Drupal 8  8.0.2
Language Class Reference
Inheritance diagram for Language:

Public Member Functions

 getValue ()
 
 setValue ($value, $notify=TRUE)
 
 getString ()
 
 id ()
 
- Public Member Functions inherited from TypedData
 __construct ($definition, $name=NULL, TypedDataInterface $parent=NULL)
 
 getPluginId ()
 
 getPluginDefinition ()
 
 getDataDefinition ()
 
 getValue ()
 
 setValue ($value, $notify=TRUE)
 
 getString ()
 
 getConstraints ()
 
 validate ()
 
 applyDefaultValue ($notify=TRUE)
 
 setContext ($name=NULL, TraversableTypedDataInterface $parent=NULL)
 
 getName ()
 
 getRoot ()
 
 getPropertyPath ()
 
 getParent ()
 

Protected Attributes

 $id
 
 $language
 
- Protected Attributes inherited from TypedData
 $definition
 
 $name
 
 $parent
 

Additional Inherited Members

- Static Public Member Functions inherited from TypedData
static createInstance ($definition, $name=NULL, TraversableTypedDataInterface $parent=NULL)
 

Detailed Description

Defines the 'language' data type.

The plain value of a language is the language object, i.e. an instance of . For setting the value the language object or the language code as string may be passed.

( id = "language", label = ("Language"), description = ("A language object.") )

Member Function Documentation

getString ( )

{Returns a string representation of the data.

Returns
string
}

Implements TypedDataInterface.

References Language\getValue().

Here is the call graph for this function:

getValue ( )

Overrides TypedData::getValue().

Returns
|null

Implements TypedDataInterface.

References Drupal\languageManager().

Referenced by Language\getString().

Here is the call graph for this function:

Here is the caller graph for this function:

id ( )

{}

setValue (   $value,
  $notify = TRUE 
)

Overrides TypedData::setValue().

Both the langcode and the language object may be passed as value.

Implements TypedDataInterface.


The documentation for this class was generated from the following file: