Yiistorm


(Mazx) #1

Hi!

I wrote plugin for all who work with Yii in PHPStorm IDE.

Plugin provide navigation:

  • from controller (and view) to view throuth

render("viewname")

or


render("//fullpath/viewname")

and etc

  • support "themes" (press ctrl+Y to get config page) fullpath will be

/themes/<themename>/views/controllername/viewname.php

  • from any place to widget class throuth

$this->widget("application.components.WidgetClass")

or just


$this->widget("WidgetClass")

in some places =)

  • from controller actions() method to CAction child class just click to

"class"=>"application.full.path.to.MyCAction"

  • from MyCAction to view (throuth first controller what using this MyCAction, in plan make select from variants)

  • and over usable things

B)


(Mazx) #2

<_< can’t add links to github and my site…first messages in this forum )


(Da:Sourcerer) #3

Here we go: https://github.com/cmazx/yiistorm

TBH, I think samdark already mentioned this several times …


(Jacob Moen) #4

That Samdark mentioned it several times is not a reason why the developer of the Yiistorm plugin shouldn’t mention it. :)


(Da:Sourcerer) #5

Oh, I didn’t intend to turn mazx down. I just thought I’d back him up a bit. That “TBH” might have been a bit misplaced :rolleyes:


(Jacob Moen) #6

No, I think it was the three dots …


(Da:Sourcerer) #7

That must be about the first time I see somebody reading something into an ellipse :blink:


(Jacob Moen) #8

[font=sans-serif][size=2]

[/size][/font]

[font=sans-serif][size=2]

[/size][/font]

[font=“sans-serif”][size=“2”]Anyway. I approve of the Yiistorm plugin. :)[/size][/font]


(Alexander Makarov) #9

I’ve posted about the plugin at the front page.


(Goncalo Basto) #10

Nice addon while the IDE don’t implement full support to Yii framework.

Thanks a lot!


#11

Great!


(Bob) #12

Nice! :slight_smile:

I was wondering, is there any way to let Yii understand that JustAModel::model()->findByPk(1) returns a JustAModel model and not a CActiveRecord?

What I do have:


		

/**

 * @param string $className active record class name.

 * @return Message the static model class

 */

static public function model ( $className = __CLASS__ )

{

	return parent::model($className);

}



But that return is offcourse overwritten by the CActiveRecord->findByPk return of CactiveRecord




/**

 * @return CActiveRecord the record found. Null if none is found.

 */

public function findByPk($pk,$condition='',$params=array())

{




(Boaz Rymland) #13

[size="2"]do you want Yii or your IDE to know about this type?[/size]

If you want your IDE to know the type, there’s the usual but tedious way to let it know:




// use the comment syntax demonstrated below.

/* @var JustAModel $model */

$model = JustAModel::model()->findByPk(1)




(Dwi Wahyudi 14) #14

fantastic :D


(Johnwales Jw) #15

dot dot dot dot dot


(Petschephp) #16

Do you have any plans for supporting path alias’s and components set in protected/config/main.php?


(Mazx) #17

Yep. In future))


(Mazx) #18

somebody wants to auto-phpdocs? )))

Take new beta on mazx.ru)


(Bill) #19

I’m just trying out PHP Storm for the first time, and added YiiStorm. PHP Storm says it’s getting the following error:

class with name "com.yiistorm.actions.YiiStormConfigAction" not found [Plugin: YiiStorm]: class with name "com.yiistorm.actions.YiiStormConfigAction" not found [Plugin: YiiStorm]

Any idea what’s causing this? I don’t want to be missing out on any goodies dot dot dot :slight_smile:


(Mazx) #20

Wich version of plugin?