本文整理汇总了PHP中Am_Controller::getFullUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Controller::getFullUrl方法的具体用法?PHP Am_Controller::getFullUrl怎么用?PHP Am_Controller::getFullUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Controller
的用法示例。
在下文中一共展示了Am_Controller::getFullUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initSetupForm
protected function _initSetupForm(Am_Form_Setup $form)
{
$url = 'https://auth.aweber.com/1.0/oauth/authorize_app/' . self::APP_ID;
$el = $form->addTextarea('auth', array('cols' => 80, 'rows' => 4))->setLabel("aWeber App Authorization Code\n" . "get it on <a target='_blank' href='{$url}'>aWeber Website</a>");
$el->addRule('regex', 'Invalid value', '/^[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|\\s*$/');
if ($this->getConfig('auth') && !$this->getConfig('access.access_token')) {
if (!empty($_GET['oauth_token'])) {
$api = $this->getApi();
$api->user->tokenSecret = $_COOKIE['requestTokenSecret'];
$api->user->requestToken = $_GET['oauth_token'];
$api->user->verifier = $_GET['oauth_verifier'];
list($accessToken, $accessTokenSecret) = $api->getAccessToken();
$this->getDi()->config->saveValue('newsletter.aweber.access', array('access_token' => $accessToken, 'access_secret' => $accessTokenSecret));
Am_Controller::redirectLocation(REL_ROOT_URL . "/admin-setup/aweber");
return;
} else {
$api = $this->getApi();
$callbackUrl = Am_Controller::getFullUrl();
try {
list($requestToken, $requestTokenSecret) = $api->getRequestToken($callbackUrl);
Am_Controller::setCookie('requestTokenSecret', $requestTokenSecret);
$form->addStatic()->setLabel('Access Tokens')->setContent(sprintf('Access tokens are empty or expired, %sclick this link%s to update', '<a href="' . Am_Controller::escape($api->getAuthorizeUrl()) . '">', '</a>'));
} catch (Exception $e) {
$this->getDi()->errorLogTable->logException($e);
$form->addStatic()->setLabel('Access Tokens')->setContent('Plugin configuration error. Got an error from API: ' . $e->getMessage());
}
}
}
$fields = $this->getDi()->userTable->getFields(true);
unset($fields['email']);
unset($fields['name_f']);
unset($fields['name_l']);
$ff = $form->addMagicSelect('fields')->setLabel("Pass additional fields to AWeber\nfields must be configured in AWeber with exactly same titles\nelse API calls will fail and users will not be added\n\nBy default the plugin passes \"email\" and \"name\"\nfields to Aweber, so usually you do not need to select \nthat fields to send as additional fields.\n");
$ff->loadOptions(array_combine($fields, $fields));
}
示例2: getUrl
function getUrl($record = null, $id = null)
{
$vars = $this->grid->getFilter()->getFilterVars();
$params = array('_eu_vat_details_filter' => @$vars['filter'], 'return_url' => Am_Controller::getFullUrl());
if (!is_null($record)) {
$params['_eu_vat_details_filter']['country'][] = $record->country;
$params['_eu_vat_details_filter']['tax_rate'] = $record->tax_rate;
}
return sprintf(REL_ROOT_URL . "/admin-vat-report/details/?%s", http_build_query($params));
}
示例3: render
public function render()
{
$val = Am_Controller::escape($this->options);
$selfUrl = Am_Controller::escape(Am_Controller::getFullUrl());
return <<<CUT
<form class='filter' method='get' action='{$selfUrl}'>
<b>Filter by Username or Name or E-Mail Address#</b>
<input type='text' name='search-filter' value='{$val}'>
<input type='text' name='search-type' value='filter' />
<input type='submit' value='Filter' class='query-button'>
</form>
CUT;
}