/** * Return add discussion URL via public portal * * @param Portal $portal * @param Project $project * @param array $additional_params * @return string */ function portal_discussions_module_add_discussion_url($portal, $project, $additional_params = null) { $params = array('portal_name' => $portal->getSlug()); if ($additional_params !== null) { $params = array_merge($params, $additional_params); } // if return assemble_url('portal_discussions_add', $params); }
/** * Return portal revision view URL * * @param Portal $portal * @return string */ function getPortalViewUrl($portal) { return assemble_url('portal_repository_commit', array('portal_name' => $portal->getSlug(), 'repository_id' => $this->getParentId(), 'r' => $this->getRevision())); }
/** * Get the URL of source module * * @param Portal $portal * @return string */ function portal_source_module_url($portal) { return assemble_url('portal_repositories', array('portal_name' => $portal->getSlug())); }
/** * Return portal milestones section URL * * @param Portal $portal * @return string */ function portal_milestones_module_url($portal) { return assemble_url('portal_milestones', array('portal_name' => $portal->getSlug())); }
/** * Return portal ticket changes URL * * @param Portal $portal * @return string */ function getPortalChangesUrl($portal) { return assemble_url('portal_ticket_changes', array('portal_name' => $portal->getSlug(), 'ticket_id' => $this->getTicketId())); }
/** * Return portal object view URL * * @param Portal $portal * @param array $additional_params * @return string */ function getPortalViewUrl($portal, $additional_params = null) { $params = array('portal_name' => $portal->getSlug(), $this->object_id_param_name => $this->getId()); if ($additional_params !== null) { $params = array_merge($params, $additional_params); } // if return assemble_url($this->portal_view_route_name, $params); }
/** * Return portal commit details URL * * @param Portal $portal * @param integer $revision * @return string */ function getPortalCommitUrl($portal, $revision) { return assemble_url('portal_repository_commit', array('portal_name' => $portal->getSlug(), 'repository_id' => $this->getId(), 'r' => $revision)); }
/** * Return portal view attachment URL * * @param Portal $portal * @param boolean $force_download * @return string */ function getPortalViewUrl($portal, $force_download = false) { $disposition = $force_download ? 'attachment' : ($this->isImage() ? 'inline' : 'attachment'); return assemble_url($this->portal_view_route_name, array('portal_name' => $portal->getSlug(), 'attachment_id' => $this->getId(), 'disposition' => $disposition)); }
/** * Return portal view category URL * * @param Portal $portal * @param integer $page * @return string */ function getPortalViewUrl($portal, $page = null) { $params = array('portal_name' => $portal->getSlug(), 'controller' => 'portal_' . $this->getController(), 'category_id' => $this->getId(), 'module' => PORTALS_MODULE); if ($page !== null) { $params['page'] = $page; } // if return assemble_url('portal_category', $params); }
/** * Returns portal tag URL * * @param string $tag * @param Portal $portal * @param integer $page * @return string */ function getPortalTagUrl($tag, $portal, $page = null) { $params = array('portal_name' => $portal->getSlug(), 'tag' => urlencode($tag)); if ($page !== null) { $params['page'] = $page; } // if return assemble_url('portal_tag', $params); }