本文整理汇总了PHP中Yum::route方法的典型用法代码示例。如果您正苦于以下问题:PHP Yum::route方法的具体用法?PHP Yum::route怎么用?PHP Yum::route使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Yum
的用法示例。
在下文中一共展示了Yum::route方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __get
/**
* Implements support for getting URLs, Tables and Views
* @param string $name
*/
public function __get($name)
{
if (substr($name, -3) === 'Url') {
if (isset($this->_urls[substr($name, 0, -3)])) {
return Yum::route($this->_urls[substr($name, 0, -3)]);
}
}
if (substr($name, -4) === 'View') {
if (isset($this->_views[substr($name, 0, -4)])) {
return $this->_views[substr($name, 0, -4)];
}
}
if (substr($name, -5) === 'Table') {
if (isset($this->_tables[substr($name, 0, -5)])) {
return $this->_tables[substr($name, 0, -5)];
}
}
return parent::__get($name);
}
示例2: array
<?
$this->pageTitle=Yii::app()->name . ' - '.Yii::t("UserModule.user", "Activate");
$this->breadcrumbs=array(
Yii::t("UserModule.user", "Login") => array(Yum::route('{user}/login')),
Yii::t("UserModule.user", "Activate"));
$this->title = Yii::t("UserModule.user", "Activate");
?>
<?
if(Yii::app()->user->hasFlash('registration'))
{
?>
<div class="success">
<? echo Yii::app()->user->getFlash('registration'); ?>
</div>
<?
}
?>
<? if($activateFromWeb): ?>
<div class="form">
<? echo CHtml::beginForm(array('registration/activation'),'GET',array()); ?>
<div id="activatiion_code">
<div class="row">
<? echo Yii::t("UserModule.user", "Enter the activation code you recieved below."); ?>
</div>
<div class="row">
<? if(isset($form->email)){
示例3: array
<?php
$this->pageTitle = Yii::app()->name . ' - ' . Yii::t("UserModule.user", "Activate");
$this->breadcrumbs = array(Yii::t("UserModule.user", "Login") => array(Yum::route('{user}/login')), Yii::t("UserModule.user", "Activate"));
$this->title = Yii::t("UserModule.user", "Activate");
?>
<?php
if (Yii::app()->user->hasFlash('registration')) {
?>
<div class="success">
<?php
echo Yii::app()->user->getFlash('registration');
?>
</div>
<?php
}
?>
<?php
if ($activateFromWeb) {
?>
<div class="form">
<?php
echo CHtml::beginForm(array('registration/activation'), 'GET', array());
?>
<div id="activatiion_code">
<div class="row">
<?php
示例4: array
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>$attributes,
));
}
if(Yum::hasModule('role') && Yii::app()->user->isAdmin()) {
Yii::import('application.modules.role.models.*');
echo '<h2>'.Yum::t('This user belongs to these roles:') .'</h2>';
if($model->roles) {
echo "<ul>";
foreach($model->roles as $role) {
echo CHtml::tag('li',array(),CHtml::link(
$role->title,array(Yum::route('role/view'),'id'=>$role->id)),true);
}
echo "</ul>";
} else {
printf('<p>%s</p>', Yum::t('None'));
}
}
if(Yii::app()->user->isAdmin())
echo CHtml::Button(
Yum::t('Update User'), array(
'submit' => array('user/update', 'id' => $model->id)));
if(Yum::hasModule('profile'))
echo CHtml::Button(
Yum::t('Visit profile'), array(
示例5: array
$attributes = array('username');
if ($profiles) {
$profileFields = YumProfileField::model()->forAll()->findAll();
if ($profileFields) {
foreach ($profileFields as $field) {
array_push($attributes, array('label' => Yii::t('UserModule.user', $field->title), 'name' => $field->varname, 'value' => $model->profile->getAttribute($field->varname)));
}
}
}
array_push($attributes, array('name' => 'createtime', 'value' => date(UserModule::$dateFormat, $model->createtime)), array('name' => 'lastvisit', 'value' => date(UserModule::$dateFormat, $model->lastvisit)));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $attributes));
}
if (Yum::hasModule('role') && Yii::app()->user->isAdmin()) {
Yii::import('application.modules.role.models.*');
echo '<h2>' . Yum::t('This user belongs to these roles:') . '</h2>';
if ($model->roles) {
echo "<ul>";
foreach ($model->roles as $role) {
echo CHtml::tag('li', array(), CHtml::link($role->title, array(Yum::route('role/view'), 'id' => $role->id)), true);
}
echo "</ul>";
} else {
printf('<p>%s</p>', Yum::t('None'));
}
}
if (Yii::app()->user->isAdmin()) {
echo CHtml::Button(Yum::t('Update User'), array('submit' => array('user/update', 'id' => $model->id)));
}
if (Yum::hasModule('profile')) {
echo CHtml::Button(Yum::t('Visit profile'), array('submit' => array('//profile/profile/view', 'id' => $model->id)));
}