eZ\Publish\Core\REST\Common\RequestParser::generate PHP Метод

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

Generate a URL of the given type from the specified values.
public generate ( string $type, array $values = [] ) : string
$type string
$values array
Результат string
    public function generate($type, array $values = array());

Usage Example

Пример #1
0
 /**
  * Returns a collection of Trashed locations contained in the trash.
  *
  * $query allows to filter/sort the elements to be contained in the collection.
  *
  * @param \eZ\Publish\API\Repository\Values\Content\Query $query
  *
  * @return \eZ\Publish\API\Repository\Values\Content\SearchResult
  */
 public function findTrashItems(Query $query)
 {
     $response = $this->client->request('GET', $this->requestParser->generate('trashItems'), new Message(array('Accept' => $this->outputVisitor->getMediaType('LocationList'))));
     $locations = $this->inputDispatcher->parse($response);
     $trashItems = array();
     foreach ($locations as $location) {
         $trashItems[] = $this->buildTrashItem($location);
     }
     return $trashItems;
 }
All Usage Examples Of eZ\Publish\Core\REST\Common\RequestParser::generate