Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getColumnForeignKey example
protected
function
getPropertyNameOfColumnName
(
$table
,
$column
)
{
$foreignKey
=
$this
->
getColumnForeignKey
(
$table
,
$column
)
;
if
(
$foreignKey
instanceof \Doctrine\DBAL\Schema\ForeignKeyConstraint
)
{
$table
=
$foreignKey
->
getForeignTableName
(
)
;
$fullName
=
$this
->
getClassNameOfTableName
(
$table
)
;
return
lcfirst
(
$fullName
)
. 'Id';
}
return
lcfirst
(
$this
->
underscoreToCamelCase
(
$column
->
getName
(
)
)
)
;
}