/** * (non-PHPdoc) * add the fonts * @see Ai1ec_Less_Variable::set_up_renderable() */ public function set_up_renderable(Ai1ec_Renderable $renderable) { foreach ($this->fonts as $text => $key) { $renderable->add_option($text, $key); } $renderable->set_value($this->value); return $renderable; }
/** * (non-PHPdoc) * Set up the color picker * @see Ai1ec_Less_Variable::set_up_renderable() */ private function set_up_renderable(Ai1ec_Renderable $renderable) { $renderable->set_label($this->description); if (substr($this->value, 0, 3) === 'rgb') { if (substr($this->value, 0, 4) === 'rgba') { $renderable->set_format('rgba'); } else { $renderable->set_format('rgb'); } } return $renderable; }
/** * (non-PHPdoc) * add the fonts * @see Ai1ec_Less_Variable::set_up_renderable() */ public function set_up_renderable(Ai1ec_Renderable $renderable) { foreach ($this->fonts as $text => $key) { $renderable->add_option($text, $key); } if (!in_array($this->value, $this->fonts)) { $this->use_custom_value = true; $this->custom_value = $this->value; $this->value = self::CUSTOM_FONT; } $renderable->set_value($this->value); return $renderable; }
public function render() { $this->renderable->render(); }