@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 30 lines 570 B view raw
1<?php 2 3abstract class PhutilCalendarContainerNode 4 extends PhutilCalendarNode { 5 6 private $children = array(); 7 8 final public function getChildren() { 9 return $this->children; 10 } 11 12 final public function getChildrenOfType($type) { 13 $result = array(); 14 15 foreach ($this->getChildren() as $key => $child) { 16 if ($child->getNodeType() != $type) { 17 continue; 18 } 19 $result[$key] = $child; 20 } 21 22 return $result; 23 } 24 25 final public function appendChild(PhutilCalendarNode $node) { 26 $this->children[] = $node; 27 return $this; 28 } 29 30}