* @since 1.0 */ class StarRating extends \kartik\base\InputWidget { /** * @inherit doc * @throw InvalidConfigException */ public function init() { parent::init (); $this->registerAssets (); if ($this->pluginLoading) { Html::addCssClass ( $this->options, 'rating-loading' ); } echo $this->getInput ( 'textInput' ); } /** * Registers the needed assets */ public function registerAssets() { $view = $this->getView (); StarRatingAsset::register ( $view ); $this->registerPlugin ( 'rating' ); } }