Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. CException
  2.  
  3. Categories does not have a method named "beginWidget".
  4.  
  5. /home/soul/yii/base/CComponent.php(266)
  6.  
  7. 254     public function __call($name,$parameters)
  8. 255     {
  9. 256         if($this->_m!==null)
  10. 257         {
  11. 258             foreach($this->_m as $object)
  12. 259             {
  13. 260                 if($object->getEnabled() && method_exists($object,$name))
  14. 261                     return call_user_func_array(array($object,$name),$parameters);
  15. 262             }
  16. 263         }
  17. 264         if(class_exists('Closure', false) && $this->canGetProperty($name) && $this->$name instanceof Closure)
  18. 265             return call_user_func_array($this->$name, $parameters);
  19. 266         throw new CException(Yii::t('yii','{class} does not have a method named "{name}".',
  20. 267             array('{class}'=>get_class($this), '{name}'=>$name)));
  21. 268     }
  22. 269
  23. 270     /**
  24. 271      * Returns the named behavior object.
  25. 272      * The name 'asa' stands for 'as a'.
  26. 273      * @param string $behavior the behavior name
  27. 274      * @return IBehavior the behavior object, or null if the behavior does not exist
  28. 275      * @since 1.0.2
  29. 276      */
  30. 277     public function asa($behavior)
  31. 278     {
  32. Stack Trace
  33. #0 
  34. +  /home/soul/yii/db/ar/CActiveRecord.php(213): CComponent->__call("beginWidget", array("COutputCache", array("duration" => 120, "id" => "getCategoriesDropDown")))
  35. #1 
  36. unknown(0): CActiveRecord->__call("beginWidget", array("COutputCache", array("duration" => 120, "id" => "getCategoriesDropDown")))
  37. #2 
  38. +  /home/soul/yii/web/CBaseController.php(249): Categories->beginWidget("COutputCache", array("duration" => 120, "id" => "getCategoriesDropDown"))
  39. #3 
  40. –  /home/soul/beta_html/protected/models/Categories.php(291): CBaseController->beginCache("getCategoriesDropDown", array("duration" => 120))
  41. 286
  42. 287     public function getCategoriesDropDown($categoryId = 0, $includeChildren = true, $emptyString = 'No Parent') {
  43. 288
  44. 289         if ( !is_numeric($categoryId) ) return false;
  45. 290
  46. 291         if(CController::beginCache('getCategoriesDropDown', array('duration'=>120))) {
  47. 292
  48. 293             $arr_return    = array();
  49. 294             if ($emptyString) $arr_return[0] = $emptyString;
  50. 295    
  51. 296             $cats = Categories::model()->findAll( 'parentid=:parentid', array(':parentid'=>$categoryId) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement