ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilICalComponent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
28{
34 public function __construct($a_name)
35 {
36 parent::__construct($a_name);
37 }
38
44 public function getItemsByName(string $a_name, bool $a_recursive = true): array
45 {
46 $found = [];
47 foreach ($this->getItems() as $item) {
48 if ($item->getName() == $a_name) {
49 $found[] = $item;
50 }
51 if ($a_recursive) {
52 foreach ($item->getItemsByName($a_name) as $hit) {
53 $found[] = $hit;
54 }
55 }
56 }
57 return $found;
58 }
59}
Represents a ical component.
getItemsByName(string $a_name, bool $a_recursive=true)
get items by name @access public
__construct($a_name)
Constructor @access public.
Abstract base class for all ical items (Component, Parameter and Value)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc