1 | <?php |
||
43 | class Builder |
||
44 | { |
||
45 | /** |
||
46 | * @var IdBuilder |
||
47 | */ |
||
48 | protected $variantIdBuilder; |
||
49 | |||
50 | /** |
||
51 | * Builder constructor. |
||
52 | * @param IdBuilder|null $variantIdBuilder |
||
53 | */ |
||
54 | public function __construct(IdBuilder $variantIdBuilder = null) |
||
58 | |||
59 | /** |
||
60 | * This method can be used to build an Apache_Solr_Document from a TYPO3 page. |
||
61 | * |
||
62 | * @param TypoScriptFrontendController $page |
||
63 | * @param string $url |
||
64 | * @param Rootline $pageAccessRootline |
||
65 | * @param string $mountPointParameter |
||
66 | * @return Apache_Solr_Document|object |
||
67 | */ |
||
68 | public function fromPage(TypoScriptFrontendController $page, $url, Rootline $pageAccessRootline, $mountPointParameter) |
||
119 | |||
120 | /** |
||
121 | * @param TypoScriptFrontendController $page |
||
122 | * @param string $accessGroups |
||
123 | * @param string $mountPointParameter |
||
124 | * @return string |
||
125 | */ |
||
126 | protected function getPageDocumentId($page, $accessGroups, $mountPointParameter) |
||
130 | |||
131 | /** |
||
132 | * @param integer $pageId |
||
133 | * @return Site |
||
134 | */ |
||
135 | protected function getSiteByPageId($pageId) |
||
139 | |||
140 | /** |
||
141 | * @param string $pageContent |
||
142 | * @return Typo3PageContentExtractor |
||
143 | */ |
||
144 | protected function getExtractorForPageContent($pageContent) |
||
148 | |||
149 | /** |
||
150 | * Builds the content for the rootline field. |
||
151 | * |
||
152 | * @param int $pageId |
||
153 | * @param string $mountPointParameter |
||
154 | * @return string |
||
155 | */ |
||
156 | protected function getRootLineFieldValue($pageId, $mountPointParameter) |
||
164 | |||
165 | /** |
||
166 | * Gets a comma separated list of frontend user groups to use for the |
||
167 | * document ID. |
||
168 | * |
||
169 | * @param Rootline $pageAccessRootline |
||
170 | * @return string A comma separated list of frontend user groups. |
||
171 | */ |
||
172 | protected function getDocumentIdGroups(Rootline $pageAccessRootline) |
||
185 | |||
186 | /** |
||
187 | * Adds the access field to the document if needed. |
||
188 | * |
||
189 | * @param \Apache_Solr_Document $document |
||
190 | * @param Rootline $pageAccessRootline |
||
191 | */ |
||
192 | protected function addAccessField(\Apache_Solr_Document $document, Rootline $pageAccessRootline) |
||
199 | |||
200 | /** |
||
201 | * Adds the endtime field value to the Apache_Solr_Document. |
||
202 | * |
||
203 | * @param \Apache_Solr_Document $document |
||
204 | * @param array $pageRecord |
||
205 | */ |
||
206 | protected function addEndtimeField(\Apache_Solr_Document $document, $pageRecord) |
||
212 | |||
213 | /** |
||
214 | * Adds keywords, multi valued. |
||
215 | * |
||
216 | * @param \Apache_Solr_Document $document |
||
217 | * @param array $pageRecord |
||
218 | */ |
||
219 | protected function addKeywordsField(\Apache_Solr_Document $document, $pageRecord) |
||
230 | |||
231 | /** |
||
232 | * Add content from several tags like headers, anchors, ... |
||
233 | * |
||
234 | * @param \Apache_Solr_Document $document |
||
235 | * @param array $tagContent |
||
236 | */ |
||
237 | protected function addTagContentFields(\Apache_Solr_Document $document, $tagContent = []) |
||
243 | } |
||
244 |