This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function() { | |
var triggers = $(".modalInput").overlay({ | |
// some mask tweaks suitable for modal dialogs | |
mask: { | |
color: '#000', | |
loadSpeed: 0, | |
opacity: 0.7 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function testGetVotedFor() | |
{ | |
$contestant1 = new stdClass; | |
$contestant1->name = 'Michael Jordan'; | |
$contestant1->id = 1; | |
$contestant2 = new stdClass; | |
$contestant2->name = 'Patrick Ewing'; | |
$contestant2->id = 2; | |
$comment['message'] = 'I really like Michael Jordan'; | |
$this-assertEquals(getVotedFor($comment, $contestant1, $contestant2), 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?= GridView::widget([ | |
'dataProvider' => $dataProvider, | |
'columns' => [ | |
['class' => 'yii\grid\SerialColumn'], | |
[ | |
'label' => 'title', | |
'format' => 'html', | |
'value' => function () { return Html::a($owner->model->title, 'site/index'); } | |
], | |
'pay', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace common\models; | |
use Yii; | |
use yii\behaviors\TimestampBehavior; | |
use yii\db\ActiveRecord; | |
/** | |
* This is the model class for table "tbl_job". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\controllers; | |
use Yii; | |
use common\models\Job; | |
use common\models\JobSearch; | |
use yii\web\Controller; | |
use yii\web\NotFoundHttpException; | |
use yii\filters\VerbFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$criteria = new CDbCriteria(array( | |
'condition' => '`'.$this->orderField.'` > :position' . ($this->condition ? ' AND ' . $this->condition : ''), | |
'params' => array(':position' => $this->owner->attributes[$this->orderField]), | |
'order' => '`'.$this->orderField.'`', | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?= Html::a('Delete', ['delete', 'id' => $model->id], [ | |
'class' => 'btn btn-danger', | |
'data' => [ | |
'confirm' => 'Are you sure you want to delete this item?', | |
'method' => 'post', | |
], | |
]) ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use yii\helpers\Html; | |
use yii\widgets\DetailView; | |
/** | |
* @var yii\web\View $this | |
* @var common\models\cList $model | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Test { | |
private $_testMethodArray; | |
public function testDeleteFromMethodArray() | |
{ | |
$this->testMethodArray(); | |
unset($this->testMethodArray()[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
if ( !$session->validate() ) { | |
$session = null; | |
} | |
} catch ( Exception $e ) { | |
// catch any exceptions | |
$session = null; | |
echo $e->getMessage(); | |
} |
OlderNewer