本文整理汇总了PHP中app\models\Task::urlToAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::urlToAll方法的具体用法?PHP Task::urlToAll怎么用?PHP Task::urlToAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Task
的用法示例。
在下文中一共展示了Task::urlToAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
echo Html::encode($this->title);
?>
</title>
<?php
$this->head();
?>
</head>
<body>
<?php
$this->beginBody();
?>
<div class="wrap">
<?php
NavBar::begin(['brandLabel' => \Yii::t('app', 'My Goals'), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => Yii::$app->user->isGuest ? [] : [['label' => \Yii::t('dashboard', 'Dashboard'), 'url' => ['/dashboard/index']], ['label' => \Yii::t('task', 'Tasks'), 'url' => Task::urlToAll()], ['label' => \Yii::t('status', 'Statuses'), 'url' => ['/settings/status/index']], ['label' => \Yii::t('type', 'Types'), 'url' => ['/settings/type/index']], ['label' => \Yii::t('priority', 'Priorities'), 'url' => ['/settings/priority/index']], ['label' => \Yii::t('app', 'Logout ({0})', [Yii::$app->user->identity->username]), 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]);
NavBar::end();
?>
<div class="container">
<?php
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
<?php
echo $content;
?>
</div>
</div>
<footer class="footer">
<div class="container">
示例2: foreach
?>
<? endforeach; ?>
</div>
<? endif; ?>
</div>
<div class="row">
<div class="col-lg-8 col-md-7 col-sm-6 col-xs-12">
<h2>
<?php
echo \Yii::t('dashboard', 'Nearest Tasks');
?>
<?php
echo Html::a($tasksCount, Task::urlToAll(), ['class' => 'label label-primary']);
?>
</h2>
<? foreach ($tasks as $task): ?>
<?php
echo $this->render('/task/list-item', ['task' => $task, 'showGoalTitle' => true]);
?>
<? endforeach; ?>
</div>
<div class="col-lg-4 col-md-5 col-sm-6 col-xs-12">
<h2><?php
echo \Yii::t('dashboard', 'Nearest Goals');
?>
<?php
echo Html::a($goalsCount, Url::to('/goal/index'), ['class' => 'label label-primary']);