Jackalope\Transport\DoctrineDBAL\Client::getNodeTypes PHP Method

getNodeTypes() public method

{@inheritDoc}
public getNodeTypes ( $nodeTypes = [] )
    public function getNodeTypes($nodeTypes = array())
    {
        $standardTypes = StandardNodeTypes::getNodeTypeData();
        $userTypes = $this->fetchUserNodeTypes();
        if ($nodeTypes) {
            $nodeTypes = array_flip($nodeTypes);
            return array_values(array_intersect_key($standardTypes, $nodeTypes) + array_intersect_key($userTypes, $nodeTypes));
        }
        return array_values($standardTypes + $userTypes);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function getNodeTypes($nodeTypes = array())
 {
     $cacheKey = 'nodetypes: ' . serialize($nodeTypes);
     $result = $this->caches['meta']->fetch($cacheKey);
     if (!$result) {
         $result = parent::getNodeTypes($nodeTypes);
         $this->caches['meta']->save($cacheKey, $result);
     }
     return $result;
 }