getJs() public method

Get the formatter JavaScript.
public getJs ( ) : string
return string
Example #1
0
 /**
  * {@inheritdoc}
  */
 protected function getAssets()
 {
     $assets = parent::getAssets();
     $assets->addJs(function () {
         return $this->formatter->getJs();
     });
     return $assets;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getView()
 {
     $view = parent::getView();
     $view->getJs()->addString(function () {
         return $this->formatter->getJs();
     });
     return $view;
 }