Jsor\Doctrine\PostGIS\Event\DBALSchemaEventSubscriber::onSchemaDropTable PHP Method

onSchemaDropTable() public method

public onSchemaDropTable ( Doctrine\DBAL\Event\SchemaDropTableEventArgs $args )
$args Doctrine\DBAL\Event\SchemaDropTableEventArgs
    public function onSchemaDropTable(SchemaDropTableEventArgs $args)
    {
        if ($this->schemaManager->isPostGis2()) {
            return;
        }
        $table = $args->getTable();
        $hasSpatialGeometryColumn = count($this->schemaManager->listSpatialGeometryColumns($table->getName())) > 0;
        if ($hasSpatialGeometryColumn) {
            $args->setSql("SELECT DropGeometryTable('" . $table->getName() . "')")->preventDefault();
        }
    }