/**
  * Get the name of a route action
  *
  * @param ApiResource $parentResource
  * @return string
  */
 public function getRouteName(ApiResource $parentResource = null)
 {
     $parentResourceName = $parentResource ? '.' . $parentResource->getName() : '';
     return $this->apiResource->getBundlePrefix() . $parentResourceName . '.' . $this->apiResource->getName() . '.' . $this->action;
 }
 /**
  * @param ApiResource $resource
  * @return string
  */
 public static function getFilterName(ApiResource $resource)
 {
     return $resource->getBundlePrefix() . '_' . $resource->getName();
 }
 /**
  * @param $routeName
  * @param ApiResource $resource
  * @return string
  */
 private function getSection($routeName, ApiResource $resource)
 {
     $prefixPos = strlen($resource->getBundlePrefix() . '.');
     $nextDot = strpos($routeName, '.', $prefixPos);
     $resourceName = substr($routeName, $prefixPos, $nextDot - $prefixPos);
     $parentResource = $this->manager->getResource($resourceName);
     return ucwords($parentResource->getName());
 }