コード例 #1
0
 /**
  * Overrides \RestfulEntityBaseNode::publicFieldsInfo().
  */
 public function publicFieldsInfo()
 {
     $public_fields = parent::publicFieldsInfo();
     $public_fields['location'] = array('property' => 'field_location', 'process_callbacks' => array(array($this, 'processLocation')));
     $public_fields['user'] = array('property' => 'author', 'resource' => array('user' => array('name' => 'users')));
     return $public_fields;
 }
コード例 #2
0
 /**
  * Overrides \RestfulEntityBaseNode::publicFieldsInfo().
  */
 public function publicFieldsInfo()
 {
     $public_fields = parent::publicFieldsInfo();
     $public_fields['body'] = array('property' => 'body', 'sub_property' => 'value');
     $public_fields['tags'] = array('property' => 'field_tags', 'resource' => array('tags' => 'tags'));
     $public_fields['image'] = array('property' => 'field_image', 'process_callbacks' => array(array($this, 'imageProcess')), 'image_styles' => array('thumbnail', 'medium', 'large'));
     $public_fields['user'] = array('property' => 'author', 'resource' => array('user' => array('name' => 'users', 'full_view' => TRUE)));
     return $public_fields;
 }
コード例 #3
0
 /**
  * Overrides \RestfulEntityBaseNode::publicFieldsInfo().
  */
 public function publicFieldsInfo()
 {
     $public_fields = parent::publicFieldsInfo();
     $public_fields['logo'] = array('property' => 'field_company_logo', 'image_styles' => array('thumbnail', 'medium', 'large'), 'process_callbacks  ' => array(array($this, 'imageProcess')));
     return $public_fields;
 }