1<?php 2 3/* Copyright (c) 2017 Jesús López <lopez@leifos.de> Extended GPL, see docs/LICENSE */ 4 5namespace ILIAS\UI\Implementation\Component\ViewControl; 6 7use ILIAS\UI\Component\ViewControl as VC; 8use ILIAS\UI\Component\Component; 9use ILIAS\UI\Component\Button\Button; 10use ILIAS\UI\Implementation\Component\SignalGeneratorInterface; 11 12class Factory implements VC\Factory 13{ 14 /** 15 * @var SignalGeneratorInterface 16 */ 17 protected $signal_generator; 18 19 /** 20 * @param SignalGeneratorInterface $signal_generator 21 */ 22 public function __construct(SignalGeneratorInterface $signal_generator) 23 { 24 $this->signal_generator = $signal_generator; 25 } 26 27 /** 28 * @inheritdoc 29 */ 30 public function mode($labelled_actions, $aria_label) 31 { 32 return new Mode($labelled_actions, $aria_label); 33 } 34 35 /** 36 * @inheritdoc 37 */ 38 public function section(Button $previous_action, \ILIAS\UI\Component\Component $button, Button $next_action) 39 { 40 return new Section($previous_action, $button, $next_action); 41 } 42 43 /** 44 * @inheritdoc 45 */ 46 public function sortation(array $options) 47 { 48 return new Sortation($options, $this->signal_generator); 49 } 50 51 /** 52 * @inheritdoc 53 */ 54 public function pagination() 55 { 56 return new Pagination($this->signal_generator); 57 } 58} 59