do extensions work?

Dear all,

I am new to yii, I have heard its a great framework and apparently very popular. well some say its only popular in Russia and eastern Europe but that’s besides the point

I guess, just like any other opensource software, its a pain to get it to work

can someone please explain to me how do I get the yii strap and yii bootstrap extensions to work.

it appears to be simple installation. however, it refers to /extensions directory whereas I have vendor directory in yii2. it refers to main.php where as I have web.php. Am I looking at some old extension for yii1?

When I install the extension and run this example

$this->widget(‘yiiwheels.widgets.grid.WhGridView’, array(

  1. ‘filter’=>$person,

  2. ‘fixedHeader’ => true,

  3. ‘headerOffset’ => 40, // 40px is the height of the main navigation at bootstrap

  4. ‘type’=>‘striped bordered’,

  5. ‘dataProvider’ => $gridDataProvider,

  6. ‘template’ => “{items}”,

  7. ‘columns’ => $gridColumns,

9.));

I get this error

Unknown Method – yii\base\UnknownMethodException

Calling unknown method: yii\web\View::widget()

  1. in C:\wamp\www\timesheets\vendor\yiisoft\yii2\base\Component.php at line 285

    public function __call($name, $params)

    {

     $this->ensureBehaviors();
    
    
     foreach ($this->_behaviors as $object) {
    
    
         if ($object->hasMethod($name)) {
    
    
             return call_user_func_array([$object, $name], $params);
    
    
         }
    
    
     }
    
    
     throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()")
    

I have spent way too much time getting this to work I can’t find a way out and it is extremely frustrating. Given the fact that this is “very easy” to use.

Please help me its making me go crazy

Thanks

baz

I’m sorry but I have to ask - are you sure you know what you are doing?

Are you trying to install Yii 1.1 extensions in Yii 2 app? This is possible but not super easy.

Are you using Composer?

Have you read Yii 2 documentation?

And this "I guess, just like any other opensource software, its a pain to get it to work" sentence is just a terrible generalisation.

Thanks for your reply. I am sorry about the generalization.

I followed the instructions on yiibooster.clevertech.biz

I am assuming that is for yii2

After using the example, I get the error about widget unknown method

I am really not sure what am I missing here

would appreciate some advice.

This extension is for Yii 1.

Bootstrap 3 framework is already implemented in Yii 2. If you are looking for Yii 2 extensions check it here http://www.yiiframework.com/extensions/?tag=yii2 or https://packagist.org/search/?q=yii2 or just simple google it.

I recommend to read Yii 2 guide http://www.yiiframework.com/doc-2.0/guide-index.html

If you are looking for the way to use Yii 1.1 extensions in Yii 2 read this section:

http://www.yiiframework.com/doc-2.0/guide-tutorial-yii-integration.html#using-both-yii2-yii1