ApiPlatform\Core\Metadata\Property\PropertyMetadata::isReadable PHP Метод

isReadable() публичный метод

Is readable?
public isReadable ( ) : boolean | null
Результат boolean | null
    public function isReadable()
    {
        return $this->readable;
    }

Usage Example

 /**
  * Sets readable/writable based on matching normalization/denormalization groups.
  *
  * A false value is never reset as it could be unreadable/unwritable for other reasons.
  * If normalization/denormalization groups are not specified, the property is implicitly readable/writable.
  *
  * @param PropertyMetadata $propertyMetadata
  * @param string           $resourceClass
  * @param string           $propertyName
  * @param string[]|null    $normalizationGroups
  * @param string[]|null    $denormalizationGroups
  *
  * @return PropertyMetadata
  */
 private function transformReadWrite(PropertyMetadata $propertyMetadata, string $resourceClass, string $propertyName, array $normalizationGroups = null, array $denormalizationGroups = null) : PropertyMetadata
 {
     $groups = $this->getPropertySerializerGroups($resourceClass, $propertyName);
     if (false !== $propertyMetadata->isReadable()) {
         $propertyMetadata = $propertyMetadata->withReadable(null === $normalizationGroups || !empty(array_intersect($normalizationGroups, $groups)));
     }
     if (false !== $propertyMetadata->isWritable()) {
         $propertyMetadata = $propertyMetadata->withWritable(null === $denormalizationGroups || !empty(array_intersect($denormalizationGroups, $groups)));
     }
     return $propertyMetadata;
 }
All Usage Examples Of ApiPlatform\Core\Metadata\Property\PropertyMetadata::isReadable