public function executeLeadership($request) { $options = $this->getParams(array('is_current')); //respond with 400 Bad Request if entity isn't an org if ($this->entity['primary_type'] != 'Org') { $this->returnStatusCode(400, "Can't retrieve leadership; requested entity is a person."); } $this->entities = EntityApi::getLeadership($this->entity['id'], $options); return 'Xml'; }