Advertisement
Guest User

Untitled

a guest
May 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. /** @var array $params Current get params without c **/
  3. $params = $_GET;
  4. unset( $params[ 'c' ] );
  5.  
  6. /** @var string $url **/
  7. $url = Yii::app()->controller->createUrl( Yii::app()->controller->id . '/' . Yii::app()->controller->action->id, $params );
  8.  
  9. /**
  10. * Create form with nedded c param included.
  11. */
  12. echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_INLINE, $url, 'GET', [ 'class' => 'plugin-submit-onchange' ]);
  13. echo TbHtml::label('Number of items in list:', 'c');
  14. echo TbHtml::dropDownList( 'c', $this->_c, $this->options );
  15. echo TbHtml::endForm();
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement