eZ\Publish\Core\Persistence\Cache\ContentTypeHandler::update PHP Метод

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

См. также: eZ\Publish\SPI\Persistence\Content\Type\Handler::update
public update ( $typeId, $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $struct )
$struct eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct
    public function update($typeId, $status, UpdateStruct $struct)
    {
        $this->logger->logCall(__METHOD__, array('type' => $typeId, 'status' => $status, 'struct' => $struct));
        if ($status !== Type::STATUS_DEFINED) {
            return $this->persistenceHandler->contentTypeHandler()->update($typeId, $status, $struct);
        }
        // Warm cache
        $this->cache->getItem('contentType', $typeId)->set($type = $this->persistenceHandler->contentTypeHandler()->update($typeId, $status, $struct))->save();
        // Clear identifier cache in case it was changed before warming the new one
        $this->cache->clear('contentType', 'identifier');
        $this->cache->clear('searchableFieldMap');
        $this->cache->getItem('contentType', 'identifier', $type->identifier)->set($typeId)->save();
        return $type;
    }