本文整理匯總了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'));
}