Exemplo n.º 1
0
 public function getTitle()
 {
     $title = parent::getTitle();
     if ($title === null) {
         return mt('setup', 'PHP Version');
     }
     return $title;
 }
 public function getTitle()
 {
     $title = parent::getTitle();
     if ($title === null) {
         return mt('setup', 'Read- and writable configuration directory');
     }
     return $title;
 }
Exemplo n.º 3
0
 public function getTitle()
 {
     $title = parent::getTitle();
     if ($title === null) {
         return sprintf(mt('setup', '%s Platform'), ucfirst($this->getCondition()));
     }
     return $title;
 }
Exemplo n.º 4
0
 public function getTitle()
 {
     $title = parent::getTitle();
     if ($title === $this->getAlias()) {
         if ($title === null) {
             $title = $this->getCondition();
         }
         return sprintf(mt('setup', 'PHP Module: %s'), $title);
     }
     return $title;
 }
Exemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function getStateText()
 {
     $stateText = parent::getStateText();
     if ($stateText === null) {
         $alias = $this->getAlias();
         if ($this->getState()) {
             $stateText = $alias === null ? sprintf(mt('setup', 'The %s class is available.', 'setup.requirement.class'), $this->getCondition()) : sprintf(mt('setup', 'The %s is available.', 'setup.requirement.class'), $alias);
         } else {
             $stateText = $alias === null ? sprintf(mt('setup', 'The %s class is missing.', 'setup.requirement.class'), $this->getCondition()) : sprintf(mt('setup', 'The %s is missing.', 'setup.requirement.class'), $alias);
         }
     }
     return $stateText;
 }
Exemplo n.º 6
0
 /**
  * Return whether the given requirement equals this one
  *
  * @param   Requirement     $requirement
  *
  * @return  bool
  */
 public function equals(Requirement $requirement)
 {
     if ($requirement instanceof static) {
         return $this->getCondition() === $requirement->getCondition();
     }
     return false;
 }
Exemplo n.º 7
0
 /**
  * Register a requirement
  *
  * @param   Requirement     $requirement    The requirement to add
  *
  * @return  RequirementSet
  */
 public function add(Requirement $requirement)
 {
     $merged = false;
     foreach ($this->requirements as $knownRequirement) {
         if ($knownRequirement instanceof Requirement && $requirement->equals($knownRequirement)) {
             $knownRequirement->setOptional($requirement->isOptional());
             foreach ($requirement->getDescriptions() as $description) {
                 $knownRequirement->addDescription($description);
             }
             $merged = true;
             break;
         }
     }
     if (!$merged) {
         $this->requirements[] = $requirement;
     }
     return $this;
 }