eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\DoctrineDatabase::loadObjectStateDataForContent PHP Method

loadObjectStateDataForContent() public method

Loads object state data for $contentId content from $stateGroupId state group.
public loadObjectStateDataForContent ( integer $contentId, integer $stateGroupId ) : array
$contentId integer
$stateGroupId integer
return array
    public function loadObjectStateDataForContent($contentId, $stateGroupId)
    {
        $query = $this->createObjectStateFindQuery();
        $query->innerJoin($this->dbHandler->quoteTable('ezcobj_state_link'), $query->expr->eq($this->dbHandler->quoteColumn('id', 'ezcobj_state'), $this->dbHandler->quoteColumn('contentobject_state_id', 'ezcobj_state_link')))->where($query->expr->lAnd($query->expr->eq($this->dbHandler->quoteColumn('group_id', 'ezcobj_state'), $query->bindValue($stateGroupId, null, \PDO::PARAM_INT)), $query->expr->eq($this->dbHandler->quoteColumn('contentobject_id', 'ezcobj_state_link'), $query->bindValue($contentId, null, \PDO::PARAM_INT))));
        $statement = $query->prepare();
        $statement->execute();
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }