23            return $this->
renderMonth($component, $default_renderer);
 
   25            return $this->
renderButton($component, $default_renderer);
 
   36            $tpl_name = 
"tpl.primary.html";
 
   39            $tpl_name = 
"tpl.standard.html";
 
   42            $tpl_name = 
"tpl.shy.html";
 
   45            $tpl_name = 
"tpl.tag.html";
 
   49        $action = $component->getAction();
 
   53        $label = $component->getLabel();
 
   54        if ($label !== 
null) {
 
   55            $tpl->setVariable(
"LABEL", $component->getLabel());
 
   57        if ($component->isActive()) {
 
   58            $tpl->setCurrentBlock(
"with_href");
 
   60            $tpl->parseCurrentBlock();
 
   62            $tpl->touchBlock(
"disabled");
 
   64        $aria_label = $component->getAriaLabel();
 
   65        if ($aria_label != 
null) {
 
   66            $tpl->setCurrentBlock(
"with_aria_label");
 
   67            $tpl->setVariable(
"ARIA_LABEL", $aria_label);
 
   68            $tpl->parseCurrentBlock();
 
   70        if ($component->isAriaChecked()) {
 
   71            $tpl->setCurrentBlock(
"with_aria_checked");
 
   72            $tpl->setVariable(
"ARIA_CHECKED", 
"true");
 
   73            $tpl->parseCurrentBlock();
 
   89        parent::registerResources($registry);
 
   90        $registry->register(
'./src/UI/templates/js/Button/button.js');
 
   91        $registry->register(
"./libs/bower/bower_components/moment/min/moment-with-locales.min.js");
 
   92        $registry->register(
"./libs/bower/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js");
 
  100        $tpl->setVariable(
"FORCE_RENDERING", 
"");
 
  109            $tpl->setCurrentBlock(
"with_id");
 
  111            $tpl->parseCurrentBlock();
 
  117        $def = $component->getDefault();
 
  119        for (
$i = 1; 
$i<=12; 
$i++) {
 
  120            $this->
toJS(array(
"month_" . str_pad(
$i, 2, 
"0", STR_PAD_LEFT) . 
"_short"));
 
  125        $month = explode(
"-", 
$def);
 
  126        $tpl->setVariable(
"DEFAULT_LABEL", $this->
txt(
"month_" . str_pad($month[0], 2, 
"0", STR_PAD_LEFT) . 
"_short") . 
" " . $month[1]);
 
  127        $tpl->setVariable(
"DEF_DATE", $month[0] . 
"/1/" . $month[1]);
 
  129        $lang_key = in_array($this->
getLangKey(), array(
"ar", 
"bg", 
"cs", 
"da", 
"de", 
"el", 
"en", 
"es", 
"et", 
"fa", 
"fr", 
"hu", 
"it",
 
  130            "ja", 
"ka", 
"lt", 
"nl", 
"pl", 
"pt", 
"ro", 
"ru", 
"sk", 
"sq", 
"sr", 
"tr", 
"uk", 
"vi", 
"zh"))
 
  133        if ($lang_key == 
"zh") {
 
  136        $tpl->setVariable(
"LANG", $lang_key);
 
  141            $tpl->setCurrentBlock(
"with_id");
 
  143            $tpl->parseCurrentBlock();
 
  144            $tpl->setVariable(
"JSID", 
$id);
 
  152        $tpl->touchBlock(
'rel_' . $component->getRelevance());
 
  154        $classes = trim(join(
' ', $component->getClasses()));
 
  155        if ($classes !== 
'') {
 
  156            $tpl->setVariable(
"CLASSES", $classes);
 
  159        $bgcol = $component->getBackgroundColor();
 
  161            $tpl->setVariable(
"BGCOL", $bgcol->asHex());
 
  163        $forecol = $component->getForegroundColor();
 
  165            $tpl->setVariable(
"FORECOL", $forecol->asHex());
 
An exception for terminatinating execution or to throw for unit testing.
Base class for all component renderers.
txt($id)
Get a text from the language file.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.
checkComponent(Component $component)
Check if a given component fits this renderer and throw \LogicError if that is not the case.
getLangKey()
Get current language key.
toJS($key)
Add language var to client side (il.Language)
if(!array_key_exists('StateId', $_REQUEST)) $id
A component is the most general form of an entity in the UI.
An entity that renders components to a string output.