public getReactComponent ( string $name ) : string | ||
$name | string | Used to name the DOM elements and obtain the initial model. |
Résultat | string | A snippet good for adding to a SS template. |
public function getReactComponent($name)
{
$model = $this->getModel($name);
$model['InitialSecurityID'] = $this->getSecurityToken()->getValue();
return $this->customise(['Name' => $name, 'Model' => htmlentities(json_encode($model))])->renderWith('ReactTemplate');
}