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


PHP Yum::route方法代码示例

本文整理汇总了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);
 }
开发者ID:Canyian,项目名称:yii-user-management-facebook,代码行数:23,代码来源:UserModule.php

示例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)){ 
开发者ID:neam,项目名称:yii-user-management,代码行数:31,代码来源:resend_activation.php

示例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 
开发者ID:bhaveshsoni,项目名称:yii-user-management,代码行数:31,代码来源:resend_activation.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(
开发者ID:neam,项目名称:yii-user-management,代码行数:31,代码来源:view.php

示例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)));
}
开发者ID:Canyian,项目名称:yii-user-management-facebook,代码行数:31,代码来源:view.php


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