Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Label.php

class Label

Same name in this branch
  1. 11.1.x vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php \PhpParser\Node\Stmt\Label
  2. 11.1.x core/lib/Drupal/Core/Render/Element/Label.php \Drupal\Core\Render\Element\Label

Protobuf type <code>google.protobuf.FieldDescriptorProto.Label</code>

Hierarchy

  • class \Google\Protobuf\Internal\FieldDescriptorProto\Label

Expanded class hierarchy of Label

140 string references to 'Label'
Action::create in core/modules/system/src/Entity/Action.php
Constructs a new entity object, without permanently saving it.
Action::prepareRow in core/modules/system/src/Plugin/migrate/source/Action.php
Adds additional data to the row.
BlockContentTypeForm::form in core/modules/block_content/src/BlockContentTypeForm.php
Gets the actual form array to be built.
BlockForm::form in core/modules/block/src/BlockForm.php
Gets the actual form array to be built.
BlockPluginTrait::submitConfigurationForm in core/lib/Drupal/Core/Block/BlockPluginTrait.php
Most block plugins should not override this method. To add submission handling for a specific block type, override BlockBase::blockSubmit().

... See full list

File

vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php, line 12

Namespace

Google\Protobuf\Internal\FieldDescriptorProto
View source
class Label {
    
    /**
     * 0 is reserved for errors
     *
     * Generated from protobuf enum <code>LABEL_OPTIONAL = 1;</code>
     */
    const LABEL_OPTIONAL = 1;
    
    /**
     * Generated from protobuf enum <code>LABEL_REQUIRED = 2;</code>
     */
    const LABEL_REQUIRED = 2;
    
    /**
     * Generated from protobuf enum <code>LABEL_REPEATED = 3;</code>
     */
    const LABEL_REPEATED = 3;
    private static $valueToName = [
        self::LABEL_OPTIONAL => 'LABEL_OPTIONAL',
        self::LABEL_REQUIRED => 'LABEL_REQUIRED',
        self::LABEL_REPEATED => 'LABEL_REPEATED',
    ];
    public static function name($value) {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }
    public static function value($name) {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }

}

Members

Title Sort descending Modifiers Object type Summary
Label::$valueToName private static property
Label::LABEL_OPTIONAL constant 0 is reserved for errors
Label::LABEL_REPEATED constant Generated from protobuf enum &lt;code&gt;LABEL_REPEATED = 3;&lt;/code&gt;
Label::LABEL_REQUIRED constant Generated from protobuf enum &lt;code&gt;LABEL_REQUIRED = 2;&lt;/code&gt;
Label::name public static function
Label::value public static function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal