You are here

protected function RestfulBase::addDefaultValuesToPublicFields in RESTful 7

Add default values to the public fields array.

Parameters

array $public_fields: The unprocessed public fields array.

Return value

array The processed public fields array.

3 calls to RestfulBase::addDefaultValuesToPublicFields()
RestfulBase::setPublicFields in plugins/restful/RestfulBase.php
Set the public fields.
RestfulDataProviderDbQuery::addDefaultValuesToPublicFields in plugins/restful/RestfulDataProviderDbQuery.php
Add default values to the public fields array.
RestfulEntityBase::addDefaultValuesToPublicFields in plugins/restful/RestfulEntityBase.php
Add default values to the public fields array.
2 methods override RestfulBase::addDefaultValuesToPublicFields()
RestfulDataProviderDbQuery::addDefaultValuesToPublicFields in plugins/restful/RestfulDataProviderDbQuery.php
Add default values to the public fields array.
RestfulEntityBase::addDefaultValuesToPublicFields in plugins/restful/RestfulEntityBase.php
Add default values to the public fields array.

File

plugins/restful/RestfulBase.php, line 1138
Contains RestfulBase.

Class

RestfulBase
Class \RestfulBase

Code

protected function addDefaultValuesToPublicFields(array $public_fields = array()) {

  // Set defaults values.
  foreach (array_keys($public_fields) as $key) {

    // Set default values.
    $info =& $public_fields[$key];
    $info += array(
      'process_callbacks' => array(),
      'callback' => FALSE,
      'create_or_update_passthrough' => FALSE,
    );
  }
  return $public_fields;
}