public function ResourceFieldCollection::setLimitFields in RESTful 7.2
Set the limit fields.
Parameters
string[] $limit_fields: The list of fields to set.
Overrides ResourceFieldCollectionInterface::setLimitFields
File
- src/
Plugin/ resource/ Field/ ResourceFieldCollection.php, line 331 - Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldCollection.
Class
Namespace
Drupal\restful\Plugin\resource\FieldCode
public function setLimitFields($limit_fields) {
$this->limitFields = $limit_fields;
// Make sure that the nested fields are added appropriately.
foreach ($limit_fields as $limit_field) {
$parts = explode('.', $limit_field);
$this->limitFields[] = $parts[0];
}
$this->limitFields = array_unique($this->limitFields);
}