/** * Removes a field definition from an existing Type. * * This method creates a new status of the Type with the field definition * referred to by $fieldDefinitionId removed. It does not update existing * content objects depending on the field (default) values. * * @param mixed $contentTypeId * @param mixed $fieldDefinitionId * * @return boolean */ public function removeFieldDefinition( $contentTypeId, $status, $fieldDefinitionId ) { $this->contentTypeGateway->deleteFieldDefinition( $contentTypeId, $status, $fieldDefinitionId ); // @todo FIXME: Return true only if deletion happened return true; }
/** * Deletes a field definition. * * @param mixed $typeId * @param int $status * @param mixed $fieldDefinitionId */ public function deleteFieldDefinition($typeId, $status, $fieldDefinitionId) { try { return $this->innerGateway->deleteFieldDefinition($typeId, $status, $fieldDefinitionId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }