Download EJuiDateTimePicker
from Github repo
Extract extension into ext.juidatetimepicker
folder.
Enable auto-loading:
<?php
'import' => [
// ...
'ext.juidatetimepicker.EJuiDateTimePicker',
],
<?php | |
/** | |
* This is the model class for table "news_comments". | |
* | |
* The followings are the available columns in table 'news_comments': | |
* @property string $id | |
* @property integer $news_id | |
* @property string $author | |
* @property string $text |
<?php | |
public function actionAddComment( News $news ) | |
{ | |
$comment = new NewsComments(); | |
if ( isset( $_POST[ 'NewsComments' ] ) ) | |
{ | |
$comment->attributes = $_POST[ 'NewsComments' ]; | |
$comment->news_id = $news->id; | |
// if user authorized, then get name directly from the user model |
<?php | |
class RegisterForm extends CFormModel | |
{ | |
public $username; | |
public $password; | |
public $password_repeat; | |
public $email; | |
private $_identity; |
<?php | |
class News extends CActiveRecord | |
{ | |
public $author_search; | |
public function rules() | |
{ | |
return [ | |
// ... | |
[ 'id, title, text, author_id, author_search', 'safe', 'on' => 'search' ], |
linearGradient($startColor, $endColor) | |
background $startColor | |
background -moz-linear-gradient(top, $startColor 0%, $endColor 100%) | |
background -webkit-gradient(linear, left top, left bottom, color-stop(0%, $startColor), color-stop(100%, $endColor)) | |
background -webkit-linear-gradient(top, $startColor 0%, $endColor 100%) | |
background -o-linear-gradient(top, $startColor 0%, $endColor 100%) | |
background -ms-linear-gradient(top, $startColor 0%, $endColor 100%) | |
background linear-gradient(to bottom, $startColor 0%, $endColor 100%) | |
filter unquote("progid:DXImageTransform.Microsoft.gradient(startColorstr='" + $startColor + "', endColorstr='" + $endColor + "', GradientType = 0)") |
<?php | |
/* @var MyController $this */ | |
$this->beginWidget( 'CClipWidget', [ 'id' => 'sidebar' ] ); // start clipping with id | |
// here are some useful & common outputs... | |
$this->endWidget(); // stop clipping | |
// somewhere else use clip: | |
echo $this->clips[ 'sidebar' ]; |
<?php | |
class User extends CActiveRecord | |
{ | |
public function rules() | |
{ | |
return [ | |
[ 'username, email', 'required' ], | |
[ 'password', 'required', 'on' => 'insert, changePassword' ], // require on insert, also on changePassword scenarios | |
[ 'email', 'length', 'min' => 3, 'max' => 128 ], | |
[ 'email', 'email' ], |
<?php | |
/* @var $this NewsController */ | |
/* @var $model News */ | |
/* @var $form CActiveForm */ | |
?> | |
<div class="panel-group" id="accordion"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h4 class="panel-title"> | |
<a class="accordion-toggle collapsed" href="#collapseOne" data-toggle="collapse" data-parent="#accordion"> |
Download EJuiDateTimePicker
from Github repo
Extract extension into ext.juidatetimepicker
folder.
Enable auto-loading:
<?php
'import' => [
// ...
'ext.juidatetimepicker.EJuiDateTimePicker',
],