ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
UIHelper.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\GlobalScreen_\UI;
22 
27 
31 trait UIHelper
32 {
33  protected function nok(Factory $f, bool $as_image = false): Icon|Image
34  {
35  if ($as_image) {
36  return $f->image()->standard(
37  'assets/images/standard/icon_unchecked.svg',
38  ''
39  );
40  }
41 
42  return $f->symbol()->icon()->custom(
43  'assets/images/standard/icon_unchecked.svg',
44  '',
45  'small'
46  );
47  }
48 
49  protected function ok(Factory $f, bool $as_image = false): Icon|Image
50  {
51  if ($as_image) {
52  return $f->image()->standard(
53  'assets/images/standard/icon_checked.svg',
54  ''
55  );
56  }
57 
58  return $f->symbol()->icon()->custom(
59  'assets/images/standard/icon_checked.svg',
60  '',
61  'small'
62  );
63  }
64 }