/** * Renders link for an image * * @param int $itemUid UID of item to render link for * @param Tx_Yag_Domain_Model_Item $item Item to render a link to * @param int pageUid (Optional) ID of page to render link for. If null, current page is used * @param integer $pageType type of the target page. See typolink.parameter * @return string Rendered link for album * @throws Exception */ public function render($itemUid = null, Tx_Yag_Domain_Model_Item $item = null, $pageUid = null, $pageType = 0) { if ($itemUid === null && $item === null) { throw new Exception('You have to set "imageUid" or "item" as parameter. Both parameters can not be empty when using imageLinkViewHelper', 1358059753); } if ($itemUid === null) { $itemUid = $item->getUid(); } return parent::render('showSingle', array('item' => $itemUid), 'Item', null, null, $pageUid, $pageType); }
/** * Renders link for an album * * @param Tx_Yag_Domain_Model_Album $album Album object to render link for * @param Tx_Yag_Domain_Model_Gallery $gallery Gallery object to render link for * @param integer $pageUid * @param integer $pageType type of the target page. See typolink.parameter * @param integer $pageType type of the target page. See typolink.parameter * @param boolean $noCache set this to disable caching for the target page. You should not need this. * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this. * @param string $section the anchor to be added to the URI * @param string $format The requested format, e.g. ".html" * @return string Rendered link for album * @throws Exception */ public function render(Tx_Yag_Domain_Model_Album $album = null, Tx_Yag_Domain_Model_Gallery $gallery = null, $pageUid = null, $pageType = 0, $noCache = false, $noCacheHash = false, $section = '', $format = '') { // TODO implement gallery download if ($album instanceof Tx_Yag_Domain_Model_Album) { $namespace = Tx_Yag_Domain_Context_YagContextFactory::getInstance()->getObjectNamespace() . '.albumUid'; $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($namespace, array(), $album->getUid()); } Tx_PtExtbase_State_Session_SessionPersistenceManagerFactory::getInstance()->addSessionRelatedArguments($arguments); return parent::render('downloadAsZip', $arguments, 'ItemList', null, null, $pageUid, $pageType, $noCache, $noCacheHash, $section, $format); }
/** * Renders link for an album * * @param int $galleryUid UID of album to render link for * @param Tx_Yag_Domain_Model_Gallery $gallery Album object to render link for * @param int $pageUid (Optional) ID of page to render link for. If null, current page is used * @param int $pageType * @param bool $noCache * @param bool $noCacheHash * @param string $section * @param string $format * @throws Exception * @return string Rendered link for gallery * */ public function render($galleryUid = null, Tx_Yag_Domain_Model_Gallery $gallery = null, $pageUid = null, $pageType = 0, $noCache = false, $noCacheHash = false, $section = '', $format = '') { if ($galleryUid === null && $gallery === null) { throw new Exception('You have to set "galleryUid" or "gallery" as parameter. Both parameters can not be empty when using galleryLinkViewHelper', 1295575455); } if ($galleryUid === null) { $galleryUid = $gallery->getUid(); } $namespace = Tx_Yag_Domain_Context_YagContextFactory::getInstance()->getObjectNamespace() . '.galleryUid'; $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($namespace, array(), $galleryUid); return parent::render('index', $arguments, 'Gallery', null, null, $pageUid, $pageType, $noCache, $noCacheHash, $section, $format); }
/** * Renders the link to an image * * @param array $arguments Arguments * @param integer $pageUid target page. See TypoLink destination * @param integer $pageType type of the target page. See typolink.parameter * @param boolean $noCache set this to disable caching for the target page. You should not need this. * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this. * @param string $section the anchor to be added to the URI * @param string $format The requested format, e.g. ".html" * @param boolean $linkAccessRestrictedPages If set, links pointing to access restricted pages will still link to the page even though the page cannot be accessed. * @param array $additionalParams additional query parameters that won't be prefixed like $arguments (overrule $arguments) * @param boolean $absolute If set, the URI of the rendered link is absolute * @param boolean $addQueryString If set, the current query parameters will be kept in the URI * @param array $argumentsToBeExcludedFromQueryString arguments to be removed from the URI. Only active if $addQueryString = TRUE * @return string Rendered link */ public function render($pageUid = null, $pageType = 0, array $arguments = array(), $noCache = false, $noCacheHash = false, $section = '', $format = '', $linkAccessRestrictedPages = false, array $additionalParams = array(), $absolute = false, $addQueryString = false, array $argumentsToBeExcludedFromQueryString = array()) { $objectNameSpace = $namespace = Tx_Yag_Domain_Context_YagContextFactory::getInstance()->getObjectNamespace(); $arguments = array(); if (isset($this->arguments['album'])) { $albumUid = $this->arguments['album']->getUid(); $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($objectNameSpace . '.albumUid', $arguments, $albumUid); } if (isset($this->arguments['gallery'])) { $galleryUid = $this->arguments['gallery']->getUid(); $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($objectNameSpace . '.galleryUid', $arguments, $galleryUid); } Tx_PtExtbase_State_Session_SessionPersistenceManagerFactory::getInstance()->addSessionRelatedArguments($arguments); return parent::render('show', $arguments, 'Item', null, null, $pageUid, $pageType, $noCache, $noCacheHash, $section, $format, $linkAccessRestrictedPages, $additionalParams, $absolute, $addQueryString, $argumentsToBeExcludedFromQueryString); }
/** * Renders link for an album * * @param integer $albumUid UID of album to render link for * @param Tx_Yag_Domain_Model_Album $album Album object to render link for * @param Tx_Yag_Domain_Model_Gallery $gallery Gallery object to render link for * @param integer pageUid (Optional) ID of page to render link for. If null, current page is used * @param integer $pageType type of the target page. See typolink.parameter * @param integer $pageType type of the target page. See typolink.parameter * @param boolean $noCache set this to disable caching for the target page. You should not need this. * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this. * @param string $section the anchor to be added to the URI * @param string $format The requested format, e.g. ".html" * @return string Rendered link for album * @throws Exception */ public function render($albumUid = 0, Tx_Yag_Domain_Model_Album $album = NULL, Tx_Yag_Domain_Model_Gallery $gallery = NULL, $pageUid = NULL, $pageType = 0, $noCache = FALSE, $noCacheHash = FALSE, $section = '', $format = '') { if ($albumUid == 0 && $album === NULL) { throw new Exception('You have to set "albumUid" or "album" as parameter. Both parameters can not be empty when using albumLinkViewHelper', 1295575454); } if ($albumUid == 0) { $albumUid = $album->getUid(); } $baseNamespace = Tx_Yag_Domain_Context_YagContextFactory::getInstance()->getObjectNamespace(); $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($baseNamespace . '.albumUid', array(), $albumUid); if ($gallery !== NULL) { $arguments = Tx_PtExtbase_Utility_NameSpace::saveDataInNamespaceTree($baseNamespace . '.galleryUid', $arguments, $gallery->getUid()); } return parent::render('submitFilter', $arguments, 'ItemList', NULL, NULL, $pageUid, $pageType, $noCache, $noCacheHash, $section, $format); }