1<?php 2 3/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */ 4 5namespace ILIAS\UI\Implementation\Component\Button; 6 7use ILIAS\UI\Component\Button as B; 8use ILIAS\UI\Component\Signal; 9 10class Factory implements B\Factory 11{ 12 /** 13 * @inheritdoc 14 */ 15 public function standard($label, $action) 16 { 17 return new Standard($label, $action); 18 } 19 20 /** 21 * @inheritdoc 22 */ 23 public function primary($label, $action) 24 { 25 return new Primary($label, $action); 26 } 27 28 /** 29 * @inheritdoc 30 */ 31 public function close() 32 { 33 return new Close(); 34 } 35 36 /** 37 * @inheritdoc 38 */ 39 public function tag($label, $action) 40 { 41 return new Tag($label, $action); 42 } 43 44 /** 45 * @inheritdoc 46 */ 47 public function shy($label, $action) 48 { 49 return new Shy($label, $action); 50 } 51 52 /** 53 * @inheritdoc 54 */ 55 public function month($default) 56 { 57 return new Month($default); 58 } 59 60 /** 61 * @inheritdoc 62 */ 63 public function bulky($icon_or_glyph, $label, $action) 64 { 65 return new Bulky($icon_or_glyph, $label, $action); 66 } 67 68 /** 69 * @inheritdoc 70 */ 71 public function toggle(string $label, $on_action, $off_action, bool $is_on = false, Signal $click_signal = null) : \ILIAS\UI\Component\Button\Toggle 72 { 73 return new Toggle($label, $on_action, $off_action, $is_on, $click_signal); 74 } 75} 76