本文整理汇总了PHP中Pages::getSlugById方法的典型用法代码示例。如果您正苦于以下问题:PHP Pages::getSlugById方法的具体用法?PHP Pages::getSlugById怎么用?PHP Pages::getSlugById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pages
的用法示例。
在下文中一共展示了Pages::getSlugById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
* Time: 3:36 PM
*/
class BankRequestController extends Controller
{
public function actionIndex()
{
$model = new BankRequest();
if (isset($_POST['BankRequest'])) {
$model->attributes = $_POST['BankRequest'];
$model->choosetype = isset($_POST['choosetype']) ? $_POST['choosetype'] : 0;
$model->property_type_code = isset($_POST['property_type_code']) ? is_array($_POST['property_type_code']) ? implode(',', $_POST['property_type_code']) : "" : '';
if ($model->validate()) {
$model->tenancy_expiry_datepicker = MyFormat::indexDateToDbDate($model->tenancy_expiry_datepicker);
$model->target_price = (double) $model->target_price;
if ($model->save()) {
//email to Admin
SendEmail::sendMailBankRequestToAdmin($model);
$link_thanks = Yii::app()->createAbsoluteUrl('page/index', array('slug' => Pages::getSlugById(PAGE_THANK_BANK_VALUATION_REQUEST)));
$this->redirect($link_thanks);
示例2: array
<p class="note"><em>Minimum 6 letters and/or numbers</em></p>
</div>
</div>
<div class="row clearfix">
<label class="lb-1"></label>
<div class="group-1">
<?php
echo $form->checkBox($model, 'is_subscriber');
?>
<p><strong>Please send me updates, monthly newsletter and partner offers</strong></p>
</div>
</div>
<?php
$link_PAGE_Terms_Of_Service = Yii::app()->createAbsoluteUrl('site/view_page', array('slug' => Pages::getSlugById(PAGE_Terms_Of_Service)));
$link_PAGE_Privacy_Policy = Yii::app()->createAbsoluteUrl('site/view_page', array('slug' => Pages::getSlugById(PAGE_Privacy_Policy)));
?>
<div class="w-2 clearfix">
<button type="submit" class="btn-3">Register</button>
</div>
<p class="note space-1">By registering your account you agree to OneHome Infologic’s <a href="<?php
echo $link_PAGE_Terms_Of_Service;
?>
" target="_blank">Terms of Service</a> and <a href="<?php
echo $link_PAGE_Privacy_Policy;
?>
" target="_blank">Privacy Policy</a>.</p>
<?php
示例3: actionLogout
//if($model->validate() && $model->login())
if ($model->validate()) {
if (!empty($returnUrl)) {
$this->redirect($returnUrl);
}
/* Change at yii 1.1.13:
* we not use: if (strpos(Yii::app()->user->returnUrl,'/index.php')===false) to check returnUrl
*/
if (strtolower(Yii::app()->user->returnUrl) !== strtolower(Yii::app()->baseUrl . '/')) {
$this->redirect(Yii::app()->user->returnUrl);
}
$this->redirect(Yii::app()->createAbsoluteUrl('member/member_profile/myprofile'));
}
}
// display the login form
$this->render('user_login/login', array('model' => $model));
} catch (Exception $exc) {
throw new CHttpException(404, 'Invalid request. Please do not repeat this request again.');
}
}
/**
* <Jason>
* <pmhai90@gmail.com>
* Logs out the current user and redirect to homepage.
*/
public function actionLogout()
{
$role_id = Yii::app()->user->role_id;