当前位置: 首页>>代码示例>>PHP>>正文


PHP Horde_Form::setTitle方法代码示例

本文整理汇总了PHP中Horde_Form::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Form::setTitle方法的具体用法?PHP Horde_Form::setTitle怎么用?PHP Horde_Form::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Horde_Form的用法示例。


在下文中一共展示了Horde_Form::setTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupDeleteForm

 /**
  * Create a permission deleting form.
  *
  * @param Horde_Perms_Permission $permission  A permissions object.
  */
 public function setupDeleteForm($permission)
 {
     /* Initialise form if required. */
     $this->_formInit();
     $this->_form->setTitle(sprintf(Horde_Core_Translation::t("Delete permissions for \"%s\""), $this->_corePerms->getTitle($permission->getName())));
     $this->_form->setButtons(array(array('class' => 'horde-delete', 'value' => Horde_Core_Translation::t("Delete")), array('class' => 'horde-cancel', 'value' => Horde_Core_Translation::t("Do not delete"))));
     $this->_form->addHidden('', 'perm_id', 'text', false);
     $this->_form->addVariable(sprintf(Horde_Core_Translation::t("Delete permissions for \"%s\" and any sub-permissions?"), $this->_corePerms->getTitle($permission->getName())), 'prompt', 'description', false);
 }
开发者ID:horde,项目名称:horde,代码行数:14,代码来源:Ui.php

示例2: catch

    }
}
$id = $vars->get('alarm');
if ($id) {
    if ($vars->get('delete')) {
        try {
            $horde_alarm->delete($id, '');
            $notification->push(_("The alarm has been deleted."), 'horde.success');
        } catch (Horde_Alarm_Exception $e) {
            $notification->push($e);
            $id = null;
        }
    } else {
        try {
            $alarm = $horde_alarm->get($id, '');
            $form->setTitle(sprintf(_("Edit \"%s\""), $alarm['title']));
            $vars->set('title', $alarm['title']);
            $vars->set('text', $alarm['text']);
            $vars->set('start', $alarm['start']->timestamp());
            if (!empty($alarm['end'])) {
                $vars->set('end', $alarm['end']->timestamp());
            }
            $vars->set('methods', $alarm['methods']);
            foreach ($alarm['params'] as $method => $params) {
                foreach ($params as $name => $value) {
                    $vars->set($method . '_' . $name, $value);
                }
            }
        } catch (Horde_Alarm_Exception $e) {
            $notification->push($alarm);
            $id = $alarm = null;
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:31,代码来源:alarms.php

示例3: array

$channel_id = $vars->get('channel_id');
$story_id = $vars->get('id');
if (!$conf['sharing']['allow']) {
    Horde::url('stories/view.php', true)->add(array('story_id' => $story_id, 'channel_id' => $channel_id))->redirect();
    exit;
}
$story = $GLOBALS['injector']->getInstance('Jonah_Driver')->getStory($channel_id, $story_id);
if (is_a($story, 'PEAR_Error')) {
    $notification->push(sprintf(_("Error fetching story: %s"), $story->getMessage()), 'horde.warning');
    $story = '';
}
$vars->set('subject', $story['title']);
/* Set up the form. */
$form = new Horde_Form($vars);
$title = _("Share Story");
$form->setTitle($title);
$form->setButtons(_("Send"));
$form->addHidden('', 'channel_id', 'int', false);
$form->addHidden('', 'id', 'int', false);
$v =& $form->addVariable(_("From"), 'from', 'email', true, false);
if ($GLOBALS['registry']->getAuth()) {
    $v->setDefault($injector->getInstance('Horde_Core_Factory_Identity')->create()->getValue('from_addr'));
}
$form->addVariable(_("To"), 'recipients', 'email', true, false, _("Separate multiple email addresses with commas."), true);
$form->addVariable(_("Subject"), 'subject', 'text', true);
$form->addVariable(_("Include"), 'include', 'enum', true, false, null, array(array(_("A link to the story"), _("The complete text of the story"))));
$form->addVariable(_("Message"), 'message', 'longtext', false, false, null, array(4, 40));
if ($form->validate($vars)) {
    $form->getInfo($vars, $info);
    $channel = $GLOBALS['injector']->getInstance('Jonah_Driver')->getChannel($channel_id);
    if (empty($channel['channel_story_url'])) {
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:share.php


注:本文中的Horde_Form::setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。