Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -12,6 +12,12 @@ use Drupal\rdf\RdfMappingInterface;
* @ConfigEntityType(
* id = "rdf_mapping",
* label = @Translation("RDF mapping"),
* label_singular = @Translation("RDF mapping item"),
* label_plural = @Translation("RDF mappings items"),
* label_count = @PluralTranslation(
* singular = "@count RDF mapping item",
* plural = "@count RDF mapping items",
* ),
* config_prefix = "mapping",
* entity_keys = {
* "id" = "id"
@ -53,20 +59,20 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
*
* @var array
*/
protected $types = array();
protected $types = [];
/**
* The mappings for fields on this bundle.
*
* @var array
*/
protected $fieldMappings = array();
protected $fieldMappings = [];
/**
* {@inheritdoc}
*/
public function getPreparedBundleMapping() {
return array('types' => $this->types);
return ['types' => $this->types];
}
/**
@ -74,9 +80,9 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
*/
public function getBundleMapping() {
if (!empty($this->types)) {
return array('types' => $this->types);
return ['types' => $this->types];
}
return array();
return [];
}
/**
@ -94,16 +100,16 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
* {@inheritdoc}
*/
public function getPreparedFieldMapping($field_name) {
$field_mapping = array(
$field_mapping = [
'properties' => NULL,
'datatype' => NULL,
'datatype_callback' => NULL,
'mapping_type' => NULL,
);
];
if (isset($this->fieldMappings[$field_name])) {
$field_mapping = array_merge($field_mapping, $this->fieldMappings[$field_name]);
}
return empty($field_mapping['properties']) ? array() : $field_mapping;
return empty($field_mapping['properties']) ? [] : $field_mapping;
}
/**
@ -113,13 +119,13 @@ class RdfMapping extends ConfigEntityBase implements RdfMappingInterface {
if (isset($this->fieldMappings[$field_name])) {
return $this->fieldMappings[$field_name];
}
return array();
return [];
}
/**
* {@inheritdoc}
*/
public function setFieldMapping($field_name, array $mapping = array()) {
public function setFieldMapping($field_name, array $mapping = []) {
$this->fieldMappings[$field_name] = $mapping;
return $this;
}