Issue #3112683 by Hardik_Patel_12, andypost, alexpott: Remove all @deprecated code from Field component
parent
d57f7ebce1
commit
00bcb11b55
|
@ -288,34 +288,6 @@ class BaseFieldDefinition extends ListDataDefinition implements FieldDefinitionI
|
||||||
return ($cardinality == static::CARDINALITY_UNLIMITED) || ($cardinality > 1);
|
return ($cardinality == static::CARDINALITY_UNLIMITED) || ($cardinality > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function isQueryable() {
|
|
||||||
@trigger_error('BaseFieldDefinition::isQueryable() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Field\BaseFieldDefinition::hasCustomStorage(). See https://www.drupal.org/node/2856563.', E_USER_DEPRECATED);
|
|
||||||
return !$this->hasCustomStorage();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets whether the field is queryable.
|
|
||||||
*
|
|
||||||
* @param bool $queryable
|
|
||||||
* Whether the field is queryable.
|
|
||||||
*
|
|
||||||
* @return static
|
|
||||||
* The object itself for chaining.
|
|
||||||
*
|
|
||||||
* @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use
|
|
||||||
* \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage() instead.
|
|
||||||
*
|
|
||||||
* @see https://www.drupal.org/node/2856563
|
|
||||||
*/
|
|
||||||
public function setQueryable($queryable) {
|
|
||||||
@trigger_error('BaseFieldDefinition::setQueryable() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage(). See https://www.drupal.org/node/2856563.', E_USER_DEPRECATED);
|
|
||||||
$this->definition['queryable'] = $queryable;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets constraints for a given field item property.
|
* Sets constraints for a given field item property.
|
||||||
*
|
*
|
||||||
|
@ -634,24 +606,6 @@ class BaseFieldDefinition extends ListDataDefinition implements FieldDefinitionI
|
||||||
return $class::mainPropertyName();
|
return $class::mainPropertyName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper to retrieve the field item class.
|
|
||||||
*
|
|
||||||
* @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use
|
|
||||||
* \Drupal\Core\TypedData\ListDataDefinition::getClass() instead.
|
|
||||||
*/
|
|
||||||
protected function getFieldItemClass() {
|
|
||||||
@trigger_error('BaseFieldDefinition::getFieldItemClass() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\TypedData\ListDataDefinition::getClass(). See https://www.drupal.org/node/2933964.', E_USER_DEPRECATED);
|
|
||||||
if ($class = $this->getItemDefinition()->getClass()) {
|
|
||||||
return $class;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$type_definition = \Drupal::typedDataManager()
|
|
||||||
->getDefinition($this->getItemDefinition()->getDataType());
|
|
||||||
return $type_definition['class'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -108,20 +108,6 @@ interface FieldStorageDefinitionInterface extends CacheableDependencyInterface {
|
||||||
*/
|
*/
|
||||||
public function isRevisionable();
|
public function isRevisionable();
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether the field is queryable via QueryInterface.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* TRUE if the field is queryable.
|
|
||||||
*
|
|
||||||
* @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use
|
|
||||||
* \Drupal\Core\Field\FieldStorageDefinitionInterface::hasCustomStorage()
|
|
||||||
* instead.
|
|
||||||
*
|
|
||||||
* @see https://www.drupal.org/node/2856563
|
|
||||||
*/
|
|
||||||
public function isQueryable();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the human-readable label for the field.
|
* Returns the human-readable label for the field.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue