2 namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
49 use MenuViewHelperTrait;
58 $this->
registerArgument(
'as',
'string',
'Name of the template variable that will contain selected pages',
true);
59 $this->
registerArgument(
'column',
'integer',
'Column number (colPos) from which to select content',
false, 0);
60 $this->
registerArgument(
'pageUid',
'integer',
'UID of page containing section-objects; defaults to current page',
false, null);
61 $this->
registerArgument(
'type',
'string',
'Search method when selecting indices from page',
false,
'');
71 $as = (string)$this->arguments[
'as'];
72 $pageUid = (int)$this->arguments[
'pageUid'];
73 $type = (string)$this->arguments[
'type'];
75 if (empty($pageUid)) {
76 $pageUid = $this->getTypoScriptFrontendController()->id;
79 if (!empty($type) && !in_array($type, array(
'all',
'header'),
true)) {
83 return $this->renderChildrenWithVariables(array(
84 $as => $this->
findBySection($pageUid, $type, (
int)$this->arguments[
'column'])
107 $constraints = array(
108 'colPos = ' . (
int)$column
115 $constraints[] =
'sectionIndex = 1';
116 $constraints[] =
'header <> \'\'';
117 $constraints[] =
'header_layout <> 100';
120 $constraints[] =
'sectionIndex = 1';
123 $whereStatement = implode(
' AND ', $constraints);
125 $contentElements = $this->getTypoScriptFrontendController()->cObj->getRecords(
'tt_content', [
126 'where' => $whereStatement,
127 'orderBy' =>
'sorting',
128 'languageField = sys_language_uid',
129 'pidInList' => (
int)$pageUid
132 return $contentElements;