public function GetLookupForCall() { $ServiceResponse = new ServiceResponse(); $SegmentsProcessed = array(); $ScriptsProcessed = array(); $ActionsProcessed = array(); $Segments = SegmentEntity::where('IsEnabled', 1)->get(); foreach ($Segments as $Segment) { $model = new stdClass(); $model->key = $Segment->SegmentID; $model->value = $Segment->SegmentName; $model->parentid = 0; $SegmentsProcessed[] = $model; } foreach (Constants::$CallActionsENUM as $key => $action) { $model = new stdClass(); $model->key = $key; $model->value = $action; $model->parentid = 0; $ActionsProcessed[] = $model; } $totalGroups = Common::CommonGroups(); $ServiceResponse->Data = array("SegmentList" => $SegmentsProcessed, "ActionList" => $ActionsProcessed, "GroupList" => $totalGroups); $ServiceResponse->IsSuccess = TRUE; return $ServiceResponse; }
public function Addnews($user) { $response = new ServiceResponse(); $totalGroups = Common::CommonGroups(); $response->Data = array("GroupList" => $totalGroups); $response->IsSuccess = TRUE; return $response; }