Using php as property

Hello guys,

i have a php function xyz and i want to use when i click on delete button as confermation.

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=&gt;'tabella-grid',


'dataProvider'=&gt;&#036;model-&gt;search(),


'filter'=&gt;&#036;model,


'columns'=&gt;array(


	'ID',


	'nome',


	array(


		 'class'=&gt;'CButtonColumn',


                     'deleteConfirmation'=&gt;'xyz()',





		),


	


),

));

how can I do?

thanks

Try this way




array(

	'template'=>'{view}{delete}{update}',

	'class'=>'CButtonColumn',

	'buttons'=>array

	(

		'delete' => array

		(

			'options'=>array('onclick'=>'xyz()'),

		),

	 ),

),



does not work … : (

this works if the function is in Javascript, but my function is in php…

Please explain better what this function would do… deleteConfirmation needs a string (message to be shown)… so I suppose that your function returns the confirmation message…

Note that this value is not evaluated at runtime…

You can use it like


'deleteConfirmation' => $this->xyz(),

Where xyz() is a method in the calling controller that returns a message like




public function xyz()

{

   return 'Do you really want to delete this record?';

}