Problem/Motivation

  • Check and align the comments at Drupal\k8s\Plugin\views\field\K8s<ResourceName>BulkForm
  • The following is a list of CamelCase resource names (the other one is NOT CamelCame):
    • ConfigMaps
    • CronJob
    • DaemonSet
    • LimitRange
    • ReplicaSet
    • ServiceAccount
    • StatefulSet
  • See also the Glossary page: https://kubernetes.io/docs/reference/glossary/?all=true
  • Format:
    /**
     * Defines a ReplicaSet operations bulk form element.
     *
     * @ViewsField("<resource_name>_bulk_form")
     */
    class K8s<ResourceName>BulkForm extends BulkForm {
    
      /**
       * {@inheritdoc}
       */
      protected function emptySelectedMessage(): TranslatableMarkup {
        return $this->t('No <Resource Name> selected.');
      }
    
    }
    
  • For example:
    /**
     * Defines a ReplicaSet operations bulk form element.
     *
     * @ViewsField("replica_set_bulk_form")
     */
    class K8sReplicaSetBulkForm extends BulkForm {
    
      /**
       * {@inheritdoc}
       */
      protected function emptySelectedMessage(): TranslatableMarkup {
        return $this->t('No ReplicaSet selected.');
      }
    
    }
    
    /**
     * Defines a Network Policy operations bulk form element.
     *
     * @ViewsField("network_policy_bulk_form")
     */
    class K8sNetworkPolicyBulkForm extends BulkForm {
    
      /**
       * {@inheritdoc}
       */
      protected function emptySelectedMessage(): TranslatableMarkup {
        return $this->t('No Network Policy selected.');
      }
    

Issue fork cloud-3225420

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yas created an issue. See original summary.

yas’s picture

Issue summary: View changes

TamakiFujino made their first commit to this issue’s fork.

TamakiFujino’s picture

Assigned: Unassigned » TamakiFujino
Status: Active » Needs work

TamakiFujino’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community

@tamakifujino

Thank you for the refactoring. It looks good. I'll merge the patch to 4.x and close this issue as Fixed.

  • yas committed f759596 on 4.x authored by TamakiFujino
    Issue #3225420 by TamakiFujino, yas: Align the comments at Drupal\k8s\...

yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.