/**
  * Render javascript of given component
  *
  * @param  string $component Component name
  * @param  string $element   DOM element where to render component
  * @param  array  $props     Optional. Array of properties
  * @param  string $variable  Optional. Name of variable on return
  *
  * @return string Javascript
  */
 public function renderJS($component, $element, $props = null, $variable = null)
 {
     return $this->reactJs->setComponent($component, $props)->getJS($element, $variable);
 }
Example #2
0
 /**
  * Overwrite constructor due to avoid this kind of stuff in Extension: str_replace('%', '%%', $library_path)
  */
 public function __construct($libpath, $apppath)
 {
     parent::__construct(file_get_contents($libpath), file_get_contents($apppath));
 }