/**
  * @inheritdoc
  */
 public function getFieldsToShow()
 {
     if (!array_key_exists('fieldsToShow', $this->cache)) {
         $this->cache['fieldsToShow'] = $this->storage->getFieldsToShow();
     }
     return $this->cache['fieldsToShow'];
 }
 /**
  * @param array $propertyPath
  * @return bool
  */
 public function isPropertyVisible(array $fullPropertyPath)
 {
     $fieldsToShow = $this->storage->getFieldsToShow();
     $fieldsToHide = $this->storage->getFieldsToHide();
     if ($fieldsToShow->isEmpty() && $fieldsToHide->isEmpty()) {
         return true;
     }
     $propertyName = array_pop($fullPropertyPath);
     if ($propertyName === 'id') {
         return true;
     }
     if ($fieldsToShow->hasPath($fullPropertyPath)) {
         return $fieldsToShow->hasField($fullPropertyPath, $propertyName);
     }
     if ($fieldsToHide->hasPath($fullPropertyPath)) {
         return !$fieldsToHide->hasField($fullPropertyPath, $propertyName);
     }
     return true;
 }