Hello, I'm new in Yii, I followed the instructions for using the extension and I could not run, nor the basic usage.
Copy the files in place
Assuming a model 'Customer'
1. I see my model in 'protected/controllers/CustomerController.php' the method LoadModule(), Ok
public function loadModel()
{
if($this->_model===null)
{
if(isset($_GET['id']))
$this->_model=Customer::model()->findbyPk($_GET['id']);
if($this->_model===null)
throw new CHttpException(404,'The requested page does not exist.');
}
return $this->_model;
}
2. At the end of my controller 'protected/controllers/CustomerController.php' put the method setFlash()
public function setFlash( $key, $value, $defaultValue = null )
{
Yii::app()->user->setFlash( $key, $value, $defaultValue );
}
3. Change actions(), also in 'protected/controllers/CustomerController.php'? put at the end? or in 'protected/components/controller.php'?, or in 'protected/controllers/SiteController.php' if it is here, what do I do with the code that is already here?
4. I make changes in my view and add a update-dialog-open-link class to all the links or
<?php
echo CHtml::link( 'Create', array( 'create' ),
array(
'class' => 'update-dialog-open-link',
'data-update-dialog-title' => Yii::t( 'app', 'Create a new mix' ),
));
?>
5. I add the widget in my view, is in 'protected/views/Customer/create.php'? or directly on the form 'protected/views/Customer/_form.php'?
<div class="form">
<?php
$this->widget( 'ext.EUpdateDialog.EUpdateDialog' );
$form=$this->beginWidget('CActiveForm', array(
'id'=>'project-form',
'enableAjaxValidation'=>false,
)); ?>
...
Either way is not working.
Will you show me step by step detail how to run this extension?
Sorry for my google-English.
Regards.