本文整理汇总了PHP中TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractViewHelper类的具体用法?PHP AbstractViewHelper怎么用?PHP AbstractViewHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractViewHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: injectDependenciesIntoViewHelper
/**
* @param \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper
* @return void
*/
protected function injectDependenciesIntoViewHelper(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)
{
$viewHelper->_set('configurationManager', $this->mockConfigurationManager);
parent::injectDependenciesIntoViewHelper($viewHelper);
$this->mvcPropertyMapperConfigurationService->_set('hashService', new \TYPO3\CMS\Extbase\Security\Cryptography\HashService());
$viewHelper->_set('mvcPropertyMapperConfigurationService', $this->mvcPropertyMapperConfigurationService);
}
示例2: injectDependenciesIntoViewHelper
/**
* @param \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper
* @return void
*/
protected function injectDependenciesIntoViewHelper(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)
{
$viewHelper->_set('configurationManager', $this->mockConfigurationManager);
parent::injectDependenciesIntoViewHelper($viewHelper);
$hashService = $this->getMock(\TYPO3\CMS\Extbase\Security\Cryptography\HashService::class, array('appendHmac'));
$hashService->expects($this->any())->method('appendHmac')->will($this->returnValue(''));
$this->mvcPropertyMapperConfigurationService->_set('hashService', $hashService);
$viewHelper->_set('mvcPropertyMapperConfigurationService', $this->mvcPropertyMapperConfigurationService);
$viewHelper->_set('hashService', $hashService);
}
示例3: processDisablesEscapingInterceptorIfViewHelperDisablesIt
/**
* @test
*/
public function processDisablesEscapingInterceptorIfViewHelperDisablesIt()
{
$interceptorPosition = \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER;
$this->mockViewHelper->expects($this->once())->method('isEscapingInterceptorEnabled')->will($this->returnValue(FALSE));
$this->mockNode->expects($this->once())->method('getUninitializedViewHelper')->will($this->returnValue($this->mockViewHelper));
$this->assertTrue($this->escapeInterceptor->_get('interceptorEnabled'));
$this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState);
$this->assertFalse($this->escapeInterceptor->_get('interceptorEnabled'));
}
示例4: initializeArguments
/**
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('partial', 'string', 'Partial to render, with or without section');
$this->registerArgument('section', 'string', 'Section', false, NULL);
$this->registerArgument('arguments', 'array', 'Array of variables to be transferred. Use {_all} for all variables', FALSE, array());
}
示例5: initializeArguments
/**
* Register arguments.
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('haystack', 'array', 'Array to search', TRUE);
$this->registerArgument('needle', 'string', 'Needle to search', TRUE);
$this->registerArgument('strict', 'boolean', 'Strict mode?', FALSE, FALSE);
}
示例6: initializeArguments
/**
* Register arguments.
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('prefix', 'string', 'prefix', TRUE);
$this->registerArgument('prefixSprint', 'string', 'prefix sprintf string', TRUE);
$this->registerArgument('array', 'array', 'values', TRUE);
}
示例7: getMenuItemEntry
/**
* Fix error with hidden pages not showing correctly with shortcuts.
*
* @param array $page
* @param array $rootLine
* @return array
*/
protected function getMenuItemEntry($page, $rootLine)
{
$page = parent::getMenuItemEntry($page, $rootLine);
$page['hasSubPages'] = count($this->getSubmenu($page['uid'])) > 0 ? 1 : 0;
$page['class'] = implode(' ', $this->getItemClass($page));
return $page;
}
示例8: initializeArguments
/**
* Registers own arguments.
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('data', 'array', 'The array to output as CSV line', false, null);
$this->registerArgument('fieldDelimiter', 'string', 'The string to use as a column separator', false, ',');
$this->registerArgument('fieldEnclosure', 'string', 'The string to enclose the field content in', false, '"');
}
示例9: initializeArguments
/**
* Register arguments.
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('record', '\\File_MARC_Record|boolean', 'The decoded MARC record', FALSE, NULL);
$this->registerArgument('path', 'string', 'The MARC path', FALSE, NULL);
$this->registerArgument('index', 'integer', 'If return data might be an array, define which index should be returned', FALSE, NULL);
}
示例10: initializeArguments
/**
*
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('renderLink', 'bool', 'If true the image is wrapped with a link if one is configured in the file reference', false, true);
$this->registerArgument('maxHeight', 'int', 'maximum height', false, PHP_INT_MAX);
$this->registerArgument('maxWidth', 'int', 'maximum width', false, PHP_INT_MAX);
}
示例11: initializeArguments
/**
* Register arguments.
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('data', 'array', 'The data checked against the blacklist', TRUE, NULL);
$this->registerArgument('blacklist', 'array', 'The blacklist to be parsed', TRUE, NULL);
$this->registerArgument('blacklistOnKeys', 'boolean', 'Blacklist on array values (default: false) or array keys (true)', FALSE, FALSE);
}
示例12: initializeArguments
/**
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('section', 'integer', 'Section Number', false, 0);
$this->registerArgument('row', 'integer', 'Row Number', false, 0);
$this->registerArgument('column', 'integer', 'Column Number', false, 0);
}
示例13: initializeArguments
/**
* Registers own arguments.
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('format', 'string', 'The linked data format to create', false, 'turtle');
$this->registerArgument('prefixes', 'array', 'The namespace names to use', false, []);
$this->registerArgument('name', 'string', 'The name of the template variable to store the data in', false, 'linkedDataContainer');
}
示例14: initializeArguments
/**
* Register arguments.
* @return void
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('string', 'string', 'The string to split into components', TRUE, NULL);
$this->registerArgument('lengths', 'string', 'The lengths seperated, by an "," to seperate the string', TRUE);
$this->registerArgument('placeholder', 'string', 'The string that is used to mark a offset as not used', FALSE, '|');
}
示例15: initializeArguments
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('parameter', 'string', 'Target used for external links', TRUE);
$this->registerArgument('parameterStdWrap', 'array', 'Target used for external links');
$this->registerArgument('useCacheHash', 'array', 'Target used for external links', FALSE, TRUE);
$this->registerArgument('extTarget', 'string', 'Target used for external links');
$this->registerArgument('extTargetStdWrap', 'array', 'stdWrap');
$this->registerArgument('fileTarget', 'string', 'Target used for file links');
$this->registerArgument('fileTargetStdWrap', 'array', 'stdWrap');
$this->registerArgument('target', 'string', 'Target used for internal links');
$this->registerArgument('targetStdWrap', 'array', 'stdWrap');
$this->registerArgument('additionalParams', 'array', 'This is parameters that are added to the end of the URL.');
$this->registerArgument('additionalParamsStdWrap', 'array', 'stdWrap, eg.: {data: "TSFE : id"}');
$this->registerArgument('forceAbsoluteUrl', 'boolean', 'Forces links to internal pages to be absolute, thus having a proper URL scheme and domain prepended.');
$this->registerArgument('forceAbsoluteUrlArray', 'array', 'forceAbsoluteUrl settings');
$this->registerArgument('addQueryString', 'boolean', 'Add the QUERY_STRING to the start of the link.');
$this->registerArgument('addQueryStringArray', 'array', 'addQueryString settings');
$this->registerArgument('jumpurl', 'boolean', 'Decides if the link should call the script with the jumpurl parameter in order to register any clicks in statistics.');
$this->registerArgument('jumpurlArray', 'array', 'jumpurl settings');
$this->registerArgument('wrap', 'string', 'Wraps the links.');
$this->registerArgument('wrapStdWrap', 'array', 'stdWrap');
$this->registerArgument('ATagBeforeWrap', 'string', 'If set, the link is first wrapped with ".wrap" and then the A-tag.');
$this->registerArgument('ATagBeforeWrapStdWrap', 'array', 'stdWrap');
$this->registerArgument('linkAccessRestrictedPages', 'boolean', 'If set, typolinks pointing to access restricted pages will still link to the page even though the page cannot be accessed.');
$this->registerArgument('userFunc', 'string', 'This passes the link-data compiled by the typolink function to a user- defined function for final manipulation.');
}