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

hideSubtree() public method

Sets a location to be hidden, and it self + all children to invisible.
public hideSubtree ( string $pathString )
$pathString string
    public function hideSubtree($pathString)
    {
        $query = $this->handler->createUpdateQuery();
        $query->update($this->handler->quoteTable('ezcontentobject_tree'))->set($this->handler->quoteColumn('is_invisible'), $query->bindValue(1))->set($this->handler->quoteColumn('modified_subnode'), $query->bindValue(time()))->where($query->expr->like($this->handler->quoteColumn('path_string'), $query->bindValue($pathString . '%')));
        $query->prepare()->execute();
        $query = $this->handler->createUpdateQuery();
        $query->update($this->handler->quoteTable('ezcontentobject_tree'))->set($this->handler->quoteColumn('is_hidden'), $query->bindValue(1))->where($query->expr->eq($this->handler->quoteColumn('path_string'), $query->bindValue($pathString)));
        $query->prepare()->execute();
    }