Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function getFieldSet($type)
 {
     settype($type, 'string');
     if (array_key_exists($type, $this->fieldSetCache) === false) {
         $fieldSet = $this->parameters->getFieldSet($type);
         $this->fieldSetCache[$type] = $fieldSet === null ? null : array_flip(array_values($fieldSet));
     }
     return $this->fieldSetCache[$type];
 }
 /**
  * If relationship from 'parent' to 'current' resource passes field set filter.
  *
  * @param Frame $current
  * @param Frame $previous
  *
  * @return bool
  */
 private function isRelationshipInFieldSet(Frame $current, Frame $previous)
 {
     if (($fieldSet = $this->parameters->getFieldSet($previous->getResource()->getType())) === null) {
         return true;
     }
     return in_array($current->getRelationship()->getName(), $fieldSet, true) === true;
 }
Beispiel #3
0
 /**
  * @inheritdoc
  */
 public function getFieldSet($type)
 {
     $fieldSet = $this->parameters->getFieldSet($type);
     return $fieldSet === null ? null : array_flip(array_values($fieldSet));
 }