eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase::assignSectionToContent PHP Метод

assignSectionToContent() публичный Метод

Inserts the assignment of $contentId to $sectionId.
public assignSectionToContent ( integer $sectionId, integer $contentId )
$sectionId integer
$contentId integer
    public function assignSectionToContent($sectionId, $contentId)
    {
        $query = $this->dbHandler->createUpdateQuery();
        $query->update($this->dbHandler->quoteTable('ezcontentobject'))->set($this->dbHandler->quoteColumn('section_id'), $query->bindValue($sectionId, null, \PDO::PARAM_INT))->where($query->expr->eq($this->dbHandler->quoteColumn('id'), $query->bindValue($contentId, null, \PDO::PARAM_INT)));
        $query->prepare()->execute();
    }