本文整理汇总了PHP中Am_Form_Setup::name2dots方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Form_Setup::name2dots方法的具体用法?PHP Am_Form_Setup::name2dots怎么用?PHP Am_Form_Setup::name2dots使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Form_Setup
的用法示例。
在下文中一共展示了Am_Form_Setup::name2dots方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __toString
function __toString()
{
$label = $this->getLabel();
if (is_array($label)) {
$label = array_map('strip_tags', $label);
$label = implode(' ', $label);
}
$tmplates = Am_Di::getInstance()->emailTemplateTable->findByName($this->getName(), null, null, 'days');
$out = '';
$delUrl = REL_ROOT_URL . '/admin-email-templates/delete/?';
$editUrl = REL_ROOT_URL . '/admin-email-templates/edit-pending-notification-rule?';
foreach ($tmplates as $t) {
$p = array('id' => $t->email_template_id, 'b' => $_SERVER['REQUEST_URI'] . '#' . $this->getName(), 'label' => $label, 'name' => $this->getName());
$out .= '<div style="padding-bottom:0.4em">– ' . $this->renderRule($t) . ' [<a class="email-template local" href="' . $editUrl . http_build_query($p, '', '&') . '">Edit</a>] [<a class="email-template-del local" href="' . $delUrl . http_build_query($p, '', '&') . '">Delete</a>]</div>';
}
$url = REL_ROOT_URL . '/admin-email-templates/add-pending-notification-rule/?';
$params = array('name' => Am_Form_Setup::name2dots($this->getName()), 'b' => $_SERVER['REQUEST_URI'] . '#' . $this->getName(), 'label' => $label);
if ($out) {
$out .= '<br />';
}
$out = sprintf('<a name="%s"></a><div>%s<div><a href="%s" class="email-template local">%s</a></div></div>', $this->getName(), $out, $url . http_build_query($params, '', '&'), ___('Add New Notification Rule'));
return $out;
}
示例2: preDispatch
public function preDispatch()
{
$vars = $this->_request->toArray();
foreach ($vars as $k => $v) {
$kk = Am_Form_Setup::name2dots($k);
if ($kk != $k) {
unset($vars[$k]);
$vars[$kk] = $v;
}
}
$this->_request->setParams($vars);
}
示例3: getEditLink
public static function getEditLink($el, $day = null, $product_id = null)
{
$label = $el->getLabel();
if (is_array($label)) {
$label = array_map('strip_tags', $label);
$label = implode(' ', $label);
}
$url = REL_ROOT_URL . sprintf('/admin-email-templates/edit/?name=%s&b=%s', Am_Form_Setup::name2dots($el->getName()), rawurlencode($_SERVER['REQUEST_URI'] . '#' . $el->getName()));
if (!is_null($day)) {
$url .= sprintf('&day=%d', $day);
}
if (!is_null($product_id)) {
$url .= sprintf('&product_id=%d', $product_id);
}
$url .= sprintf('&label=%s', rawurlencode($label));
return sprintf('<a href="%s" class="email-template">%s</a>', $url, ___('Edit E-Mail Template'));
}