You are here

public function BestPracticesFolderStructure::getAction in Site Audit 8.3

.

Overrides SiteAuditCheckBase::getAction

File

src/Plugin/SiteAuditCheck/BestPracticesFolderStructure.php, line 54

Class

BestPracticesFolderStructure
Provides the BestPracticesFolderStructure Check.

Namespace

Drupal\site_audit\Plugin\SiteAuditCheck

Code

public function getAction() {
  $message = '';
  if ($this->score == SiteAuditCheckBase::AUDIT_CHECK_SCORE_WARN) {
    if (!$this->registry->contrib && !$this->registry->custom) {
      $message .= $this
        ->t('Put all the contrib modules inside the ./modules/contrib directory and custom modules inside the ./modules/custom directory.');
    }
    elseif (!$this->registry->contrib) {
      $message .= $this
        ->t('Put all the contrib modules inside the ./modules/contrib directory.');
    }
    elseif (!$this->registry->custom) {
      $message .= $this
        ->t('Put all the custom modules inside the ./modules/custom directory.');
    }
    return $message . ' ' . $this
      ->t('Moving modules may cause errors, so refer to https://www.drupal.org/node/183681 for information on how to best proceed.');
  }
}