Puli\Repository\Api\Resource\PuliResource::hasChildren PHP Метод

hasChildren() публичный Метод

Returns whether the resource has child resources.
public hasChildren ( ) : boolean
Результат boolean Returns `true` if the resource has child resources.
    public function hasChildren();

Usage Example

Пример #1
0
 /**
  * Formats the name of the resource.
  *
  * Resources with children are colored.
  *
  * @param PuliResource $resource The resource.
  *
  * @return string|null The formatted name.
  */
 private function formatName(PuliResource $resource)
 {
     $name = $resource->getName();
     if ($resource->hasChildren()) {
         return '<c1>' . $name . '</c1>';
     }
     return $name;
 }
All Usage Examples Of Puli\Repository\Api\Resource\PuliResource::hasChildren