original_string: public function addSplitButton($options = null)
      {
          $options = array_merge(
              array(
                  'text' => false,
                  'icons' => array(
                      'primary' => $this->js_triangle_class,
                  ),
              ),
              $options ?: array()
          );
  
          /** @type Button $but */
          $but = $this->owner->add('Button', array('options' => $options), $this->spot);
  
          /** @type Order $order */
          $order = $this->owner->add('Order');
          $order->move($but, 'after', $this)->now();
  
          // Not very pretty, but works well
          $but
              ->js(true)
              ->removeClass('ui-corner-all')
              ->addClass('ui-corner-right')
              ->css('margin-left', '-2px');
  
          $this
              ->js(true)
              ->removeClass('ui-corner-all')
              ->addClass('ui-corner-left')
              ->css('margin-right', '-2px');
  
          return $but;
      }
code: public function addSplitButton($options = null)
      {
          $options = array_merge(
              array(
                  'text' => false,
                  'icons' => array(
                      'primary' => $this->js_triangle_class,
                  ),
              ),
              $options ?: array()
          );
  
          /** @type Button $but */
          $but = $this->owner->add('Button', array('options' => $options), $this->spot);
  
          /** @type Order $order */
          $order = $this->owner->add('Order');
          $order->move($but, 'after', $this)->now();
  
          // Not very pretty, but works well
          $but
              ->js(true)
              ->removeClass('ui-corner-all')
              ->addClass('ui-corner-right')
              ->css('margin-left', '-2px');
  
          $this
              ->js(true)
              ->removeClass('ui-corner-all')
              ->addClass('ui-corner-left')
              ->css('margin-right', '-2px');
  
          return $but;
      }
code_tokens: public function addSplitButton ( $ options = null ) { $ options = array_merge ( array ( 'text' => false , 'icons' => array ( 'primary' => $ this -> js_triangle_class , ) , ) , $ options ? : array ( ) ) ; /** @type Button $but */ $ but = $ this -> owner -> add ( 'Button' , array ( 'options' => $ options ) , $ this -> spot ) ; /** @type Order $order */ $ order = $ this -> owner -> add ( 'Order' ) ; $ order -> move ( $ but , 'after' , $ this ) -> now ( ) ; // Not very pretty, but works well $ but -> js ( true ) -> removeClass ( 'ui-corner-all' ) -> addClass ( 'ui-corner-right' ) -> css ( 'margin-left' , '-2px' ) ; $ this -> js ( true ) -> removeClass ( 'ui-corner-all' ) -> addClass ( 'ui-corner-left' ) -> css ( 'margin-right' , '-2px' ) ; return $ but ; }
docstring: Adds another button after this one with an arrow and returns it.
  
  @param array $options Options to pass to new Button class
  
  @return Button New button object (button with triangle)
docstring_tokens: Adds another button after this one with an arrow and returns it .