eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::trashLocation PHP Method

trashLocation() public method

The associated content object is left untouched.
public trashLocation ( mixed $locationId ) : boolean
$locationId mixed
return boolean
    public function trashLocation($locationId)
    {
        $locationRow = $this->getBasicNodeData($locationId);
        /** @var $query \eZ\Publish\Core\Persistence\Database\InsertQuery */
        $query = $this->handler->createInsertQuery();
        $query->insertInto($this->handler->quoteTable('ezcontentobject_trash'));
        unset($locationRow['contentobject_is_published']);
        foreach ($locationRow as $key => $value) {
            $query->set($key, $query->bindValue($value));
        }
        $query->prepare()->execute();
        $this->removeLocation($locationRow['node_id']);
        $this->setContentStatus($locationRow['contentobject_id'], ContentInfo::STATUS_ARCHIVED);
    }