| 1 | <?php |
||
| 13 | class TokenHandler { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The token service. |
||
| 17 | * |
||
| 18 | * @var \Drupal\Core\Utility\Token |
||
| 19 | */ |
||
| 20 | protected $token; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Inject token dependencies. |
||
| 24 | * |
||
| 25 | * @param \Drupal\Core\Utility\Token $token |
||
| 26 | * The token service. |
||
| 27 | */ |
||
| 28 | public function __construct(Token $token) { |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public static function create(ContainerInterface $container) { |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get view arguments array from string that contains tokens. |
||
| 43 | * |
||
| 44 | * @param string $string |
||
| 45 | * The token string defined by the view. |
||
| 46 | * @param string $type |
||
| 47 | * The token type. |
||
| 48 | * @param object $object |
||
| 49 | * The object being used for replacement data (typically a node). |
||
| 50 | * |
||
| 51 | * @return array |
||
| 52 | * An array of argument values. |
||
| 53 | */ |
||
| 54 | public function getArgumentsFromTokenString($string, $type, $object) { |
||
| 62 | |||
| 63 | } |
||
| 64 |