/** * Load the member variables from an array * The array can contain the keys 'id', 'parent', 'fields'. The later of which * is an array indexed by field names and which contains the values of the field * * @param array $post */ public function setFromPost($post, $populate_on_set_id = false) { parent::setFromPost($post, $populate_on_set_id); if (is_array($post) && array_key_exists('fields', $post) && is_array($post['fields']) && array_key_exists('parent', $post['fields'])) { $this->setParent($post['fields']['parent']); } }