class EntityPagerFactory in Entity Pager 2.0.x
Same name and namespace in other branches
- 8 src/EntityPagerFactory.php \Drupal\entity_pager\EntityPagerFactory
Factory for entity pager objects.
Hierarchy
- class \Drupal\entity_pager\EntityPagerFactory
Expanded class hierarchy of EntityPagerFactory
1 string reference to 'EntityPagerFactory'
1 service uses EntityPagerFactory
File
- src/
EntityPagerFactory.php, line 11
Namespace
Drupal\entity_pagerView source
class EntityPagerFactory {
/**
* The token service.
*
* @var \Drupal\Core\Utility\Token
*/
protected $token;
/**
* EntityPagerFactory constructor.
*
* @param \Drupal\Core\Utility\Token $token
* The token service.
*/
public function __construct(Token $token) {
$this->token = $token;
}
/**
* Returns a newly constructed entity pager.
*
* @param \Drupal\views\ViewExecutable $view
* The executable to construct an entity pager for.
*
* @return \Drupal\entity_pager\EntityPagerInterface
* The entity pager object.
*/
public function get(ViewExecutable $view) {
return new EntityPager($view, $this->token);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityPagerFactory:: |
protected | property | The token service. | |
EntityPagerFactory:: |
public | function | Returns a newly constructed entity pager. | |
EntityPagerFactory:: |
public | function | EntityPagerFactory constructor. |