Commit 210cd85c authored by git's avatar git Committed by Yas Naoi
Browse files

Issue #3017877 by shidat, Xiaohua Guan, yas, baldwinlouie: Fix code standard...

Issue #3017877 by shidat, Xiaohua Guan, yas, baldwinlouie: Fix code standard error "ERROR | Public method name "abc_xyz" is not in lowerCamel format"
parent b9769fe8
Loading
Loading
Loading
Loading
+1 −1
Changes for cloud.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ function cloud_views_pre_render(ViewExecutable $view) {
    foreach ($view->result as $key => $result) {
      /* @var \Drupal\cloud\Entity\CloudConfigInterface $cloud */
      $cloud = $result->_entity;
      if (!$account->hasPermission('view ' . $cloud->cloud_context())) {
      if (!$account->hasPermission('view ' . $cloud->getCloudContext())) {
        unset($view->result[$key]);
      }
    }
+1 −1
Changes for modules/cloud_server_template/cloud_server_template.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ function cloud_server_template_theme_suggestions_cloud_server_template(array $va
 */
function cloud_server_template_cloud_config_delete(\Drupal\cloud\Entity\CloudConfig $cloud_config) {
  $ids = \Drupal::entityQuery('cloud_server_template')
    ->condition('cloud_context', $cloud_config->cloud_context())
    ->condition('cloud_context', $cloud_config->getCloudContext())
    ->execute();
  if (count($ids)) {
    /* @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager */
+4 −4
Changes for modules/cloud_server_template/src/Controller/CloudServerTemplateAccessControlHandler.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -22,15 +22,15 @@ class CloudServerTemplateAccessControlHandler extends EntityAccessControlHandler
    switch ($operation) {
      case 'view':
        if (!$entity->isPublished()) {
          return AccessResult::allowedIfHasPermissions($account, ['view unpublished cloud server template entities', 'view ' . $entity->cloud_context()]);
          return AccessResult::allowedIfHasPermissions($account, ['view unpublished cloud server template entities', 'view ' . $entity->getCloudContext()]);
        }
        return AccessResult::allowedIfHasPermissions($account, ['view published cloud server template entities', 'view ' . $entity->cloud_context()]);
        return AccessResult::allowedIfHasPermissions($account, ['view published cloud server template entities', 'view ' . $entity->getCloudContext()]);

      case 'update':
        return AccessResult::allowedIfHasPermissions($account, ['edit cloud server template entities', 'view ' . $entity->cloud_context()]);
        return AccessResult::allowedIfHasPermissions($account, ['edit cloud server template entities', 'view ' . $entity->getCloudContext()]);

      case 'delete':
        return AccessResult::allowedIfHasPermissions($account, ['delete cloud server template entities', 'view ' . $entity->cloud_context()]);
        return AccessResult::allowedIfHasPermissions($account, ['delete cloud server template entities', 'view ' . $entity->getCloudContext()]);
    }

    // Unknown operation, no opinion.
+4 −4
Changes for modules/cloud_server_template/src/Controller/CloudServerTemplateController.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ class CloudServerTemplateController extends ControllerBase implements ContainerI
        $date = \Drupal::service('date.formatter')->format($revision->getRevisionCreationTime(), 'short');
        if ($vid != $cloud_server_template->getRevisionId()) {
          $link = $this->l($date, new Url('entity.cloud_server_template.revision', [
            'cloud_context' => $cloud_server_template->cloud_context(),
            'cloud_context' => $cloud_server_template->getCloudContext(),
            'cloud_server_template' => $cloud_server_template->id(),
            'cloud_server_template_revision' => $vid,
          ]));
@@ -171,13 +171,13 @@ class CloudServerTemplateController extends ControllerBase implements ContainerI
              'title' => $this->t('Revert'),
              'url' => $has_translations
              ? Url::fromRoute('entity.cloud_server_template.translation_revert', [
                'cloud_context' => $cloud_server_template->cloud_context(),
                'cloud_context' => $cloud_server_template->getCloudContext(),
                'cloud_server_template' => $cloud_server_template->id(),
                'cloud_server_template_revision' => $vid,
                'langcode' => $langcode,
              ])
              : Url::fromRoute('entity.cloud_server_template.revision_revert', [
                'cloud_context' => $cloud_server_template->cloud_context(),
                'cloud_context' => $cloud_server_template->getCloudContext(),
                'cloud_server_template' => $cloud_server_template->id(),
                'cloud_server_template_revision' => $vid,
              ]),
@@ -188,7 +188,7 @@ class CloudServerTemplateController extends ControllerBase implements ContainerI
            $links['delete'] = [
              'title' => $this->t('Delete'),
              'url' => Url::fromRoute('entity.cloud_server_template.revision_delete', [
                'cloud_context' => $cloud_server_template->cloud_context(),
                'cloud_context' => $cloud_server_template->getCloudContext(),
                'cloud_server_template' => $cloud_server_template->id(),
                'cloud_server_template_revision' => $vid,
              ]),
+2 −2
Changes for modules/cloud_server_template/src/Controller/CloudServerTemplateListBuilder.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -39,13 +39,13 @@ class CloudServerTemplateListBuilder extends CloudContentListBuilder {
  public function buildRow(EntityInterface $entity) {

    $account = \Drupal::currentUser();
    if ($account->hasPermission('view ' . $entity->cloud_context())) {
    if ($account->hasPermission('view ' . $entity->getCloudContext())) {
      $row['name'] = Link::createFromRoute(
        $entity->label(),
        'entity.cloud_server_template.canonical',
        [
          'cloud_server_template' => $entity->id(),
          'cloud_context' => $entity->cloud_context()
          'cloud_context' => $entity->getCloudContext()
        ]
      );

Loading