isNodeType() public method

{@inheritDoc}
public isNodeType ( $nodeTypeName )
 /**
  * @param Node $node
  */
 private function clearNodeCache(Node $node)
 {
     $cacheKey = "nodes: {$node->getPath()}, " . $this->workspaceName;
     $this->caches['node']->delete($cacheKey);
     // actually in the DBAL all nodes have a uuid ..
     if ($node->isNodeType('mix:referenceable')) {
         $uuid = $node->getIdentifier();
         $cacheKey = "nodes by uuid: {$uuid}, " . $this->workspaceName;
         $this->caches['node']->delete($cacheKey);
     }
 }
Ejemplo n.º 2
0
 /**
  * Update the lastModified fields if they where not set manually.
  *
  * Note that we can drop this if this jackrabbit issue ever gets
  * implemented https://issues.apache.org/jira/browse/JCR-2233
  *
  * @param Node $node
  */
 protected function updateLastModified(Node $node)
 {
     if (!$this->getAutoLastModified() || !$node->isNodeType('mix:lastModified')) {
         return;
     }
     if ($node->hasProperty('jcr:lastModified') && !$node->getProperty('jcr:lastModified')->isModified() && !$node->getProperty('jcr:lastModified')->isNew()) {
         $node->setProperty('jcr:lastModified', new \DateTime());
     }
     if ($node->hasProperty('jcr:lastModifiedBy') && !$node->getProperty('jcr:lastModifiedBy')->isModified() && !$node->getProperty('jcr:lastModifiedBy')->isNew()) {
         $node->setProperty('jcr:lastModifiedBy', $this->credentials->getUserID());
     }
 }