loading menu...
April 26, 2011

Yii’s default validator Aliases

Below is the complete list of predefined validator aliases: boolean: alias of CBooleanValidator, ensuring the attribute has a value that is either CBooleanValidator::trueValue or CBooleanValidator::falseValue. captcha: alias of CCaptchaValidator, ensuring the attribute is equal to the verification code displayed in […]
October 6, 2010

Upload and resize image using YII

Download and extract this file in protected/extensions directory.   In config/main.php file, add the following element to components array  'image'=>array( 'class'=>'application.extensions.image.CImageComponent', 'driver'=>'GD', )   Now in action, insert the following code and modify paths $model->Picture = CUploadedFile::getInstance($model,'Picture'); if( is_object($model->Picture) ) […]
October 4, 2010

Ajax button in CGridView

To add an ajax button to CGridView modify the buttons column  as   'columns' => array( 'id', 'name', array( 'class'=>'CButtonColumn', 'template' => '{view} {update} {delete}', 'buttons'=>array( 'view' => array( 'url'=>'"index.php?r=admin/view&id=".$data->user_id."&m=users"', 'click' => "function (){ $('#viewTab').load($(this).attr('href'));return false; }" ) ), ), […]

  • Cost Efficient Solutions.
  • Minimal Timelines.
  • Effective Communication.
  • High Quality Standards.
  • Lifetime Support.
  • Transparent Execution.
  • 24/7 Availability.
  • Scalable Teams.

Join Our 200+ Happy Clients Accross Globe


Free Consultation.

    Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

    Working with flash messages in Yii
    This website uses cookies to provide necessary website functionality, improve your experience and analyze our traffic. By using our website, you agree to our Privacy Policy and our cookies usage.
    More About Privacy