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


PHP Am_Controller::makeUrl方法代码示例

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


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

示例1: initActions

 function initActions()
 {
     $this->actionAdd(new Am_Grid_Action_Upload());
     $this->actionAdd(new Am_Grid_Action_Delete());
     $actionDownload = new Am_Grid_Action_Url('download', ___('Download'), Am_Controller::makeUrl('admin-upload', 'get', 'default', array('id' => '__ID__')));
     $actionDownload->setTarget('_top');
     $this->actionAdd($actionDownload);
     $this->actionAdd(new Am_Grid_Action_Group_Delete());
     $this->actionAdd(new Am_Grid_Action_LiveEdit('desc'));
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:10,代码来源:AdminBannersController.php

示例2: __toString

    public function __toString()
    {
        $output = sprintf('<div style="padding:0.5em"><h1>%s</h1><table %s><tr><th>%s</th>
	<th>%s</th>
        <th>%s</th>
	<th>%s</th>
	<th>&nbsp;</th></tr>', ___('Configured Tax Values'), 'class="grid"', ___('Country'), ___('State'), ___('Zip'), ___('Tax Value'));
        foreach ($this->regional_taxes as $id => $region) {
            $output .= '<tr>' . sprintf('<td>%s</td>', Am_Di::getInstance()->countryTable->getTitleByCode($region['country'])) . sprintf('<td>%s</td>', $region['state'] ? Am_Di::getInstance()->stateTable->getTitleByCode($region['country'], $region['state']) : '*') . sprintf('<td>%s</td>', $region['zip'] ? $region['zip'] : '*') . sprintf('<td>%.2f%s</td>', $region['tax_value'], '%') . sprintf('<td><a class="remove" href="%s">%s</a></td>', Am_Controller::makeUrl('admin-tax', 'removeregion', null, array('id' => $id)), ___('Remove')) . '</tr>';
        }
        $output .= '</table></div>';
        $id = $this->getId();
        $output .= "\n        <style type='text/css'>\n            #row-{$id} .element-title { display: none;  }\n            #row-{$id} .element { margin-left: 0 } \n        </style>\n        ";
        return sprintf('<tr><td colspan="2" id="tax-regional-regions">%s</td></tr>', $output);
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:15,代码来源:AdminTaxController.php

示例3: getUrl

 public function getUrl($record = null, $id = null)
 {
     return Am_Controller::makeUrl('admin-import', 'delete', null, array('id' => $record->id));
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:AdminImportController.php

示例4: url

 /**
  * Returns url of current page with given _REQUEST parameters overriden
  * @param array $parametersOverride
  */
 function url(array $parametersOverride = array(), $skipRequestParams = false)
 {
     $vars = $skipRequestParams ? $parametersOverride : array_merge($_REQUEST, $parametersOverride);
     return Am_Controller::makeUrl() . '?' . http_build_query($vars);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:9,代码来源:View.php

示例5: init

    function init()
    {
        /* General Settings */
        $fieldSet = $this->addElement('fieldset', 'general', array('id' => 'general', 'label' => ___('General')));
        $loginGroup = $fieldSet->addGroup('', array('id' => 'login'))->setLabel(___('Username'));
        $login = $loginGroup->addElement('text', 'login', array('size' => 20));
        $login->addRule('required');
        $loginGroup->addRule('callback2', '-error-', array($this, 'checkUniqLogin'));
        $comment = $fieldSet->addTextarea("comment", array('style' => "width:90%", 'id' => 'comment'), array('label' => ___('Comment')));
        if ($this->record && $this->record->pk()) {
            $url = Am_Controller::escape(Am_Controller::makeUrl('admin-users', 'login-as', null, array('id' => $this->record->pk())));
            $loginGroup->addStatic('_login_as')->setContent("&nbsp;<a href='{$url}' target='_blank'>" . ___("login as user") . "</a>");
        }
        $pass = $fieldSet->addElement('password', '_pass', array('size' => 20, 'autocomplete' => 'off'))->setLabel(___('New Password'));
        //$pass0 = $gr->addElement('password', '_pass0', array('size' => 20));
        //$pass0->addRule('eq', 'Password confirmation must be equal to Password', $pass);
        if ($this->getAttribute('_a_') == 'insert') {
            $pass->addRule('required');
        }
        $nameField = $fieldSet->addGroup('', array('id' => 'name'), array('label' => ___('Name')));
        $nameField->addElement('text', 'name_f', array('size' => 20));
        $nameField->addElement('text', 'name_l', array('size' => 20));
        $gr = $fieldSet->addGroup()->setLabel(___('E-Mail Address'));
        $gr->addElement('text', 'email', array('size' => 40))->addRule('required');
        $gr->addRule('callback2', '-error-', array($this, 'checkUniqEmail'));
        $fieldSet->addElement('text', 'phone', array('size' => 20))->setLabel(___('Phone Number'));
        if ($this->record && $this->record->isLoaded()) {
            $resendText = Am_Controller::escape(___("Resend Signup E-Mail"));
            $sending = Am_Controller::escape(___('sending'));
            $sent = Am_Controller::escape(___('sent successfully'));
            $id = $this->record->pk();
            $gr->addElement('static')->setContent(<<<CUT
<input type='button' value='{$resendText}' id='resend-signup-email' />
<script type='text/javascript'>
\$(function(){
\$("#resend-signup-email").click(function(){
    var btn = this;
    var txt = btn.value;
    btn.value += '...({$sending})...';
    \$.post(window.rootUrl + '/admin-users/resend-signup-email', {id: {$id}}, function(){
        btn.value = txt + '...({$sent})';
        setTimeout(function(){ btn.value = txt; }, 600);
    });
});
});
</script>
CUT
);
        }
        $isLocked = $fieldSet->addElement('advradio', 'is_locked', array('id' => 'is_locked'))->loadOptions(array('' => 'No', '1' => '<font color=red><b>' . ___("Yes, locked") . '</b></font>', '-1' => '<i>' . ___("Disable auto-locking for this customer") . '</i>'))->setLabel(___('Is Locked'));
        if (Am_Di::getInstance()->config->get('manually_approve')) {
            $fieldSet->addElement('advcheckbox', 'is_approved', array('id' => 'is_approved'))->setLabel(___('Is Approved'));
        }
        $fieldSet->addElement('advradio', 'unsubscribed', array('id' => 'unsubscribed'))->setLabel(___("Is Unsubscribed?\nif enabled, this will\nunsubscribe the customer from:\n* messages that you send from aMember Cp, \n* autoresponder messages,\n* subscription expiration notices"))->loadOptions(array('' => ___('No'), '1' => ___('Yes, do not e-mail this customer for any reasons')));
        if ($this->record->isLoaded()) {
            $fieldSet->addStatic('_signup_info', null, array('label' => ___('Signup Info')))->setContent(sprintf("<div>%s</div>", $this->record->added . ' / ' . $this->record->remote_addr));
        }
        if (Am_Di::getInstance()->config->get('use_user_groups')) {
            $group = $this->addGroup('', array('id' => 'user_groups'))->setLabel(___('User Groups'));
            $groups = $group->addSelect('_groups', array('multiple' => 'multiple', 'class' => 'magicselect'));
            $groups->loadOptions(Am_Di::getInstance()->userGroupTable->getSelectOptions());
            $group->addHtml()->setHtml(sprintf('<a href="%s" target="_blank">%s<a/>', Am_Controller::escape(REL_ROOT_URL . '/admin-user-groups'), ___("Edit Groups")));
        }
        /* Address Info */
        $this->insertAddressFields();
        $this->insertAdditionalFields();
        $event = new Am_Event_UserForm(Am_Event_UserForm::INIT, $this, $this->record, array());
        $event->run();
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:69,代码来源:AdminUsersController.php


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