本文整理汇总了PHP中Project::getPublicName方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getPublicName方法的具体用法?PHP Project::getPublicName怎么用?PHP Project::getPublicName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project::getPublicName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Project $project, $count, $selected)
{
$this->label = util_unconvert_htmlspecialchars($project->getPublicName());
$this->count = $count;
$this->value = $project->getGroupId();
$this->selected = $selected;
}
示例2: __construct
public function __construct(array $hit, Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->has_highlight = !empty($this->highlight);
$this->display_permissions = isset($hit['fields']['permissions']);
if ($this->display_permissions) {
$this->permissions = implode(', ', $hit['fields']['permissions']);
}
}
示例3: export
public function export(Project $project, array $options, PFUser $user, ZipArchive $archive)
{
$this->logger->info("Start exporting project " . $project->getPublicName());
$xml_element = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>
<project />');
$this->exportProjectUgroups($project, $xml_element);
$this->exportPlugins($project, $xml_element, $options, $user, $archive);
$this->logger->info("Finish exporting project " . $project->getPublicName());
return $this->convertToXml($xml_element);
}
示例4: notifySiteAdmin
private function notifySiteAdmin(Project $project)
{
$subject = $GLOBALS['Language']->getText('register_project_one_step', 'complete_mail_subject', array($project->getPublicName()));
$presenter = new MailPresenterFactory();
$renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
$mail = new TuleapRegisterMail($presenter, $renderer, "mail-project-register-admin");
$mail = $mail->getMailNotificationProject($subject, ForgeConfig::get('sys_noreply'), ForgeConfig::get('sys_email_admin'), $project);
if (!$mail->send()) {
$GLOBALS['Response']->addFeedback(Feedback::WARN, $GLOBALS['Language']->getText('global', 'mail_failed', array($GLOBALS['sys_email_admin'])));
}
}
示例5: __construct
public function __construct(array $hit, Project $project)
{
$this->item_title = $hit['fields']['title'];
$this->url = '/plugins/docman/?group_id=' . $hit['fields']['group_id'] . '&id=' . $hit['fields']['id'] . '&action=details';
$this->project_name = $project->getPublicName();
$this->highlight = isset($hit['highlight']['file']) ? array_shift($hit['highlight']['file']) : '';
$this->has_highlight = !empty($this->highlight);
$this->display_permissions = isset($hit['fields']['permissions']);
if ($this->display_permissions) {
$this->permissions = implode(', ', $hit['fields']['permissions']);
}
}
示例6: getCurrentBindingHTML
/**
* Get the HTML output for current binding
*
* @param Project $currentProject Project of the currently bound ugroup
* @param ProjectUGroup $currentSource Currently bound ugroup
*
* @return String
*/
private function getCurrentBindingHTML(Project $currentProject = null, ProjectUGroup $currentSource = null)
{
if ($currentSource) {
$currentBindHTML = '';
if ($currentSource && $currentProject->userIsAdmin()) {
$currentBindHTML .= $GLOBALS['Language']->getText('project_ugroup_binding', 'current_binded', array('<a href="/project/admin/editugroup.php?group_id=' . $currentProject->getID() . '&ugroup_id=' . $currentSource->getId() . '&func=edit" ><b>' . $currentSource->getName() . '</b></a>', '<a href="/projects/' . $currentProject->getUnixName() . '" ><b>' . $currentProject->getPublicName() . '</b></a>'));
}
$currentBindHTML .= '<form action="" method="post"><input type="hidden" name="action" value="remove_binding" /><input type="submit" value="' . $GLOBALS['Language']->getText('project_ugroup_binding', 'remove_binding') . '"/></form>';
} else {
$currentBindHTML = $GLOBALS['Language']->getText('project_ugroup_binding', 'no_binding');
}
return $currentBindHTML;
}
示例7: sendMail
public function sendMail(PFUser $user, Project $project, $tv3_id, $tracker_name)
{
$mail = new Codendi_Mail();
$breadcrumbs = array();
$breadcrumbs[] = '<a href="' . get_server_url() . '/projects/' . $project->getUnixName(true) . '" />' . $project->getPublicName() . '</a>';
$mail->getLookAndFeelTemplate()->set('breadcrumbs', $breadcrumbs);
$mail->addAdditionalHeader("X-Codendi-Project", $project->getUnixName());
$mail->setFrom($GLOBALS['sys_noreply']);
$mail->setTo($user->getEmail());
$mail->setSubject('Output of your migration TV3 -> TV5');
$mail->setBody($this->getMailBody($tv3_id, $tracker_name));
$mail->send();
$this->purgeLogStack();
}
示例8: array
function __construct(Project $project, $url, $feedback, MailBuilder $mail_builder)
{
parent::__construct();
$this->project = $project;
$this->_url = $url;
$this->_listeners = array();
$this->_feedback = $feedback;
$this->_item_factory = $this->_getItemFactory();
$this->notifications = array();
$this->mail_builder = $mail_builder;
if ($project && !$project->isError()) {
$this->_group_name = $project->getPublicName();
}
}
示例9: sendMassmail
/**
*
* Send mails to a group of people and check the max number of emailed people limit.
*
* @param Project $project Project of the receivers
* @param PFO_User $user Sender
* @param string $subject
* @param string $html_body
* @param PFUser[] $receivers
*/
public function sendMassmail(Project $project, PFUser $user, $subject, $html_body, array $receivers)
{
$hp = Codendi_HTMLPurifier::instance();
$project_name = $project->getPublicName();
$sys_max_number_of_emailed_people = ForgeConfig::get('sys_max_number_of_emailed_people');
if (count($receivers) > $sys_max_number_of_emailed_people && !$user->isSuperUser()) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('my_index', 'massmail_not_sent_max_users', $sys_max_number_of_emailed_people));
return;
}
$mail = new Codendi_Mail();
$mail->setFrom($user->getEmail());
$mail->setTo($user->getEmail());
$mail->setBccUser($receivers);
$mail->setSubject("[" . $GLOBALS['sys_name'] . "] [" . $project_name . "] " . $subject);
$mail->setBodyText($hp->purify($html_body, CODENDI_PURIFIER_STRIP_HTML));
$mail->setBodyHtml($html_body);
$is_sent = $mail->send();
return $is_sent;
}
示例10: displayHeader
public function displayHeader($title, $breadcrumbs, $toolbar)
{
$GLOBALS['HTML']->setRenderedThroughService(true);
$breadcrumbs = array_merge(array(array('title' => $this->project->getPublicName(), 'url' => '/projects/' . $this->project->getUnixName() . '/')), $breadcrumbs);
foreach ($breadcrumbs as $b) {
$classname = '';
if (isset($b['classname'])) {
$classname = 'class="breadcrumb-step-' . $b['classname'] . '"';
}
$GLOBALS['HTML']->addBreadcrumb('<a href="' . $b['url'] . '" ' . $classname . '>' . $b['title'] . '</a>');
}
foreach ($toolbar as $t) {
$class = isset($t['class']) ? 'class="' . $t['class'] . '"' : '';
$item_title = isset($t['short_title']) ? $t['short_title'] : $t['title'];
$GLOBALS['HTML']->addToolbarItem('<a href="' . $t['url'] . '" ' . $class . '>' . $item_title . '</a>');
}
$params = array('title' => $title, 'group' => $this->project->group_id, 'toptab' => $this->getId());
if ($pv = (int) HTTPRequest::instance()->get('pv')) {
$params['pv'] = (int) $pv;
}
$this->displayDuplicateInheritanceWarning();
site_project_header($params);
}
示例11: get_project_full_name
public function get_project_full_name()
{
return $this->project->getPublicName();
}
示例12: fetchTrackerSwitcher
public function fetchTrackerSwitcher(PFUser $user, $separator, Project $include_project = null, Tracker $current_tracker = null)
{
$hp = Codendi_HTMLPurifier::instance();
$html = '';
//Projects/trackers
$projects = $user->getProjects(true);
if ($include_project) {
$found = false;
foreach ($projects as $data) {
if ($data['group_id'] == $include_project->getGroupId()) {
$found = true;
break;
}
}
if (!$found) {
$projects[] = array('group_id' => $include_project->getGroupId(), 'group_name' => $include_project->getPublicName());
}
}
$html .= '<strong>';
if ($current_tracker) {
$html .= $hp->purify($current_tracker->getProject()->getPublicName(), CODENDI_PURIFIER_CONVERT_HTML);
} else {
$html .= $GLOBALS['Language']->getText('plugin_tracker', 'tracker_switcher');
}
$html .= '</strong>' . $separator;
$html .= '<select id="tracker_select_tracker">';
if (!$current_tracker) {
$html .= '<option selected="selected">--</option>';
}
$factory = TrackerFactory::instance();
foreach ($projects as $data) {
if ($trackers = $factory->getTrackersByGroupId($data['group_id'])) {
foreach ($trackers as $key => $v) {
if (!$v->userCanView($user)) {
unset($trackers[$key]);
}
}
if ($trackers) {
$html .= '<optgroup label="' . $hp->purify($data['group_name'], CODENDI_PURIFIER_CONVERT_HTML) . '">';
foreach ($trackers as $t) {
$selected = $current_tracker && $t->getId() == $current_tracker->getId() ? 'selected="selected"' : '';
$html .= '<option ' . $selected . ' value="' . $t->getId() . '">';
$html .= $hp->purify($t->getName(), CODENDI_PURIFIER_CONVERT_HTML);
$html .= '</option>';
}
$html .= '</optgroup>';
}
}
}
$html .= '</select>';
return $html;
}
示例13: while
$group_id = $request->get('group_id');
} else {
exit_no_group();
}
//Process MEMBERSHIP_DELETE event
account_remove_user_from_group($group_id, $user_id, false);
/********* mail the changes so the admins know what happened *********/
$res_admin = db_query("SELECT user.user_id AS user_id, user.email AS email, user.user_name AS user_name FROM user,user_group " . "WHERE user_group.user_id=user.user_id AND user_group.group_id=" . db_ei($group_id) . " AND " . "user_group.admin_flags = 'A'");
$to = '';
while ($row_admin = db_fetch_array($res_admin)) {
$to .= "{$row_admin['email']},";
}
if (strlen($to) > 0) {
$to = substr($to, 0, -1);
$project = new Project($group_id);
$project_name = $project->getPublicName();
list($host, $port) = explode(':', $GLOBALS['sys_default_domain']);
$link_members = get_server_url() . "/project/memberlist.php?group_id={$group_id}";
$subject = $Language->getText('bookmark_rmproject', 'mail_subject', array($GLOBALS['sys_name'], user_getname($user_id), $project_name));
$body = stripcslashes($Language->getText('bookmark_rmproject', 'mail_body', array($project_name, user_getname($user_id), $link_members)));
$mail = new Mail();
$mail->setTo($to);
$mail->setSubject($subject);
$mail->setFrom($GLOBALS['sys_noreply']);
$mail->setBody($body);
$mail->send();
}
// display the personal page again
session_redirect("/my/");
} else {
exit_not_logged_in();
示例14: __construct
public function __construct(Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->project_uri = '/projects/' . $project->getUnixName();
}
示例15: get_section_two
public function get_section_two()
{
return $GLOBALS['Language']->getText('mail_register_project_one_step_notification', 'section_two', array($this->project->getPublicName()));
}