I have written a widget and am passing a parameter to it but I keep getting "Undefined variable: designations"
Widget code:
<?php
class Designation_Logo_Small extends CWidget
{
var $designations;
public function init() {
} // public function init()
public function run() {
$this->render('designation_logos_small', $designations);
} // public function run()
} // class Designation_Logo_Small
Called like this:
$designations = array('c' => true,
'r' => true,
's' => true,
'm' => false
);
$this->widget('designation_logo_small', array('designations' => $designations));
What am I doing wrong here? This widget is being called from another widget’s view, could that be part of the problem?