TYPO3 CMS  TYPO3_6-2
PageViewHelper.php
Go to the documentation of this file.
1 <?php
3 
4 /* *
5  * This script is part of the TYPO3 project - inspiring people to share! *
6  * *
7  * TYPO3 is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU General Public License version 2 as published by *
9  * the Free Software Foundation. *
10  * *
11  * This script is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
13  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
14  * Public License for more details. *
15  * */
46 
50  protected $tagName = 'a';
51 
57  public function initializeArguments() {
59  $this->registerTagAttribute('target', 'string', 'Target of link', FALSE);
60  $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document', FALSE);
61  }
62 
77  public function render($pageUid = NULL, array $additionalParams = array(), $pageType = 0, $noCache = FALSE, $noCacheHash = FALSE, $section = '', $linkAccessRestrictedPages = FALSE, $absolute = FALSE, $addQueryString = FALSE, array $argumentsToBeExcludedFromQueryString = array(), $addQueryStringMethod = NULL) {
78  $uriBuilder = $this->controllerContext->getUriBuilder();
79  $uri = $uriBuilder->reset()
80  ->setTargetPageUid($pageUid)
81  ->setTargetPageType($pageType)
82  ->setNoCache($noCache)
83  ->setUseCacheHash(!$noCacheHash)
84  ->setSection($section)
85  ->setLinkAccessRestrictedPages($linkAccessRestrictedPages)
86  ->setArguments($additionalParams)
87  ->setCreateAbsoluteUri($absolute)
88  ->setAddQueryString($addQueryString)
89  ->setArgumentsToBeExcludedFromQueryString($argumentsToBeExcludedFromQueryString)
90  ->setAddQueryStringMethod($addQueryStringMethod)
91  ->build();
92  if (strlen($uri)) {
93  $this->tag->addAttribute('href', $uri);
94  $this->tag->setContent($this->renderChildren());
95  $result = $this->tag->render();
96  } else {
97  $result = $this->renderChildren();
98  }
99  return $result;
100  }
101 }
registerTagAttribute($name, $type, $description, $required=FALSE, $default=NULL)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.