I am creating a widget and I am getting the following exception:
Alias "components.laser.Laser" is invalid. Make sure it points to an existing directory or file.
This is how I am calling my widget:
<?php $this->widget('components.laser.Laser', array('form_id'=>$form_id)); ?>
This is the widget class, which is in /protected/components/laser/Laser.php:
<?php
class Laser extends CWidget
{
public $form_id;
public function run()
{
$this->renderPartial('_form', array('form_id'=>$form_id), false, true);
}
}
This is the partial view, which is in /protected/components/laser/views/_form.php:
<div class="form">
<fieldset>
<legend style="font-weight: bold">
<?php
$form = Form::model()->find("id=$form_id");
echo ucfirst($form->title);
?>
</legend>
</fieldset>
</div><!-- form -->
Any idea what is causing the exception?