Exemplo n.º 1
0
 /**
  * Renders a simple button.
  *
  * @param Model $model
  *   The model, which hosts all the data we need.
  *
  * @return string
  *   The generated markup from the template files.
  */
 public function renderButton(Model $model)
 {
     $template = $this->getTemplateFileContent('singleButton');
     $template = str_replace('{help}', $this->renderHelp($model->getHelpid()), $template);
     $template = str_replace('{text}', $model->getNormal(), $template);
     return str_replace('{class}', $model->getName(), $template);
 }