/**
  * Register arguments.
  * @return void
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('query', 'string|array', 'Solr querystring or array of query fields and their query values.', TRUE);
     $this->registerArgument('operator', 'string', 'Solr query operator.', FALSE, 'AND');
     $this->registerArgument('sortField', 'string', 'Sort field.', FALSE);
     $this->registerArgument('sortOrder', 'string', 'Sort order ("asc" or "desc").', FALSE, 'asc');
     $this->registerArgument('rows', 'integer', 'Number of rows to be returned.', FALSE);
     $this->registerArgument('fields', 'string', 'Fields to be returned, comma seperated if more than one field.', FALSE);
 }
Esempio n. 2
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('pattern', 'string', 'regex pattern to match string against', TRUE);
     $this->registerArgument('string', 'string', 'string to match with the regex pattern', TRUE);
     $this->registerArgument('global', 'boolean', 'match global', FALSE, FALSE);
 }
Esempio n. 3
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('pageUid', 'integer', 'value to check', FALSE, NULL);
     $this->registerArgument('includeHidden', 'boolean', 'include hidden pages', FALSE, FALSE);
     $this->registerArgument('showHiddenInMenu', 'boolean', 'include pages hidden in menu', FALSE, FALSE);
 }
Esempio n. 4
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('pageUid', 'integer', 'Parent page to check', false, null);
     $this->registerArgument('includeHidden', 'boolean', 'DEPRECATED: Include hidden pages', false, false);
     $this->registerArgument('includeAccessProtected', 'boolean', 'Include access protected pages', false, false);
     $this->registerArgument('includeHiddenInMenu', 'boolean', 'Include pages hidden in menu', false, false);
     $this->registerArgument('showHiddenInMenu', 'boolean', 'DEPRECATED: Use includeHiddenInMenu', false, false);
 }
 /**
  * @test
  */
 public function elseArgumentHasPriorityOverChildNodesIfConditionIsFalse()
 {
     $mockElseViewHelperNode = $this->getMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', false);
     $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue(\TYPO3\CMS\Fluid\ViewHelpers\ElseViewHelper::class));
     $mockElseViewHelperNode->expects($this->never())->method('evaluate');
     $this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
     $this->arguments['else'] = 'ElseArgument';
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $actualResult = $this->viewHelper->_call('renderElseChild');
     $this->assertEquals('ElseArgument', $actualResult);
 }
Esempio n. 6
0
 /**
  * Initialize arguments
  *
  * @return void
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('file', 'string', 'Filename which must exist to trigger f:then rendering', FALSE);
     $this->registerArgument('directory', 'string', 'Directory which must exist to trigger f:then rendering', FALSE);
 }
Esempio n. 7
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('string', 'string', 'string to check', TRUE);
     $this->registerArgument('fullString', 'string', 'need', FALSE, FALSE);
 }
Esempio n. 8
0
 public function initializeArguments()
 {
     $this->registerArgument('newsItem', 'object', 'News item', false);
     parent::initializeArguments();
 }
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('domainObject', 'object', '', true);
     $this->registerArgument('renderCondition', 'string', '', true);
 }
Esempio n. 10
0
 /**
  * renders <f:then> child if $condition is true, otherwise renders <f:else> child.
  *
  * @param bool $condition View helper condition
  * @return string the rendered string
  * @api
  */
 public function render($condition)
 {
     return parent::render();
 }
 /**
  * Override: forcibly disables page caching - a TRUE condition
  * in this ViewHelper means page content would be depending on
  * the current visitor's session/cookie/auth etc.
  *
  * Returns value of "then" attribute.
  * If then attribute is not set, iterates through child nodes and renders ThenViewHelper.
  * If then attribute is not set and no ThenViewHelper and no ElseViewHelper is found, all child nodes are rendered
  *
  * @return string rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was found
  * @api
  */
 protected function renderThenChild()
 {
     if ('FE' === TYPO3_MODE) {
         $GLOBALS['TSFE']->no_cache = 1;
     }
     return parent::renderThenChild();
 }
Esempio n. 12
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('value', 'mixed', 'value to check', TRUE);
     $this->registerArgument('class', 'mixed', 'className to check against', TRUE);
 }
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('extensionName', 'string', 'Name of extension that must be loaded in order to evaluate as TRUE, UpperCamelCase', TRUE);
 }
 /**
  * Initialize all arguments. You need to override this method and call
  * $this->registerArgument(...) inside this method, to register all your arguments.
  *
  * @return void
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('condition', 'mixed', 'View helper condition expression, evaled', TRUE);
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->registerArgument('property', 'string', 'Property to validate', true);
 }
 /**
  * Register arguments.
  * @return void
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('highlighting', 'array', 'Result array with highlighting per document', TRUE);
     $this->registerArgument('id', 'string', 'document id to check', TRUE);
 }
Esempio n. 17
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('language', 'string', 'language to check', true);
     $this->registerArgument('defaultTitle', 'string', 'title of the default language', false, 'en');
 }
 /**
  * Override: forcibly disables page caching - a TRUE condition
  * in this ViewHelper means page content would be depending on
  * the current visitor's session/cookie/auth etc.
  *
  * Returns value of "then" attribute.
  * If then attribute is not set, iterates through child nodes and renders ThenViewHelper.
  * If then attribute is not set and no ThenViewHelper and no ElseViewHelper is found, all child nodes are rendered
  *
  * @return string rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was found
  * @api
  */
 protected function renderThenChild()
 {
     if (TRUE === $this->isFrontendContext()) {
         $GLOBALS['TSFE']->no_cache = 1;
     }
     return parent::renderThenChild();
 }
Esempio n. 19
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('value', 'string', 'value to check', TRUE);
 }
Esempio n. 20
0
 /**
  * Override: forcibly disables page caching - a TRUE condition
  * in this ViewHelper means page content would be depending on
  * the current visitor's session/cookie/auth etc.
  *
  * Returns value of "then" attribute.
  * If then attribute is not set, iterates through child nodes and renders ThenViewHelper.
  * If then attribute is not set and no ThenViewHelper and no ElseViewHelper is found, all child nodes are rendered
  *
  * @return string rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was found
  * @api
  */
 protected function renderThenChild()
 {
     $GLOBALS['TSFE']->no_cache = 1;
     return parent::renderThenChild();
 }
Esempio n. 21
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('haystack', 'string', 'haystack', TRUE);
     $this->registerArgument('needle', 'string', 'need', TRUE);
 }
 /**
  * The compiled ViewHelper adds two new ViewHelper arguments: __thenClosure and __elseClosure.
  * These contain closures which are be executed to render the then(), respectively else() case.
  *
  * @param string $argumentsVariableName
  * @param string $renderChildrenClosureVariableName
  * @param string $initializationPhpCode
  * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode
  * @param \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler
  * @return string
  * @internal
  */
 public function compile($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 {
     parent::compile($argumentsVariableName, $renderChildrenClosureVariableName, $initializationPhpCode, $syntaxTreeNode, $templateCompiler);
     return \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler::SHOULD_GENERATE_VIEWHELPER_INVOCATION;
 }
Esempio n. 23
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('name', 'string', 'name of the variable', true);
 }
Esempio n. 24
0
 /**
  * renders <f:then> child if the current logged in FE user belongs to the specified role (aka usergroup)
  * otherwise renders <f:else> child.
  *
  * @param string $role The usergroup (either the usergroup uid or its title)
  * @return string the rendered string
  * @api
  */
 public function render($role)
 {
     return parent::render();
 }
Esempio n. 25
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('string', 'string', 'string to check', true);
     $this->registerArgument('fullString', 'string', 'need', false, false);
 }
Esempio n. 26
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('pageUid', 'integer', 'value to check', false, null);
     $this->registerArgument('respectSiteRoot', 'boolean', 'value to check', false, false);
 }
Esempio n. 27
0
 /**
  * Initialize arguments
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('value', 'mixed', 'value to check', true);
 }
Esempio n. 28
0
 /**
  * Registers own arguments.
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('haystacks', 'string|array', 'Haystack to search', TRUE);
     $this->registerArgument('needle', 'string', 'Needle to be searched', TRUE);
 }