eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase::loadFieldDefinition PHP Method

loadFieldDefinition() public method

Loads an array with data about field definition referred $id and $status.
public loadFieldDefinition ( mixed $id, integer $status ) : array
$id mixed field definition id
$status integer One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
return array Data rows.
    public function loadFieldDefinition($id, $status)
    {
        $q = $this->dbHandler->createSelectQuery();
        $this->selectColumns($q, 'ezcontentclass_attribute');
        $q->from($this->dbHandler->quoteTable('ezcontentclass_attribute'))->where($q->expr->lAnd($q->expr->eq($this->dbHandler->quoteColumn('id', 'ezcontentclass_attribute'), $q->bindValue($id, null, \PDO::PARAM_INT)), $q->expr->eq($this->dbHandler->quoteColumn('version', 'ezcontentclass_attribute'), $q->bindValue($status, null, \PDO::PARAM_INT))));
        $stmt = $q->prepare();
        $stmt->execute();
        return $stmt->fetch(\PDO::FETCH_ASSOC);
    }