CodeExplorer getDependingTables example
$this->
View()->
assign('success', true
);
} public function columnNameExistsAction() { $name =
$this->
Request()->
getParam('columnName'
);
$table =
$this->
Request()->
getParam('tableName'
);
$mapping =
$this->
get(TableMappingInterface::
class);
$tables =
array_merge([$table],
$mapping->
getDependingTables($table));
$table = null;
foreach ($tables as $attributeTable) { if ($mapping->
isTableColumn($attributeTable,
$name)) { $table =
$attributeTable;
break;
} } $this->
View()->
assign([ 'exists'
=> ($table !== null
),
if ($entity) { $this->entityManager->
remove($entity);
$this->entityManager->
flush($entity);
} if (!
$updateDependingTables) { return;
} $dependingTables =
$this->tableMapping->
getDependingTables($table);
foreach ($dependingTables as $dependingTable) { $this->
delete($dependingTable,
$column);
} } /**
* {@inheritdoc}
*/
public function update( $table,
$columnName,