‪TYPO3CMS  10.4
PagePathViewHelper.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
21 
27 {
31  public function ‪initializeArguments()
32  {
33  parent::initializeArguments();
34  $this->registerArgument('pid', 'int', 'Pid of the page', true);
35  $this->registerArgument('titleLimit', 'int', 'Limit of the page title', false, 20);
36  }
37 
43  public function ‪render()
44  {
45  return static::renderStatic(
46  $this->arguments,
47  $this->buildRenderChildrenClosure(),
48  $this->renderingContext
49  );
50  }
51 
59  public static function ‪renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
60  {
61  return ‪BackendUtility::getRecordPath($arguments['pid'], '', $arguments['titleLimit']);
62  }
63 }
‪TYPO3\CMS\Belog\ViewHelpers\Be\PagePathViewHelper
Definition: PagePathViewHelper.php:27
‪TYPO3\CMS\Belog\ViewHelpers\Be
Definition: PagePathViewHelper.php:16
‪TYPO3\CMS\Belog\ViewHelpers\Be\PagePathViewHelper\render
‪string render()
Definition: PagePathViewHelper.php:43
‪TYPO3\CMS\Belog\ViewHelpers\Be\PagePathViewHelper\renderStatic
‪static string renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
Definition: PagePathViewHelper.php:59
‪TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
Definition: AbstractBackendViewHelper.php:28
‪TYPO3\CMS\Belog\ViewHelpers\Be\PagePathViewHelper\initializeArguments
‪initializeArguments()
Definition: PagePathViewHelper.php:31
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath
‪static mixed getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)
Definition: BackendUtility.php:546