33 protected int $base_location = self::DATADIR
43 return hash(
"sha256", self::class .
"::" . $this->component_dir . $this->base_location);
51 if ($this->base_location === self::DATADIR) {
53 } elseif ($this->base_location === self::WEBDIR) {
54 $data_dir = dirname(__DIR__, 5) .
"/public/data";
57 throw new LogicException(
'cannot determine base directory');
91 $this->path = $this->
buildPath($environment);
92 return parent::achieve($environment);
104 $this->path = $this->
buildPath($environment);
105 return parent::isApplicable($environment);
110 if (
null === $environment->
getResource(Environment::RESOURCE_ILIAS_INI)) {
113 return null !== $environment->
getResource(Environment::RESOURCE_CLIENT_ID);
Signals that some goal won't be achievable by actions of the system ever.
buildPath(Environment $environment)
checkEnvironment(Environment $environment)
getHash()
Get a hash for this objective.
isApplicable(Environment $environment)
@inheritDoc
__construct(string $component_dir, protected int $base_location=self::DATADIR)
getPreconditions(Environment $environment)
achieve(Environment $environment)
Objectives can be achieved.
An environment holds resources to be used in the setup process.
hasConfigFor(string $component)
getConfigFor(string $component)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An objective is a desired state of the system that is supposed to be created by the setup.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc