an iterable of all `ContainerType` classes that are activated. */ public static function getActivatedContainerTypes(): iterable { $args = [ ContainerType::getContainerTypes(), DBManager::get()->fetchFirst( 'SELECT `container_type` FROM `cw_container_type_states` WHERE `activated` = 0' ), ]; return [...array_diff(...$args)]; } /** * Activate the `ContainerType` this `ContainerTypeState` is relating to. * * @return `true` on success, `false` otherwise */ public function activate(): bool { $this->activated = 1; return (bool) $this->store(); } /** * Deactivate the `ContainerType` this `ContainerTypeState` is relating to. * * @return `true` on success, `false` otherwise */ public function deactivate(): bool { $this->activated = 0; return (bool) $this->store(); } }