query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
/////////////////////// Family planning // ///////////////////// Operation listslGet Fetch list of Family Planning (for select options).
public function listsFamilyplanningGet() { $response = Familyplanning::all(); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function fetchList($listType,$displayCol, $selectedValue, $showIdle=false, $translate=true,$applyRestrictionClause=false) {\r\n//scriptLog(\"fetchList($listType,$displayCol, $selectedValue, $showIdle, $translate)\");\r\n $res=array();\r\n if (! SqlElement::class_exists($listType)) {\r\n debugTraceLog(\"WARNING : SqlElement::fetchList() called for not valid class '$listType'\");\r\n return array();\r\n }\r\n $obj=new $listType();\r\n $calculated=false;\r\n $field=$obj->getDatabaseColumnName($displayCol);\r\n if (property_exists($obj, '_calculateForColumn') and isset($obj->_calculateForColumn[$displayCol])) {\r\n \t$field=$obj->_calculateForColumn[$displayCol];\r\n \t$calculated=true;\r\n }\r\n $query=\"select \" . $obj->getDatabaseColumnName('id') . \" as id, \" . $field . \" as name from \" . $obj->getDatabaseTableName() ;\r\n if ($showIdle or !property_exists($obj, 'idle')) {\r\n $query.= \" where (1=1 \";\r\n } else {\r\n $query.= \" where (idle=0 \";\r\n }\r\n $crit=$obj->getDatabaseCriteria();\r\n foreach ($crit as $col => $val) {\r\n \tif ($obj->getDatabaseColumnName($col)=='idProject' and ($val=='*' or !$val)) {$val=0;}\r\n \tif ($val===null) {\r\n \t $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . ' IS NULL';\r\n \t} else {\r\n $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . '=' . Sql::str($val);\r\n \t}\r\n }\r\n if ($applyRestrictionClause) {\r\n \t$query.=' and '.getAccesRestrictionClause($listType,null,true);\r\n }\r\n $query .=')';\r\n if ($selectedValue) {\r\n \tif ($selectedValue!='*') {\r\n $query .= \" or \" . $obj->getDatabaseColumnName('id') .'= ' . Sql::str($selectedValue) ;\r\n \t}\r\n }\r\n if (property_exists($obj,'_sortCriteriaForList')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.'.$obj->_sortCriteriaForList;\r\n } else if (property_exists($obj,'sortOrder')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.sortOrder, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'order')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.order, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'baselineDate')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.baselineDate, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n }\r\n $result=Sql::query($query);\r\n if (Sql::$lastQueryNbRows > 0) {\r\n while ($line = Sql::fetchLine($result)) {\r\n $name=$line['name'];\r\n if ($obj->isFieldTranslatable($displayCol) and $translate){\r\n \tif ($listType=='Linkable' and substr($name,0,7)=='Context') {\r\n \t\t$name=SqlList::getNameFromId('ContextType', substr($name,7,1));\r\n \t} else {\r\n $name=i18n($name);\r\n \t}\r\n }\r\n if ($displayCol=='name' and property_exists($obj,'_constructForName') and !$calculated) {\r\n \t$nameObj=new $listType($line['id'],true);\r\n \t$name=$nameObj->name;\r\n }\r\n $res[($line['id'])]=$name;\r\n }\r\n }\r\n // Plugin - start - Management for event \"list\"\r\n global $pluginAvoidRecursiveCall;\r\n if (! $pluginAvoidRecursiveCall) {\r\n $pluginAvoidRecursiveCall=true;\r\n $pluginObjectClass=$listType;\r\n $table=$res;\r\n $lstPluginEvt=Plugin::getEventScripts('list',$pluginObjectClass);\r\n foreach ($lstPluginEvt as $script) {\r\n require $script; // execute code\r\n }\r\n $res=$table;\r\n $pluginAvoidRecursiveCall=false;\r\n }\r\n // Plugin - end\r\n if ($translate) {\r\n self::$list[$listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } else {\r\n \tself::$list['no_tr_' . $listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } \r\n return $res;\r\n }", "public abstract function get_lists();", "public function getTravelingLocalFormList() { \r\n\t $predicate = new Predicate(); \r\n\t\t$sql = $this->getSql(); \r\n\t\t$select = $sql->select(); \r\n\t\t$select->from(array('e' => $this->entityTable)) \r\n\t\t ->columns(array('*')) \r\n\t\t\t ->where($predicate->greaterThanOrEqualTo('effectiveFrom',date('Y-m-d')))\r\n\t\t\t ->where(array('isCanceled' => 0))\r\n\t\t\t ->where(array('isApproved' => 0))\r\n\t\t// ->where($predicate->lessThanOrEqualTo('approvedLevel','approvalLevel') )\r\n\t\t; \r\n\t\t$sqlString = $sql->getSqlStringForSqlObject($select); \r\n\t\t//echo $sqlString; \r\n\t\t//exit; \r\n\t\treturn $this->adapter->query($sqlString)->execute(); \r\n\t}", "public function fetchList();", "protected abstract function fetchLists();", "public function getTravelingLocalFormListAdmin() {\r\n\t\t//$predicate = new Predicate();\r\n\t\t$sql = $this->getSql();\r\n\t\t$select = $sql->select();\r\n\t\t$select->from(array('e' => $this->entityTable))\r\n\t\t\t ->columns(array('*'))\r\n\t\t\t //->where($predicate->lessThanOr('effectiveFrom',date('Y-m-d')))\r\n\t\t\t ->where(array('isCanceled' => 0))\r\n\t\t\t ->where(array('isApproved' => 0))\r\n\t\t// ->where($predicate->lessThanOrEqualTo('approvedLevel','approvalLevel') )\r\n\t\t;\r\n\t\t$sqlString = $sql->getSqlStringForSqlObject($select);\r\n\t\t//echo $sqlString;\r\n\t\t//exit;\r\n\t\treturn $this->adapter->query($sqlString)->execute();\r\n\t}", "static function list($q=\"\",$f=\"\"){\n \t$query = \"select \n\t\t\t\t\tcloto_id.id,\n\t\t\t\t\tcloto_id.tipo,\n\t\t\t\t\tcloto_type.nome AS tipo_nome,\n\t\t\t\t\t\n\t\t\t\t\tif(cloto_id.tipo = '1',cloto_label.value,\n\t\t\t\t\t\tif(cloto_id.tipo = '2',cloto_number.value,\n\t\t\t\t\t\t\tif(cloto_id.tipo = '3',cloto_text.value,'[object]')\n\t\t\t\t\t\t)\n\t\t\t\t\t) as value\n\t\t\t\tfrom cloto_id\n\t\t\t\t\n\t\t\t\tleft join cloto_label on cloto_id.id = cloto_label.id\n\t\t\t\tleft join cloto_number on cloto_id.id = cloto_number.id\n\t\t\t\tleft join cloto_text on cloto_id.id = cloto_text.id\n\t\t\t\tleft join cloto_object on cloto_id.id = cloto_object.id\n\t\t\t\t\n\t\t\t\tINNER JOIN cloto_type ON cloto_id.tipo = cloto_type.id\n\t\t\t;\";\n \t$retorno = dbQuery($query);\n\n \treturn $retorno;\n\n }", "public function listsFamilyplanningByIdGet($familyplanning_id)\r\n {\r\n $response = FamilyPlanning::findOrFail();\r\n return response()->json($response, 200);\r\n }", "function getList()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t$db\t=& $this->getDBO();\r\n\r\n\t\t// Determine paging variables\r\n\t\t$limit = $mainframe->getUserStateFromRequest( \"viewlistlimit\", 'limit', 10 );\r\n\t\t$limitstart = $mainframe->getUserStateFromRequest( \"viewlimitstart\", 'limitstart', 0 );\r\n\r\n\t\t// Determine basic variables \r\n\t\t$option = JRequest::getVar('option', '', '', 'string');\r\n\t\t$version = JRequest::getVar('version', '', '', 'string');\r\n\t\t$type = JRequest::getVar('type', '', '', 'string');\r\n\t\t$name = JRequest::getVar('name', '', '', 'string');\r\n\t\t$this->_list['option'] = JRequest::getVar('option', '', '', 'string'); \r\n\t\t$this->_list['version'] = $version;\r\n\t\t$this->_list['stype'] = $type;\r\n\t\t$this->_list['sname'] = $name;\r\n\r\n\t\t// Create option field for servertype\r\n\t\t$types[] = Array();\r\n\t\t$array = Array (0 => Array ('component', JText::_( 'Component')),\r\n\t \t 1 => Array ('module', JText::_( 'Module')),\r\n\t\t 2 => Array ('plugin', JText::_( 'Plugin')),\r\n\t \t 3 => Array ('template', 'Template'),\r\n\t \t 4 => Array ('language', JText::_( 'Language'))\r\n );\r\n\r\n\t\t$types[] = mosHTML::makeOption( '', JText::_('Select Type'));\r\n\t\tfor ($i=0; $i<count($array); $i++) {\r\n\t\t\t$types[] = mosHTML::makeOption( $array[$i][0], $array[$i][1] );\r\n\t\t} # End for\r\n\t\t$this->_list['type'] = mosHTML::selectList( $types, 'type', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $type);\r\n\r\n\t\t// Create option field for package names.\r\n\t\t$query = \"SELECT name FROM #__jpackagedir_packages GROUP BY 1\";\r\n\t\t$db->setQuery($query);\r\n\t\t$rows = $db->loadObjectList();\r\n\r\n\t\t$names[] = mosHTML::makeOption( '', JText::_('Select Package'));\r\n\t\tforeach ($rows as $row) {\r\n\t\t\t$names[] = mosHTML::makeOption( $row->name, $row->name );\r\n\t\t} # End for\r\n\t\t$this->_list['name'] = mosHTML::selectList( $names, 'name', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $name);\r\n\r\n\t\t// Determine where clause\r\n\t\t$this->_list['rows'] = Array();\r\n\t\t$where = Array();\r\n\t\tif (!empty($type)) { $where[] = \"type = '$type'\"; }\r\n\t\tif (!empty($name)) { $where[] = \"name = '$name'\"; }\r\n\t\tif (!empty($version)) { $where[] = \"version = '$version'\"; }\r\n\t\t$where = (count($where) ? \"\\n WHERE \".implode(' AND ', $where) : '');\r\n\r\n\t\t// Get the total number of records, this is used for paging option\r\n\t\t// in form.\r\n\t\t$query = \"SELECT COUNT(*) FROM #__jpackagedir_packages\" . $where;\r\n\t\t$db->setQuery( $query );\r\n\t\t$total = $db->loadResult();\r\n\r\n\t\t// Now read the current dataset, and pass it on...\r\n\t\t$query = \"SELECT * FROM #__jpackagedir_packages $where ORDER BY version\";\r\n\t\t$db->setQuery( $query, $limitstart, $limit );\r\n\t\t$this->_list['rows'] = $this->_db->loadObjectList();\r\n\t\tif ($db->getErrorNum()) {\r\n\t\t\treturn false;\r\n\t\t} # End if\r\n\r\n\r\n\t\t// Initialize the paging, offer the total number of records, the first record\r\n\t\t// for current page and the number of records to render.\r\n\t\tinclude_once(JPATH_BASE.DS.\"includes\".DS.\"pageNavigation.php\");\r\n\t\t$this->_list['pagenav'] = new mosPageNav( $total, $limitstart, $limit );\r\n\r\n\t\treturn $this->_list;\r\n\t}", "public function list();", "public function list();", "public function list();", "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idRecepcion = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($offset!==''){ \n\t\t\t\tif ($idRecepcion!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idRecepcion))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private function lists(){\n\t\t\t$constrain = '';\n\t\t\t$offset = $this->validateNumber(isset($_GET['offset'])?$_GET['offset']:NULL);\n\t\t\t$idRemision = $this->validateNumber(isset($_GET['id'])?$_GET['id']:NULL);\n\t\t\t$constrains = isset($_POST['constrains'])?$_POST['constrains']:'1 = 1';\n\t\t\t\n\t\t\tif($constrains === '1 = 1'){\n\t\t\t\t$constrain = $constrains;\n\t\t\t}else{\n\t\t\t\t$tam = count($constrains);\n\t\t\t\tforeach ($constrains as $campo => $valor) {\n\t\t\t\t\tif(--$tam){\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor.' AND ';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\" AND ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_numeric($valor)){\n\t\t\t\t\t\t\t$constrain.=$campo.' = '.$valor;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$constrain.=$campo.' LIKE \"%'.$valor.'%\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($offset!==''){ \n\t\t\t\tif ($idRemision!=='') {\n\t\t\t\t\tif(($result = $this->model->listsDetails($idRemision))){\n\t\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->session['action']='list';\n\t\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionForm.html');\n\t\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(($result = $this->model->lists($offset,-1,$constrain))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('remisionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function _find_list() {\n\t\treturn $this->Menu->generatetreelist(null, null, null, '__');\n\t}", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\") {\n\t\t\t$sSavedFilterList = isset($UserProfile) ? $UserProfile->GetSearchFilters(CurrentUserName(), \"fvw_spmlistsrch\") : \"\";\n\t\t} else {\n\t\t\t$sSavedFilterList = \"\";\n\t\t}\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJSON(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->detail_jenis_spp->AdvancedSearch->ToJSON(), \",\"); // Field detail_jenis_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_jenis_spp->AdvancedSearch->ToJSON(), \",\"); // Field id_jenis_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->status_spp->AdvancedSearch->ToJSON(), \",\"); // Field status_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->no_spp->AdvancedSearch->ToJSON(), \",\"); // Field no_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tgl_spp->AdvancedSearch->ToJSON(), \",\"); // Field tgl_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->keterangan->AdvancedSearch->ToJSON(), \",\"); // Field keterangan\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jumlah_up->AdvancedSearch->ToJSON(), \",\"); // Field jumlah_up\n\t\t$sFilterList = ew_Concat($sFilterList, $this->bendahara->AdvancedSearch->ToJSON(), \",\"); // Field bendahara\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nama_pptk->AdvancedSearch->ToJSON(), \",\"); // Field nama_pptk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nip_pptk->AdvancedSearch->ToJSON(), \",\"); // Field nip_pptk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kode_program->AdvancedSearch->ToJSON(), \",\"); // Field kode_program\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kode_kegiatan->AdvancedSearch->ToJSON(), \",\"); // Field kode_kegiatan\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kode_sub_kegiatan->AdvancedSearch->ToJSON(), \",\"); // Field kode_sub_kegiatan\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tahun_anggaran->AdvancedSearch->ToJSON(), \",\"); // Field tahun_anggaran\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jumlah_spd->AdvancedSearch->ToJSON(), \",\"); // Field jumlah_spd\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nomer_dasar_spd->AdvancedSearch->ToJSON(), \",\"); // Field nomer_dasar_spd\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tanggal_spd->AdvancedSearch->ToJSON(), \",\"); // Field tanggal_spd\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_spd->AdvancedSearch->ToJSON(), \",\"); // Field id_spd\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kode_rekening->AdvancedSearch->ToJSON(), \",\"); // Field kode_rekening\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nama_bendahara->AdvancedSearch->ToJSON(), \",\"); // Field nama_bendahara\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nip_bendahara->AdvancedSearch->ToJSON(), \",\"); // Field nip_bendahara\n\t\t$sFilterList = ew_Concat($sFilterList, $this->no_spm->AdvancedSearch->ToJSON(), \",\"); // Field no_spm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tgl_spm->AdvancedSearch->ToJSON(), \",\"); // Field tgl_spm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->status_spm->AdvancedSearch->ToJSON(), \",\"); // Field status_spm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nama_bank->AdvancedSearch->ToJSON(), \",\"); // Field nama_bank\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nomer_rekening_bank->AdvancedSearch->ToJSON(), \",\"); // Field nomer_rekening_bank\n\t\t$sFilterList = ew_Concat($sFilterList, $this->npwp->AdvancedSearch->ToJSON(), \",\"); // Field npwp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->pimpinan_blud->AdvancedSearch->ToJSON(), \",\"); // Field pimpinan_blud\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nip_pimpinan->AdvancedSearch->ToJSON(), \",\"); // Field nip_pimpinan\n\t\t$sFilterList = ew_Concat($sFilterList, $this->no_sptb->AdvancedSearch->ToJSON(), \",\"); // Field no_sptb\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tgl_sptb->AdvancedSearch->ToJSON(), \",\"); // Field tgl_sptb\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "abstract public function getList();", "public function getSubdivisionList();", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\") {\n\t\t\t$sSavedFilterList = isset($UserProfile) ? $UserProfile->GetSearchFilters(CurrentUserName(), \"fspplistsrch\") : \"\";\n\t\t} else {\n\t\t\t$sSavedFilterList = \"\";\n\t\t}\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tgl->AdvancedSearch->ToJSON(), \",\"); // Field tgl\n\t\t$sFilterList = ew_Concat($sFilterList, $this->no_spp->AdvancedSearch->ToJSON(), \",\"); // Field no_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jns_spp->AdvancedSearch->ToJSON(), \",\"); // Field jns_spp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kd_mata->AdvancedSearch->ToJSON(), \",\"); // Field kd_mata\n\t\t$sFilterList = ew_Concat($sFilterList, $this->urai->AdvancedSearch->ToJSON(), \",\"); // Field urai\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jmlh->AdvancedSearch->ToJSON(), \",\"); // Field jmlh\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jmlh1->AdvancedSearch->ToJSON(), \",\"); // Field jmlh1\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jmlh2->AdvancedSearch->ToJSON(), \",\"); // Field jmlh2\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jmlh3->AdvancedSearch->ToJSON(), \",\"); // Field jmlh3\n\t\t$sFilterList = ew_Concat($sFilterList, $this->jmlh4->AdvancedSearch->ToJSON(), \",\"); // Field jmlh4\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nm_perus->AdvancedSearch->ToJSON(), \",\"); // Field nm_perus\n\t\t$sFilterList = ew_Concat($sFilterList, $this->alamat->AdvancedSearch->ToJSON(), \",\"); // Field alamat\n\t\t$sFilterList = ew_Concat($sFilterList, $this->npwp->AdvancedSearch->ToJSON(), \",\"); // Field npwp\n\t\t$sFilterList = ew_Concat($sFilterList, $this->pimpinan->AdvancedSearch->ToJSON(), \",\"); // Field pimpinan\n\t\t$sFilterList = ew_Concat($sFilterList, $this->bank->AdvancedSearch->ToJSON(), \",\"); // Field bank\n\t\t$sFilterList = ew_Concat($sFilterList, $this->rek->AdvancedSearch->ToJSON(), \",\"); // Field rek\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nospm->AdvancedSearch->ToJSON(), \",\"); // Field nospm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tglspm->AdvancedSearch->ToJSON(), \",\"); // Field tglspm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ppn->AdvancedSearch->ToJSON(), \",\"); // Field ppn\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ps21->AdvancedSearch->ToJSON(), \",\"); // Field ps21\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ps22->AdvancedSearch->ToJSON(), \",\"); // Field ps22\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ps23->AdvancedSearch->ToJSON(), \",\"); // Field ps23\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ps4->AdvancedSearch->ToJSON(), \",\"); // Field ps4\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kodespm->AdvancedSearch->ToJSON(), \",\"); // Field kodespm\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nambud->AdvancedSearch->ToJSON(), \",\"); // Field nambud\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nppk->AdvancedSearch->ToJSON(), \",\"); // Field nppk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nipppk->AdvancedSearch->ToJSON(), \",\"); // Field nipppk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->prog->AdvancedSearch->ToJSON(), \",\"); // Field prog\n\t\t$sFilterList = ew_Concat($sFilterList, $this->prog1->AdvancedSearch->ToJSON(), \",\"); // Field prog1\n\t\t$sFilterList = ew_Concat($sFilterList, $this->bayar->AdvancedSearch->ToJSON(), \",\"); // Field bayar\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function getFeaturesList(){\n return $this->_get(1);\n }", "public function lists();", "public function getList();", "public function getList();", "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('nro_factura','int4');\r\n\t\t$this->captura('nombre_emisor','varchar');\t\t\r\n\t\t$this->captura('domicilio_emisor','varchar');\r\n\t\t$this->captura('nit_emisor','int4');\r\n\t\t$this->captura('nombre_cliente','varchar');\t\t\r\n\t\t$this->captura('domicilio_cliente','varchar');\r\n\t\t$this->captura('nit_cliente','int4');\r\n\t\t$this->captura('fecha_emision','date');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function getTravelLocalApprovalSeqList() {\r\n\t\t$sql = $this->getSql();\r\n\t\t$select = $sql->select(); \r\n\t\t$select->from(array('e' => $this->seqTable))\r\n\t\t ->columns(array('id','ApprovalLevelName','ApprovalSequence'))\r\n\t\t; \r\n\t\t//echo $select->getSqlString(); \r\n\t\t//exit; \r\n\t\treturn $select; \r\n\t}", "function lists() {\n $params = array();\n return $this->callServer(\"lists\", $params);\n }", "public function getTravelLocalFormApprovedList() {\r\n\t\t$sql = $this->getSql();\r\n\t\t$select = $sql->select();\r\n\t\t$select->from(array('e' => $this->entityTable))\r\n\t\t ->columns(array('id','employeeNumberTravelingLocal','effectiveFrom','effectiveTo'))\r\n\t\t ->join(array('ep' => 'EmpEmployeeInfoMain'),'ep.employeeNumber = e.employeeNumberTravelingLocal',\r\n\t\t\t\t array('employeeName'))\r\n\t\t\t ->where(array('isCanceled' => 0))\r\n\t\t\t ->where(array('isApproved' => 1))\r\n\t\t;\r\n\t\t//$select->where($predicate->In('e.id',$ids));\r\n\t\t//echo $select->getSqlString();\r\n\t\t//exit;\r\n\t\treturn $select;\r\n\t}", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function lst()\n\t{\n\t\t$list = AdminModel::paginate(3);\n\t\t$this->assign('list',$list);\n\t\treturn $this->fetch();\n\t}", "function get_list_to_show($area)\n\t{\n\t\t$this->load->model('_procurement_plan');\n\t\t$this->load->model('_contract');\n\t\t$this->load->model('_bid');\n\t\t$list = array();\n\t\t\n\t\tif($area == 'procurement_plans') {\n\t\t\t$list = $this->_procurement_plan->lists(array('status'=>'published', 'offset'=>0, 'limit'=>NUM_OF_ROWS_PER_PAGE));\n\t\t} else if($area == 'best_evaluated_bidders') {\n\t\t\t$list = $this->_bid->lists('awards');\n\t\t} else if($area == 'active_notices') {\n\t\t\t$list = $this->_tender->lists(array('status'=>'published', 'display_type'=>'public', 'offset'=>0, 'limit'=>NUM_OF_ROWS_PER_PAGE));\n\t\t} else if($area == 'contract_awards') {\n\t\t\t$list = $this->_contract->lists(array('offset'=>0, 'limit'=>NUM_OF_ROWS_PER_PAGE, 'status'=>array('active','complete','endorsed','commenced')));\n\t\t}\n\t\t\n\t\treturn $list;\n\t}" ]
[ "0.60832804", "0.6028166", "0.5958076", "0.593907", "0.5872578", "0.580533", "0.575887", "0.5733446", "0.5717532", "0.56706613", "0.56706613", "0.56706613", "0.56586474", "0.5640728", "0.5632262", "0.5617078", "0.55723804", "0.55632466", "0.5548233", "0.55478686", "0.55432796", "0.5537515", "0.5537515", "0.5524429", "0.54960775", "0.54892087", "0.54879457", "0.5483333", "0.54801255", "0.54733807" ]
0.62600815
0
Operation listsFamilyplanningFamilyplanningIdGet Fetch a FamilyPlanning item specified by familyplanningId.
public function listsFamilyplanningByIdGet($familyplanning_id) { $response = FamilyPlanning::findOrFail(); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsFamilyplanningPut($familyplanning_id)\r\n {\r\n $input = Request::all();\r\n $family_plan = FamilyPlanning::findOrFail($familyplanning_id);\r\n $family_plan->update(['name' => $input['name']]);\r\n if($family_plan->save()){\r\n return response()->json(['msg' => 'Updated family plan'], 200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update a plan');\r\n }\r\n }", "public function listsFamilyplanningGet()\r\n {\r\n $response = Familyplanning::all();\r\n return response()->json($response, 200);\r\n }", "public function listsFamilyplanningDelete($familyplanning_id)\r\n {\r\n FamilyPlanning::destroy($familyplanning_id);\r\n return response()->json(['msg' => 'deleted family plan'], 200);\r\n }", "public function getId_planning()\n {\n return $this->_id_planning;\n }", "public function listsFamilyplanningPost()\r\n {\r\n $input = Request::all();\r\n $new_familyPlan = FamilyPlanning::create($input);\r\n if($new_familyPlan){\r\n return response()->json(['msg' => 'Created a new Family plan']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new family plan');\r\n }\r\n }", "public function setId_planning($id_planning)\n {\n $id_planning = (int) $id_planning;\n $this->_id_planning = $id_planning;\n }", "function listerPlanningProf(){\n\t$query='select * from professeur, planning, utilisateur where professeur.idProfesseur=planning.idProfesseur and professeur.idProfesseur=utilisateur.id_user order by professeur.idProfesseur';\n\t$result=mysql_query($query);\n\treturn $result;\t\n}", "private function getTurnPlannings($turnId)\n\t{\n\t\t$plannings = [];\n\t\t// get all courses of the specific turn\n\t\tif (Entrust::hasRole('Admin') || Entrust::hasRole('Lehrplanung') ) // role Lehrplanung has to be changed to a permission\n\t\t\t$plannings = Planning::where('turn_id','=',$turnId)->get();\n\t\telse {\n\t\t\t$researchgroupIds = Entrust::user()->getResearchgroupIds();\n\t\t\t$plannings = DB::table('plannings')\n\t\t\t\t->join('employee_planning','employee_planning.planning_id', '=', 'plannings.id')\n\t\t\t\t->join('employees', 'employees.id','=','employee_planning.employee_id')\n\t\t\t\t->join('researchgroups', 'researchgroups.id', '=', 'employees.researchgroup_id')\n\t\t\t\t->select('plannings.id')\n\t\t\t\t->whereIn('researchgroups.id',$researchgroupIds)\n\t\t\t\t->where('plannings.turn_id','=', $turnId)\n\t\t\t\t->get();\n\n\t\t\t$planningIds = [];\n\t\t\tif (sizeof($plannings) > 0) {\n\t\t\t\tforeach ($plannings as $p) {\n\t\t\t\t\tarray_push($planningIds, $p->id);\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$plannings = array();\n\n\t\t\t$planningUser = Planning::where('user_id','=',Entrust::user()->id)->where('turn_id','=',$turnId)->get();\n\n\t\t\tforeach ($planningUser as $p) {\n\t\t\t\tif (!array_key_exists($p->id, $planningIds))\n\t\t\t\t\tarray_push($planningIds, $p->id);\n\t\t\t}\n\n\t\t\tif (sizeof($planning_ids) > 0)\n\t\t\t\t$plannings = Planning::related($planningIds)->get();\n\t\t}\n\n\t\treturn $plannings;\n\t}", "public function scopeRelatedPlannings($query, Planning $planning, Course $course)\n\t{\n\t\treturn $query->join('courses','courses.id','=','plannings.course_id')\n\t\t\t\t\t\t->select('plannings.*')\n\t\t\t\t\t\t->where('courses.module_id','=',$course->module->id)\n\t\t\t\t\t\t->where('plannings.turn_id','=',$planning->turn_id)\n\t\t\t\t\t\t->whereNotIn('plannings.id', [$planning->id])\n\t\t\t\t\t\t->orderBy('plannings.group_number', 'ASC');\n\t}", "public function getFranchisesByGameId($id){\n $pdo = $this->connection->prepare(\"SELECT franchise_id FROM games_franchises WHERE game_id=:id\");\n $pdo->execute(array(\n 'id' => $id\n ));\n $franchises_ids = $pdo->fetchAll(PDO::FETCH_ASSOC);\n\n return $franchises_ids;\n }", "public function get_player_franchise($fffl_player_id,$league_id){\r\n $this->db->where('fffl_player_id',$fffl_player_id)\r\n \t\t\t\t\t\t\t->order_by('season','Desc');\r\n if($this->current_week==0){\r\n \r\n $this->db->where('season<'.$this->current_year);\r\n }\r\n \t\t\t\t\t\t\t$franchise_query=$this->db->get('Franchise');\r\n $franchise=array();\r\n foreach($franchise_query->result_array() as $data){\r\n \t$franchise[$data['season']][$data['team_id']]['salary']=$data['salary'];\r\n \t$franchise[$data['season']][$data['team_id']]['area']=$data['area'];\r\n \r\n }\r\n return $franchise;\r\n }", "public function scopePlannedFlight(Builder $query)\n {\n return $query->whereNotNull('plan_id')->where(function (Builder $q) {\n $q->where('requestee_id', Auth::id())->orWhere('acceptee_id', Auth::id());\n })->get();\n }", "public function show($id)\n {\n $Planning = Planning::findOrFail($id);\n\n return new PlanningResource($Planning);\n }", "public function getPassengers($id, $nbPsgr)\r\n {\r\n $psgrIni = parse_ini_file(OdysseyHelper::getOverridedFile(JPATH_BASE.'/administrator/components/com_odyssey/models/forms/passenger.ini'));\r\n $attributes = $psgrIni['attributes'];\r\n $select = '';\r\n\r\n foreach($attributes as $attribute) {\r\n $select .= 'p.'.$attribute.',';\r\n }\r\n\r\n if($psgrIni['is_address']) {\r\n $address = $psgrIni['address'];\r\n foreach($address as $value) {\r\n\t$select .= 'a.'.$value.',';\r\n }\r\n }\r\n\r\n //Remove comma from the end of the string.\r\n //$select = substr($select, 0, -1);\r\n\r\n $db = $this->getDbo();\r\n $query = $db->getQuery(true);\r\n $query->select($select.'p.id')\r\n\t ->from('#__odyssey_order_passenger AS op')\r\n\t ->join('LEFT', '#__odyssey_passenger AS p ON p.id=op.psgr_id');\r\n\r\n if($psgrIni['is_address']) {\r\n $query->join('LEFT', '#__odyssey_address AS a ON a.item_id=op.psgr_id AND a.item_type=\"passenger\"');\r\n }\r\n\r\n $query->where('op.order_id='.(int)$id)\r\n\t ->order('p.customer DESC');\r\n $db->setQuery($query);\r\n $passengers = $db->loadAssocList();\r\n\r\n if($nbPsgr > count($passengers)) {\r\n }\r\n elseif($nbPsgr < count($passengers)) {\r\n }\r\n\r\n return $passengers;\r\n }", "public function retrieveFamilyMembersByFamilyId($familyId)\n {\n return $this->start()->uri(\"/api/user/family\")\n ->urlSegment($familyId)\n ->get()\n ->go();\n }", "public function get_plans()\n {\n //\n\n \n $user_id = Auth::user()->id;\n\n $listing_code = Session::get('listing_code');\n\n\n $listing = Listing::where('listing_code', $listing_code)->where('agent_id', $user_id)->first();\n\n try {\n //code...\n\n $floor_plans = ListingFloorPLan::where('listing_id', $listing->id)->latest()->get();\n\n } catch (\\Throwable $th) {\n //throw $th;\n\n return $th;\n }\n\n \n\n\n\n return $floor_plans;\n }", "function jx_loadfranby_menuid($menuid)\r\n\t\t{\r\n\t\t\t$output=array();\r\n\t\t\t$allfranby_menuid_res=$this->db->query(\"SELECT fid,b.franchise_name\r\n\t\t\t\t\t\t\t\t\t\t FROM `pnh_franchise_menu_link`a\r\n\t\t\t\t\t\t\t\t\t\tJOIN `pnh_m_franchise_info`b ON b.franchise_id=a.fid\r\n\t\t\t\t\t\t\t\t\t\tWHERE menuid=? AND STATUS=1 AND b.is_suspended=0\",$menuid);\r\n\t\t\tif($allfranby_menuid_res ->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$output['franlist_bymenu']=$allfranby_menuid_res->result_array();\r\n\t\t\t\t$output['status']='success';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output['status']='error';\r\n\t\t\t\t$output['message']='No franchisee found for Menu';\r\n\t\t\t}\r\n\t\t\techo json_encode($output);\r\n\t\t}", "function get_family_id($par_id){\n\t\t$fam_id=\"\";\n\t\t//$this->firephp->log(\"Par id= \".$par_id);\n\t\t$pp=$this->is_primary_parent($par_id);\n\t\tif ($pp==1){\n\t\t\t$this->db->where('parentPrimary_uacc_id',$par_id);\n\t\t}else if($pp==2){\n\t\t\t$this->db->where('parentAlt_uacc_id',$par_id);\n\t\t}\n\t\t$this->db->select('familyId');\n\t\t$qres=$this->db->get(TWELL_FAM_PROF_TBL);\n\t\tif ($qres->num_rows()==1) {\n\t\t\t$row=$qres->row();\n\t\t\t//$this->firephp->log(\"Familyid=\".$row->familyId);\n\t\t\t$fam_id=$row->familyId;\n\t\t}else{\n\t\t\t$this->firephp->log(\"Could not retrieve family id\");\n\t\t}\n\t\treturn $fam_id;\n\t}", "public function getLocalidades($provincia_id = 19, $departamento_id = false) {\n \t $localidades = $this->Localidad->getLocalidadesLocation($provincia_id = 19, $departamento_id);\n\t\t$new_localidades = array();\n\t\tif (!empty($localidades)) {\n\t\t foreach ($localidades as $localidad) {\n\t\t \t \t$new_localidades[$localidad[\"Localidad\"][\"id\"]] = $localidad[\"Localidad\"][\"nombre\"];\n\t\t }\t\t\t\n \t\t $localidades = $new_localidades;\n\t\t}\n\t $this->set(compact(\"localidades\"));\t\n\n }", "public function planninglogs()\n\t{\n\t\treturn $this->hasMany('Planninglog');\n\t}", "public function scopeOldRooms($query, Turn $turn, Planning $planning)\n\t{\n\t\treturn $query->join('planning_room','planning_room.id', '=', 'plannings.id')\n\t\t\t\t\t->join('turns', 'plannings.turn_id', '=', 'turns.id')\n\t\t\t\t\t->where('plannings.course_id', '=', $planning->course_id)\n\t\t\t\t\t->where('plannings.id', '!=', $planning->id)\n\t\t\t\t\t->where('plannings.group_number','=', $planning->group_number)\n\t\t\t\t\t->where('turns.year', '<=', $turn->year)\n\t\t\t\t\t->orderBy('turns.year', 'DESC')\n\t\t\t\t\t->orderBy('turns.name', 'DESC');\n\t}", "function pick_list_for_pending_shipments($id)\r\n\t\t{\r\n\t\t\t$user=$this->erpm->auth();\r\n\t\t\t$sql=\"select a.id,b.invoice_no,c.tray_name,g.town_name,f.franchise_name from pnh_m_manifesto_sent_log a \r\n\t\t\t\t\t\tjoin shipment_batch_process_invoice_link b on b.inv_manifesto_id=a.manifesto_id\r\n\t\t\t\t\t\tjoin m_tray_info c on c.tray_id=b.tray_id\r\n\t\t\t\t\t\tjoin king_invoice d on d.invoice_no=b.invoice_no\r\n\t\t\t\t\t\tjoin king_transactions e on e.transid=d.transid\r\n\t\t\t\t\t\tjoin pnh_m_franchise_info f on f.franchise_id=e.franchise_id\r\n\t\t\t\t\t\tjoin pnh_towns g on g.id=f.town_id\r\n\t\t\t\t\t\twhere a.id=? and packed=1 and shipped=0\r\n\t\t\t\t\tgroup by b.invoice_no\r\n\t\t\t\t\torder by g.town_name\";\r\n\t\t\t$pick_list_data=$this->db->query($sql,array($id))->result_Array();;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$data['pick_list_data']=$pick_list_data;\r\n\t\t\t$data['manifest_id']=$id;\r\n\t\t\t$data['page']='pending_shipments_pick_list';\r\n\t\t\t$this->load->view('admin/body/pending_shipments_pick_list',$data);\r\n\t\t}", "public function getParafiscalById($idParafiscal) {\r\n $parafiscal = null;\r\n $sql = \"SELECT * FROM parafiscales WHERE idParafiscales = \" . $idParafiscal;\r\n $r = $this->db->ejecutarConsulta($sql);\r\n if ($r) {\r\n $w = mysql_fetch_array($r);\r\n $periodo = substr($w['periodo'], 0, -3);\r\n $evaluacionContenidoDocumento = $this->getEstadoParafiscalesById($w['evaluacionContenidoDocumento']);\r\n $evaluacionRevisorFiscal = $this->getEstadoParafiscalesById($w['evaluacionRevisorFiscal']);\r\n $usuario = new CUsuario($w['usuario'], NULL);\r\n $parafiscal = new CParafiscales($w['idParafiscal'], $periodo, $w['fechaRealizacionComunicado'], $w['comunicadoEntregaSoportes'], $evaluacionContenidoDocumento, $evaluacionRevisorFiscal, $usuario, $w['fechaComunicadoInterventoria'], $w['comunicadoConceptoInterventoria'], $w['observaciones']);\r\n }\r\n return $parafiscal;\r\n }", "function get_predefined_innovation_plan($id)\n {\n $result = $this->db->get_where('predefined_innovation_plan', array(\n 'id' => $id\n ))->row_array();\n if (! (array) $result) {\n $fields = $this->db->list_fields('predefined_innovation_plan');\n foreach ($fields as $field) {\n $result[$field] = '';\n }\n }\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $result;\n }", "function getEmployees($phase_id)\n {\n $empfilter = \"\";\n\n // Get the project id of the given project phase\n $phasenode = &getNode(\"project.phase\");\n $projectids = $phasenode->selectDb(\"phase.id='$phase_id'\", \"\", \"\", \"\", array(\"projectid\"));\n $projectid = $projectids[0][\"projectid\"][\"id\"];\n\n // Get a list of team member personids\n $project_personemployeenode = &getNode(\"project.project_personemployee\");\n $personids = $project_personemployeenode->selectDb(\"project_person.projectid='$projectid'\", \"\", \"\", \"\", array(\"personid\"));\n $personidarray = array();\n foreach ($personids as $personid)\n $personidarray[] = $personid[\"personid\"][\"id\"];\n\n // If any team members found for the given project, then add a filter\n // limiting the result to be (a subset of) the project team\n if (count($personidarray) > 0)\n {\n $empfilter .= \" AND person.id IN (\".implode(\",\", $personidarray).\")\";\n }\n\n // If no anyuser privilege available, then do not show employees the\n // current user isn't supervisor of\n if (!$this->hasAnyUserPrivilege())\n {\n $user = getUser();\n $empfilter .= \" AND supervisor=\".$user[\"id\"];\n }\n\n $empnode = &getNode(\"employee.employee\");\n return $empnode->selectDb(\"status='active' $empfilter\", \"person.lastname ASC, person.firstname ASC\", \"\", \"\", array(\"id\", \"lastname\", \"firstname\"));\n }", "public function get_localidadesById($idProvincia) {\n $this->db->select(\n '\n idLocalidad,\n nombre\n '\n );\n $this->db->from('localidades');\n $this->db->where('idProvincia', $idProvincia);\n $this->db->order_by('nombre', 'ASC');\n $result = $this->db->get();\n\n return ($result->num_rows() > 0) ? $result->result_array() : false;\n }", "protected function process_planning__edit($p_type = C__MAINTENANCE__PLANNING, $p_id = null)\n {\n global $index_includes, $g_loc;\n\n if ($p_type === C__MAINTENANCE__PLANNING)\n {\n $l_is_allowed_to_edit = $this->get_auth()\n ->is_allowed_to(isys_auth::EDIT, 'planning');\n }\n else\n {\n $l_is_allowed_to_edit = $this->get_auth()\n ->is_allowed_to(isys_auth::EDIT, 'planning_archive');\n } // if\n\n $l_contacts = $l_objects = [];\n\n isys_component_template_navbar::getInstance()\n ->set_active($l_is_allowed_to_edit, C__NAVBAR_BUTTON__SAVE)\n ->set_active(true, C__NAVBAR_BUTTON__CANCEL)\n ->set_save_mode('formsubmit');\n\n if ($p_id !== null)\n {\n $l_planning_data = $this->m_dao->get_data($p_id)\n ->get_row();\n\n $l_object_res = $this->m_dao->get_planning_objects($p_id);\n $l_contact_res = $this->m_dao->get_planning_contacts($p_id);\n\n if (count($l_object_res))\n {\n while ($l_object_row = $l_object_res->get_row())\n {\n $l_objects[] = (int) $l_object_row['isys_obj__id'];\n } // while\n } // if\n\n if (count($l_contact_res))\n {\n while ($l_contact_row = $l_contact_res->get_row())\n {\n $l_contacts[] = (int) $l_contact_row['isys_obj__id'];\n } // while\n } // if\n }\n else\n {\n // Default selection for the maintenance type.\n $l_planning_data = [\n 'isys_maintenance__finished' => null,\n 'isys_maintenance__mail_dispatched' => null,\n 'isys_maintenance__isys_maintenance_type__id' => $this->m_dao->retrieve(\n 'SELECT isys_maintenance_type__id FROM isys_maintenance_type WHERE isys_maintenance_type__const = \"C__MAINTENANCE__TYPE__CLIENT_MAINTENANCE\";'\n )\n ->get_row_value('isys_maintenance_type__id')\n ];\n } // if\n\n $l_mailtemplates = [];\n $l_mailtemplate_res = $this->m_dao->get_mailtemplates();\n\n if (count($l_mailtemplate_res))\n {\n while ($l_row = $l_mailtemplate_res->get_row())\n {\n $l_mailtemplates[$l_row['isys_maintenance_mailtemplate__id']] = $l_row['isys_maintenance_mailtemplate__title'];\n } // while\n } // if\n\n $l_rules = [\n 'C__MAINTENANCE__PLANNING__ID' => [\n 'p_strValue' => (int) $p_id,\n 'p_bInvisible' => true,\n 'p_bInfoIconSpacer' => 0\n ],\n 'C__MAINTENANCE__PLANNING__OBJECT_SELECTION' => [\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n 'p_strValue' => isys_format_json::encode($l_objects)\n ],\n 'C__MAINTENANCE__PLANNING__TYPE' => [\n 'p_strPopupType' => 'dialog_plus',\n 'p_strTable' => 'isys_maintenance_type',\n 'p_strSelectedID' => $l_planning_data['isys_maintenance__isys_maintenance_type__id'],\n 'p_strClass' => 'input-small'\n ],\n 'C__MAINTENANCE__PLANNING__DATE_FROM' => [\n 'p_strPopupType' => 'calendar',\n 'p_strClass' => 'input-mini',\n 'p_strValue' => $l_planning_data['isys_maintenance__date_from']\n ],\n 'C__MAINTENANCE__PLANNING__DATE_TO' => [\n 'p_strPopupType' => 'calendar',\n 'p_strClass' => 'input-mini',\n 'p_strValue' => $l_planning_data['isys_maintenance__date_to'],\n 'p_bInfoIconSpacer' => 0\n ],\n 'C__MAINTENANCE__PLANNING__COMMENT' => [\n 'p_strValue' => $l_planning_data['isys_maintenance__comment']\n ],\n 'C__MAINTENANCE__PLANNING__CONTACT_ROLES' => [\n 'p_strTable' => 'isys_contact_tag',\n 'p_strSelectedID' => $l_planning_data['isys_maintenance__isys_contact_tag__id'],\n 'p_strClass' => 'input-small'\n ],\n 'C__MAINTENANCE__PLANNING__CONTACTS' => [\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATS__PERSON_MASTER;C__CATS__PERSON_GROUP_MASTER;C__CATS__ORGANIZATION_MASTER_DATA',\n 'p_strValue' => isys_format_json::encode($l_contacts)\n ],\n 'C__MAINTENANCE__PLANNING__MAILTEMPLATE' => [\n 'p_arData' => $l_mailtemplates,\n 'p_strSelectedID' => $l_planning_data['isys_maintenance__isys_maintenance_mailtemplate__id']\n ]\n ];\n\n if ($l_is_allowed_to_edit)\n {\n $this->m_tpl->activate_editmode();\n } // if\n\n if ($l_is_allowed_to_edit && $p_type === C__MAINTENANCE__PLANNING)\n {\n isys_component_template_navbar::getInstance()\n ->append_button(\n 'LC__MAINTENANCE__PLANNING__FINISH_MAINTENANCE',\n 'maintenance-finish',\n [\n 'tooltip' => _L('LC__MAINTENANCE__POPUP__FINISH_MAINTENANCE'),\n 'icon' => 'icons/silk/tick.png',\n 'icon_inactive' => 'icons/silk/tick.png',\n 'js_onclick' => isys_factory::get_instance('isys_popup_maintenance_finish')\n ->process_overlay('', 700, 318),\n 'accesskey' => 'f',\n 'navmode' => 'maintenance_finish',\n 'active' => ($l_planning_data['isys_maintenance__finished'] === null)\n ]\n );\n } // if\n\n if ($this->get_auth()\n ->is_allowed_to(isys_auth::EXECUTE, 'send_mails')\n )\n {\n isys_component_template_navbar::getInstance()\n ->append_button(\n 'LC__MAINTENANCE__SEND_MAIL',\n 'maintenance-send-mail',\n [\n 'tooltip' => _L('LC__MAINTENANCE__SEND_MAIL'),\n 'icon' => 'icons/silk/email.png',\n 'icon_inactive' => 'icons/silk/email.png',\n 'js_onclick' => ';',\n 'accesskey' => 'm',\n 'navmode' => 'maintenance_send_mail',\n 'active' => ($l_planning_data['isys_maintenance__id'] > 0)\n ]\n );\n } // if\n\n $this->m_tpl->assign(\n 'ajax_url',\n isys_helper_link::create_url(\n [\n C__GET__AJAX => 1,\n C__GET__AJAX_CALL => 'maintenance'\n ]\n )\n )\n ->assign(\n 'mail_dispatched',\n ($l_planning_data['isys_maintenance__mail_dispatched'] !== null ? $g_loc->fmt_datetime($l_planning_data['isys_maintenance__mail_dispatched']) : false)\n )\n ->assign('finished', ($l_planning_data['isys_maintenance__finished'] !== null ? $g_loc->fmt_datetime($l_planning_data['isys_maintenance__finished']) : false))\n ->smarty_tom_add_rules('tom.content.bottom.content', $l_rules);\n\n $index_includes['contentbottomcontent'] = __DIR__ . DS . 'templates' . DS . 'planning.tpl';\n }", "public function read_single_frgmnt($frgid)\r\n {\r\n global $db;\r\n $query = 'SELECT * FROM ' .$this->mPrefix.'fragmente WHERE frag_id='.$frgid;\r\n return $db->queryRow($query);\r\n }", "public function getFacilitador_Treinamento($id)\n {\n // ->join('projetos', 'atas.projetos = projetos.id', 'left');\n \n $q = $this->db->get_where('atas_facilitadores', array('ata' => $id));\n \n if ($q->num_rows() > 0) {\n return $q->row();\n }\n return FALSE;\n \n }", "public function find($id) {\n\t\t$sql = \"select * from t_packinglist where pl_id=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row)\n\t\t\treturn $this->buildDomainObject($row);\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\"No PackingList matching id \" . $id);\n\t}" ]
[ "0.67721224", "0.66733485", "0.66648865", "0.596039", "0.58294225", "0.5357657", "0.4983266", "0.48565686", "0.48120186", "0.46990034", "0.45681223", "0.4402708", "0.4337086", "0.43158495", "0.4214881", "0.41974786", "0.41768944", "0.41526002", "0.41471782", "0.4144267", "0.41026604", "0.41001728", "0.40777436", "0.40561086", "0.40535328", "0.39709225", "0.39688283", "0.39676315", "0.3965999", "0.39531556" ]
0.8230346
0
Operation listsFamilyplanningPost create a FamilyPlanning item.
public function listsFamilyplanningPost() { $input = Request::all(); $new_familyPlan = FamilyPlanning::create($input); if($new_familyPlan){ return response()->json(['msg' => 'Created a new Family plan']); }else{ return response('Oops, seems like something went wrong while trying to create a new family plan'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsFamilyplanningPut($familyplanning_id)\r\n {\r\n $input = Request::all();\r\n $family_plan = FamilyPlanning::findOrFail($familyplanning_id);\r\n $family_plan->update(['name' => $input['name']]);\r\n if($family_plan->save()){\r\n return response()->json(['msg' => 'Updated family plan'], 200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update a plan');\r\n }\r\n }", "public function listsFamilyplanningGet()\r\n {\r\n $response = Familyplanning::all();\r\n return response()->json($response, 200);\r\n }", "public function listsFamilyplanningDelete($familyplanning_id)\r\n {\r\n FamilyPlanning::destroy($familyplanning_id);\r\n return response()->json(['msg' => 'deleted family plan'], 200);\r\n }", "public function listsFamilyplanningByIdGet($familyplanning_id)\r\n {\r\n $response = FamilyPlanning::findOrFail();\r\n return response()->json($response, 200);\r\n }", "public function actionCreate() {\n $model = new Listing;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Listing'])) {\n $model->attributes = $_POST['Listing'];\n $features = $_POST['Listing']['features'];\n if ($model->save()) {\n\n\t\t\t\t$model_temp = new Listing;\n\t\t\t\t$criteria=new CDbCriteria;\n\t\t\t\t$criteria->select='max(sorting_number) AS maxColumn';\n\t\t\t\t$row_temp = $model_temp->model()->find($criteria);\n\t\t\t\t$max = $row_temp['maxColumn'];\n\t\t\t\t$model->sorting_number = $max+1;\n\t\t\t\t$model->save();\n $model->addRelationRecords('features', $features);\n $this->redirect(array('view', 'id' => $model->listing_id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\r\n\t{\r\n\t\t$details = $this->getDetailsArray(['UserGroups' => null]);\r\n\r\n\t\treturn view('admin.listing-plans.create', [\r\n\t\t\t'details' => $details\r\n\t\t]);\r\n\t}", "public function listsfacilityTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = FacilityTypes::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the facilityType');\r\n }\r\n }", "function fed_display_dashboard_add_new_post( $post_type ) {\n\t$post_table = fed_fetch_rows_by_table( BC_FED_POST_DB );\n\t$post_settings = fed_get_post_settings_by_type( $post_type );\n\t$menu = isset( $post_settings['menu']['rename_post'] ) ? $post_settings['menu']['rename_post'] : strtoupper( $post_type );\n\t$menu_item = get_query_var( 'fed_menu_items' );\n\t?>\n\t<div class=\"row\">\n\t\t<div class=\"col-md-5\">\n\t\t\t<a class=\"btn btn-primary\" href=\"<?php echo esc_url( add_query_arg(\n\t\t\t\tarray(\n\t\t\t\t\t'menu_type' => $menu_item['menu_type'],\n\t\t\t\t\t'menu_slug' => $menu_item['menu_slug'],\n\t\t\t\t\t'fed_nonce' => wp_create_nonce( 'fed_nonce' )\n\t\t\t\t)\n\t\t\t), site_url() ); ?>\">\n\t\t\t\t<i class=\"fa fa-mail-reply\"></i>\n\t\t\t\tBack to <?php echo $menu; ?>\n\t\t\t</a>\n\t\t</div>\n\t</div>\n\t<form method=\"post\"\n\t\t class=\"fed_dashboard_add_new_post\"\n\t\t action=\"<?php echo admin_url( 'admin-ajax.php?action=fed_dashboard_add_new_post' ); ?>\">\n\n\t\t<?php fed_wp_nonce_field( 'fed_nonce', 'fed_nonce' ) ?>\n\n\t\t<input type=\"hidden\"\n\t\t\t name=\"post_type\"\n\t\t\t value=\"<?php echo $post_type; ?>\">\n\n\t\t<input type=\"hidden\"\n\t\t\t name=\"fed_post_type\"\n\t\t\t value=\"<?php echo $post_type; ?>\">\n\n\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t<div class=\"col-md-12\">\n\t\t\t\t<div class=\"fed_header_font_color\"><?php _e( 'Title' ) ?></div>\n\t\t\t\t<?php echo fed_get_input_details( array(\n\t\t\t\t\t'placeholder' => 'Title',\n\t\t\t\t\t'input_meta' => 'post_title',\n\t\t\t\t\t'input_type' => 'single_line'\n\t\t\t\t) ); ?>\n\t\t\t</div>\n\n\t\t</div>\n\t\t<?php\n\t\tif ( ! isset( $post_settings['dashboard']['post_content'] ) ) {\n\t\t\t?>\n\t\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<div class=\"fed_header_font_color\"><?php _e( 'Content' ) ?></div>\n\t\t\t\t\t<?php wp_editor( '', 'post_content', array( 'quicktags' => true ) ); ?>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\n\t\tfed_show_category_tag_post_format( $post_type, $post_settings );\n\n\t\t/**\n\t\t * Featured Image\n\t\t * _thumbnail_id\n\t\t */\n\t\tif ( ! isset( $post_settings['dashboard']['featured_image'] ) ) {\n\t\t\t?>\n\t\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<div class=\"fed_header_font_color\">\n\t\t\t\t\t\t<?php _e( 'Featured Image' ) ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php echo fed_input_box( '_thumbnail_id', array(), 'file' ) ?>\n\t\t\t\t\t<?php echo fed_get_input_details( array(\n\t\t\t\t\t\t'input_meta' => '_thumbnail_id',\n\t\t\t\t\t\t'input_type' => 'file'\n\t\t\t\t\t) ) ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\t/**\n\t\t * Comment Status\n\t\t */\n\t\tif ( ! isset( $post_settings['dashboard']['allow_comments'] ) ) {\n\t\t\t?>\n\t\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<div class=\"fed_header_font_color\"><?php _e( 'Allow Comments' ) ?></div>\n\t\t\t\t\t<?php echo fed_input_box( 'comment_status', array(\n\t\t\t\t\t\t'default_value' => 'open',\n\t\t\t\t\t\t'value' => 'open'\n\t\t\t\t\t), 'checkbox' ); ?>\n\n\t\t\t\t\t<?php echo fed_get_input_details( array(\n\t\t\t\t\t\t'input_meta' => 'comment_status',\n\t\t\t\t\t\t'input_type' => 'checkbox',\n\t\t\t\t\t\t'default_value' => 'open',\n\t\t\t\t\t\t'user_value' => 'open'\n\t\t\t\t\t) ); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\t/**\n\t\t * Extra Fields\n\t\t */\n\t\tforeach ( $post_table as $item ) {\n\t\t\tif ( $post_type === $item['post_type'] ) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t<div class=\"fed_header_font_color\"><?php _e( $item['label_name'] ); ?></div>\n\t\t\t\t\t\t' . fed_get_input_details( $item ) . '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t<div class=\"row fed_dashboard_item_field\">\n\t\t\t<div class=\"col-md-3 col-md-offset-4\">\n\t\t\t\t<button class=\"btn btn-primary\"\n\t\t\t\t\t\ttype=\"submit\">\n\t\t\t\t\t<i class=\"fa fa-floppy-o\"></i>\n\t\t\t\t\t<?php _e( 'Save', 'frontend-dashboard' ) ?>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n\t<?php\n}", "public function createNewItemToPlan() {\n $tracker = $this->planning->getPlanningTracker();\n return $GLOBALS['Language']->getText('plugin_agiledashboard', 'create_new_item_to_plan', array($tracker->getItemName()));\n }", "public function add_post() {\n \n\n /* Validation section */\n $this->form_validation->set_rules('DraftFormat', 'Draft Format', 'trim|required|in_list[Head to Head,League]');\n\t\t$this->form_validation->set_rules('DraftType', 'Draft Type', 'trim' . (!empty($this->Post['DraftFormat']) && $this->Post['DraftFormat'] == 'League' ? '|required|in_list[Normal,Hot,Champion,Practice,More,Mega,Winner Takes All,Only For Beginners]' : ''));\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsPaid', 'IsPaid', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsConfirm', 'IsConfirm', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsAutoCreate', 'Is Auto Create', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('ShowJoinedDraft', 'ShowJoinedDraft', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('WinningAmount', 'WinningAmount', 'trim|required|integer');\n $this->form_validation->set_rules('DraftSize', 'DraftSize', 'trim' . (!empty($this->Post['DraftFormat']) && $this->Post['DraftFormat'] == 'League' ? '|required|integer' : ''));\n $this->form_validation->set_rules('EntryFee', 'EntryFee', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric' : ''));\n $this->form_validation->set_rules('NoOfWinners', 'NoOfWinners', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|integer' : ''));\n $this->form_validation->set_rules('EntryType', 'EntryType', 'trim' . (!empty($this->Post['ContestFormat']) && $this->Post['ContestFormat'] == 'League' ? '|required|in_list[Single,Multiple]' : ''));\n\t\t$this->form_validation->set_rules('UserJoinLimit', 'UserJoinLimit', 'trim' . (!empty($this->Post['EntryType']) && $this->Post['EntryType'] == 'Multiple' ? '|required|integer' : ''));\n\t\t$this->form_validation->set_rules('AdminPercent', 'AdminPercent', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric|regex_match[/^[0-9][0-9]?$|^100$/]' : ''));\n $this->form_validation->set_rules('CashBonusContribution', 'CashBonusContribution', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric|regex_match[/^[0-9][0-9]?$|^100$/]' : ''));\n \n\t\tif ($this->Post['IsPaid'] == 'Yes' && !empty($this->Post['CustomizeWinning']) && is_array($this->Post['CustomizeWinning'])) {\n $TotalWinners = $TotalPercent = $TotalWinningAmount = 0;\n foreach ($this->Post['CustomizeWinning'] as $Key => $Value) {\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][From]', 'From', 'trim|required|integer');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][To]', 'To', 'trim|required|integer');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][Percent]', 'Percent', 'trim|required|numeric');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][WinningAmount]', 'WinningAmount', 'trim|required|numeric');\n $TotalWinners += ($Value['To'] - $Value['From']) + 1;\n $TotalPercent += $Value['Percent'];\n $TotalWinningAmount += (($Value['To'] - $Value['From']) + 1) * $Value['WinningAmount'];\n if($Key > 0){\n\t\t\t\t\tif($this->Post['CustomizeWinning'][$Key]['WinningAmount'] >= $this->Post['CustomizeWinning'][$Key-1]['WinningAmount']){\n\t\t\t\t\t\t$this->Return['ResponseCode'] = 500;\n\t\t\t\t\t\t$this->Return['Message'] = \"Winning amount \".($Key+1).\",can not greater than or equals to Winning amount \".$Key;\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\n /* Check Total No Of Winners */\n if ($TotalWinners != $this->Post['NoOfWinners']) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winners should be equals to No Of Winners.\";\n exit;\n }\n\n /* Check Total Percent */\n if ($TotalPercent < 90 || $TotalPercent > 100) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winners Percent should be 90% to 100%.\";\n exit;\n }\n\n /* Check Total Winning Amount */\n if ($TotalWinningAmount > $this->Post['WinningAmount']) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winning Amount should be less than or equals to Winning Amount\";\n exit;\n }\n }\n if ($this->Post['IsPaid'] == 'Yes' && (empty($this->Post['CustomizeWinning']) || !is_array($this->Post['CustomizeWinning']))) {\n $this->Return['ResponseCode'] = 500;\n\t\t\t$this->Return['Message'] = \"Customize winning data is required.\";\n\t\t\texit;\n }\n $this->form_validation->set_message('regex_match', '{field} value should be between 0 to 100.');\n $this->form_validation->validation($this); /* Run validation */\n /* Validation - ends */\n\t\t\n\t\t/* Add Pre Draft */\n \t$PreDraft = $this->PredraftContest_model->addDraft($this->Post, $this->SessionUserID);\n if (!$PreDraft) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"An error occurred, please try again later.\";\n } else {\n \t$this->PredraftContest_model->createPreDraftContest($PreDraft);\n $this->Return['Message'] = \"Pre Draft created successfully.\";\n }\n }", "protected function process_planning__save($p_type = C__MAINTENANCE__PLANNING, $p_post)\n {\n if ($p_type === C__MAINTENANCE__PLANNING)\n {\n $this->get_auth()\n ->check(isys_auth::EDIT, 'planning');\n }\n else\n {\n $this->get_auth()\n ->check(isys_auth::EDIT, 'planning_archive');\n } // if\n\n $l_id = ($p_post['C__MAINTENANCE__PLANNING__ID'] > 0) ? $p_post['C__MAINTENANCE__PLANNING__ID'] : null;\n\n $l_objects = $p_post['C__MAINTENANCE__PLANNING__OBJECT_SELECTION__HIDDEN'];\n $l_contacts = $p_post['C__MAINTENANCE__PLANNING__CONTACTS__HIDDEN'];\n\n if (isys_format_json::is_json_array($l_objects))\n {\n $l_objects = isys_format_json::decode($l_objects);\n }\n else\n {\n $l_objects = null;\n } // if\n\n if (isys_format_json::is_json_array($l_contacts))\n {\n $l_contacts = isys_format_json::decode($l_contacts);\n }\n else\n {\n $l_contacts = null;\n } // if\n\n // We need to go sure the \"date from < date to\".\n if (!empty($p_post['C__MAINTENANCE__PLANNING__DATE_FROM__HIDDEN']) && !empty($p_post['C__MAINTENANCE__PLANNING__DATE_TO__HIDDEN']))\n {\n if ($p_post['C__MAINTENANCE__PLANNING__DATE_FROM__HIDDEN'] > $p_post['C__MAINTENANCE__PLANNING__DATE_TO__HIDDEN'])\n {\n $l_date_tmp = $p_post['C__MAINTENANCE__PLANNING__DATE_FROM__HIDDEN'];\n\n $p_post['C__MAINTENANCE__PLANNING__DATE_FROM__HIDDEN'] = $p_post['C__MAINTENANCE__PLANNING__DATE_TO__HIDDEN'];\n\n $p_post['C__MAINTENANCE__PLANNING__DATE_TO__HIDDEN'] = $l_date_tmp;\n } // if\n } // if\n\n try\n {\n $l_id = $this->m_dao->save_planning(\n $l_id,\n [\n 'isys_maintenance__isys_maintenance_type__id' => $p_post['C__MAINTENANCE__PLANNING__TYPE'],\n 'isys_maintenance__date_from' => $p_post['C__MAINTENANCE__PLANNING__DATE_FROM__HIDDEN'],\n 'isys_maintenance__date_to' => $p_post['C__MAINTENANCE__PLANNING__DATE_TO__HIDDEN'],\n 'isys_maintenance__comment' => $p_post['C__MAINTENANCE__PLANNING__COMMENT'],\n 'isys_maintenance__isys_maintenance_mailtemplate__id' => $p_post['C__MAINTENANCE__PLANNING__MAILTEMPLATE'],\n 'isys_maintenance__isys_contact_tag__id' => $p_post['C__MAINTENANCE__PLANNING__CONTACT_ROLES'],\n 'isys_maintenance__status' => C__RECORD_STATUS__NORMAL\n ],\n $l_objects,\n $l_contacts\n );\n\n isys_notify::success(_L('LC__MAINTENANCE__NOTIFY__SAVE_SUCCESS'));\n }\n catch (Exception $e)\n {\n isys_notify::error(_L('LC__MAINTENANCE__NOTIFY__SAVE_FAILURE') . $e->getMessage(), ['sticky' => true]);\n } // try\n\n return $l_id;\n }", "function create_zubi_consultancy() {\n\t$title = $_POST['title'];\n\t$category = array($_POST['category']);\n\t$name = sanitize_title($title);\n\t$post = array (\n\t\t'post_title' => $title,\n\t\t'post_name' => $name,\n\t\t'post_author' => 1,\n\t\t'post_type' => 'sfwd-courses',\n\t\t'comment_status' => 'closed',\n\t\t'post_category' => $category\n\t);\n\t$post_id = wp_insert_post($post);\n\tupdate_post_meta( $post_id, 'fachada_servicio', 'fachada_CONSULTORIA' );\n\n\tif (is_wp_error($post_id)) {\n\t\treturn new WP_Error('cant_insert_post', 'Consultancy could not be created', array ('status' => 500 ));\n\t} else {\n\t\t$new_post = get_post($post_id);\n\t\treturn $new_post;\n\t};\n\n}", "public function postAction()\n {\n try\n {\n $trackingReq = $this->_helper->TrackingRequest($this->_request->getRawBody());\n\n $item = $this->trackingService->addTrackingItem($trackingReq['content']);\n\n $this->view->item = $item;\n\n $this->_response->setHttpResponseCode(201);\n $this->_response->setHeader('Etag', md5($item->getHashString()));\n $this->_response->setHeader('Content-Type', 'application/atom+xml;charset=\"utf-8\"');\n\n // - Causing additional markup to be generated\n // $this->_response->setHeader('Location', $this->view->apiEndPoint . '/fulfillment/' . $item->getId());\n\n $this->render('tracking-fulfillment');\n }\n catch (InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, $e->getMessage());\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'Term is already tracked');\n }\n }", "function addgoal()\n {\n $goal = $this->value('goal');\n\n $user_id = $this->userInfo('user_id');\n\t\t\n\t\t $clinic_id = $this->get_clinic_info($user_id);\n\n if(isset($goal) && $goal != \"\")\n {\n $goal_arr = array(\n 'goal' => $goal,\n 'status' => 1,\n 'created_by' => $user_id,\n\t\t\t\t'clinicId' => $clinic_id\n );\n\n $this->insert('patient_goal', $goal_arr);\n $newlyinsertedgoalid = $this->insert_id();\n\n echo \"<li id='goal_{$newlyinsertedgoalid}' style=\\\"min-height:40px;\\\"> \n <span class=\\\"todo-actions goal-actions\\\"> \n <a href=\\\"javaScript:void(0);\\\" id=\\\"{$newlyinsertedgoalid}\\\">\n <i onclick='App.updateGoal(event);' id=\\\"Goal{$newlyinsertedgoalid}\\\" class=\\\"fa fa-square-o\\\"></i>\n </a> \n </span> \t\n <span id='span_{$newlyinsertedgoalid}' class=\\\"desc\\\">{value}</span> \n </li>\";\n }\n else\n {\n echo \"Goal is blank\";\n }\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "public function createAction()\n {\n if ($this->request->isPost()) {\n\n $npfOffice = new NpfOffices();\n\n\n $npfOffice->assign(array(\n 'name_bn' => $this->request->getPost('name_bn', 'striptags'),\n 'name_en' => $this->request->getPost('name_en', 'striptags'),\n 'address_bn' => $this->request->getPost('address_bn', 'striptags'),\n 'address_en' => $this->request->getPost('address_en', 'striptags'),\n 'phone' => $this->request->getPost('phone', 'striptags'),\n 'email' => $this->request->getPost('email', 'striptags'),\n 'domain_id' => $this->request->getPost('domain_id', 'int'),\n ));\n\n if (!$npfOffice->save()) {\n $this->flash->error($npfOffice->getMessages());\n } else {\n\n $this->flash->success(\"Office was created successfully\");\n\n Tag::resetInput();\n }\n }\n\n $this->view->form = new NpfOfficesForm(null);\n }", "public function create()\n {\n return view('admin.member_ship_plans.create');\n }", "public function create()\n {\n return view('admin.shippings.create', ['title' => trans('admin.add')]);\n }", "public function listingCreate($form){\n \n ///do things only if submited by \"create button\"\n if (!$form['add_postage']->submittedBy){\n \n //things to do when form is submitted by create button\n //unset postage textbox counter on success\n unset($this->hlp->sess(\"postage\")->counter);\n \n $values = $form->getValues(True);\n $postage = $this->lHelp->returnPostageArray($values);\n $procValues = $this->lHelp->getProcValues($values); \n $listingID = $this->listings->create($procValues);\n \n if (!empty($postage['options'])){\n $this->listings->writeListingPostageOptions($listingID, $postage);\n }\n \n $this->redirect(\"Listings:in\");\n }\n }", "function create_post_type() {\r\n\r\n\t\t$args = apply_filters( 'agentpress_listings_post_type_args',\r\n\t\t\tarray(\r\n\t\t\t\t'labels' => array(\r\n\t\t\t\t\t'name'\t\t\t\t\t=> __( 'Listings', 'apl' ),\r\n\t\t\t\t\t'singular_name'\t\t\t=> __( 'Listing', 'apl' ),\r\n\t\t\t\t\t'add_new'\t\t\t\t=> __( 'Add New', 'apl' ),\r\n\t\t\t\t\t'add_new_item'\t\t\t=> __( 'Add New Listing', 'apl' ),\r\n\t\t\t\t\t'edit'\t\t\t\t\t=> __( 'Edit', 'apl' ),\r\n\t\t\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Listing', 'apl' ),\r\n\t\t\t\t\t'new_item'\t\t\t\t=> __( 'New Listing', 'apl' ),\r\n\t\t\t\t\t'view'\t\t\t\t\t=> __( 'View Listing', 'apl' ),\r\n\t\t\t\t\t'view_item'\t\t\t\t=> __( 'View Listing', 'apl' ),\r\n\t\t\t\t\t'search_items'\t\t\t=> __( 'Search Listings', 'apl' ),\r\n\t\t\t\t\t'not_found'\t\t\t\t=> __( 'No listings found', 'apl' ),\r\n\t\t\t\t\t'not_found_in_trash'\t=> __( 'No listings found in Trash', 'apl' )\r\n\t\t\t\t),\r\n\t\t\t\t'public'\t\t=> true,\r\n\t\t\t\t'query_var'\t\t=> true,\r\n\t\t\t\t'menu_position'\t=> 6,\r\n\t\t\t\t'menu_icon'\t\t=> APL_URL . 'images/apl-icon-16x16.png',\r\n\t\t\t\t'has_archive'\t=> true,\r\n\t\t\t\t'supports'\t\t=> array( 'title', 'editor', 'comments', 'thumbnail', 'genesis-seo', 'genesis-layouts', 'genesis-simple-sidebars' ),\r\n\t\t\t\t'rewrite'\t\t=> array( 'slug' => 'listings' ),\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tregister_post_type( 'listing', $args );\r\n\r\n\t}", "public function create()\n {\n return view('listings.new');\n \n }", "function create_family_goal() {\n date_default_timezone_set('Asia/Singapore');\n $this->load->helper('date');\n $date = date('Y-m-d');\n\n $new = array(\n 'seeker_id' => $this->session->userdata('seeker_id'),\n 'goal_cat_id' => '1',\n 'goal_desc' => $this->input->post('family'),\n 'achievement_criteria' => $this->input->post('family_criteria'),\n 'goal_set_date' => $date,\n 'target_end_date'=> $this->input->post('target_date1'),\n 'goal_completion_status' => 'Active'\n );\n\n $insert = $this->db->insert('goal', $new);\n return $insert;\n }", "function buddyfree_add_project_post_type() {\n\n// Set UI labels for Custom Post Type\n $labels = array(\n 'name' => _x( 'Projects', 'Post Type General Name', 'buddyfree' ),\n 'singular_name' => _x( 'Project', 'Post Type Singular Name', 'buddyfree' ),\n 'menu_name' => __( 'Projects', 'buddyfree' ),\n // 'parent_item_colon' => __( 'Parent Project', 'buddyfree' ),\n 'all_items' => __( 'All Projects', 'buddyfree' ),\n 'view_item' => __( 'View Project', 'buddyfree' ),\n 'add_new_item' => __( 'Add New Project', 'buddyfree' ),\n 'add_new' => __( 'Add New', 'buddyfree' ),\n 'edit_item' => __( 'Edit Project', 'buddyfree' ),\n 'update_item' => __( 'Update Project', 'buddyfree' ),\n 'search_items' => __( 'Search Project', 'buddyfree' ),\n 'not_found' => __( 'Not Found', 'buddyfree' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'buddyfree' ),\n );\n \n// Set other options for Custom Post Type\n \n $args = array(\n 'label' => __( 'project', 'buddyfree' ),\n 'description' => __( 'Project news and reviews', 'buddyfree' ),\n 'labels' => $labels,\n // Features this CPT supports in Post Editor\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-hammer',\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n 'taxonomies' => array( 'category', 'topics', 'post_tag' ),\n );\n \n // Registering your Custom Post Type\n register_post_type( 'projects', $args );\n\n}", "public function store(CreateListingPlanRequest $request)\r\n\t{\r\n\t\t$data = $request->all();\r\n\r\n\t\t//creates listing plan\r\n\t\t$this->listingPlanRepository->create($data);\r\n\r\n\t\tflash()->success(trans('back.flash_successfully_added'));\r\n\t\treturn redirect()->route('admin.listing-plans.index');\r\n\t}", "public function AddFraisForfait()\r\n {\r\n $frais = new Frais();\r\n //Get le mois\r\n $mois = $this->GetMois(date('m'));\r\n //Ajoute a LigneFraisForfait les données suivantes\r\n $frais->AddLigneFraisForfait($_SESSION['uid'],$mois,$_POST['typefrais'],$_POST['quantite']);\r\n\r\n $this->MainPage();\r\n }", "public function create()\n {\n $members = $this->goalRepository->getStaffMember();\n $goalTypes = Goal::GOAL_TYPE;\n\n return view('goals.create', compact('members', 'goalTypes'));\n }", "public function store(PostFilmesRequest $request)\n {\n return Filmes::create($request->all());\n }", "public function store(CreateFacilityPlanRequest $request)\n { \t\n //$data= $request->all();\n $facilityKeys= array();\n \n $facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n /*foreach($request->all() as $key => $val){\n \tif(preg_match(\"%^facility[0-9]+$%\", $key) && $val !== \"\"){\n \t\t//check that a value doesn't repeat\n \t\t$repeatedVal= false;\n \t\tforeach($facilityKeys as $facilityKey){\n \t\t\tif($val == $facilityKey){\n \t\t\t\t$repeatedVal=true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif(!$repeatedVal)\n \t\t\t$facilityKeys[]= $val;\n \t}\n }\n /*foreach($request->all() as $key => $val){\n \tif($key !== \"_token\" && $key !==\"name\")\n \t\t$facilityKeys[]= $val;\t\n } */ \n \n \t$facility_plan= FacilityPlan::create($request->all());\n \t$facility_plan->facilities()->attach($facilityKeys);\n \n return \\Redirect::route('admin.facility_plans.index');\n }", "protected function addNewPartners()\n {\n foreach ($this->participatingOrganizations as $participatingOrganization) {\n if ($participatingOrganization->identifier() === $this->reportingOrganization->identifier) {\n if (trim($participatingOrganization->name()) !== trim($this->reportingOrganization->name)\n || $participatingOrganization->type() !== array_get($this->reportingOrganization->reporting_org, '0.reporting_organization_type', '')) {\n if ($participatingOrganization->identifier()) {\n $identifier = (string) $participatingOrganization->identifier();\n if (!($existingPartner = $this->partners->where('identifier', $identifier)->first())) {\n $organization = $this->createPartnerOrganization($participatingOrganization);\n }\n } else {\n if (!$existingPartner = $this->partnersWithName->where('nameString', trim($participatingOrganization->name()))->first()) {\n $organization = $this->createPartnerOrganization($participatingOrganization);\n }\n }\n\n if (isset($organization)) {\n $participatingOrganization->data['org_data_id'] = $organization->id;\n $participatingOrganization->data['country'] = array_has($this->countries, $organization->country) ? $organization->country : '';\n }\n }\n } else {\n if ($participatingOrganization->identifier()) {\n $identifier = (string) $participatingOrganization->identifier();\n if (!($existingPartner = $this->partners->where('identifier', $identifier)->first())) {\n $organization = $this->createPartnerOrganization($participatingOrganization);\n }\n } else {\n if (!$existingPartner = $this->partnersWithName->where('nameString', trim($participatingOrganization->name()))->first()) {\n $organization = $this->createPartnerOrganization($participatingOrganization);\n }\n }\n\n if (isset($organization)) {\n $participatingOrganization->data['org_data_id'] = $organization->id;\n $participatingOrganization->data['country'] = array_has($this->countries, $organization->country) ? $organization->country : '';\n }\n }\n\n\n $this->partners = $this->reportingOrganization->partners();\n $this->partnersWithName = $this->getPartnersWithName();\n }\n\n return $this;\n }", "protected function postAddNewSubshapePortionRequest(Requests\\PostAddNewSubshapePortionRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling postAddNewSubshapePortion');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling postAddNewSubshapePortion');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling postAddNewSubshapePortion');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling postAddNewSubshapePortion');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling postAddNewSubshapePortion');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{path}/{shapeIndex}/paragraphs/{paragraphIndex}/portions';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n // query params\n if ($request->position !== null) {\n $queryParams['position'] = ObjectSerializer::toQueryValue($request->position);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"path\", $request->path);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'POST');\n }" ]
[ "0.5242891", "0.49540678", "0.48662233", "0.48094192", "0.45763302", "0.45679262", "0.456388", "0.4558311", "0.45319682", "0.44902307", "0.44634", "0.44574568", "0.44418606", "0.44272166", "0.43916282", "0.43817014", "0.43719554", "0.43578473", "0.43516904", "0.4344669", "0.43411136", "0.43199894", "0.43165737", "0.43121964", "0.4311542", "0.4310725", "0.4284837", "0.42836976", "0.42813414", "0.42735204" ]
0.7227644
0
Operation listsFamilyplanningFamilyplanningIdPut Update an existing FamilyPlanning item.
public function listsFamilyplanningPut($familyplanning_id) { $input = Request::all(); $family_plan = FamilyPlanning::findOrFail($familyplanning_id); $family_plan->update(['name' => $input['name']]); if($family_plan->save()){ return response()->json(['msg' => 'Updated family plan'], 200); }else{ return response('Oops, seems like something went wrong while trying to update a plan'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsFamilyplanningByIdGet($familyplanning_id)\r\n {\r\n $response = FamilyPlanning::findOrFail();\r\n return response()->json($response, 200);\r\n }", "public function setId_planning($id_planning)\n {\n $id_planning = (int) $id_planning;\n $this->_id_planning = $id_planning;\n }", "public function listsFamilyplanningPost()\r\n {\r\n $input = Request::all();\r\n $new_familyPlan = FamilyPlanning::create($input);\r\n if($new_familyPlan){\r\n return response()->json(['msg' => 'Created a new Family plan']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new family plan');\r\n }\r\n }", "public function listsFamilyplanningDelete($familyplanning_id)\r\n {\r\n FamilyPlanning::destroy($familyplanning_id);\r\n return response()->json(['msg' => 'deleted family plan'], 200);\r\n }", "public function getId_planning()\n {\n return $this->_id_planning;\n }", "public function listsFamilyplanningGet()\r\n {\r\n $response = Familyplanning::all();\r\n return response()->json($response, 200);\r\n }", "public function update(Request $request, Boarding $boarding)\n {\n $boarding->route_id = $request->route;\n $boarding->schedule_id = $request->schedule;\n $boarding->from_city = $request->from_city;\n $boarding->to_city = $request->to_city;\n $boarding->terminal_id = $request->terminal;\n $boarding->date = $request->date;\n $boarding->driver_id = $request->driver;\n $boarding->conductor_id = $request->conductor_hostess;\n $boarding->bus_id = $request->bus;\n\n $boarding->total_passenger = $request->pass_seat;\n $boarding->total_fare = $request->total_fare;\n $boarding->total_exp = $request->sum_myvals;\n $boarding->total_discount = $request->discount;\n $boarding->netcash = $request->net;\n \n $boarding->save();\n $user_terminal_id = Auth::user()->terminal_id;\n foreach($request->exp as $expid => $expamt){\n BoardingExpense::updateOrCreate(['boarding_id' => $boarding->id,'expense_type_id' => $expid], ['amount' => $expamt]);\n }\n Session::flash('flash_success', 'Boarding updated successfully');\n return redirect()->route('admin.boarding.index');\n }", "public function update($project, $firewall, Google_Firewall $postBody, $optParams = array()) {\n $params = array('project' => $project, 'firewall' => $firewall, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n $data = $this->__call('update', array($params));\n if ($this->useObjects()) {\n return new Google_Operation($data);\n } else {\n return $data;\n }\n }", "public function update(Request $request, MemberShipPlan $membeship_plan)\n {\n if(config('app.dev_mode') == false) \n return back()->with('warning', trans('messages.dev_restriction'));\n \n if( $membeship_plan->update($request->all()) )\n return back()->with('success', trans('messages.updated', ['model' => $this->model_name]));\n\n return back()->with('error', trans('messages.failed'));\n }", "public function scopeRelatedPlannings($query, Planning $planning, Course $course)\n\t{\n\t\treturn $query->join('courses','courses.id','=','plannings.course_id')\n\t\t\t\t\t\t->select('plannings.*')\n\t\t\t\t\t\t->where('courses.module_id','=',$course->module->id)\n\t\t\t\t\t\t->where('plannings.turn_id','=',$planning->turn_id)\n\t\t\t\t\t\t->whereNotIn('plannings.id', [$planning->id])\n\t\t\t\t\t\t->orderBy('plannings.group_number', 'ASC');\n\t}", "public function update(Request $request, Boarding $boarding)\n {\n //\n }", "public function update($listingPlanId, UpdateListingPlanRequest $request)\r\n\t{\r\n\t\t$data = $request->all();\r\n\r\n\t\t//updates listing plan\r\n\t\t$this->listingPlanRepository->update($listingPlanId, $data, ['auto_conf']);\r\n\r\n\t\tflash()->success(trans('back.flash_successfully_updated'));\r\n\t\treturn redirect()->route('admin.listing-plans.index');\r\n\t}", "public function update(Request $request, $plano_id, $aula_id, $id)\n {\n $this->validate($request, [\n 'falta' => 'required',\n 'aluno' => 'required',\n ]);\n\n $frequencia = Frequencia::findOrfail($id);\n $frequencia->falta = $request->falta;\n $frequencia->aluno_id = $request->aluno;\n $frequencia->aula_id = $aula_id;\n $frequencia->save();\n\n return redirect('plano/' . $plano_id . '/aula/' . $aula_id . '/frequencia')->with('success', 'Frequência atualizada com sucesso!');\n }", "public function addFkFiscalizacaoProcessoFiscalGrupos(\\Urbem\\CoreBundle\\Entity\\Fiscalizacao\\ProcessoFiscalGrupo $fkFiscalizacaoProcessoFiscalGrupo)\n {\n if (false === $this->fkFiscalizacaoProcessoFiscalGrupos->contains($fkFiscalizacaoProcessoFiscalGrupo)) {\n $fkFiscalizacaoProcessoFiscalGrupo->setFkFiscalizacaoProcessoFiscal($this);\n $this->fkFiscalizacaoProcessoFiscalGrupos->add($fkFiscalizacaoProcessoFiscalGrupo);\n }\n \n return $this;\n }", "public function update(gandola $gandolas, GandRequest $request)\n {\n \n $gandolas->update($request->validated());\n\n return redirect()->route('gandolas.show', $gandolas)->with('status', 'The project was update successfully');\n }", "public function update(EditFacilityPlanRequest $request, $id)\n {\n \t$facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n \t\n \t/*foreach($request->all() as $key => $val){\n \t\tif($key !== \"_token\" && $key !==\"name\")\n \t\t\t$facilityKeys[]= $val;\n \t}*/\n \t\n \t\n \t$facility_plan= FacilityPlan::find($id);\n \t$facility_plan->fill($request->all());\n \t$facility_plan->save();\n \t \n \t$facility_plan->facilities()->sync($facilityKeys);\n \n $message= $facility_plan->name . ' updated succesfully';\n if($request->ajax()){\n \treturn $message;\n }\n Session::flash('message',$message);\n return redirect()->route('admin.facility_plans.index');\n }", "public function setDate_planning_end($date_planning_end)\n {\n $this->_date_planning_end = $date_planning_end;\n }", "public function edit(Boarding $boarding)\n {\n //\n }", "public function update(FamilymemberRequest $request, Familymember $familymember)\n {\n $familymember->updated_by = auth()->id();\n $familymember->birth_date = date(\"Y-m-d\", strtotime(request('birth_date')));\n $familymember->update(request([\n 'firstname',\n 'middlename',\n 'lastname',\n 'sex',\n 'address',\n 'disability',\n 'phone_no',\n 'email',\n 'relationship',\n ]));\n alert()->success('success', 'FAmill year has successfully Updated.')->persistent();\n return redirect()->route('general.familymember.index');\n }", "public function update(Request $request, Balita $balita)\n {\n //\n }", "public function setFaxnbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->faxnbr !== $v) {\n $this->faxnbr = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_FAXNBR] = true;\n }\n\n return $this;\n }", "public function update(Request $request, Pizza $pizza)\n {\n $pizza->update($request->request->toArray());\n return $pizza;\n }", "public function update(Request $request, $numero_factura)\n {\n $factura = Factura::find($numero_factura);\n $factura->fill($request->all());\n $factura->save();\n Flash::warning('La factura ha sido modificada');\n return redirect()->route('facturas.index');\n }", "public function updateListing($plan_info)\n {\n $is_free = false;\n\n // Define is listing is free\n if (\n $plan_info['Price'] <= 0\n || ($plan_info['Price'] > 0\n && (\n (\n $this->planType == 'listing'\n && $plan_info['Package_ID']\n && $plan_info['Listings_remains'] > 0\n )\n || (\n $this->planType == 'account'\n && $plan_info['Listings_remains'] > 0\n )\n )\n )\n ) {\n $is_free = true;\n\n // Redirect to the form if done step was initiated not by script\n if (!$this->listingData['Plan_ID']) {\n $this->redirectToStep('category');\n exit;\n }\n }\n // Checking for paid listing payment status\n elseif (strtotime($this->listingData['Pay_date']) === false) {\n if ($this->singleStep) {\n $this->redirectToStep('category');\n } else {\n $this->redirectToStep($this->listingData['Last_step'], $this->extendUrl());\n }\n exit;\n }\n\n // Change listing status\n $update = array(\n 'fields' => array(\n 'Last_step' => '',\n 'Last_type' => '',\n 'Cron' => '0',\n 'Cron_notified' => '0',\n 'Cron_featured' => '0',\n ),\n 'where' => array(\n 'ID' => $this->listingID,\n ),\n );\n\n if ($is_free) {\n // Define featured status\n if (($plan_info['Featured'] || $plan_info['Featured_listing'])\n && (!$plan_info['Advanced_mode']\n || ($plan_info['Advanced_mode'] && $this->adType == 'featured')\n )\n ) {\n $featured = true;\n }\n\n $update['fields']['Status'] = $GLOBALS['config']['listing_auto_approval'] ? 'active' : 'pending';\n $update['fields']['Pay_date'] = 'NOW()';\n $update['fields']['Featured_ID'] = $featured ? $plan_info['ID'] : 0;\n $update['fields']['Featured_date'] = $featured ? 'NOW()' : 'NULL';\n }\n\n $GLOBALS['rlDb']->update($update, 'listings');\n\n /**\n * @since 4.7.2 - Hook moved after code \"rlDb->update()\"\n * @since 4.6.0 - All parameters\n */\n $GLOBALS['rlHook']->load('afterListingDone', $this, $update, $is_free);\n }", "public function scopeOldRooms($query, Turn $turn, Planning $planning)\n\t{\n\t\treturn $query->join('planning_room','planning_room.id', '=', 'plannings.id')\n\t\t\t\t\t->join('turns', 'plannings.turn_id', '=', 'turns.id')\n\t\t\t\t\t->where('plannings.course_id', '=', $planning->course_id)\n\t\t\t\t\t->where('plannings.id', '!=', $planning->id)\n\t\t\t\t\t->where('plannings.group_number','=', $planning->group_number)\n\t\t\t\t\t->where('turns.year', '<=', $turn->year)\n\t\t\t\t\t->orderBy('turns.year', 'DESC')\n\t\t\t\t\t->orderBy('turns.name', 'DESC');\n\t}", "public function update(Request $request, $id)\n {\n $grupo=Grupo::find($id);\n $old_values=Grupo::find($id);\n\n $grupo->plan = $request->plan;\n $grupo->nombre = $request->nombre;\n $grupo->estado = $request->estado;\n $grupo->ciudad_origen = $request->ciudad_origen;\n $grupo->fecha_llegada = $request->fecha_llegada.\" \".$request->hora_llegada;\n $grupo->descripcion_transporte_llegada = $request->descripcion_transporte_llegada;\n $grupo->fecha_salida = $request->fecha_salida.\" \".$request->hora_salida;\n $grupo->descripcion_transporte_salida = $request->descripcion_transporte_salida;\n $grupo->costo_total_recorrido = $request->costo_total_recorrido;\n $grupo->costo_total_gastado = $request->costo_total_gastado;\n\n //if($grupo->estado==\"1\"){\n // $grupo->estado=true;\n //}\n //else{\n // $grupo->estado=false;\n //}\n $new_values= $grupo;\n $type=Grupo::class;\n //dd($old_values, $new_values);\n LogManager::insertLogUpdate($old_values, $new_values, $type, Auth::user()->name);\n $grupo->save();\n Flash::warning('Se ha modificado el grupo '.$grupo->nombre.' satisfactoriamente');\n return redirect()->route('admin.grupo.index');\n }", "private function putProject() {\r\n $this->clientOwnsProject();\r\n $this->checkReadOnlyFields(FALSE, 400201);\r\n\r\n if ($this->usertype != 'api-tenant') {\r\n $this->checkReadOnlyFields($this->tenantfields, 400201);\r\n }\r\n $projectArray = self::setProjectArray();\r\n\r\n $project = $projectArray['project'];\r\n $control = $projectArray['control'];\r\n\r\n $completePerso = (isset($project['personalization_mode']) && $project['personalization_mode'] == OPT_PERSOMODE_COMPLETE);\r\n $noControlRule = (!isset($control['rule_id']) || $control['rule_id'] <= 0);\r\n if ($completePerso && $noControlRule) {\r\n self::verifyControlRule();\r\n }\r\n\r\n if (count($project) > 0) {\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->update('landingpage_collection', $project);\r\n }\r\n\r\n if (count($control) > 0) {\r\n $this->db->where('landingpage_collectionid', $this->project)\r\n ->where('pagetype', OPT_PAGETYPE_CTRL)\r\n ->update('landing_page', $control);\r\n }\r\n\r\n $this->optimisation->flushKpiResultsForCollection($this->project);\r\n $this->optimisation->evaluateImpactAfterCollectionChange($this->project);\r\n $this->optimisation->flushCollectionCache($this->project);\r\n return $this->successResponse(200);\r\n }", "public function store(PlanningRequest $request)\n {\n if (!Auth::user()->isAdmin() && !Auth::user()->isTech() && !Auth::user()->isManager() && !Auth::user()->isPlanneur() && !Auth::user()->isFM()) {\n return redirect()->back();\n }\n\n if(Session()->get('locale') == 'en') {\n $carb = Carbon::createFromFormat('m/d/Y',$request->Date); \n } elseif (Session()->get('locale') == 'fr') {\n $carb = Carbon::createFromFormat('d/m/Y',$request->Date); \n }\n\n $date = $carb->format('Y-m-d');\n\n // Add planning in the table\n $planning = new Planning;\n $planning->site_id = $request->site_id;\n $planning->equipment_id = $request->equipment_id;\n $planning->name = $request->Name;\n $planning->date = $date;\n $planning->description = $request->Description;\n\n if(isset($request->Reminder)) {\n\n if(Session()->get('locale') == 'en') {\n $carbon = Carbon::createFromFormat('m/d/Y h:i A',$request->Reminder); \n } elseif (Session()->get('locale') == 'fr') {\n $carbon = Carbon::createFromFormat('d/m/Y H:i',$request->Reminder); \n }\n\n $reminder = $carbon;\n\n $planning->reminder = $reminder;\n }\n\n $planning->save();\n\n if ($request->ajax())\n {\n if ($planning){\n return Response::json(['success' => 'true']);\n }else {\n return Response::json(['success' => 'false']);\n }\n \n } else{\n // Renseigner un message flash\n Session::flash('success', trans('planning.Success'));\n\n // Rediriger vers une page\n return redirect()->back();\n }\n }", "public function updTrainingFee($refid, $tr_cost)\n {\n $data = array(\n \"th_training_fee\" => $tr_cost,\n );\n\n $this->db->where(\"th_ref_id\", $refid);\n\n return $this->db->update(\"ims_hris.training_head\", $data);\n }", "public function insert_franchise_player($team_id,$fffl_player_id,$year){\r\n\t\t//check to make sure he's not already franchise for that team, just to be sure\r\n\t\t$query = $this->db->where('team_id',$team_id)\r\n\t\t\t\t\t\t->where('fffl_player_id',$fffl_player_id)\r\n\t\t\t\t\t\t->where('season',$this->current_year)\r\n\t\t\t\t\t\t->get('Franchise');\r\n\t\t$message = '';\r\n\t\t//check to make sure salary is under the limit\r\n\t\t$player_salary = $this->Salaries->get_player_team_salary($team_id,$fffl_player_id);\r\n\t\t$total_salary_with = $this->get_team_franchise_salary($team_id,$year) + $player_salary;\r\n\t\t$under_cap = $this->Leagues->get_league_salary_cap($this->Teams->get_team_league_id($team_id)) - $total_salary_with;\r\n\t\t$player_name = $this->Players->get_player_info(array($fffl_player_id),'fffl_player_id','first_name last_name');\r\n\t\t//if he's not there and he won't exceed the cap, insert him\r\n\t\tif($under_cap>=0){\r\n\t\t\tif($query->num_rows()==0){\r\n\t\t\t$this->db->set('team_id',$team_id)\r\n\t\t\t\t\t->set('fffl_player_id',$fffl_player_id)\r\n\t\t\t\t\t->set('salary',$player_salary)\r\n\t\t\t\t\t->set('season',$year)\r\n\t\t\t\t\t->set('area', $this->Rosters_View->get_team_player_area($team_id,$fffl_player_id))\r\n\t\t\t\t\t->insert('Franchise');\r\n\t\t\t$message .= $player_name['first_name'].' '.$player_name['last_name'].' - Success';\r\n\t\t\t\r\n\t\t\t}//already there\r\n\t\t\telse{\r\n\t\t\t\t$message .= 'There was an error. Please refresh the page. If it continues, contact me.';\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}//under cap\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t$message .= $player_name['first_name'].' '.$player_name['last_name'].' not added. Would exceed salary cap.';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $message;\r\n\t}" ]
[ "0.5707996", "0.54358536", "0.536175", "0.52452826", "0.47779822", "0.47570205", "0.43715778", "0.4049968", "0.39982924", "0.39031604", "0.38636073", "0.38484845", "0.38259766", "0.38251325", "0.38199756", "0.3815365", "0.3803095", "0.3802177", "0.37730306", "0.3753238", "0.37142092", "0.37027395", "0.36753345", "0.363097", "0.3629728", "0.36257216", "0.36166334", "0.3601951", "0.36013693", "0.35969412" ]
0.73814946
0
Operation listsFamilyplanningFamilyplanningIdDelete Deletes a FamilyPlanning item specified by familyplanningId.
public function listsFamilyplanningDelete($familyplanning_id) { FamilyPlanning::destroy($familyplanning_id); return response()->json(['msg' => 'deleted family plan'], 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsFamilyplanningByIdGet($familyplanning_id)\r\n {\r\n $response = FamilyPlanning::findOrFail();\r\n return response()->json($response, 200);\r\n }", "public function listsFamilyplanningPut($familyplanning_id)\r\n {\r\n $input = Request::all();\r\n $family_plan = FamilyPlanning::findOrFail($familyplanning_id);\r\n $family_plan->update(['name' => $input['name']]);\r\n if($family_plan->save()){\r\n return response()->json(['msg' => 'Updated family plan'], 200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update a plan');\r\n }\r\n }", "protected function process_planning__delete($p_type = C__MAINTENANCE__PLANNING, $p_id)\n {\n if ($p_type === C__MAINTENANCE__PLANNING)\n {\n $this->get_auth()\n ->check(isys_auth::DELETE, 'planning');\n }\n else\n {\n $this->get_auth()\n ->check(isys_auth::DELETE, 'planning_archive');\n } // if\n\n if (!is_array($p_id))\n {\n $p_id = [$p_id];\n } // if\n\n $this->m_dao->delete_planning(array_filter($p_id, 'is_numeric'));\n }", "public function setId_planning($id_planning)\n {\n $id_planning = (int) $id_planning;\n $this->_id_planning = $id_planning;\n }", "public function destroy_planning($id) {\n $user = Auth::user();\n $user->recettes()->detach($id);\n\n return redirect('/planning');\n }", "public function listsFamilyplanningPost()\r\n {\r\n $input = Request::all();\r\n $new_familyPlan = FamilyPlanning::create($input);\r\n if($new_familyPlan){\r\n return response()->json(['msg' => 'Created a new Family plan']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new family plan');\r\n }\r\n }", "public function getId_planning()\n {\n return $this->_id_planning;\n }", "public function deleteAllocation($allocation_id)\n {\n return $this->pterodactyl->nodes->deleteAllocation($this->id, $allocation_id);\n }", "public function listsFamilyplanningGet()\r\n {\r\n $response = Familyplanning::all();\r\n return response()->json($response, 200);\r\n }", "public function delete_franchise($id){\n\t\t$query = \"DELETE FROM `franchise` WHERE `franchise_id`='$id'\";\n\t\t$result = mysql_query($query);\n\t\tif($result){\n\t\t\theader('location:view_franchise.php');\t\t \n\t\t}else{\n\t\t\tdie('can not delete'.mysql_error());\n\t\t}\n\t}", "public function deleteParafiscalById($idParafiscal) {\r\n $tabla = \"parafiscales\";\r\n $predicado = \"idParafiscales = \" . $idParafiscal;\r\n $r = $this->db->borrarRegistro($tabla, $predicado);\r\n return $r;\r\n }", "public function delete_goal( $goal_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'goals/' . abs( intval( $goal_id ) ),\n\t\t\t'method' => 'DELETE',\n\t\t) );\n\t}", "public function delete($famid)\n\t{\n\t\t$userfamily = Family::getto(\"Edit\")->where('id','=',$famid)->get();\n\t\t$familyarray[$famid] = $userfamily[0]->name ; \n\t\t// Check if this family has 0 members\n\t\t$members_count = Person::where('family_id', '=', $famid)->count();\n\n \n\t\t// Family has one or more members.\n\t\t$members = Person::where('family_id', '=', $famid)->get(['id','name','nickname']);\n\t\t$membersarray = array() ;\n\t\tforeach ($members as $key => $value) {\n\t\t\t$membersarray[$value->id] = $this->getfullname($value->id, $value->name, $value->nickname) ;\n\t\t}\n\n\t\treturn view('deletemember',['members' => $membersarray,\n\t\t\t\t\t\t\t\t\t'members_count' => $members_count, \n\t\t\t\t\t\t\t\t\t'familyarray' => $familyarray,\n\t\t\t\t\t\t\t\t\t'famid' => $famid ]);\n\t}", "public function eliminar($idFacPagos){\n\t\tif(!isset($idFacPagos)){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\t\t\n\n\t\t$this->db->where('id_factura_pagos_pedido', $idFacPagos);\n\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\n\t\tif ($this->resultDb->num_rows() > 0){\n\t\t\t\t$this->db->where('id_factura_pagos_pedido' , $idFacPagos);\n\t\t\t\t$this->db->delete($this->controllerSPA);\n\t\t\t\t$this->responseHTTP['message'] = \n\t\t\t\t\t\t\t\t\t\t\t'Regitro eliminado correctamente';\n\t\t\t\t$this->responseHTTP[\"appst\"] = 1500;\n\t\t}else{\n\t\t\t$this->responseHTTP['appst'] =\n\t\t\t\t\t\t\t\t 'El registro que intenta eliminar no existe';\n\t\t\t$this->responseHTTP[\"appst\"] = 2500;\n\t\t}\n\n\t\t$this->__responseHttp($this->responseHTTP, 200);\n\t}", "public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "public function deleteFranchisesByGameId(Game $game){\n $prepared = $this->connection->prepare(\"DELETE FROM games_franchises WHERE game_id=:game_id\");\n $prepared->execute(array(\n 'game_id' => $game->getId()\n ));\n }", "public function destroy($id)\n {\n $grupo = Grupo::find($id);\n\n /** if (count($grupo->departamentos) > 0) {\n flash(\"La Facultad <strong>\" . $facultad->nombre . \"</strong> no pudo ser eliminada porque tiene departamentos asociados.\")->warning();\n return redirect()->route('facultad.index');\n } else {\n * */\n $result = $grupo->delete();\n if ($result) {\n $aud = new Auditoriaacademico();\n $u = Auth::user();\n $aud->usuario = \"ID: \" . $u->identificacion . \", USUARIO: \" . $u->nombres . \" \" . $u->apellidos;\n $aud->operacion = \"ELIMINAR\";\n $str = \"ELIMINACIÓN DE FACULTAD. DATOS ELIMINADOS: \";\n foreach ($grupo->attributesToArray() as $key => $value) {\n $str = $str . \", \" . $key . \": \" . $value;\n }\n $aud->detalles = $str;\n $aud->save();\n flash(\"El Grupo <strong>\" . $grupo->nombre . \"</strong> fue eliminado de forma exitosa!\")->success();\n return redirect()->route('grupo.index');\n } else {\n flash(\"El Grupo <strong>\" . $grupo->nombre . \"</strong> no pudo ser eliminado. Error: \" . $result)->error();\n return redirect()->route('grupo.index');\n }\n //}\n }", "public function deleteFamille(\\NNGenie\\InfosMatBundle\\Entity\\Famille $famille);", "public function removeFkPpaProgramas(\\Urbem\\CoreBundle\\Entity\\Ppa\\Programa $fkPpaPrograma)\n {\n $this->fkPpaProgramas->removeElement($fkPpaPrograma);\n }", "public function remove()\n\t{\n\t\t$database\t= new database();\n\t\tif ( isset($this->_properties['planning_gallery_id']) && $this->_properties['planning_gallery_id'] > 0) \n\t\t{\n\t\t\t$sql = \"DELETE FROM planning_gallery WHERE planning_gallery_id = '\" . $this->planning_gallery_id . \"'\";\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif($result \t= $database->query($sql)) \n\t\t\t\t{\n\t\t\t\t\tif ($database->affected_rows > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->message = cnst12;\t// Data successfully removed!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tthrow new Exception(cnst13);\t// Selected record is not found!\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->message\t= \"Exception: \".$e->getMessage();\n\t\t\t\t$this->warning\t= true;\n\t\t\t}\n\t\t}\n\t}", "public function scopeRelatedPlannings($query, Planning $planning, Course $course)\n\t{\n\t\treturn $query->join('courses','courses.id','=','plannings.course_id')\n\t\t\t\t\t\t->select('plannings.*')\n\t\t\t\t\t\t->where('courses.module_id','=',$course->module->id)\n\t\t\t\t\t\t->where('plannings.turn_id','=',$planning->turn_id)\n\t\t\t\t\t\t->whereNotIn('plannings.id', [$planning->id])\n\t\t\t\t\t\t->orderBy('plannings.group_number', 'ASC');\n\t}", "function deleteFromFavorites() {\n if($this->getRequestMethod() != \"POST\") {\n $this->response('',406);\n }\n $userId = (int)$this->_request['user_id'];\n $videoId = (int)$this->_request['video_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($userId, $auth)) {\n $this->response('',204);\n }\n if($videoId > 0) { \n $query = \"delete from favorites where user_id=$userId and video_id=$videoId;\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Successfully deleted one record.\");\n $this->response(json_encode($success),200);\n } else {\n $this->response('',204);\n } \n }", "public function removeFkTcealPublicacaoRgfs(\\Urbem\\CoreBundle\\Entity\\Tceal\\PublicacaoRgf $fkTcealPublicacaoRgf)\n {\n $this->fkTcealPublicacaoRgfs->removeElement($fkTcealPublicacaoRgf);\n }", "private function deleteFavorite()\n {\n try\n {\n $request = $_REQUEST;\n\n //check if video id provided\n if( !isset($request['videoid']) || $request['videoid']==\"\" )\n throw_error_msg(\"Video Id not provided.\");\n\n if( !is_numeric($request['videoid']) )\n throw_error_msg(\"Video Id is not numeric.\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\"));\n\n $video_id = mysql_clean($request['videoid']);\n global $cbvid;\n $cbvid->action->remove_favorite($video_id);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'removed from favorites succesfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function actionEliminar($id, $id_devolucion) {\n $model = $this->findModel($id, $id_devolucion);\n $model->delete();\n $atributos_viejos = $model->attributes;\n StaticMembers::RegistrarTraza($model, $atributos_viejos, 'eliminar', $model->numero);\n \\Yii::$app->session->setFlash('success', 'Elemento eliminado correctamente', false);\n return $this->redirect(['inicio']);\n }", "public function eliminarReserva($id_reservacion) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"delete from reservacion where id_reservacion=?\";\n $consulta = $pdo->prepare($sql);\n //Ejecutamos la sentencia incluyendo a los parametros:\n\n try {\n $consulta->execute(array($id_reservacion));\n } catch (PDOException $e) {\n Database::disconnect();\n throw new Exception($e->getMessage());\n }\n Database::disconnect();\n }", "public static function eliminarDepartamento($idDepartamento) {\n $query = \"DELETE FROM Departamento WHERE idDepartamento = ('$idDepartamento')\";\n\n self::getConexion();\n\n $resultado = self::$conexion->prepare($query);\n $resultado->execute();\n\n if($resultado) {\n return $resultado;\n }\n// return false;\n }", "public function removeFkFiscalizacaoProcessoFiscalGrupos(\\Urbem\\CoreBundle\\Entity\\Fiscalizacao\\ProcessoFiscalGrupo $fkFiscalizacaoProcessoFiscalGrupo)\n {\n $this->fkFiscalizacaoProcessoFiscalGrupos->removeElement($fkFiscalizacaoProcessoFiscalGrupo);\n }", "public function delete($project, $firewall, $optParams = array()) {\n $params = array('project' => $project, 'firewall' => $firewall);\n $params = array_merge($params, $optParams);\n $data = $this->__call('delete', array($params));\n if ($this->useObjects()) {\n return new Google_Operation($data);\n } else {\n return $data;\n }\n }", "public function destroy($id_registro)\n {\n $plancuenta = Sfp_plancuenta::where('id_registro', $id_registro)->first();\n $plancuenta->delete();\n return redirect('/sfp-plancuentas')->with('status', 'La cuenta ha sido eliminada exitosamente');\n }" ]
[ "0.6191843", "0.59487015", "0.51261145", "0.5027939", "0.49844816", "0.4951533", "0.4898134", "0.47777814", "0.4668897", "0.4572022", "0.4528388", "0.44962564", "0.44941026", "0.44936752", "0.44781384", "0.4451104", "0.4367483", "0.4349413", "0.43368837", "0.4301875", "0.43008748", "0.4280027", "0.42736062", "0.42612416", "0.42420983", "0.423108", "0.42165914", "0.42144087", "0.4192024", "0.4182203" ]
0.8074552
0
/////////////////////// Illnesses // ///////////////////// Operation listsIllnessesGet Fetch list of Illnessess(for select options).
public function listsIllnessesGet() { $response = Illnesses::all(); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }", "public function getAllIllnesses() : IllnessCollection\n {\n if (NO_DATABASE) {\n $collection = new IllnessCollection();\n $collection->addRecord(new IllnessRecord(\n 1,\n 'Illness 1',\n 'Class 1',\n 'Illness 1 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 2,\n 'Illness 2',\n 'Class 1',\n 'Illness 2 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 3,\n 'Illness 3',\n 'Class 2',\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n ));\n\n return $collection;\n }\n\n $sql = \"SELECT * FROM illness \";\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n\n $collection = new IllnessCollection();\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $collection->addRecord(new IllnessRecord(\n $row['ill_id'],\n $row['ill_name'],\n $row['class_name'],\n $row['ill_describe']\n ));\n }\n\n return $collection;\n }", "public function listsIllnessesPut($illness_id)\r\n {\r\n $input = Request::all();\r\n $illness = Illnesses::findOrFail($illness_id);\r\n $illness->update(['name' => $input['name']]);\r\n if($illness->save()){\r\n return response()->json(['msg' => 'Updated Illness'], 200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to update the illness');\r\n }\r\n }", "public function listsIllnessesPost()\r\n {\r\n $input = Request::all();\r\n $new_illness = Illnesses::create($input);\r\n if($new_illness){\r\n return response()->json(['msg' => 'Created new illness'],200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to create a new illness');\r\n }\r\n }", "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'listicdcodes',\n 'lookfor' => get_data('term'),\n )));\n\n $listicdcodes = !empty($listicdcodes) ? json_decode($listicdcodes) : array();\n\n /*Converting to autocomplete understandable format*/\n if (!empty($listicdcodes))\n {\n foreach ($listicdcodes as $val)\n {\n $listicdcodes_arr[] = array('id' => current($val)->ICDCode, 'value' => current($val)->ICDTitle);\n }\n }\n exit(json_encode($listicdcodes_arr));\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function getArticulationListAttribute()\n {\n return $this->allarticulations->pluck('id')->all();\n }", "public function violation_listSec()\r\n\t{\r\n\t\t$status_id = 1;//1 means pending pa siya\r\n\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM tbl_item i\r\n\t\t\t\tINNER JOIN tbl_violations v \r\n\t\t\t\tON i.item_id = v.vehicle_id\r\n\t\t\t\tWHERE v.status = ?\r\n\t\t\";\r\n\t\t$result = $this->getRows($sql, [$status_id]);\r\n\r\n\t\treturn $result;\r\n\t}", "public function findIllnessesByDrugId(string $drugId) : array\n {\n if (NO_DATABASE) {\n return [\n new IllnessRecord(\n 1,\n 'Illness 1',\n 'Class 1',\n 'Illness 1 description.'\n ),\n new IllnessRecord(\n 2,\n 'Illness 2',\n 'Class 1',\n 'Illness 2 description.'\n ),\n new IllnessRecord(\n 3,\n 'Illness 3',\n 'Class 2',\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n )];\n }\n\n $sql = \"SELECT id.ill_id,i.ill_name,i.class_name,i.ill_describe\n \t\t FROM illness i INNER JOIN illdrug id\n ON id.drug_id=? AND i.ill_id=id.ill_id\n ORDER BY i.ill_name\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$drugId]);\n\n $illnesses = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $illnesses[] = new IllnessRecord(\n \t$row['ill_id'],\n $row['ill_name'],\n \t$row['class_name'],\n $row['ill_describe']\n );\n }\n\n return $illnesses;\n }", "public static function queryListInmuebles()\n {\n $connect = Connect::getINSTANCE();\n $query = \"SELECT * FROM `list_inmuebles`\";\n $resultado = $connect->getConnection()->query($query);\n $inmuebles = array();\n if ($resultado->num_rows > 0) {\n // output data of each row\n while ($row = $resultado->fetch_assoc()) {\n $inmuebles[] = $row;\n }\n return $inmuebles;\n }\n return [];\n }", "public function getIlinewhoList(){\n return $this->_get(1);\n }", "public function lists()\n {\n $industry = new Industry();\n\n $output = $industry->industryLists();\n\n return response()->json(['industries' => $output ]);\n }", "public function getInterventionList(Request $request)\r\n {\r\n $careplan_id = 0;\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n if($request->has('careplan_id')){\r\n $careplan_id = encrypt_decrypt('decrypt', $request->get('careplan_id'));\r\n }\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n\r\n $patient = $this->patient->patientDetail($request->get('patient_id'), false);\r\n $patient = $patient['patient_info'];\r\n $interventionList = $this->intervention->getLists($patient_id,$careplan_id);\r\n $html = view('patients.caseload.checkpoint.intervention.list',compact('interventionList', 'patient_id','patient','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function listsIndicationsget()\r\n {\r\n $response = Indication::all();\r\n return response()->json($response,200);\r\n }", "public function getList()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n $report_arr = $this->inspection->readAllReport();\n\n if (count($report_arr) > 0)\n {\n echo $this->encodeJson(\"Inspections found.\", 0x00, $report_arr);\n }\n else\n {\n echo $this->encodeJson(\"No inspections found.\", 0xD1ED, NULL);\n }\n }", "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function getIlcList(Request $request){\n\n $ilcList= \"<option>Select ILC</option>\";\n $ilcs= $this->ilcList($request->file_no, $request->supplier_no);\n foreach ($ilcs as $key => $value) {\n $ilcList.='<option value=\"'.$key.'\"> '. $value .' </option>';\n }\n return $ilcList;\n }", "public function getICID_soaps($icIDs,$dbhandle = false){\r\r\n\t\t\tif($dbhandle == false){\r\r\n\t\t\t\t$dbhandle = $this->dbhandleSQLI();\r\r\n\t\t\t}\r\r\n\t\t\t$icid = false;\r\r\n\t\t\tif ($this->dbfound()){\r\r\n\t\t\t\t$tablename = \"icsoap\";\r\r\n\t\t\t\tif ($this->tableExists($tablename)){\r\r\n\t\t\t\t\t// Get ID numbers for Consults\r\r\n\t\t\t\t\tif(is_array($icIDs)){\r\r\n\t\t\t\t\t\t$str = implode(',',$icIDs);\r\r\n\t\t\t\t\t} else{\r\r\n\t\t\t\t\t\t$str = $icIDs; \r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$sql = \"SELECT `$tablename`.* FROM `$this->db`.`$tablename` WHERE `$tablename`.`icid` IN (\".$str.\")\";\r\r\n\t\t\t\t\t$result = mysqli_query($dbhandle, $sql);\r\r\n\t\t\t\t\tif ($result){\r\r\n\t\t\t\t\t\tif (mysqli_num_rows($result) > 0){\r\r\n\t\t\t\t\t\t\tfor ( $i = 0; $i < mysqli_num_rows($result); $i++ ){ \r\r\n\t\t\t\t\t\t\t\t$row = mysqli_fetch_assoc($result);\r\r\n\t\t\t\t\t\t\t\t$metrics[$i]=$row;\r\r\n\t\t\t\t\t\t\t\t//$id = $healthConsult[$i]['id'];\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\treturn $metrics;\r\r\n\t\t}", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function getAllByRequestIdLovWftyAndDesc(Request $request)\n {\n $this->validate($request, [\n \"companyId\" => \"required|integer\",\n \"requestId\" => \"required|integer\"\n ]);\n\n\n $worklist = $this->worklistDao->getAllByRequestIdLovWftyAndDesc($request->requestId, $request->lovWft, $request->description);\n\n $count = count($worklist);\n if ($count > 0) {\n for ($i = 0; $i < $count; $i++) {\n $worklist[$i]->person = $this->assignmentDao->getOneByEmployeeId($worklist[$i]->approverId);\n }\n }\n\n\n $resp = new AppResponse($worklist, trans('messages.allDataRetrieved'));\n return $this->renderResponse($resp);\n }", "public function get_witnesses()\n {\n return json_decode($this->witnesses ? $this->witnesses : '[]');\n }", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "public function getMyInclusions($id) {\n\t\t\t$this->query(\"SELECT * FROM usecaseinclusions WHERE usecaseid={$id};\");\n\t\t\treturn $this->resultSet();\n\t\t}", "public function HCInstituteListData()\n {\n\t\t$sql=\"SELECT \n\t\t\t\tHID.INSTITUTE_NAME INSTITUTE_NAME,\n\t\t\t\tHID.RANKING RANKING,\n\t\t\t\tHIAD.ADDRESS_LINE1 ADDRESS_LINE1,\n\t\t\t\tHIAD.ADDRESS_LINE2 ADDRESS_LINE2,\n\t\t\t\tHIAD.PIN_CODE PIN_CODE,\n\t\t\t\tHCM.CITY_NAME CITY_NAME\n\t\t\t\tFROM \n\t\t\t\tTEST.INSTITUTE_DTL HID\n\t\t\t\tLEFT JOIN TEST.INSTITUTE_ADDRESS_DTL HIAD\n\t\t\t\tON HIAD.INSTITUTE_DTL__ID = HID.ID\n\t\t\t\tLEFT JOIN TEST.CITY_MST HCM\n\t\t\t\tON HCM.ID=HIAD.CITY_MST__ID\n\t\t\t\";\n\t\t$this->vResult = mysqli_query($this->vDbConn,$sql);\n\n\t\twhile($this->vRow = mysqli_fetch_assoc($this->vResult)){\n\t\t\t$this->vCHCInstituteListStructObj->vInstituteList[]\t=\t$this->vRow;\t\t\n\t\t}\n\t\t\n\t\t\n\n return ;\n }", "public function getList() {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "public function get_assessment_list() {\n\t\ttry {\n\t\t\t$list = $this->soap->getAssessmentList();\n\t\t} catch(SoapFault $e) {\n\t\t\tthrow new QMWiseException($e);\n\t\t}\n\t\tif(!is_array($list->AssessmentList->Assessment)) return array($list->AssessmentList->Assessment);\n\t\treturn $list->AssessmentList->Assessment;\n\t}", "public function getMyInclusionsInfo($id) {\n\t\t\t$this->query(\"SELECT id, usecase.usecaseid as usecaseid, name FROM usecaseinclusions, usecase WHERE usecaseinclusions.usecaseid={$id} AND usecase.id = usecaseinclusions.includedusecaseid;\");\n\t\t\treturn $this->resultSet();\n\t\t}", "public function listsInstructionget()\r\n {\r\n $response = Instruction::all();\r\n return response()->json($response,200);\r\n }", "public function findIllnessesByPaymentId(string $paymentId) : array\n {\n if (NO_DATABASE) {\n return [];\n }\n\n $sql = \"SELECT i.ill_id,i.ill_name,i.class_name,i.ill_describe\n \t\t FROM illness i INNER JOIN payments p\n ON p.pay_id=? AND i.ill_id=p.ill_id\n ORDER BY i.ill_name\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$paymentId]);\n\n $illnesses = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n \t$illnesses[] = new IllnessRecord(\n $row['ill_id'],\n \t\t\t$row['ill_name'],\n \t\t\t$row['class_name'],\n $row['ill_describe']\n \t);\n }\n\n return $illnesses;\n }", "public function listNotificationInterests( );" ]
[ "0.67824316", "0.6399592", "0.598086", "0.59483105", "0.5627163", "0.5490051", "0.53138566", "0.5274395", "0.5253797", "0.52518713", "0.5214885", "0.50874525", "0.50854594", "0.5079672", "0.5052269", "0.5041156", "0.5030213", "0.4954483", "0.49201334", "0.48974612", "0.48881742", "0.48474815", "0.48398155", "0.4835063", "0.48203683", "0.4794698", "0.47932652", "0.47874922", "0.4776773", "0.47700408" ]
0.7882593
0
Operation listsIllnessesIllnessIdGet Fetch a Illness specified by illnessId.
public function listsIllnessesByIdGet($illness_id) { $response = Illnesses::findOrFail($illness_id); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIllnessesPut($illness_id)\r\n {\r\n $input = Request::all();\r\n $illness = Illnesses::findOrFail($illness_id);\r\n $illness->update(['name' => $input['name']]);\r\n if($illness->save()){\r\n return response()->json(['msg' => 'Updated Illness'], 200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to update the illness');\r\n }\r\n }", "public function findIllnessById(int $illnessId)\n {\n $sql = \"SELECT * FROM illness WHERE ill_id = ?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if (!$result) {\n return false;\n }\n\n return new IllnessRecord(\n $result['ill_id'],\n $result['ill_name'],\n $result['class_name'],\n $result['ill_describe']\n );\n }", "public function getFullIllnessById(int $illnessId)\n {\n if (NO_DATABASE) {\n if ($illnessId <= 3) { // just for tests\n $illness = new IllnessRecord(\n $illnessId,\n \"Illness $illnessId\",\n 'Class ' . ($illnessId < 3) ? 1 : 2,\n \"Illness $illnessId description.\"\n );\n\n if ($illnessId == 3) {\n $illness->setDescription(\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n );\n }\n\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n } else {\n return false;\n }\n }\n\n $sql = \"SELECT * FROM illness WHERE ill_id=?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n if (!$result) {\n return false;\n }\n\n $illness = new IllnessRecord(\n $result['ill_id'],\n $result['ill_name'],\n \t $result['class_name'],\n \t\t$result['ill_describe']\n );\n\n // Find and add all steps\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n // Add everything else\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function listsIllnessesGet()\r\n {\r\n $response = Illnesses::all();\r\n return response()->json($response, 200);\r\n }", "public function getStayByIllnessId(int $illnessId)\n {\n if (NO_DATABASE) {\n return rand(1, 5);\n }\n\n $sql = \"SELECT number FROM payments\n WHERE ill_id=? AND pay_name='stay' \";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n\n return $stmt->fetchColumn(0); // returns false if no columns\n }", "public function findIllnessesByDrugId(string $drugId) : array\n {\n if (NO_DATABASE) {\n return [\n new IllnessRecord(\n 1,\n 'Illness 1',\n 'Class 1',\n 'Illness 1 description.'\n ),\n new IllnessRecord(\n 2,\n 'Illness 2',\n 'Class 1',\n 'Illness 2 description.'\n ),\n new IllnessRecord(\n 3,\n 'Illness 3',\n 'Class 2',\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n )];\n }\n\n $sql = \"SELECT id.ill_id,i.ill_name,i.class_name,i.ill_describe\n \t\t FROM illness i INNER JOIN illdrug id\n ON id.drug_id=? AND i.ill_id=id.ill_id\n ORDER BY i.ill_name\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$drugId]);\n\n $illnesses = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $illnesses[] = new IllnessRecord(\n \t$row['ill_id'],\n $row['ill_name'],\n \t$row['class_name'],\n $row['ill_describe']\n );\n }\n\n return $illnesses;\n }", "public function findIllnessSteps(int $illnessId) : array\n {\n $sql = \"SELECT s.step_num,n.step_name,s.step_text\n FROM steps s INNER JOIN stepname n\n ON s.step_num=n.step_num\n WHERE s.ill_id=?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n\n $steps = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $steps[] = new Step(\n $row['step_num'],\n \t$row['step_name']\n );\n }\n\n return $steps;\n }", "public function findIllnessesByPaymentId(string $paymentId) : array\n {\n if (NO_DATABASE) {\n return [];\n }\n\n $sql = \"SELECT i.ill_id,i.ill_name,i.class_name,i.ill_describe\n \t\t FROM illness i INNER JOIN payments p\n ON p.pay_id=? AND i.ill_id=p.ill_id\n ORDER BY i.ill_name\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$paymentId]);\n\n $illnesses = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n \t$illnesses[] = new IllnessRecord(\n $row['ill_id'],\n \t\t\t$row['ill_name'],\n \t\t\t$row['class_name'],\n $row['ill_describe']\n \t);\n }\n\n return $illnesses;\n }", "public function getDrugsByIllnessId(int $illnessId) : array\n {\n if (NO_DATABASE) {\n return [new Drug(\n rand(1,3),\n 'Drug',\n 'Drug description',\n '/img/drug.jpg',\n rand(30, 100)\n )];\n }\n\n $sql = \"SELECT\n drug.drug_id,\n drug.drug_name,\n drug.drug_text,\n drug.drug_picture,\n drug.drug_cost\n\t\t FROM drug INNER JOIN illdrug\n ON illdrug.ill_id=? AND drug.drug_id=illdrug.drug_id\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n\n $drugs = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n \t$drugs[] = new Drug(\n $row['drug_id'],\n \t\t\t$row['drug_name'],\n \t\t\t$row['drug_text'],\n \t\t\t$row['drug_picture'],\n \t\t\t$row['drug_cost']\n \t\t\t);\n }\n\n return $drugs;\n }", "public function getAllIllnesses() : IllnessCollection\n {\n if (NO_DATABASE) {\n $collection = new IllnessCollection();\n $collection->addRecord(new IllnessRecord(\n 1,\n 'Illness 1',\n 'Class 1',\n 'Illness 1 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 2,\n 'Illness 2',\n 'Class 1',\n 'Illness 2 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 3,\n 'Illness 3',\n 'Class 2',\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n ));\n\n return $collection;\n }\n\n $sql = \"SELECT * FROM illness \";\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n\n $collection = new IllnessCollection();\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $collection->addRecord(new IllnessRecord(\n $row['ill_id'],\n $row['ill_name'],\n $row['class_name'],\n $row['ill_describe']\n ));\n }\n\n return $collection;\n }", "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function getStepsByIllnessId(int $illnessId) : array\n {\n if (NO_DATABASE) {\n $steps = [];\n $steps[] = new Step(1, '接诊');\n $steps[] = new Step(2, '检查');\n $steps[] = new Step(3, '诊断');\n $steps[] = new Step(4, '治疗方案');\n } else {\n $steps = $this->findIllnessSteps($illnessId);\n }\n\n foreach ($steps as $step) {\n $stepNum = $step->getNum();\n\n $text = $this->getStepText($illnessId, $stepNum);\n $step->setText($text);\n\n $pictures = $this->getStepPictures($illnessId, $stepNum);\n $step->addPictures($pictures);\n\n $videos = $this->getStepVideos($illnessId, $stepNum);\n $step->addVideos($videos);\n }\n\n return $steps;\n }", "public function listsNonadherencebyIdget($nonadherence_id)\r\n {\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n return response()->json($reason,200);\r\n }", "public function getMyInclusionsInfo($id) {\n\t\t\t$this->query(\"SELECT id, usecase.usecaseid as usecaseid, name FROM usecaseinclusions, usecase WHERE usecaseinclusions.usecaseid={$id} AND usecase.id = usecaseinclusions.includedusecaseid;\");\n\t\t\treturn $this->resultSet();\n\t\t}", "public function getLoansByLoanId($id){\r\n $id = $this->db->escape($id);\r\n $sql = \"SELECT *,\r\n (SELECT x.description FROM l_funds x WHERE x.lid = a.fund_id) as loan_type,\r\n (SELECT x.description FROM l_interest_type x WHERE x.lid = a.interest_type) as interest_type,\r\n (SELECT x.description FROM l_interest_term x WHERE x.lid = a.interest_term) as interest_term,\r\n (0) as running_total, \r\n (0) as amount,\r\n (a.amount_payable / a.terms) as monthly,\r\n DATE_ADD(DATE(a.date_approved), INTERVAL a.terms MONTH) as maturity_date, \r\n (a.amount_payable) as balance \r\n FROM t_loans a \r\n INNER JOIN t_members b ON b.member_id = a.member_id \r\n WHERE a.loan_id = '{$id}'\";\r\n\r\n $result = $this->db->query($sql);\r\n if (isset($result[0])){\r\n return $result[0];\r\n }\r\n return false;\r\n }", "public function getMyInclusions($id) {\n\t\t\t$this->query(\"SELECT * FROM usecaseinclusions WHERE usecaseid={$id};\");\n\t\t\treturn $this->resultSet();\n\t\t}", "private function getLenders($loan_id) {\n\t\t// Retrieve from DB details about bids, join with profile and return info about each lender.\n\t\treturn DB::table('bids')\n\t\t\t\t\t -> join ('profile', 'bids.user_id', '=', 'profile.id')\n\t\t\t\t\t -> select ('bids.bid_id', 'profile.fname', 'profile.lname', 'profile.streetno', 'profile.street', 'profile.suburb', 'profile.state', 'profile.postcode', 'bids.bid_amount')\n\t\t\t\t\t -> where ('bids.loan_id', '=', $loan_id)\n\t\t\t\t\t -> orderBy ('profile.lname', 'ASC')\n\t\t\t\t\t -> get(); // Returns array.\n\t}", "public function listsIllnessesPost()\r\n {\r\n $input = Request::all();\r\n $new_illness = Illnesses::create($input);\r\n if($new_illness){\r\n return response()->json(['msg' => 'Created new illness'],200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to create a new illness');\r\n }\r\n }", "public function show($id)\n\t{\n\t\treturn Lense::find($id);\n\t}", "public function get_holidays($id = '*') {\n $loc_holdidays = Yii::app()->db->createCommand()\n ->select('l.loc_name, h.hol_name, h.hol_description, h.hol_date')\n ->from('shop_control.shop_holidays sh, locations l, holidays h')\n ->where('l.loc_id = sh.loc_id and sh.hol_id = h.hol_id')\n ->queryAll();\n\n return $loc_holdidays;\n }", "private function getLifestyle($id)\n {\n $this->db->select('exercise, exercise_minutes, exercise_days, diet');\n $this->db->where('userid', $id);\n $query = $this->db->get('lifestyle');\n\n return $query;\n }", "public function show($id)\n {\n $PresentingIllness = PresentingIllness::findOrFail($id);\n return response()->json($PresentingIllness);\n }", "public function getLemburData($id = null) {\n if ($id) {\n $sql = \"SELECT * FROM lembur where id = ?\";\n $query = $this->db->query($sql, array($id));\n return $query->row_array();\n }\n\n $sql = \"SELECT a.*,status_desc FROM lembur a INNER JOIN status_approval b on a.status = b.id ORDER BY a.id DESC\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function get_by_id($id) {\n $this->db->select('*');\n $this->db->from(\"violations\");\n $this->db->where('id', $id);\n\n $query = $this->db->get();\n\n return $query->row();\n }", "public function getPaymentsByIllnessId(int $illnessId) : array\n {\n if (NO_DATABASE) {\n return [new Payment(\n 1, $illnessId, 'Payment for drugs', rand(25, 50), rand(1,3)\n )];\n }\n\n $sql = \"SELECT p.pay_id,p.pay_name,p.pay_cost,p.number\n FROM payments p\n WHERE ill_id=? \";\n //$sql=\"SELECT SUM(pay_cost) FROM payments WHERE ill_id='$illnessId'\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n\n $payments = [];\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $payments[] = new Payment(\n $row['pay_id'],\n \t $illnessId,\n \t $row['pay_name'],\n \t $row['pay_cost'],\n \t $row['number']\n );\n }\n\n return $payments;\n }", "public static function getList($id) {\n $list = R::load('list', $id);\n return $list->id ? $list : null;\n }", "public function listDisputeEvidence(string $disputeId): ApiResponse\n {\n //prepare query string for API call\n $_queryBuilder = '/v2/disputes/{dispute_id}/evidence';\n\n //process optional query parameters\n $_queryBuilder = ApiHelper::appendUrlWithTemplateParameters($_queryBuilder, [\n 'dispute_id' => $disputeId,\n ]);\n\n //validate and preprocess url\n $_queryUrl = ApiHelper::cleanUrl($this->config->getBaseUri() . $_queryBuilder);\n\n //prepare headers\n $_headers = [\n 'user-agent' => BaseApi::USER_AGENT,\n 'Square-Version' => $this->config->getSquareVersion(),\n 'Accept' => 'application/json',\n 'Authorization' => sprintf('Bearer %1$s', $this->config->getAccessToken())\n ];\n $_headers = ApiHelper::mergeHeaders($_headers, $this->config->getAdditionalHeaders());\n\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n\n //call on-before Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n // Set request timeout\n Request::timeout($this->config->getTimeout());\n\n // and invoke the API call request to fetch the response\n try {\n $response = Request::get($_queryUrl, $_headers);\n } catch (\\Unirest\\Exception $ex) {\n throw new ApiException($ex->getMessage(), $_httpRequest);\n }\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n if (!$this->isValidResponse($_httpResponse)) {\n return ApiResponse::createFromContext($response->body, null, $_httpContext);\n }\n\n $mapper = $this->getJsonMapper();\n $deserializedResponse = $mapper->mapClass($response->body, 'Square\\\\Models\\\\ListDisputeEvidenceResponse');\n return ApiResponse::createFromContext($response->body, $deserializedResponse, $_httpContext);\n }", "public function listsInstructionByIdget($instruction_id)\r\n {\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n return response()->json($instruction,200);\r\n }", "public static function allLCL($id)\n {\n $collection = self::where([\n 'game_id' => $id\n ])->get(['role_id', 'inventory']);\n\n // O allLCL é um array de todas os clientes perdidos\n $LCLArray = [];\n foreach ($collection as $value) {\n $LCLArray[$value->role_id] = $value->inventory->lostClientList;\n }\n\n return $LCLArray;\n }" ]
[ "0.64889413", "0.64687264", "0.614035", "0.6120308", "0.6086514", "0.5572877", "0.55621356", "0.54423285", "0.5419682", "0.5403741", "0.5334413", "0.52156246", "0.5145646", "0.49907824", "0.4974129", "0.49635598", "0.49515763", "0.49488708", "0.49487263", "0.49419996", "0.48403752", "0.4757272", "0.47394893", "0.4736029", "0.4689356", "0.4683716", "0.467318", "0.46660164", "0.46461457", "0.46451083" ]
0.79928726
0
Operation listsIllnessesPost Add an illness.
public function listsIllnessesPost() { $input = Request::all(); $new_illness = Illnesses::create($input); if($new_illness){ return response()->json(['msg' => 'Created new illness'],200); }else{ return response('Oops, it seems like something went wrong while trying to create a new illness'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIllnessesPut($illness_id)\r\n {\r\n $input = Request::all();\r\n $illness = Illnesses::findOrFail($illness_id);\r\n $illness->update(['name' => $input['name']]);\r\n if($illness->save()){\r\n return response()->json(['msg' => 'Updated Illness'], 200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to update the illness');\r\n }\r\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }", "public function AddArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(!isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::values([\n 'user_id' => Session::getUser()['id'],\n 'artwork_id' => $_POST['artwork_id']\n ])->insert();\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function listsIllnessesGet()\r\n {\r\n $response = Illnesses::all();\r\n return response()->json($response, 200);\r\n }", "public function listsIndicationspost()\r\n {\r\n $input = Request::all();\r\n $new_indication = Indication::create($input);\r\n if($new_indication){\r\n return response()->json(['msg' => 'Added a new indication', 'data' => $new_indication]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the indication');\r\n }\r\n }", "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','ishot', 'title', 'img', 'price', 'hk_price', 'start_time', 'end_time', \n\t\t\t\t'stock_num', 'limit_num', 'sale_num', 'comment_num', 'status','descrip'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fj_Service_Goods::addGoods($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function addPostAction() {\n $inputVars = $this->getInput(array(\n \t\t'id', 'dataType', //主表字段:id,type\n \t\t \t'data'//子表字段\n ));\n \tlist($news, $itemsList) = $this->checkInput($inputVars);\n \t$news['create_time'] = time();\n \t$result = Admin_Service_Material::add($news, $itemsList);\n \tif (!$result) $this->failPostOutput('操作失败');\n \t$this->successPostOutput($this->actions['listUrl']);\n }", "public function add_die(BMDie $die) {\n // need to search with strict on to avoid identical-valued\n // objects matching\n if (!in_array($die, $this->validDice, TRUE)) {\n if (is_array($die->skillList)) {\n foreach ($die->skillList as $skill) {\n if (FALSE !== array_search($this->type, $skill::incompatible_attack_types())) {\n return;\n }\n }\n }\n $this->validDice[] = $die;\n }\n }", "public function addToList(ListRequest $request)\n {\n\n // try {\n // $token = Auth::guard()->attempt($credentials);\n\n // if(!$token) {\n // throw new AccessDeniedHttpException();\n // }\n\n // } catch (JWTException $e) {\n // throw new HttpException(500);\n // }\n \n \n //$drink = new Drink($request->all());\n $drink = new Drink($request->only(['drink', 'description']));\n if(!$drink->save()) {\n throw new HttpException(500);\n }\n\n return response()\n ->json([\n 'status' => 'ok'\n ]);\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Notice::addNotice($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function add() {\n\n $data = array(\n 'defect' => $this->input->post('defect', true),\n 'code' => $this->input->post('code', true),\n 'description' => $this->input->post('description', true),\n 'reason' => $this->input->post('reason', true),\n );\n\n $error = null;\n $id = $this->errors_model->add($data);\n echo $this->repairer->send_json(array('id'=>$id, 'error'=>$error));\n }", "public function getAllIllnesses() : IllnessCollection\n {\n if (NO_DATABASE) {\n $collection = new IllnessCollection();\n $collection->addRecord(new IllnessRecord(\n 1,\n 'Illness 1',\n 'Class 1',\n 'Illness 1 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 2,\n 'Illness 2',\n 'Class 1',\n 'Illness 2 description.'\n ));\n $collection->addRecord(new IllnessRecord(\n 3,\n 'Illness 3',\n 'Class 2',\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n ));\n\n return $collection;\n }\n\n $sql = \"SELECT * FROM illness \";\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n\n $collection = new IllnessCollection();\n\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)){\n $collection->addRecord(new IllnessRecord(\n $row['ill_id'],\n $row['ill_name'],\n $row['class_name'],\n $row['ill_describe']\n ));\n }\n\n return $collection;\n }", "public function addInappropriate(Inappropriate $l)\n\t{\n\t\tif ($this->collInappropriates === null) {\n\t\t\t$this->initInappropriates();\n\t\t}\n\t\tif (!in_array($l, $this->collInappropriates, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collInappropriates, $l);\n\t\t\t$l->setPost($this);\n\t\t}\n\t}", "public function addBudgetHeads() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('budget_heads', \n array('headName','headAmount','headTypeId'), \n array(trim($REQUEST_DATA['headName']),trim($REQUEST_DATA['headAmount']),trim($REQUEST_DATA['headTypeId'])) \n );\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('title', 'guide', 'gtype','ntype','btype','img', 'status', 'start_time', 'update_time'));\n\t\t$info = $this->_cookData($info);\n\t\t$info['start_time'] = strtotime($info['start_time']);\n\t\t$info['update_time'] = Common::getTime();\n\t\t$result = Client_Service_Besttj::addBesttj($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$webroot = Common::getWebRoot();\n\t\t$this->output(0,'操作成功,请添加游戏',$result);\n\t\texit;\n\t}", "public function getFullIllnessById(int $illnessId)\n {\n if (NO_DATABASE) {\n if ($illnessId <= 3) { // just for tests\n $illness = new IllnessRecord(\n $illnessId,\n \"Illness $illnessId\",\n 'Class ' . ($illnessId < 3) ? 1 : 2,\n \"Illness $illnessId description.\"\n );\n\n if ($illnessId == 3) {\n $illness->setDescription(\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n );\n }\n\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n } else {\n return false;\n }\n }\n\n $sql = \"SELECT * FROM illness WHERE ill_id=?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n if (!$result) {\n return false;\n }\n\n $illness = new IllnessRecord(\n $result['ill_id'],\n $result['ill_name'],\n \t $result['class_name'],\n \t\t$result['ill_describe']\n );\n\n // Find and add all steps\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n // Add everything else\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_post() {\n \n\n /* Validation section */\n $this->form_validation->set_rules('DraftFormat', 'Draft Format', 'trim|required|in_list[Head to Head,League]');\n\t\t$this->form_validation->set_rules('DraftType', 'Draft Type', 'trim' . (!empty($this->Post['DraftFormat']) && $this->Post['DraftFormat'] == 'League' ? '|required|in_list[Normal,Hot,Champion,Practice,More,Mega,Winner Takes All,Only For Beginners]' : ''));\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsPaid', 'IsPaid', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsConfirm', 'IsConfirm', 'trim|required|in_list[Yes,No]');\n\t\t$this->form_validation->set_rules('IsAutoCreate', 'Is Auto Create', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('ShowJoinedDraft', 'ShowJoinedDraft', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('WinningAmount', 'WinningAmount', 'trim|required|integer');\n $this->form_validation->set_rules('DraftSize', 'DraftSize', 'trim' . (!empty($this->Post['DraftFormat']) && $this->Post['DraftFormat'] == 'League' ? '|required|integer' : ''));\n $this->form_validation->set_rules('EntryFee', 'EntryFee', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric' : ''));\n $this->form_validation->set_rules('NoOfWinners', 'NoOfWinners', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|integer' : ''));\n $this->form_validation->set_rules('EntryType', 'EntryType', 'trim' . (!empty($this->Post['ContestFormat']) && $this->Post['ContestFormat'] == 'League' ? '|required|in_list[Single,Multiple]' : ''));\n\t\t$this->form_validation->set_rules('UserJoinLimit', 'UserJoinLimit', 'trim' . (!empty($this->Post['EntryType']) && $this->Post['EntryType'] == 'Multiple' ? '|required|integer' : ''));\n\t\t$this->form_validation->set_rules('AdminPercent', 'AdminPercent', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric|regex_match[/^[0-9][0-9]?$|^100$/]' : ''));\n $this->form_validation->set_rules('CashBonusContribution', 'CashBonusContribution', 'trim' . (!empty($this->Post['IsPaid']) && $this->Post['IsPaid'] == 'Yes' ? '|required|numeric|regex_match[/^[0-9][0-9]?$|^100$/]' : ''));\n \n\t\tif ($this->Post['IsPaid'] == 'Yes' && !empty($this->Post['CustomizeWinning']) && is_array($this->Post['CustomizeWinning'])) {\n $TotalWinners = $TotalPercent = $TotalWinningAmount = 0;\n foreach ($this->Post['CustomizeWinning'] as $Key => $Value) {\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][From]', 'From', 'trim|required|integer');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][To]', 'To', 'trim|required|integer');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][Percent]', 'Percent', 'trim|required|numeric');\n $this->form_validation->set_rules('CustomizeWinning[' . $Key . '][WinningAmount]', 'WinningAmount', 'trim|required|numeric');\n $TotalWinners += ($Value['To'] - $Value['From']) + 1;\n $TotalPercent += $Value['Percent'];\n $TotalWinningAmount += (($Value['To'] - $Value['From']) + 1) * $Value['WinningAmount'];\n if($Key > 0){\n\t\t\t\t\tif($this->Post['CustomizeWinning'][$Key]['WinningAmount'] >= $this->Post['CustomizeWinning'][$Key-1]['WinningAmount']){\n\t\t\t\t\t\t$this->Return['ResponseCode'] = 500;\n\t\t\t\t\t\t$this->Return['Message'] = \"Winning amount \".($Key+1).\",can not greater than or equals to Winning amount \".$Key;\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\n /* Check Total No Of Winners */\n if ($TotalWinners != $this->Post['NoOfWinners']) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winners should be equals to No Of Winners.\";\n exit;\n }\n\n /* Check Total Percent */\n if ($TotalPercent < 90 || $TotalPercent > 100) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winners Percent should be 90% to 100%.\";\n exit;\n }\n\n /* Check Total Winning Amount */\n if ($TotalWinningAmount > $this->Post['WinningAmount']) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"Customize Winning Amount should be less than or equals to Winning Amount\";\n exit;\n }\n }\n if ($this->Post['IsPaid'] == 'Yes' && (empty($this->Post['CustomizeWinning']) || !is_array($this->Post['CustomizeWinning']))) {\n $this->Return['ResponseCode'] = 500;\n\t\t\t$this->Return['Message'] = \"Customize winning data is required.\";\n\t\t\texit;\n }\n $this->form_validation->set_message('regex_match', '{field} value should be between 0 to 100.');\n $this->form_validation->validation($this); /* Run validation */\n /* Validation - ends */\n\t\t\n\t\t/* Add Pre Draft */\n \t$PreDraft = $this->PredraftContest_model->addDraft($this->Post, $this->SessionUserID);\n if (!$PreDraft) {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"An error occurred, please try again later.\";\n } else {\n \t$this->PredraftContest_model->createPreDraftContest($PreDraft);\n $this->Return['Message'] = \"Pre Draft created successfully.\";\n }\n }", "private function getBadWordViolations( AddDonationRequest $request ): void {\n\t\tif ( $request->donorIsAnonymous() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->getPolicyViolationsForField( $request->getDonorFirstName(), Result::SOURCE_DONOR_FIRST_NAME );\n\t\t$this->getPolicyViolationsForField( $request->getDonorLastName(), Result::SOURCE_DONOR_LAST_NAME );\n\t\t$this->getPolicyViolationsForField( $request->getDonorCompany(), Result::SOURCE_DONOR_COMPANY );\n\t\t$this->getPolicyViolationsForField(\n\t\t\t$request->getDonorStreetAddress(),\n\t\t\tResult::SOURCE_DONOR_STREET_ADDRESS\n\t\t);\n\t\t$this->getPolicyViolationsForField( $request->getDonorCity(), Result::SOURCE_DONOR_CITY );\n\t}", "public function listsInstructionpost()\r\n {\r\n $input = Request::all();\r\n $new_instruction = Instruction::create($input);\r\n if($new_instruction){\r\n return response()->json(['msg' => 'Wrote new instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new instruction');\r\n }\r\n }", "public function addToNotificationList($postID) {\n $sqlQuery = \"insert into laf873.notifications (ntf_postID) values(?)\";\n\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute([$postID]);\n }", "public function add() {\t\n CheckAdminLoginSession();\t\t\n\t\t$post_data = $this->input->post();\n\t\t\n\t\tif(!empty($post_data)) { \n\t\t\t$this->form_validation->set_error_delimiters('<span class=\"text-danger\">', '</span>');\n\t\t\t$this->form_validation->set_rules('name', ' Name', 'required|trim');\t\t\t\t\n\t\t\tif($this->form_validation->run() == FALSE) { } else {\n\t\tforeach ($this->input->post('company_id') as $key => $company_id) {\n\t\t\tforeach ($company_id as $insurance_type_id) {\n\t\t\t\t$data = array(\t\t\t\t\t\t\t\n\t\t\t\t'name' => $this->input->post('name'),\t\t\t\t\n\t\t\t\t'company_id' => $key,\t\t\t\t\n\t\t\t\t'insurance_type_id' => $insurance_type_id,\t\t\t\t\n\t\t\t\t'created_date' => date('Y-m-d H:i:s'),\n\t\t\t\t'modified_date' => date('Y-m-d H:i:s'),\n\t\t\t\t'status' => $this->input->post('status')\t \n\t\t\t\t); \n\t\t\t\t$id = $this->admin_model->setInsertData($this->optional_warranty,$data);\n\t\t\t}\n\t\t}\n\t\t\t\t$this->session->set_flashdata('message','Your Optional Warranty has been added successfully');\n\t\t redirect('admin/optional-warranty/lists','refresh');\n\t\t }\n }\n $data='';\n $data['companyProvidingInsurance'] = $this->admin_model->getCompanyProvidingInsurance($this->company_insurance);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/optional_warranty/add',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "public function actionAdd_interest() {\n\n if (Yii::app()->request->isAjaxRequest) {\n $model = new ResumeInterest;\n\n $data = implode(',', $_POST['data']);\n //\n $model->user_id = Yii::app()->user->id;\n $model->resume_id = $_POST['reid'];\n $model->description = $data;\n //\n if ($model->save()) {\n echo $model->id;\n } else {\n echo 0;\n }\n } else {\n echo 0;\n }\n }", "public function testAddPostValidateFail() {\n\t\t$this->blogEntriesEditMock->NetCommonsWorkflow->expects($this->once())\n\t\t\t->method('parseStatus')\n\t\t\t->will($this->returnValue(1));\n\n\t\tRolesControllerTest::login($this);\n\n\t\t// validate error発生でhandleValidationError()が呼ばれる。\n\t\t$this->blogEntriesEditMock->expects($this->once())\n\t\t\t->method('handleValidationError')\n\t\t\t->with($this->isType('array'));\n\t\t$this->testAction(\n\t\t\t'/blogs/blog_entries_edit/add/1',\n\t\t\tarray(\n\t\t\t\t'method' => 'post',\n\t\t\t)\n\t\t);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}", "public function run()\n {\n /* DB::table('illnesses')->delete();\n DB::table('seeds_illnesses')->delete();\n\n Illness::create([\n 'name' => 'mildiou',\n 'description' => 'Le mildiou est un champignon qui se propage très facilement dans des conditions humides.',\n 'cause' => 'Cette maladie est due à un champignon pathogène, le Phytophtora infestans, se développant principalement par temps humide lorsque la température oscille entre 17 et 20°C. Les alternances d\\'épisodes pluvieux et d\\'épisodes de chaleur orageuse correspondent aux conditions idéales pour que le mildiou se développe. Par contre, la canicule le stoppe.',\n 'consequence' => 'C\\'est en atteignant la plante de l’intérieur que le mildiou s’en prend aux végétaux, les faisant alors dépérir. Le mildiou se reconnaît aux petites taches noirâtres et au feutrage blanchâtre qu’il provoque respectivement sur le dessus et le dessous des feuilles. Très vite, les taches vont commencer à brunir, s’étendre aux fruits et à les faire pourrir.',\n 'prevention' => 'Sur la vigne, retirer les gourmands pour aérer le feuillage. Dès l\\'apparition des premières tâches sur les feuilles de tomates, couper les feuilles atteintes et retirer celles qui traînent au sol. Faites en sorte que vos pieds de tomates soient bien aérés. Les feuilles doivent pouvoir sécher facilement. Dès les premiers signes il est possible de pulvériser de la bouillie bordelaise afin de limiter la dissémination du champignon aux plantes voisines. Poser une toiture au dessus de vos pieds de tomates pour éviter qu\\'un excès d\\'humidité ne se dépose sur le feuillage.',\n 'treatment' => 'Dès l’apparition des premiers symptômes, coupez les parties infectées qui peuvent aller sur le tas de compost, Au tout début de l\\'apparition du mildiou, vous pouvez pulvériser une infusion de tanaisie (Tanacetum vulgare) à raison de 100g de fleurs pour 1 litre d\\'eau que vous aurez laissé infuser jusqu\\'à ce quelle soit froide avant de l\\'utiliser pure. Si ce n\\'est pas assez puissant, pulvérisez un purin de bardane (feuilles et racines) à raison d\\'1kg de plante pour 10 litres d\\'eau que vous aurez laissé fermenter 5 à 6 jours avant de le filtrer et de l\\'utiliser dilué à 5%. Si la saison est particulièrement pluvieuse, vous pouvez couvrir vos tomates en installant une sorte d\\'abri en film plastique.'\n ]);*/\n }", "public function listsWhostagepost()\r\n {\r\n $input = Request::all();\r\n $new_who = whostage::create($input);\r\n if($new_who){\r\n return response()->json(['msg' => 'Added a new who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the whostage');\r\n }\r\n }" ]
[ "0.5818865", "0.50912327", "0.50277597", "0.49744076", "0.49021968", "0.48348233", "0.48321322", "0.48191258", "0.47498712", "0.46592984", "0.4537693", "0.4522398", "0.45160106", "0.45091212", "0.4497904", "0.44814932", "0.44601893", "0.44296697", "0.4428493", "0.43950805", "0.4392665", "0.43869653", "0.43571943", "0.43487662", "0.42896417", "0.4279298", "0.4276757", "0.4273271", "0.4264371", "0.42626408" ]
0.7488231
0
Operation listsIllnessesIllnessIdPut Update an existing Illness specified by illnessId.
public function listsIllnessesPut($illness_id) { $input = Request::all(); $illness = Illnesses::findOrFail($illness_id); $illness->update(['name' => $input['name']]); if($illness->save()){ return response()->json(['msg' => 'Updated Illness'], 200); }else{ return response('Oops, it seems like something went wrong while trying to update the illness'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }", "public function findIllnessById(int $illnessId)\n {\n $sql = \"SELECT * FROM illness WHERE ill_id = ?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if (!$result) {\n return false;\n }\n\n return new IllnessRecord(\n $result['ill_id'],\n $result['ill_name'],\n $result['class_name'],\n $result['ill_describe']\n );\n }", "public function getFullIllnessById(int $illnessId)\n {\n if (NO_DATABASE) {\n if ($illnessId <= 3) { // just for tests\n $illness = new IllnessRecord(\n $illnessId,\n \"Illness $illnessId\",\n 'Class ' . ($illnessId < 3) ? 1 : 2,\n \"Illness $illnessId description.\"\n );\n\n if ($illnessId == 3) {\n $illness->setDescription(\n 'Illness 3 very long description that goes on and on and on and yet it goes on still on'\n );\n }\n\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n } else {\n return false;\n }\n }\n\n $sql = \"SELECT * FROM illness WHERE ill_id=?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n if (!$result) {\n return false;\n }\n\n $illness = new IllnessRecord(\n $result['ill_id'],\n $result['ill_name'],\n \t $result['class_name'],\n \t\t$result['ill_describe']\n );\n\n // Find and add all steps\n $steps = $this->getStepsByIllnessId($illnessId);\n $illness->addSteps($steps);\n\n // Add everything else\n $drugs = $this->getDrugsByIllnessId($illnessId);\n $illness->addDrugs($drugs);\n\n $payments = $this->getPaymentsByIllnessId($illnessId);\n $illness->addPayments($payments);\n\n $days = $this->getStayByIllnessId($illnessId);\n if ($days > 0) {\n $illness->setStay(new Stay($days));\n }\n\n return $illness;\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function listsIllnessesPost()\r\n {\r\n $input = Request::all();\r\n $new_illness = Illnesses::create($input);\r\n if($new_illness){\r\n return response()->json(['msg' => 'Created new illness'],200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to create a new illness');\r\n }\r\n }", "public function update($id, UpdateIncidenceRequest $request)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n $incidence = $this->incidenceRepository->update($request->all(), $id);\n\n Flash::success('Incidence updated successfully.');\n\n return redirect(route('incidences.index'));\n }", "public function update($id, UpdateInclusionRequest $request)\n {\n $inclusion = $this->inclusionRepository->findWithoutFail($id);\n\n if (empty($inclusion)) {\n Flash::error('Inclusion not found');\n\n return redirect(route('inclusions.index'));\n }\n\n $inclusion = $this->inclusionRepository->update($request->all(), $id);\n\n Flash::success('Inclusion updated successfully.');\n\n return redirect(route('inclusions.index'));\n }", "public function update(SecretaryUpdateRequest $request, $id)\n {\n $secretary = Secretary::find($id);\n\n $array_request = $this->processUpdateRequest($request);\n $secretary->update($array_request);\n\n $request->session()->flash('update_secretary',$secretary->last_name .' ' . $secretary->first_name .' a été Mise a Jour.');\n return redirect(route('secretary.index'));\n }", "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('tblattendance', $input, array('id' => $id));\n\n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "public function getStayByIllnessId(int $illnessId)\n {\n if (NO_DATABASE) {\n return rand(1, 5);\n }\n\n $sql = \"SELECT number FROM payments\n WHERE ill_id=? AND pay_name='stay' \";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$illnessId]);\n\n return $stmt->fetchColumn(0); // returns false if no columns\n }", "public function update(StoreMedicalInsuranceRequest $request, $id)\n {\n //\n\n $medical_insurance = MedicalInsurance::findOrFail($id);\n\n $medical_insurance_new = $request->all();\n\n $medical_insurance->fill($medical_insurance_new);\n\n $medical_insurance->save();\n\n Flash::success(trans('general.medical_insurance_edited'));\n\n return redirect()->route('medical_insurances.index');\n }", "public function listsIllnessesGet()\r\n {\r\n $response = Illnesses::all();\r\n return response()->json($response, 200);\r\n }", "public function update(UpdateDiagnosticPut $request, $id)\n {\n try {\n $status = \"activo\";\n if($request->status != \"on\"){\n $status = \"inactivo\";\n }\n $validate = $request->validated();\n DB::beginTransaction();\n $diagnostic = Diagnostic::find($id);\n $diagnostic->code = $request->code;\n $diagnostic->name = $request->name;\n $diagnostic->description = $request->description;\n $diagnostic->status = $status;\n $diagnostic->save();\n DB::commit();\n return redirect()->route('get-diagnostics');\n } catch (Exception $e) {\n DB::rollBack();\n return response()->json(['errors' => $e], 422);\n }\n }", "public function update( int $expenseId, array $parameters );", "public function update(Request $request, $id)\n {\n //\n $inters =Interest::findOrFail($id);\n $inters->update($request->all());\n\n return redirect('admin/interests');\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function update(UpdateIncome $request, $id)\n {\n $request->saveIncome($id);\n }", "public function update($id)\n\t{\n\t\t//\n\t\t$v = Validator::make(Request::all(), [\n 'name' => 'required|max:50', \n 'hall_id' => 'required',\n 'exhibition_id' => 'required', \n ]);\n \n\t if ($v->fails())\n\t {\n\t return redirect()->back()->withErrors($v->errors())\n\t \t\t\t\t\t\t ->withInput();\n\t }else{\n $id=Request::get('id');\n\t\t\t$exhibitionevent = ExhibitionEvent::find($id);\n\t\t $exhibitionevent->name = Request::get('name');\n\t\t $exhibitionevent->desc = Request::get('desc');\n\t\t $exhibitionevent->start_time = Request::get('start_time');\n\t\t $exhibitionevent->end_time = Request::get('end_time');\n\t\t // $exhibitionevent->hall_id = Request::get('hall_id');\n\t\t $exhibitionevent->exhibition_id = Request::get('exhibition_id');\n\t\t\t$exhibitionevent->save();\n\n\t\t\t$exhibitioneventhall=ExhibitionEventHall::find($id); \n\t\t\t$exhibitioneventhall->hall_id=Request::get('hall_id');\n\t\t\t$exhibitioneventhall->save();\n\n\n\t\t\treturn redirect('exhibitionevents');\n\t }\n\t}", "public function update($audienceId, $audience) \n {\n if (!($audience instanceOf \\WebMarketingROI\\OptimizelyPHP\\Resource\\v2\\Audience)) {\n throw new Exception(\"Expected argument of type Audience\",\n Exception::CODE_INVALID_ARG);\n }\n \n $postData = $audience->toArray();\n \n $result = $this->client->sendApiRequest(\"/audiences/$audienceId\", array(), 'PATCH', \n $postData, array(200));\n \n $audience = new Audience($result->getDecodedJsonData());\n $result->setPayload($audience);\n \n return $result;\n }", "public function update(AmenityListRequest $request, $id) {\n try {\n $edit_data = AmenityList::find($id);\n\n if ($request->name) {\n $edit_data->name = $request->name;\n } else {\n $edit_data->status = $request->status;\n }\n\n if ($edit_data->save()) {\n $flag = 'success';\n $msg = 'Record Updated Successfully';\n } else {\n $flag = 'danger';\n $msg = 'Record Not Updated Successfully';\n }\n\n $request->session()->flash($flag, $msg);\n return redirect(route('amenitylist.index'));\n } catch (Exception $ex) {\n return redirect()->back()->withErrors($ex->getMessage() . \" In \" . $ex->getFile() . \" At Line \" . $ex->getLine())->withInput();\n }\n }", "public function update(Request $request, $id)\n {\n $rules = [\n 'comment' => 'required',\n ];\n $validator = \\Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return response()->json($validator, 422);\n } else {\n $PresentingIllness = PresentingIllness::findOrFail($id);\n $PresentingIllness->comment = $request->input('comment');\n try {\n $PresentingIllness->save();\n return response()->json($PresentingIllness);\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return response()->json(['status' => 'error', 'message' => $e->getMessage()]);\n }\n }\n }", "public function update(InterestUpdateRequest $request, Interest $interest)\n {\n if ($interest->update($request->all())) {\n return redirect()\n ->route('admin.interest.index')\n ->with('status', \"Interest '{$request->title}' has been updated successfully!\");\n }\n\n return back()\n ->withInput();\n }", "public function update(ArticalRequest $request, $id)\n {\n $artical = $this->articalRepository->update($request->validated(), $id);\n return response()->json($artical, 200);\n }", "public function update(ItinerariesUpdateRequest $request,Itinerary $itinerary)\n {\n $itinerary->update([\n 'title'=>$request->title,\n 'tour_id'=>$request->tour_id,\n 'description'=>$request->description\n ]);\n \n session()->flash('success','Itinerary Updated');\n return redirect(route('setitineraries',$request->tour_id));\n }", "public function update(UpdateBelieversRequest $request, $id)\n {\n if (! Gate::allows('believer_edit')) {\n return abort(401);\n }\n $believer = Believer::findOrFail($id);\n $believer->update($request->all());\n\n\n\n return redirect()->route('admin.believers.index');\n }", "public function update(StoreSpecialAbility $request, $id)\n {\n\t$special_ability = SpecialAbility::find($id);\n $special_ability->description = $request->description;\n $special_ability->speciality_id = ($request->speciality_id) ? $request->speciality_id : null; \n \n $special_ability->save();\n \n return redirect('admin/specialabilities')->with('status', 'SpecialAbility updated!');\n }", "public function update(Request $request, $id)\n {\n // Get existing record\n $outcome = Outcome::findOrFail($id);\n\n // Get upates from edit page and fill\n $input = $request->all();\n $outcome->update($input);\n\n return redirect('outcomes')->with('success', 'Information has been added');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n\n $validator = $this->rules($data);\n\n if ($validator->fails()) {\n\n return back()\n ->withErrors($validator)\n ->withInput();\n } else {\n $industry = Industry::find($id);\n $industry->name = $request->input('name');\n $industry -> save();\n\n return redirect('industry/lists');\n }\n }", "public function update(Request $request, Articule $articules,$id)\n {\n $articules=Articule::find($id);\n $articules->code=$request->get(\"code\");\n $articules->name=$request->get(\"name\");\n $articules->salePrice=$request->get(\"salePrice\");\n $articules->codePostal=$request->get(\"codePostal\");\n $articules->stock=$request->get(\"stock\");\n $articules->description=$request->get(\"description\");\n $articules->img = \"pao.jpg\";\n $articules->save();\n return $articules;\n if($articules){\n echo \"editar con exito\"; \n }\n else{\n echo \"nel pastel\";\n }\n }", "public function setInsightId($val)\n {\n $this->_propDict[\"insightId\"] = $val;\n return $this;\n }" ]
[ "0.61582077", "0.5312624", "0.51997554", "0.50750184", "0.49780226", "0.4588426", "0.45512834", "0.4476085", "0.44564277", "0.44311288", "0.43907195", "0.43873525", "0.4372239", "0.43378243", "0.43279848", "0.4289718", "0.42782077", "0.42746103", "0.42687166", "0.42573997", "0.42417002", "0.4237726", "0.4234567", "0.4192891", "0.41749638", "0.41733742", "0.41477302", "0.41464704", "0.41252404", "0.4112071" ]
0.71339965
0
Operation listsIllnessesIllnessIdDelete Deletes a FamilyPlanning item specified by familyplanningId.
public function listsIllnessesDelete($illness_id) { Illnesses::destroy($illness_id); return response()->json(['msg' => 'Deleted illness']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsFamilyplanningDelete($familyplanning_id)\r\n {\r\n FamilyPlanning::destroy($familyplanning_id);\r\n return response()->json(['msg' => 'deleted family plan'], 200);\r\n }", "public function delete($burn_id)\n {\n\n $permissions = checkFunctionPermissions($_SESSION['user']['id'], array('user','user_district','user_agency'), 'write');\n if ($permissions['deny']) {\n exit;\n }\n\n $burn_sql = $this->pdo->prepare(\"DELETE FROM burns WHERE burn_id = ?;\");\n $burn_sql->execute(array($burn_id));\n if ($burn_sql->rowCount() > 0 && $many) {\n $result['message'] = status_message(\"The burn request was deleted.\", \"success\");\n } elseif ($burn_sql->rowCount() > 0 && $liners == false) {\n $result['error'] = true;\n $result['message'] = status_message(\"The burn request was deleted, but associated liners were not!\", \"error\");\n } else {\n $result['error'] = true;\n $result['message'] = status_message(\"The burn request was not deleted.\", \"error\");\n }\n\n return $result;\n }", "public function deleteLimitedEnglishProficiencyDescriptorById($id, $if_match = null)\n {\n list($response, $statusCode, $httpHeader) = $this->deleteLimitedEnglishProficiencyDescriptorByIdWithHttpInfo ($id, $if_match);\n return $response; \n }", "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "public static function deleteForLanding($id)\n\t{\n\t\tself::deleteData($id, self::ENTITY_TYPE_LANDING);\n\t}", "public function delete($id)\n {\n //Soft delete the rejection\n $rejection = RejectionReason::find($id);\n $inUseBySpecimen = $rejection->specimen->toArray();\n try {\n // The rejection is not in use\n $rejection->delete();\n } catch (Exception $e) {\n // The rejection is in use\n $url = session('SOURCE_URL');\n \n return redirect()->to($url)->with('message', trans('terms.failure-delete-record'));\n }\n // redirect\n $url = session('SOURCE_URL');\n\n return redirect()->to($url)->with('message', trans('terms.record-successfully-deleted'));\n }", "public function perma_del($id)\n {\n if (! Gate::allows('believer_delete')) {\n return abort(401);\n }\n $believer = Believer::onlyTrashed()->findOrFail($id);\n $believer->forceDelete();\n\n return redirect()->route('admin.believers.index');\n }", "public function restMarketsEbayPartsFitmentsFitmentIdDelete($id, $fitment_id)\n {\n list($response) = $this->restMarketsEbayPartsFitmentsFitmentIdDeleteWithHttpInfo($id, $fitment_id);\n return $response;\n }", "public function keywordListsKeywordListIdDeleteWithHttpInfo($keyword_list_id)\n {\n $request = $this->keywordListsKeywordListIdDeleteRequest($keyword_list_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }", "public function deleteAction()\n {\n $id = $this->_request->getParam('id');\n\n if (is_null($id))\n {\n $this->sendAlteredResponse(400, 'ID Must Be Specified When Deleting a Tracking Request');\n }\n else\n {\n try\n {\n $this->trackingService->changeFulfillmentStatus(array('content' => array('id' => $id)), true);\n $this->sendAlteredResponse(204);\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'No Tracking Request Resource With This ID');\n }\n \n }\n }", "public function deleteById($faqId);", "public function deleteTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->delete(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }", "public function delete_lists($id){\n\t\t$this->db->where(array(\n\t\t\t'pi_percentage_id'\t\t=>\t$id\n\t\t));\t\t\n\t\t$query = $this->db->get(\"payroll_pagibig_percentage_table\");\n\t\treturn $query->row();\n\t}", "public function delete_franchise($id){\n\t\t$query = \"DELETE FROM `franchise` WHERE `franchise_id`='$id'\";\n\t\t$result = mysql_query($query);\n\t\tif($result){\n\t\t\theader('location:view_franchise.php');\t\t \n\t\t}else{\n\t\t\tdie('can not delete'.mysql_error());\n\t\t}\n\t}", "private function delete_declined_skill ($discipline_id , $newversion ) {\n $affected = skill::with ('skillcategory' )->\n where('version' , '=' , $newversion)->\n where('approve_status' ,'=','declined')\n ->whereHas('skillcategory', function($q ) use ($discipline_id) {\n $q->where('discipline_id','=',$discipline_id);})\n ->delete();\n return $affected;\n }", "public function actionDelete($id) {\n if (Yii::app()->request->isPostRequest) {\n $reviews = Review::model()->findAllByAttributes(array(\n 'listing_id' => $id,\n ));\n foreach ($reviews as $review) {\n $review->delete();\n }\n \n $listingFeatures = ListingFeature::model()->findAllByAttributes(array(\n 'listing_id' => $id,\n ));\n foreach($listingFeatures as $listingFeature) {\n $listingFeature->delete();\n }\n \n $seoRecords = SeoData::model()->findAllByAttributes(array(\n 'model_name' => 'Listing',\n 'model_id' => $id,\n ));\n \n foreach($seoRecords as $seoRecord) {\n $seoRecord->delete();\n }\n \n // we only allow deletion via POST request\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax'])) {\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }\n } else {\n throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');\n }\n }", "public function delete_holiday_list($id) {\n $this->settings_model->_table_name = \"tbl_holiday\"; //table name \n $this->settings_model->_primary_key = \"holiday_id\"; //id\n $this->settings_model->delete($id);\n $type = \"success\";\n $message = \"Holiday Information Successfully Delete!\";\n set_message($type, $message);\n redirect('admin/settings/holiday_list'); //redirect page\n }", "public function deleteTracking($id) {\n\t\t\t$this->query(\"DELETE FROM usecaserequirements WHERE usecaseid = {$id};\");\n\t\t\treturn $this->resultSet();\n\t\t}", "public static function delete(\\Scrivo\\Context $context, $id) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\t\ttry {\n\t\t\tself::validateDelete($context, $id);\n\n\t\t\t$tmp = self::fetch($context, $id);\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND\n\t\t\t\t(list_item_definition_id = :id OR parent_list_item_definition_id = :id)\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM list_item_definition\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($context->cache[$id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "public function destroy(Request $request, $id)\n {\n $restriction = Restriction::findOrFail($id);\n\n if($restriction->delete()) {\n\n $restrictionExclusion = new RestrictionExclusion();\n $restrictionExclusion->people_id = Auth::user()->id;\n $restrictionExclusion->restriction_id = $id;\n $restrictionExclusion->description = $request->description;\n $restrictionExclusion->save();\n\n $this->addFlash('Restrição removida com sucesso!', 'success');\n } else {\n $this->addFlash('Erro ao remover restrição!', 'danger');\n }\n\n return redirect()->route('restricoes.index');\n }", "public function deleteIdAction() {\n\t\t$id = intval($this->getInput('id'));\n\t\t$game_id = intval($this->getInput('game_id'));\n\t\t$result = Client_Service_Besttj::deleteByBesttjId($game_id,$id);\n\t\tClient_Service_Besttj::updateBesttjDate(intval($id));\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function deleteFranchisesByGameId(Game $game){\n $prepared = $this->connection->prepare(\"DELETE FROM games_franchises WHERE game_id=:game_id\");\n $prepared->execute(array(\n 'game_id' => $game->getId()\n ));\n }", "public function deleteThirdparty($id) {\n\t\tif( Auth::user()->hasRole(1) || Auth::user()->hasRole(4) || Auth::user()->hasRole(5) || Auth::user()->hasRole(8) ) {\n\t\t\t$thirdparty = Thirdparty::find($id);\n\t\t\tif(MailGroupMember::where('user_id', '=', $thirdparty->id)->where('group_id', '=', 3)->delete() && $thirdparty->delete()) {\n\t\t\t\tSession::flash('flashmessagetxt', 'Deleted Successfully!!');\n\t\t\t\treturn Redirect::route('third-party-list');\n\t\t\t}\n\t\t}\n\t}", "public function deleteProvidentFund($id) {\n\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('provident-fund/all')->with([\n 'message' => '当前是试用模式,这个功能不可用。',\n 'message_important' => true\n ]);\n }\n\n $self = 'provident-fund';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $pfund = ProvidentFund::find($id);\n if ($pfund) {\n $pfund->delete();\n return redirect('provident-fund/all')->with([\n 'message' => '福利删除成功'\n ]);\n } else {\n return redirect('provident-fund/all')->with([\n 'message' => '没有找到福利信息',\n 'message_important' => true\n ]);\n }\n }", "public function deleteLimitedEnglishProficiencyDescriptorByIdWithHttpInfo($id, $if_match = null)\n {\n \n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling deleteLimitedEnglishProficiencyDescriptorById');\n }\n \n // parse inputs\n $resourcePath = \"/limitedEnglishProficiencyDescriptors/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n // header params\n \n if ($if_match !== null) {\n $headerParams['If-Match'] = $this->apiClient->getSerializer()->toHeaderValue($if_match);\n }\n // path params\n \n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 500:\n $data = \\Swagger\\Client\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\WebServiceError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "public function delete($id)\n {\n $fullResult = $this->client->call(\n 'crm.requisite.delete',\n array('id' => $id)\n );\n return $fullResult;\n }", "function mark_deleted($id, $break_rules = true) {\r\n\t\tglobal $current_user;\r\n\r\n\t\tif ($break_rules) {\r\n\t\t\trequire_once 'modules/Recurrence/RecurrenceRule.php';\r\n\t\t\t$m = new Meeting;\r\n\t\t\tglobal $disable_date_format;\r\n\t\t\t$save_date_format = $disable_date_format;\r\n\t\t\t$disable_date_format = true;\r\n\t\t\tif ($m->retrieve($id)) {\r\n\t\t\t\t$disable_date_format = $save_date_format;\r\n\t\t\t\t$r = new RecurrenceRule;\r\n\t\t\t\tif ($r->is_recurring($m) || $m->recurrence_of_id) {\r\n\t\t\t\t\t$r->breakAndDelete($m, 'all');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$disable_date_format = $save_date_format;\r\n\t\t}\r\n\r\n\t\tparent::mark_deleted($id);\r\n\t}", "public function delete($deleteCriteria):int{\n\t\t\tthrow NotIplementedError();\t\n\t\t}", "public function deleteBlacklistContact($id)\n {\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/sms/blacklist-contacts')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n $blacklist = BlackListContact::where('user_id', Auth::guard('client')->user()->id)->find($id);\n if ($blacklist) {\n $blacklist->delete();\n return redirect('user/sms/blacklist-contacts')->with([\n 'message' => language_data('Number deleted from blacklist', Auth::guard('client')->user()->lan_id),\n ]);\n } else {\n return redirect('user/sms/blacklist-contacts')->with([\n 'message' => language_data('Number not found on blacklist', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n }" ]
[ "0.5809312", "0.4299133", "0.42889535", "0.42707193", "0.42433476", "0.4206867", "0.4179267", "0.41744566", "0.41609272", "0.41444913", "0.41401464", "0.4139251", "0.41091368", "0.41049588", "0.40943673", "0.4089692", "0.40754503", "0.40493965", "0.4034207", "0.40242752", "0.4021356", "0.4020443", "0.40128908", "0.40082002", "0.3999964", "0.39920178", "0.39854014", "0.39827842", "0.39825243", "0.39768356" ]
0.58714515
0
/////////////////////// Services // ////////////////////// Operation listsServicesGet Fetch Drug Allergies (for select options).
public function listsServicesGet() { $response = Services::with('regimen')->get(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServices();", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public function getServicesList($org_user,$branch_id)\n {\n //Query To Get Service ID's List Of Specific Branch\n $sqlGetServiceID=\"SELECT * FROM service s INNER JOIN service_branch sb ON s.service_id=sb.service_id WHERE branch_id=?\";\n $values=array($branch_id);\n $serviceID=$this->getInfo($sqlGetServiceID,$values);\n //To Fill Out The Selection Box By Services List Of Specific Branch\n ?>\n <?php\n ?> \n <option>---</option>\n <?php\n foreach($serviceID as $i)\n {\n $id=$i['service_id'];\n ?> \n <option value=\"<?php echo $id; ?>\"><?php echo $i['service_name']; ?></option>\n <?php\n }\n ?>\n <?php\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function serviceSelectAll(){\n $data = $this->getDataAccessObject()->daoSelectAll();\n return $data;\n }", "public function getServices(): array;", "protected function renderServicesList() {}", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "private function GetServices($_list)\n\t{\n\t\t//Get Database\n\t\t$_database = $this->ConnectDatabase();\n\t\t//Create Data\n\t\t$_data = array($_list);\n\t\t//Call and return Database Function\n\t\treturn $this->CallDatabase(\n\t\t\t$_database,\n\t\t\t$_data,\n\t\t\tfunction($_pdo, $_parameters)\n\t\t\t{\n\t\t\t\t$_cond = '(' . $_parameters[0] . ')';\n\n\t\t\t\t//Create Query\n\t\t\t\t$_query = $_pdo->prepare(\"\n\t\t\t\t\tSELECT \n\t\t\t\t\t\tid,\n\t\t\t\t\t\tname\n\t\t\t\t\tFROM `Services`\n\t\t\t\t\tWHERE `id` IN \" . $_cond\n\t\t\t\t);\n\t\t\t\t//Execute Query\n\t\t\t\t$_query->execute($_parameters);\n\n\t\t\t\t$_data = array();\n\t\t\t\twhile ($_row = $_query->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t\tarray_push($_data, $_row);\n\t\t\t\t}\n\t\t\t\treturn $_data;\n\t\t\t}\n\t\t);\n }", "public function myservices_get()\n {\n\n $em = $this->doctrine->em;\n\n $user = $this->getCurrentUser();\n if($user){\n $relacion = $user->getServices()->toArray();\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"data\"] = array();\n /** @var \\Entities\\Service $service */\n foreach ($relacion as $service) {\n $service->loadRelatedData($user, null, site_url());\n $service->loadRelatedUserData($user);\n $result[\"data\"][] = $service;\n }\n $result[\"data\"] = $relacion;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }else{\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"error\"] = \"debe autenticarse\";\n $this->set_response($result, REST_Controller::HTTP_UNAUTHORIZED);\n }\n }", "function getServices() {\n $sql = 'SELECT * FROM services';\n\n $results = mysqli_query($GLOBALS['con'], $sql);\n\n if (mysqli_num_rows($results) > 0) {\n return $results;\n }\n }", "public function get_trending_services()\n {\n if (isGuest()) {\n // only get national\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.LocationScopeID = 1\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n } else {\n $userID = current_user();\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n JOIN UserAccountInformation ua ON (\n ua.id = {$userID} AND (\n (ss.LocationScopeID = 1) OR\n (ss.RegionalID = ua.RegionalID AND ss.LocationScopeID = 2) OR \n (ss.ProvincialID = ua.ProvincialID AND ss.LocationScopeID = 3) OR\n (ss.MunicipalityCityID = ua.MunicipalityCityID AND (ss.LocationScopeID = 4 OR ss.LocationScopeID = 5)) OR\n (ss.BarangayID = ua.BarangayID AND ss.LocationScopeID = 6)\n )\n )\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n }\n\n $results = $this->db->query($sql)->result_array();\n if (count($results)) {\n response_json(array(\n 'status' => true,\n 'data' => $results\n ));\n } else {\n response_json(array(\n 'status' => false,\n 'message' => 'No service found.'\n ));\n }\n }", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }", "public function getList()\n {\n return $this->call('GET', \"/shipping/services.json\");\n }", "public function index()\n {\t\t\n return ServicesResource::collection(Services::all());\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function listedesservicesAction()\r\n {\r\n $tservices = new Pits_Model_DbTable_TServicesplaces();\r\n $select = $tservices->select();\r\n $adapter = new Zend_Paginator_Adapter_DbTableSelect($select);\r\n $paginator = new Zend_Paginator($adapter);\r\n $paginator->setItemCountPerPage(10);\r\n $paginator->setCurrentPageNumber($this->view->page = $this->getRequest()->getParam('page', 1));\r\n $this->view->services = $paginator;\r\n }", "public function fetchClientServicesAction()\n {\n $this->view->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n $clientId = $this->getRequest()->getParam( 'client_id', null );\n\n $output = array(\n 'services' => '-'\n );\n\n if ( $clientId > 0 )\n {\n $clientMapper = new Application_Model_ClientMapper();\n $client = $clientMapper->fetchRow( $clientMapper->select()->where( 'id = ?', $clientId ) );\n $services = $client->getAllServices();\n $output['services'] = $this->view->partial( 'job/_partials/_services.phtml', 'default', array( 'services' => $services, 'clientId' => $clientId ) );\n }\n\n echo json_encode( $output );\n }", "public function getRequestedServices();", "public function get_business_services() {\n $this->db->select('*');\n $this->db->from('services');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public function findServices(): array;", "private function _getServiceList()\n {\n Modules_CustomServices_DataLayer::init();\n $configs = Modules_CustomServices_DataLayer::loadServiceConfigurations();\n\n // Configs are objects, but the list view needs associative arrays.\n $config_to_array = function($config) {\n return [\n 'name' => '<a href=\"' . htmlspecialchars(pm_Context::getActionUrl('index', 'view') . '/id/' . urlencode($config->unique_id)) . '\">' . htmlspecialchars($config->display_name) . '</a>',\n 'type' => self::_configTypeName($config->config_type),\n 'plesk_service_id' => '<code>' . htmlspecialchars('ext-' . pm_Context::getModuleId() . '-' . $config->unique_id) . '</code>',\n 'run_as_user' => $config->run_as_user\n ];\n };\n $data = array_map($config_to_array, $configs);\n\n // Prepare the list for presentation.\n $list = new pm_View_List_Simple($this->view, $this->_request);\n $list->setData($data);\n $list->setColumns([\n 'name' => [\n 'title' => 'Name',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ],\n 'type' => [\n 'title' => 'Type',\n 'noEscape' => FALSE,\n 'searchable' => FALSE,\n 'sortable' => FALSE\n ],\n 'plesk_service_id' => [\n 'title' => 'Service ID',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => FALSE\n ],\n 'run_as_user' => [\n 'title' => 'System user',\n 'noEscape' => FALSE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ]\n ]);\n $list->setDataUrl(['action' => 'list-data']);\n $list->setTools([\n [\n 'title' => 'Add service (simple)',\n 'description' => 'Add a new service that wraps a process',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/process'\n ],\n [\n 'title' => 'Add service (manual)',\n 'description' => 'Add a new manually controlled service',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/manual'\n ]\n ]);\n return $list;\n }", "public function service_listing() {\n // $user = array(\n // 'id' => encrypt($temp['id']),\n // 'email' => $temp['sClEmail'],\n // );\n \n $breadcrumbs = [['link' => \"/client-dashboard\", 'name' => \"Dashboard\"], ['name' => \"Service Listing\"]];\n\n $data = $this->getServiceData(\"all\", Auth::id());\n\n return view('/pages/client_user/client/client-service-listing',[\n 'breadcrumbs' => $breadcrumbs,\n // 'user'=> $user,\n ])->with(\"serviceList\", $data);\n }", "function services (){\n // \n //Get the selected destination \n if(isset($_REQUEST['attraction'])){\n $attraction=$_REQUEST['attraction'];\n }\n //\n //Die if no destination is provided\n else{\n throw new Exception(\"No attraction found\");\n }\n //\n //\n //return the attractions using the destination primary key\n $sql= $this->chk(\n \"SELECT \n services.services,\n services.name,\n attraction.attraction\n FROM \n services \n Inner Join \n atservice on atservice.services=services.services\n Inner Join\n attraction on atservice.attraction=attraction.attraction\n WHERE \n `attraction`.`attraction` = $attraction\"\n );\n // \n $service= $this->sqlData($sql);\n echo ($service); \n }", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }" ]
[ "0.66078573", "0.64048135", "0.6339726", "0.6317815", "0.6278428", "0.6264575", "0.6261286", "0.6257435", "0.62118703", "0.6175827", "0.612291", "0.6108533", "0.6086128", "0.607789", "0.6054883", "0.60350746", "0.6028612", "0.6024792", "0.59764117", "0.59717953", "0.59398216", "0.5939088", "0.59332806", "0.58971095", "0.5896911", "0.58881426", "0.58491576", "0.5827478", "0.58193815", "0.5800255" ]
0.6779598
0
Operation listsServicesServiceIdGet Fetch Service specified by serviceId.
public function listsServicesByIdGet($service_id) { $response = Services::findOrFail($service_id); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServiceById(int $id)\n {\n\n $req = $this->pdo->prepare('SELECT * FROM services WHERE id = :id');\n\n $req->bindValue(':id', (int) $id);\n $req->execute();\n\n $services = $req->fetch();\n\n return $services;\n\n }", "public function getServices($id) {\n $dql = \"SELECT se FROM Service se\n JOIN se.serviceType st\n WHERE st.id = :id\";\n $services = $this->em->createQuery($dql)\n ->setParameter('id', $id)\n ->getResult();\n return $services;\n }", "public function get_user_services_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('user_services', array('user_services_id' => $id));\n\t\treturn $query;\n\t}", "public function getService($service_id = \"\") {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\tif($service_id != \"\" and $service_id != null) {\n\t\t\t\t$service = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t\t->where('services_orders.id_client', $user->id)\n\t\t\t\t\t->where('services_orders.status', '!=', 6)\n\t\t\t\t\t->where('services_orders.id', '=', $service_id)\n\t\t\t\t\t->first(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service_id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\n\t\t\t\tif($service) {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\"message\" => \"Detalle de servicio\",\n\t\t\t\t\t\t\"response\" => array(\"service\" => $service, \"documents\" => $documents)\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\t\"message\" => \"No se encontró el servicio\",\n\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\"message\" => \"Error en los parametros, id_service es requerido\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "private function getServiceFromId(int $serviceId)\n {\n if (is_null($this->stmtService)) {\n $this->stmtService = $this->backendInstance->db->prepare(\n \"SELECT $this->attributesSelect\n FROM service\n LEFT JOIN extended_service_information\n ON extended_service_information.service_service_id = service.service_id\n WHERE service_id = :service_id AND service_activate = '1'\"\n );\n }\n $this->stmtService->bindParam(':service_id', $serviceId, PDO::PARAM_INT);\n $this->stmtService->execute();\n $results = $this->stmtService->fetchAll(PDO::FETCH_ASSOC);\n $this->serviceCache[$serviceId] = array_pop($results);\n }", "public function get($idService)\n {\n $idService = (int) $idService;\n $requete = 'SELECT * FROM services WHERE idService = ? ';\n $stmt = $this->_pdo->prepare($requete);\n $stmt->execute(array($idService));\n $result = $stmt->fetch(PDO::FETCH_OBJ);\n if (!$result) {\n $result = ['idService' => $idService, 'idFournisseur' => '',\n 'titreService' => '',\n 'desShortService' => '', 'desService' => '',\n 'idCategorie' => '', 'actService' => '',\n 'prixService' => '', 'promService' => '',\n 'refeService' => '', 'refeEfeService' => '',\n 'datLimService' => '', 'pochetteService' => '',\n 'autService' => ''];\n }\n return $result;\n }", "public function getServiceById($id)\n {\n return Service::find($id);\n }", "public static function findByServiceId( $service_id )\n {\n return Lib\\Entities\\ServiceExtra::query()->where( 'service_id', $service_id )->sortBy( 'position, id' )->find();\n }", "public function service_get($id)\n {\n $em = $this->doctrine->em;\n /** @var \\Entities\\Service $service */\n $service = $em->find('Entities\\Service', $id);\n $user = $this->getCurrentUser();\n if ($service) {\n $service->getAuthor()->getUsername();\n $service->getPositions()->toArray();\n $service->setVisits($service->getVisits() + 1);\n $service->visit_at = new DateTime(\"now\");\n $em->persist($service);\n $em->flush();\n if ($user) {\n $service->relateUserData($user, $em);\n $service->loadRelatedUserData($user);\n }\n $service->subcategoriesList = $service->getSubcategories()->toArray();\n $service->loadRelatedData($user, null, site_url());\n }\n\n $result[\"data\"] = $service;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function GetServices(GetServices $parameters)\n {\n return $this->__soapCall('GetServices', array($parameters));\n }", "public function listeServiceByFrontendId($id_service){\n\t\t\t\t\t$sql = \"SELECT * FROM service WHERE service.id_service = \".$id_service.\" \";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "public function getServices($topicId) {\n\t\tif ($this->settings['includeCHServices'] && $this->settings['eCHcommunityID'] !== '00-00') {\n\t\t\t$servicesCommunity = $this->_getServices($topicId, FALSE);\n\t\t\t$services = $servicesCommunity;\n\t\t\t$servicesCH = $this->_getServices($topicId, TRUE);\n\t\t\tif (is_array($servicesCH)) {\n\t\t\t\tforeach ($servicesCH as $service) {\n\t\t\t\t\t\t// Key used to removed duplicates\n\t\t\t\t\t$services[$service['id']] = $service;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$services = $this->_getServices($topicId, FALSE);\n\t\t}\n\n\t\t$services = is_array($services) ? $services : array();\n\n\t\t\t// Sort services by (localized) name\n\t\t$this->sort($services, 'name');\n\n\t\t$this->callHooks(\n\t\t\t'services',\n\t\t\tarray(\n\t\t\t\t'topicId' => $topicId,\n\t\t\t),\n\t\t\t$services\n\t\t);\n\n\t\treturn $services;\n\t}", "public function getServices() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_client', $user->id)\n\t\t\t\t->where('services_orders.status', '!=', 6)\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function getServiceCourier($service_id = \"\") {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\tif($service_id != \"\" and $service_id != null) {\n\t\t\t\t$service = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t\t->where('services_orders.id_courier', $user->id)\n\t\t\t\t\t->whereIn('services_orders.status', array(\"2\",\"3\"))\n\t\t\t\t\t->where('services_orders.id', '=', $service_id)\n\t\t\t\t\t->first(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service_id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\n\t\t\t\tif($service) {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\"message\" => \"Detalle de servicio\",\n\t\t\t\t\t\t\"response\" => array(\"service\" => $service, \"documents\" => $documents)\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\t\"message\" => \"No se encontró el servicio\",\n\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\"message\" => \"Error en los parametros, id_service es requerido\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function get_service_by_id($id = FALSE) {\n\t\tif ($id === FALSE) {\n\t\t\treturn 0; \n\t\t}\n\t\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('services s');\n\t\t$this->db->join('beneficiaries b', 'b.ben_id = s.ben_id');\n\t\t$this->db->where(\"s.service_id = '$id' and s.trash = '0'\"); //omit trash = 0 to be able to 'undo' trash one last time?\n\t\t$query = $this->db->get();\t\t\n\n\t\t$s = $query->row_array();\n\t\t\n\t\tif (isset($s)) {\n\t\t\tif ($s != '') {\n\t\t\t\t\t\n\t\t\t\t\t//get beneficiary details\n\t\t\t\t\t$x = $this->beneficiaries_model->get_beneficiary_by_id($s['ben_id']);\n\t\t\t\t\t$s = array_merge($s, $x);\n\t\t\t\t\t\n\t\t\t\t\t//get requestor details\n\t\t\t\t\t$y = $this->beneficiaries_model->get_beneficiary_by_id($s['req_ben_id']);\n\t\t\t\t\t\t$s['req_fname'] = $y['fname'];\n\t\t\t\t\t\t$s['req_mname'] = $y['mname'];\n\t\t\t\t\t\t$s['req_lname'] = $y['lname'];\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $s; \n\t\t}\n\t\telse{\n\n\t\t\treturn 0;\n\t\t}\n\n\t}", "public function getService(string $serviceId, array $arguments = []): Service;", "public function getservice($id)\n {\n return Service::where('country_id',$id)->get();\n }", "public function getServices($id): Collection\n {\n $p = $this->findPortfolio($id);\n return $p ? $p->services : new Collection();\n }", "public function getCelluleService($serviceId)\n {\n $cellules = $this->getEntityManager()\n ->getRepository('AppBundle:Cellule')\n ->createQueryBuilder('c')\n ->leftJoin('c.service', 's')\n ->where('c.supprimer != :supprimer')\n ->andWhere('s.id = :id')\n ->setParameter('supprimer', 1)\n ->setParameter('id', $serviceId)\n ->getQuery()\n ->getResult();\n\n return $cellules;\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function get($id)\n {\n Assert::integerish($id, __METHOD__ . ' expects $id to be an integer');\n return $this->call('GET', \"/shipping/services/{$id}.json\");\n }", "public function servicescat_get($id)\n {\n $em = $this->doctrine->em;\n $category = $em->find('Entities\\Category', $id);\n if ($category) {\n $subcategories = $category->getSubcategories()->toArray();\n $result[\"desc\"] = \"Listado de servicios por la categoria: $id\";\n $result[\"parent\"] = $category;\n $result[\"count\"] = 0;\n $result[\"data\"] = array();\n foreach ($subcategories as $subcategory) {\n $services = $subcategory->getServices()->toArray();\n $result[\"data\"] = array_merge($result[\"data\"], $services);\n }\n $result[\"count\"] = count($result[\"data\"]);\n } else {\n $result[\"desc\"] = \"Listado de servicios por la categoria: $id\";\n $result[\"parent\"] = array();\n $result[\"count\"] = 0;\n $result[\"data\"] = array();\n }\n $this->set_response($result, REST_Controller::HTTP_UNAUTHORIZED);\n }", "public function get(int $serviceId, GetParameters $parameters = null): Response\n {\n $url = $this->prepareGetUrl(static::ENDPOINT_CATALOG_SERVICES_GET, $parameters);\n $url = $this->replaceId($serviceId, $url);\n\n return $this->callApi(self::METHOD_GET, $url);\n }", "protected function _getServices($topicId, $forceCHLevel) {\n\t\t$services = array();\n\t\t$serviceList = $this->callEgovApi('GetServiceList', array(\n\t\t\t'eCHtopicID' => $topicId,\n\t\t), $forceCHLevel);\n\t\tif (is_array($serviceList) && is_array($serviceList['eCHserviceList'])) {\n\t\t\tif (is_array($serviceList['eCHserviceList']['serviceInfo']) && !isset($serviceList['eCHserviceList']['serviceInfo'][0])) {\n\t\t\t\t$serviceList['eCHserviceList']['serviceInfo'] = array($serviceList['eCHserviceList']['serviceInfo']);\n\t\t\t}\n\t\t\tif (isset($serviceList['eCHserviceList']['serviceInfo'])) {\n\t\t\t\tforeach ($serviceList['eCHserviceList']['serviceInfo'] as $service) {\n\t\t\t\t\t$id = $this->getValue($service, 'eCHserviceID');\n\t\t\t\t\tif (!$id) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$services[] = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'name' => $this->getValue($service, 'eCHservice'),\n\t\t\t\t\t\t'description' => $this->getValue($service, 'description'),\n\t\t\t\t\t\t'versionId' => $this->getValue($service, 'eCHserviceVersionID'),\n\t\t\t\t\t\t'versionName' => $this->getValue($service, 'eCHserviceVersionName'),\n\t\t\t\t\t\t'communityId' => $this->getValue($service, 'eCHcommunityID'),\n\t\t\t\t\t\t'release' => $this->getValue($service, 'release'),\n\t\t\t\t\t\t'remarks' => $this->getValue($service, 'remark'),\n\t\t\t\t\t\t'provider' => $this->getValue($service, 'eCHserviceProvider'),\n\t\t\t\t\t\t'customer' => $this->getValue($service, 'eCHcustomer'),\n\t\t\t\t\t\t'type' => $this->getValue($service, 'eCHserviceType'),\n\t\t\t\t\t\t'action' => $this->getValue($service, 'eCHaction'),\n\t\t\t\t\t\t'status' => $this->getValue($service, 'eCHstatus'),\n\t\t\t\t\t\t'author' => $this->getValue($service, 'author'),\n\t\t\t\t\t\t'dateCreation' => $this->getValue($service, 'createdDate'),\n\t\t\t\t\t\t'dateLastModification' => $this->getValue($service, 'lastModificationDate'),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$services && $this->debug) {\n\t\t\t\tt3lib_div::devLog('Could not process services for topic \"' . $topicId . '\"', 'egovapi', self::DEVLOG_WARNING, $serviceList);\n\t\t\t}\n\t\t}\n\n\t\treturn $services;\n\t}", "public static function getService($id)\n {\n return self::getManager()->getService($id);\n }", "function get_service($id) {\n\t\t$conn = db_connect();\n\t\t$result = $conn->query(\"select service_name from services where id=\".$id);\n\t\tif (!$result)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$row=$result->fetch_row();\n\t\tif($row)\n\t\t{\n\t\t\treturn $row[0];\n\t\t}\n\t}", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "public function get(string $serviceId, array $arguments = []): mixed;", "public function findServiceById($service_id) {\n if (!empty($service_id)) {\n return $this->findService(array(\"service_uuid\" => $service_id));\n }\n return false;\n }", "public function getServiceName($serviceid) {\r\n \t\r\n \tif(is_array($serviceid) && !empty($serviceid)){\r\n \t\t$serviceid = @implode(\",\", $serviceid);\r\n \t}\r\n\r\n $serviceid = str_replace('P1188', 'PL', $serviceid);\r\n $serviceid = str_replace('C1188', 'CL', $serviceid);\r\n $serviceid = str_replace('A0.5', 'A2W', $serviceid);\r\n $serviceid = str_replace('B0.5', 'B2W', $serviceid);\r\n $serviceid = str_replace('P0.5', 'P2W', $serviceid);\r\n $serviceid = str_replace('C0.5', 'C2W', $serviceid);\r\n $serviceid = str_replace('P1.5', 'P6W', $serviceid);\r\n $serviceid = str_replace('C1.5', 'C6W', $serviceid);\r\n $serviceid = str_replace('P0.07', 'P1W', $serviceid);\r\n $serviceid = str_replace('C0.07', 'C1W', $serviceid);\r\n $serviceid_arr = @explode(\",\", $serviceid);\r\n $serviceid_str = \"'\".@implode(\"','\", $serviceid_arr).\"'\";\r\n \r\n $billingServicesObj = new billing_SERVICES('newjs_slave');\r\n $serviceDetails = $billingServicesObj->fetchAllServiceDetails($serviceid_str);\r\n foreach($serviceid_arr as $key=>$val){\r\n \tforeach($serviceDetails as $kk=>$vv){\r\n \t\tif($val == $vv['SERVICEID']){\r\n \t\t\t$id = $vv[\"SERVICEID\"];\t\t\r\n \t\t\t$service_name[$id][\"NAME\"] = $vv[\"NAME\"];\r\n \t\t}\r\n \t}\r\n }\r\n \r\n return $service_name;\r\n }" ]
[ "0.730512", "0.7072424", "0.66509265", "0.6564968", "0.65384376", "0.63104904", "0.62840253", "0.6253478", "0.62413424", "0.618143", "0.61013436", "0.60689914", "0.60596937", "0.60319316", "0.602796", "0.6005711", "0.599495", "0.5926299", "0.5879651", "0.58690757", "0.5868144", "0.5855273", "0.5846701", "0.5819548", "0.5800803", "0.57357657", "0.57278514", "0.5706846", "0.5653079", "0.5630881" ]
0.766446
0
Operation listsServicesPost create a service.
public function listsServicesPost() { $input = Request::all(); $new_serivce = Services::create($input); if($new_serivce){ return response()->json(['msg'=> 'Created a new service'],200); }else{ return response('Oops, seems like something went wrong while trying to create a new service'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $services = Service::all();\n return view('back.service.addService', compact('services'));\n }", "public function handle(Services $services)\n {\n $service = $services->create([\n 'name' => $this->name,\n 'slug' => $this->slug,\n 'type' => $this->type,\n 'agent_id' => $this->agent_id,\n 'server_id' => $this->server_id,\n ]);\n\n return ['id' => $service->id];\n }", "public function create()\n {\n\n $services = Service::where('locale', 'en')->get();\n foreach ($services as $key => $item) {\n $_services = Service::where('serviceid', $item->serviceid)->get();\n if (count($_services) == 14)\n unset($services[$key]);\n }\n\n return view(\"services.create\", ['services' => $services]);\n }", "public function insert_multiple_service() {\r\n if (USER_ROLE == ROLE_ONE) {\r\n $inserts = json_decode($this->input->post('services'));\r\n $vouchers_ids = \",\";\r\n $flag = false;\r\n foreach ($inserts as $item) {\r\n $data['service_name'] = $item[0];\r\n $data['provided_by'] = $item[1];\r\n $data['billing_id'] = $item[2];\r\n $data['notes'] = $item[3];\r\n $data['cost'] = $item[4];\r\n $data['currency_type'] = $item[5];\r\n $data['received_date'] = $item[6];\r\n $data['insert_number'] = $item[7];\r\n $data['quantity'] = $item[8];\r\n $result = $this->service_model->add_service($data);\r\n if ($result != -1) {\r\n $vouchers_ids .= $result . \",\";\r\n $flag = true;\r\n } else if ($result == -1) {\r\n $flag = false;\r\n $result2 = $this->service_model->delete_many_services($vouchers_ids);\r\n }\r\n if ($flag != true)\r\n break;\r\n }\r\n if ($flag) {\r\n echo json_encode(array('status' => true, 'msg' => $result.\"تم إدخال البيانات بنجاح\"));\r\n } else {\r\n echo json_encode(array('status' => false, 'msg' => $result2.\"لم يتم إدخال البيانات هناك خطأ في البيانات المدخلة\"));\r\n }\r\n }\r\n }", "function createservicestep1_post()\n {\n $em = $this->doctrine->em;\n $service = new \\Entities\\Service();\n $service->setAthor($this->getCurrentUser());\n\n\n $service->title = $this->post('title', TRUE);\n $service->subtitle = $this->post('subtitle', TRUE);\n $service->phone = $this->post('phone', TRUE);\n $service->address = $this->post('address', TRUE);\n// $service->addSubCategories($this->post('categories', TRUE),$em);\n// $service->addCities($this->post('cities', TRUE),$em);\n// $icon = $this->post('icon');\n// $path= \"./resources/\".$icon['filename'];\n// file_put_contents($path, base64_decode($icon['value']));\n// $service->setIcon($path);\n// $em->persist($service);\n// $em->flush();\n $this->set_response($service, REST_Controller::HTTP_OK);\n }", "public function create()\n {\n $subservices = $this->subservice->lists('title', 'id');\n return view('admin.service.create', compact('subservices'));\n }", "public function create()\n {\n $services = Service::all();\n return view('backend.service-detail.create',compact('services'));\n }", "public function add_service()\n {\n\n $cols = \"`title`,`icon`,`desc`\";\n\n $value =\n \"'\" . $this->obj->all_data->service->get_title1() . \"',\n '\" . $this->obj->all_data->service->get_icon() . \"',\n '\" . $this->obj->all_data->service->get_desc() . \"'\n\n \";\n\n\n $insert = $this->obj->insert(\"out_service\", $cols, $value);\n return $insert;\n }", "public function store(CreatePatent_ServicesRequest $request)\n {\n $input = $request->all();\n\n $patentServices = $this->patentServicesRepository->createPost($request);\n\n Flash::success('Patent Services saved successfully.');\n\n return redirect(route('patentServices.index'));\n }", "public function create()\n {\n $this->data[\"form\"] = \"add\";\n return view(\"admin.pages.services\",$this->data);\n }", "public function create()\n {\n return view(\"admin.services.create\");\n }", "public function create()\n {\n return view('admin.services.add');\n }", "public function create()\n {\n return view('services.add');\n }", "public function create()\n {\n return view('backend.services.add');\n }", "public function actionCreate()\n {\n $model = new Service();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $cities = Yii::$app->getRequest()->post('cities');\n\n $model->attachCities($cities);\n\n $requestTypes = Yii::$app->getRequest()->post('request_types');\n\n $model->attachRequestTypes($requestTypes);\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('admin.services.create');\n \n }", "function _wsdl_docs_service_create($data) {\n // Confirm service name is unique\n $service_id = _wsdl_docs_get_service_id($data['name']);\n if ($service_id) {\n return 'Service with this name already exists';\n }\n // Create new WSDL service.\n $service = entity_create('wsclient_service', array('type' => 'soap'));\n $service->label = $data['name'];\n $service->name = strtolower(str_replace('-', '_', str_replace(' ', '_', $data['name'])));\n $service->save();\n $name = $data['name'];\n $id = $service->id;\n return \"WSDL service $name, ID: $id added.\";\n}", "public function create()\n {\n return view('admin/services.service.create');\n }", "public function create()\n {\n //\n\t\treturn view('services.create');\n }", "public function create()\n {\n $service = Service::pluck('libelle','direction')->all();\n return view('services.create',compact('service'));\n }", "public function create()\r\n {\r\n $serviceCategory = ServiceCategory::all();\r\n return view('admin.service.services.form', compact('serviceCategory'));\r\n }", "public function setDados(array $dados): CreatePeopleService;", "public function creating(Service $Service)\n {\n //code...\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function submitNewService()\n {\n $array = [\n 'serviceName' => request()->input('serviceName'),\n 'servicePrice' => request()->input('servicePrice'),\n 'serviceVisits' => request()->input('serviceVisits'),\n 'serviceDesc' => request()->input('serviceDesc'),\n 'serviceBenefit' => request()->input('serviceBenefit')\n ];\n\n DB::table('tbl_services')->insert([\n 'service_name'=>$array['serviceName'],\n 'service_price'=>$array['servicePrice'],\n 'service_visits'=>$array['serviceVisits'],\n 'service_desc'=>$array['serviceDesc'],\n 'service_benefit'=>$array['serviceBenefit']\n ]);\n return redirect('cms/1');\n }", "public function create(){\n return view('admin/service/service_create');\n }", "function register_service() {\r\n\r\n\t\t$labels = array(\r\n\t\t\t'name' => _x( 'Service', 'Post Type General Name', 'kitgreen' ),\r\n\t\t\t'singular_name' => _x( 'Service', 'Post Type Singular Name', 'kitgreen' ),\r\n\t\t\t'menu_name' => __( 'Service', 'kitgreen' ),\r\n\t\t\t'parent_item_colon' => __( 'Parent Item:', 'kitgreen' ),\r\n\t\t\t'all_items' => __( 'All Items', 'kitgreen' ),\r\n\t\t\t'view_item' => __( 'View Item', 'kitgreen' ),\r\n\t\t\t'add_new_item' => __( 'Add New Item', 'kitgreen' ),\r\n\t\t\t'add_new' => __( 'Add New', 'kitgreen' ),\r\n\t\t\t'edit_item' => __( 'Edit Item', 'kitgreen' ),\r\n\t\t\t'update_item' => __( 'Update Item', 'kitgreen' ),\r\n\t\t\t'search_items' => __( 'Search Item', 'kitgreen' ),\r\n\t\t\t'not_found' => __( 'Not found', 'kitgreen' ),\r\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'kitgreen' ),\r\n\t\t);\r\n\r\n\t\t$args = array(\r\n\t\t\t'label' => __( 'service', 'kitgreen' ),\r\n\t\t 'labels' => $labels,\r\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes', 'post-formats', ),\r\n 'taxonomies' => array( 'service_cat' ),\r\n 'hierarchical' => true,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'show_in_nav_menus' => true,\r\n 'show_in_admin_bar' => true,\r\n 'menu_position' => 5,\r\n 'menu_icon' => 'dashicons-admin-multisite',\r\n 'can_export' => true,\r\n 'has_archive' => true,\r\n 'exclude_from_search' => false,\r\n 'publicly_queryable' => true,\r\n 'capability_type' => 'page',\r\n\t\t);\r\n\r\n\t\tregister_post_type( 'service', $args );\r\n\r\n\t\t/**\r\n\t\t * Create a taxonomy category for Service\r\n\t\t *\r\n\t\t * @uses Inserts new taxonomy object into the list\r\n\t\t * @uses Adds query vars\r\n\t\t *\r\n\t\t * @param string Name of taxonomy object\r\n\t\t * @param array|string Name of the object type for the taxonomy object.\r\n\t\t * @param array|string Taxonomy arguments\r\n\t\t * @return null|WP_Error WP_Error if errors, otherwise null.\r\n\t\t */\r\n\t\t\r\n\t\t$labels = array(\r\n\t\t\t'name'\t\t\t\t\t=> _x( 'Service Categories', 'Taxonomy plural name', 'kitgreen' ),\r\n\t\t\t'singular_name'\t\t\t=> _x( 'Service Category', 'Taxonomy singular name', 'kitgreen' ),\r\n\t\t\t'search_items'\t\t\t=> __( 'Search Categories', 'kitgreen' ),\r\n\t\t\t'popular_items'\t\t\t=> __( 'Popular Service Categories', 'kitgreen' ),\r\n\t\t\t'all_items'\t\t\t\t=> __( 'All Service Categories', 'kitgreen' ),\r\n\t\t\t'parent_item'\t\t\t=> __( 'Parent Category', 'kitgreen' ),\r\n\t\t\t'parent_item_colon'\t\t=> __( 'Parent Category', 'kitgreen' ),\r\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Category', 'kitgreen' ),\r\n\t\t\t'update_item'\t\t\t=> __( 'Update Category', 'kitgreen' ),\r\n\t\t\t'add_new_item'\t\t\t=> __( 'Add New Category', 'kitgreen' ),\r\n\t\t\t'new_item_name'\t\t\t=> __( 'New Category', 'kitgreen' ),\r\n\t\t\t'add_or_remove_items'\t=> __( 'Add or remove Categories', 'kitgreen' ),\r\n\t\t\t'choose_from_most_used'\t=> __( 'Choose from most used text-domain', 'kitgreen' ),\r\n\t\t\t'menu_name'\t\t\t\t=> __( 'Category', 'kitgreen' ),\r\n\t\t);\r\n\t\r\n\t\t$args = array(\r\n\t\t\t'hierarchical' => true,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'service_cat' ),\r\n\t\t);\r\n\t\tregister_taxonomy( 'service_cat', array( 'service' ), $args );\r\n\r\n\t}", "public function create($id)\n {\n $client = $id;\n $servicesTypes = TypeService::all();\n return view('services.create', compact('servicesTypes', 'client'));\n }" ]
[ "0.6157643", "0.6082146", "0.5944548", "0.58804715", "0.5875691", "0.58401054", "0.581286", "0.5776268", "0.57516515", "0.571109", "0.57024246", "0.5672089", "0.56678295", "0.5653613", "0.5609553", "0.55768234", "0.55491364", "0.5534604", "0.55333495", "0.5479581", "0.54689556", "0.5464947", "0.5427694", "0.5399676", "0.5399676", "0.5399676", "0.5390601", "0.5372082", "0.53551245", "0.5340542" ]
0.80378425
0
Operation listsServicesServiceIdPut Update an existing Service.
public function listsServicesPut($service_id) { $input = Request::all(); $service = Services::findOrFail($service_id); $service->update(['name' => $input['name']]); if($service->save()){ return response()->json(['msg' => 'Updated service']); }else{ return response('Oops, it seems like somthing went wrong while trying to update the servie'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function editService($service, $id){\r\n Client::Update()\r\n ->set('service',$service)\r\n ->where('id', $id)\r\n ->execute();\r\n }", "public function update(Service $request, Services $services, $id)\n {\n \n \n $service = Services::find($id);\n \n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('admin/img/', $image_new_name);\n $service->image = 'admin/img/'. $image_new_name; \n }\n $service->name = $request->name;\n \n $service->order = $request->order;\n $service->save();\n \n return redirect()->route('Service.index');\n \n }", "public function update(Request $request, Services $services)\n {\n //\n }", "public function update(Request $request, Services $services)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $service= Services::findorfail($id);\n $tags= $request->input('service_tag');\n $service->title = $request->input('title'); \n $description = $request->input('description');\n $service->description = $description;\n $service->price = $request->input('price');\n $name = Str::slug($request->input('title'));\n $service_exist = services::where('slug', $name)->first();\n if ($service_exist) {\n $last_record = services::find(\\DB::table('services')->max('id'));\n $incremented_id = $last_record->id + 1;\n $slug = $name . '-' . $incremented_id;\n } else {\n $slug = $name;\n }\n $service->slug = $slug;\n\n $service->image = $request->input('service_image');\n \n \n $service->save();\n $s_tag = Servicetags::where('service_id',$id);\n $s_tag->delete();\n foreach($tags as $tag){\n \n $servicetag = new Servicetags;\n $servicetag->service_id= $service->id;\n $servicetag->name=$tag;\n $servicetag->save();\n\n }\n return redirect()->route('services.index')->with('success', 'Service added successfully.');\n }", "public function update(ServiceRequest $request, $id)\n {\n $service = Service::find($id);\n\n $service->name = $request->input(\"name\");\n $service->price = (float)$request->input(\"price\");\n $service->icon_class_name = $request->input(\"iconClassName\");\n $service->description = $request->input(\"description\");\n\n try {\n $service->save();\n $this->log(\"Admin successfully updated service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceSuccess\",\"Service successfully updated!\");\n }catch (\\Exception $e){\n \\Log::error($e->getMessage());\n $this->log(\"Error on admin updating service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceError\" , \"Server error on editing service, try again later.\")->withInput();\n }\n }", "public function update(Request $request, Services $service)\n {\n\t\t$service->name = $request->input('name');\n\t\t$service->subname = $request->input('subname');\n\t\t$service->description = $request->input('description');\n\t\t$service->price = $request->input('price');\n\t\t$service->disponibility = $request->input('disponibility');\n\t\t$service->image = $request->input('image');\n\t\t$service->save();\n\t\treturn new ServicesResource($service);\n }", "public function update($id)\r\n\t{\r\n\t\t// validate\r\n\t\t// read more on validation at http://laravel.com/docs/validation\r\n\t\t$rules = array (\r\n\t\t\t'name' => 'required|unique:services,name,'.$id,\r\n\t\t\t'estimated_days' => 'required|numeric|min:1'\r\n\t\t);\r\n\r\n\t\t$validator = Validator::make(Input::all(), $rules);\r\n\r\n\t\t//process\r\n\t\tif ($validator->fails()) {\r\n\t\t\treturn Redirect::to('services/edit')\r\n\t\t\t\t->withErrors($validator)\r\n\t\t\t\t->withInput();\r\n\t\t} else {\r\n\t\t\t// store service\r\n\t\t\t$service = Service::find($id);\r\n\t\t\t$service->name \t \t= Input::get('name');\r\n\t\t\t$service->estimated_days\t= Input::get('estimated_days');\r\n\t\t\t$service->is_active = Input::get('is_active');\r\n\t\t\t$service->database = Input::get('database');\r\n\t\t\t$service->tabel = Input::get('tabel');\r\n\t\t\t$service->save();\r\n\r\n\r\n\t\t\t// redirect\r\n\t\t\tSession::flash('message', 'Successfully updated service');\r\n\t\t\treturn Redirect::to('services');\r\n\t\t}\r\n\t}", "public function update($id, UpdatePatent_ServicesRequest $request)\n {\n $patentServices = $this->patentServicesRepository->find($id);\n\n if (empty($patentServices)) {\n Flash::error('Patent Services not found');\n\n return redirect(route('patentServices.index'));\n }\n\n $patentServices = $this->patentServicesRepository->update($request->all(), $id);\n\n Flash::success('Patent Services updated successfully.');\n\n return redirect(route('patentServices.index'));\n }", "public function update(ServiceRequest $request, Service $service)\n {\n foreach ($service->sections as $section) {\n Section::find($section->id)->delete();\n }\n $price = str_replace(',', '', $request->input('price'));\n $request->merge(['price' => $price]);\n $service->update($request->all());\n foreach ($request->input('sections') as $section) {\n $service->sections()->create([\n 'title' => $section['title'],\n 'content' => $section['content']\n ]);\n }\n session()->flash('flash_message', 'Se ha actualizado el servicio: '.$service->title);\n return redirect('servicios');\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function update(Request $request, Services $services)\n {\n //\n $service_update = Services::find($request->id_update);\n $kind = $request->kind_update;\n $service_update->service = $request->service_update;\n $service_update->price = $request->price_update;\n $service_update->unit = $request->unit_update;\n $service_update->save(); \n return redirect('admin/services?kind='.$kind);\n }", "public function update(Request $request, $id)\n {\n //validate the user form data \n $request->validate([\n 'Title'=>'required', \n 'type'=>'required',\n 'date'=> 'required',\n 'venue'=> 'required',\n 'address'=>'required', \n 'preacher'=>'required',\n 'sermon_title'=>'required', \n 'bible_references'=>'required',\n 'givings'=> 'required',\n 'attendees'=> 'required',\n 'sermon_notes'=> 'required',\n 'first_timers'=>'required|nullable',\n ]);\n\n \n\n\n\n\n //inserting data into the database \n $services = Service::find($id);\n $services->Title = $request->input('Title');\n $services->type = $request->input('type');\n $services->date = $request->input('date');\n\n $services->venue = $request->input('venue');\n $services->address = $request->input('address');\n\n $services->preacher = $request->input('preacher');\n \n $services->sermon_title = $request->input('sermon_title');\n \n $services->bible_references = $request->input('bible_references');\n \n $services->sermon_notes = $request->input('sermon_notes');\n $services->attendees = $request->input('attendees');\n $services->first_timers= $request->input('first_timers');\n $services->givings = $request->input('givings');\n \n \n \n\n \n $services->save();\n\n //redirecting to the user dashboard after creating a new service\n return redirect('/admin/services/view');\n }", "public function update(CreateServiceRequest $request, Services $service)\n {\n DB::beginTransaction();\n try{\n\n $this->saveServices($service, $request);\n\n DB::commit();\n\n return redirect()->route('services.index')->with('status', 'Created Successfully');\n\n } catch(Exception $e) {\n DB::rollBack();\n Log::error($e->getMessage());\n return response(['status' => \"Can't Store Data\"], 500);\n }\n\n }", "public function update(ServiceRequest $request, $id)\n {\n $service = Service::where('id',$id)->first();\n $service->fill($request->except('_token'));\n $service->update();\n return redirect(route('service.index'));\n\n }", "public function update(CreateServiceRequest $request, Service $service)\n {\n $data = $request->only('title','price');\n $service->update($data);\n return redirect('/services');\n }", "public function update(UpdateServiceRequest $request, Service $service)\n {\n if ($request->hasFile('image_file')) {\n $image = $this->uploadImage($request->file('image_file'), $service->image);\n //merge request with image variable to save it's name\n $request->merge(['image' => $image]);\n }\n $status = $service->update($request->only(\"image\", \"name\", \"details\"));\n if ($status)\n return $this->successResponse(route(\"services.index\"), 'Updated Successfully');\n return $this->failResponse();\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'service_name' => 'required',\n 'address' => 'required',\n 'type' => 'required',\n ], [\n 'service_name.required' => 'Título es requerido',\n 'address.required' => 'Dirección es requerida',\n 'type.required' => 'Tipo es requerida',\n ]);\n\n $service = Service::find($id);\n $service->service_name = $request->get('service_name');\n $service->address = $request->get('address');\n $service->telephone = $request->get('telephone');\n $service->type = $request->get(\"type\");\n $service->save();\n return response()->json([\n 'message' => 'Service updated successfully!'\n ], 200);\n\n }", "public function update($id)\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, Service::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$service = $this->service->find($id);\n\t\t\t$service->update($input);\n\n\t\t\treturn Redirect::route('services.show', $id);\n\t\t}\n\n\t\treturn Redirect::route('services.edit', $id)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function update(ServicesFormRequest $request)\n {\n $id = $request->input('id');\n $service = \\App\\Services::find($id);\n $service->title = $request->input('title');\n $service->summary = $request->get('summary');\n $service->description = $request->get('description');\n $service->price = $request->get('price');\n $service->display_order = $request->get('display_order');\n $service->is_active = $request->has('is_active') ? 1 : 0;\n $service->save();\n @$message .= 'Service updated.<br/>';\n $fileprefix = 'service-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $service->image = $filepath . $fileprefix . $filename;\n $service->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('/admin/services/edit/' . $id)->withMessage($message);\n }", "public function update(ServicosRequest $request, $id)\n {\n $servico = Servico::find($id)->update($request->all());\n return redirect('servicos');\n }", "public function set($name, $service, $context='default')\n {\n $this->getServices()->set($name, $service, $context);\n }", "public function updated(Service $service)\n {\n //\n }", "public function addEnabledService($service, string $id)\n {\n $this->enabledServices[$id] = $service;\n }", "public function update(ServiceUpdateRequest $request)\n {\n $service = Service::FindOrfail($request->id);\n $service->name = $request->name;\n $service->image = $request->image ? $request->file('image')->store('public') : $service->image;\n $service->service_type = $request->service_type;\n $service->start_date = $request->start_date;\n $service->end_date = $request->end_date;\n $service->observations = $request->observations;\n $service->update();\n return redirect()->route('client.show', ['id' => $request->idClient])->with('success', 'Servicio actualizado correctamente');\n }", "public function setServices($services) {\n $this->services = $services;\n }", "public function set(string $serviceKey, $service, bool $overwrite = false);", "public function update(Request $request, $id,UpdateServices $updateServices)\n {\n $data = $updateServices->handle($request,$id);\n return response()->json([\n 'message' => 'Success update Post',\n 'data' => $data\n ]);\n }" ]
[ "0.6380666", "0.62324464", "0.5919333", "0.5919333", "0.58397144", "0.58376795", "0.57909834", "0.57553625", "0.5730894", "0.56645685", "0.56523824", "0.56523824", "0.56523824", "0.56355286", "0.5635331", "0.5605908", "0.5605109", "0.5550786", "0.5541963", "0.5457121", "0.54431885", "0.5415322", "0.5396485", "0.5387624", "0.53767353", "0.53732985", "0.53634715", "0.53620714", "0.5355225", "0.5344618" ]
0.72101194
0
Operation listsServicesServiceIdDelete Deletes a service specified by serviceId.
public function listsServicesDelete($service_id) { $serive = Services::destroy($service_id); if($serive){ return response()->json(['msg' => 'Deleted the servie']); }else{ return response('Oops, seems like something went wrong while deleting the service'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteService($service_id) {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\tif(empty($service_id)) {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\"message\" => \"Parametros incorrectos, service_id es requerido\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\t$service = ServicesOrder::where(\"id_client\", $user->id)->where(\"id\", $service_id)->first();\n\n\t\t\t\tif($service) {\n\t\t\t\t\t$service->status = 6;\n\t\t\t\t\t$service->save();\n\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\"message\" => \"Servicio borrado exitosamente\",\n\t\t\t\t\t\t\"response\" => array(\"service\" => $service)\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\t\"message\" => \"El servicio que intenta borrar no existe\",\n\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $id = $model->service_id;\n $model->delete();\n\n return $this->redirect(['/admin/services/edit', 'id' => $id]);\n }", "public function delete($id, Service $service)\n {\n try {\n $delete = $this->apiCrudHandler->delete($id, Service::class);\n return $this->sendResponse($delete);\n } catch (Exception $e) {\n return $this->sendError($e->getMessage());\n } \n }", "public function delete_user_services_by_id($id)\n\t{\n\t\t\n\t\t\t\n\t\t$this->db->trans_start();\n\t\t\n\t\t$this->db->where('user_services_id', $id);\n\t\t$this->db->delete('user_services');\n\t\t\n\t\t$this->db->trans_complete();\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t}", "public function destroy($id)\n {\n $services = Service::find($id);\n $services->delete();\n\n return redirect('/admin/services/view');\n }", "public function destroy($id)\n {\n $delete = Service::DeleteService($id);\n\t\tif($delete){\n\t\t\treturn [\"status\"=>\"success\",\"message\"=>\"Service Deleted\"];\n\t\t}else{\n\t\t\treturn [\"status\"=>\"failed\",\"message\"=>\"Failed To Delete\"];\n\t\t}\n }", "public function delete($id)\n {\n Assert::integerish($id, __METHOD__ . 'expects $id to be an integer');\n return $this->call('DELETE', \"/shipping/services/{$id}.json\");\n }", "public function deleteAction($serviceid) {\n $this->require_login('ROLE_ADMIN', 'service/delete/' . $serviceid);\n\n $service = Admin::getService($serviceid);\n\n // If there are purchases, we're out of here\n if (Admin::is_purchases($serviceid)) {\n $haspurchases = true;\n } else {\n $haspurchases = false;\n\n // anything submitted?\n if ($data = $this->getRequest()) {\n\n // Delete?\n if (!empty($data['delete'])) {\n Admin::deleteService($service);\n }\n $this->redirect('service/index');\n }\n }\n\n $this->View('service/delete', array(\n 'service' => $service,\n 'haspurchases' => $haspurchases,\n ));\n }", "public function delete($id)\n {\n $information = Service::find($id)->delete();\n return redirect('/services');\n }", "public function destroy($id)\n {\n $service = Service::findOrFail($id);\n $service->delete();\n \n // redirect\n return redirect('/services');\n }", "public function deleteServiceActv($id)\n {\n //se verifica si el registro existe\n $actvServicio = ActividadServicio::find($id);\n if (is_null($actvServicio)) {\n return response()->json(['message' => 'Registro no encontrado'], 404);\n }\n $actvServicio->delete();\n return response()->json(['message' => 'Registro eliminado'], 200);\n }", "public function destroy($id)\r\n\t{\r\n\t\t$service = Service::find($id)->delete();\r\n\t\tSession::flash('message', 'Successfully deleted service');\r\n\t\treturn Redirect::to('services');\r\n\t}", "public function listsServicesByIdGet($service_id)\r\n {\r\n $response = Services::findOrFail($service_id);\r\n return response()->json($response,200);\r\n }", "public function destroy($id)\n {\n $services = Services::where('id', '=', $id)->delete();\n \n if($services == 1) {\n $success = true;\n $message = \"Services deleted successfully\";\n } else {\n $success = false;\n $message = \"Services not deleted\";\n }\n return response()->json([\n 'success' => $success,\n 'message' => $message,\n ]);\n }", "public function destroy($id)\n {\n if (Gate::denies('service.delete',ServiceType::findOrFail($id))) {\n session()->flash('warning', 'You do not have permission to edit a service');\n return redirect()->back();\n }\n $service = ServiceType::where('id', $id)->first();\n $service->delete();\n session()->flash('success', 'Service Deleted');\n return redirect()->route('service.index');\n }", "public function destroy($id)\n {\n $services=Services::find($id);\n\t\t$services->delete();\n\t\treturn redirect()->route('services.index')->with('success','Data Deleted');\n\t\t\n }", "public function destroy($id)\n {\n $service = Service::find($id);\n $service->delete();\n\n return Redirect::to('/admin/services');\n }", "public function deleteService(int $id):bool\n {\n $deleteService = $this->pdo->prepare('DELETE FROM services WHERE id = :id');\n\n return $deleteService->execute(array( ':id' => $id));\n\n }", "public function destroy($id)\n {\n $Service_Type = \\Blegrator\\Servicetype::find($id);\n if (is_null($Service_Type)) {\n return $this->responseWithNotFound();\n }\n\n // Delete Image\n foreach (['icon', 'coverphoto'] as $img_field) {\n if (!empty($Service_Type->{$img_field})) {\n File::deleteImageWithOriginal(\\Blegrator\\Servicetype::$Image_Path, $Service_Type->{$img_field});\n }\n }\n\n // Delete Service Type\n $Service_Type->delete();\n\n // Return Removed\n return $this->responseWithRemovedItem();\n }", "public function removeService($project_id, $service_name)\n {\n return $this->delete($this->getProjectPath($project_id, 'services/'.$this->encodePath($service_name)));\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $images = ClinicServicesImages::find()->where(['service_id' => $id])->all();\n\n foreach ($images as $image) {\n $this->actionDeleteimage($image->id);\n }\n\n $model->delete();\n return $this->redirect(['index']);\n }", "public function destroy(Services $service)\n {\n $service->delete();\n }", "public function destroy($id)\n {\n ServiceType::find($id)->delete();\n return redirect()->back()->with('message', ' Delete Service Successfully');\n }", "public function destroy($id)\n {\n $service = Services::find($id);\n $service->delete();\n \n return redirect()->back();\n }", "public function actionDelete($id, $serviceCategoriesId, $hairdressersId)\n {\n $this->findModel($id, $serviceCategoriesId, $hairdressersId)->delete();\n\n return $this->redirect(['index']);\n }", "public function destroy($id)\n {\n $service = list_services::find($id);\n $service->delete();\n return redirect('services')->with('thongbao','Xóa thành công');\n }", "public function destroy($id)\n {\n Service::destroy($id);\n\n Session::flash('flash_message', 'Service deleted!');\n\n return redirect('admin/service');\n }", "public function destroy(Service $id)\n {\n if(file_exists(public_path().'/uploads/images/services/icon/'.$id->icons))\n @unlink(public_path().'/uploads/images/services/icon/'.$id->icons);\n\n if(file_exists(public_path().'/uploads/images/services/image/'.$id->image))\n @unlink(public_path().'/uploads/images/services/image/'.$id->image);\n\n if(file_exists(public_path().'/uploads/images/services/image/thumbnail/'.$id->thumbnail))\n @unlink(public_path().'/uploads/images/services/image/thumbnail/'.$id->thumbnail);\n\n\n $id->delete();\n $delete = true;\n\n return redirect()->route('services', ['delete' => $delete])->with('status', 'Service deleted successfully');\n }", "public function cancelService($service_id) {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\tif(empty($service_id)) {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\"message\" => \"Parametros incorrectos, service_id es requerido\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\t$service = ServicesOrder::where(\"id_client\", $user->id)->where(\"id\", $service_id)->first();\n\n\t\t\t\tif($service) {\n\t\t\t\t\t$service->status = 5;\n\t\t\t\t\t$service->save();\n\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\t\"message\" => \"Servicio cancelado exitosamente\",\n\t\t\t\t\t\t\"response\" => array(\"service\" => $service)\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\t\"code\" => 400,\n\t\t\t\t\t\t\"message\" => \"El servicio que intenta cancelar no existe\",\n\t\t\t\t\t\t\"response\" => null\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function delete_service_type($ID_SERVICE_TYPE)\n {\n return $this->db->delete('SERVICE_TYPE',array('ID_SERVICE_TYPE'=>$ID_SERVICE_TYPE));\n }" ]
[ "0.6547882", "0.62994665", "0.6100552", "0.6059987", "0.586158", "0.585149", "0.5805778", "0.580275", "0.577303", "0.5748993", "0.56888115", "0.56669676", "0.561003", "0.55932647", "0.55648965", "0.55515397", "0.554832", "0.5531086", "0.549583", "0.5493261", "0.5467879", "0.5465636", "0.5460062", "0.54292375", "0.5408102", "0.5393888", "0.5390457", "0.53888315", "0.53865695", "0.5366633" ]
0.71792686
0
/////////////////////////// Changereasons functions // ///////////////////////// Operation listsChangereasonGet Fetch Change Reasons (for select options).
public function listsChangereasonget() { $response = ChangeReason::all(); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public function listsChangereasonput($changereason_id)\r\n {\r\n $input = Request::all();\r\n $reason = ChangeReason::findOrFail($changereason_id);\r\n $reason->update([ 'name' => $input['name'] ]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated change']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update reason');\r\n }\r\n }", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "function mfcs_get_request_problems_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_PROBLEM_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_PROBLEM_CONFLICT] = 'Conflict';\n $options_all[MFCS_REQUEST_PROBLEM_STALE] = 'Stale';\n $options_all[MFCS_REQUEST_PROBLEM_STUCK] = 'Stuck';\n $options_all[MFCS_REQUEST_PROBLEM_BLOCKED] = 'Blocked';\n $options_all[MFCS_REQUEST_PROBLEM_COORDINATOR] = 'Coordinator Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_REQUESTER] = 'Requester Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_ROOM] = 'Room Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_BUILDING] = 'Building Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_LOCATION] = 'Location Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_CACHE_REQUEST] = 'Cache Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_HOLIDAY] = 'Holiday Conflict';\n $options_all[MFCS_REQUEST_PROBLEM_UNAVAILABLE] = 'Room Unavailable';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "function mfcs_get_log_problems_list_options($option = NULL, $type = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_LOG_PROBLEMS_NONE] = 'None';\n }\n\n $options_all[MFCS_LOG_PROBLEMS_INSERT] = 'Insert';\n $options_all[MFCS_LOG_PROBLEMS_UPDATE] = 'Update';\n $options_all[MFCS_LOG_PROBLEMS_DELETE] = 'Delete';\n $options_all[MFCS_LOG_PROBLEMS_RESYNC] = 'Re-Synchronize';\n $options_all[MFCS_LOG_PROBLEMS_IGNORE] = 'Ignore';\n $options_all[MFCS_LOG_PROBLEMS_UNIGNORE] = 'Unignore';\n $options_all[MFCS_LOG_PROBLEMS_RECHECK] = 'Re-Check';\n $options_all[MFCS_LOG_PROBLEMS_REASSIGN_VENUE_COORDINATOR] = 'Re-assign Venue Coordinator';\n $options_all[MFCS_LOG_PROBLEMS_REASSIGN_REQUESTER] = 'Re-assign Requester';\n $options_all[MFCS_LOG_PROBLEMS_REASSIGN_REBUILD_CACHE] = 'Rebuild Cache';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n if ($type == 'requests') {\n foreach (array(MFCS_LOG_PROBLEMS_NONE, MFCS_LOG_PROBLEMS_IGNORE, MFCS_LOG_PROBLEMS_UNIGNORE, MFCS_LOG_PROBLEMS_RECHECK, MFCS_LOG_PROBLEMS_REASSIGN_VENUE_COORDINATOR, MFCS_LOG_PROBLEMS_REASSIGN_REQUESTER, MFCS_LOG_PROBLEMS_REASSIGN_REBUILD_CACHE) as $option_id) {\n if (array_key_exists($option_id, $options_all)) {\n $options[$option_id] = $options_all[$option_id];\n }\n }\n }\n elseif ($type == 'basic') {\n foreach (array(MFCS_LOG_PROBLEMS_NONE, MFCS_LOG_PROBLEMS_INSERT, MFCS_LOG_PROBLEMS_UPDATE, MFCS_LOG_PROBLEMS_DELETE, MFCS_LOG_PROBLEMS_RESYNC, MFCS_LOG_PROBLEMS_IGNORE, MFCS_LOG_PROBLEMS_UNIGNORE, MFCS_LOG_PROBLEMS_RECHECK) as $option_id) {\n if (array_key_exists($option_id, $options_all)) {\n $options[$option_id] = $options_all[$option_id];\n }\n }\n }\n else {\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n }\n\n asort($options);\n\n return $options;\n}", "public function listsNonaadherencereasonget()\r\n {\r\n $response = NonAdherenceReason::all();\r\n return response()->json($response,200);\r\n }", "public function getStatusList()\n {\n return ['0' => __('修改'), '1' => __('提议'), '2' => __('新增'), '3' => __('废止')];\n }", "public function get_reason() {\r\r\n\r\r\n $qr = query(\"SELECT DISTINCT reason_deleting FROM worknamedeleting \");\r\r\n\r\r\n\r\r\n\r\r\n $res = $qr->result();\r\r\n\r\r\n header('Content-Type: application/json; charset=utf-8');\r\r\n\r\r\n echo json_encode($res);\r\r\n\r\r\n }", "public static function reasons()\n {\n return [\n 'VIOLENCE' => static::VIOLENCE,\n 'CHILD_ABUSE' => static::CHILD_ABUSE,\n 'PROMOTES_TERRORISM' => static::PROMOTES_TERRORISM,\n 'COPYRIGHT' => static::COPYRIGHT,\n ];\n }", "public function getContactReasonOptions()\n {\n $options = array(\n 1 => \"Item Faulty\",\n 4 => \"Item Damaged\",\n 2 => \"Item not as described\",\n 3 => \"Item ordered incorrectly\",\n 6 => \"Change of mind\",\n 8 => \"Other\"\n );\n return $options;\n }", "function changeReasonAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$update = array();\n\t\t\t$update['closed_reason'] = $request['reason'];\n\t\t\t$quote_obj = new Ep_Quote_Quotes();\n\t\t\t$quote_obj->updateQuote($update,$request['quote_id']);\n\t\t}\n\t}", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "protected function reasonAjax()\n\t{\t\t\n\t\t$remove = array(\n\t\t\t'date'\t\t=> NULL,\n\t\t\t'time'\t\t=> NULL,\n\t\t\t'unlimited'\t=> TRUE,\n\t\t);\n\t\t\n\t\tif ( \\IPS\\Request::i()->id == 'other' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( array(\n\t\t\t\t'points'\t\t\t=> 0,\n\t\t\t\t'points_override'\t=> TRUE,\n\t\t\t\t'remove'\t\t\t=> $remove,\n\t\t\t\t'remove_override'\t=> TRUE,\n\t\t\t)\t);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\t\n\t\t\t$reason = \\IPS\\core\\Warnings\\Reason::load( \\IPS\\Request::i()->id );\n\t\t\t\n\t\t\t/* Add in the remove properties */\n\t\t\tif ( $reason->remove )\n\t\t\t{\n\t\t\t\t$date = \\IPS\\DateTime::create();\n\t\t\t\tif ( $reason->remove_unit == 'h' )\n\t\t\t\t{\n\t\t\t\t\t$date->add( new \\DateInterval( \"PT{$reason->remove}H\" ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$date->add( new \\DateInterval( \"P{$reason->remove}D\" ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$remove = array(\n\t\t\t\t\t'date'\t\t=> $date->format( 'Y-m-d' ),\n\t\t\t\t\t'time'\t\t=> $date->format( 'H:i' ),\n\t\t\t\t\t'unlimited'\t=> FALSE\n\t\t\t\t);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\\IPS\\Output::i()->json( array(\n\t\t\t\t'points'\t\t\t=> $reason->points,\n\t\t\t\t'points_override'\t=> $reason->points_override,\n\t\t\t\t'remove'\t\t\t=> $remove,\n\t\t\t\t'remove_override'\t=> $reason->remove_override,\n\t\t\t)\t);\n\t\t}\n\t\t\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( array(\n\t\t\t\t'points'\t\t\t=> 0,\n\t\t\t\t'points_override'\t=> FALSE,\n\t\t\t\t'remove'\t\t\t=> $remove,\n\t\t\t\t'remove_override'\t=> FALSE,\n\t\t\t)\t);\n\t\t}\n\t}", "public function getStatusDescriptions()\n {\n $statuses = $this->getSortedStatuses();\n // concatenate the descriptions\n $reasons = [];\n foreach($statuses as $s) {\n $reason = $s->getReason();\n if ($reason) {\n $reasons[] = $reason;\n }\n }\n if (!empty($reasons)) {\n return $reasons;\n }\n return null;\n }", "public function retrieveUserActionReasons()\n {\n return $this->start()->uri(\"/api/user-action-reason\")\n ->get()\n ->go();\n }", "public function getReason()\n {\n }", "public function getReason()\n {\n }", "public function getDescriptionList() {\n return $this->_get(7);\n }", "public function getDescriptionList() {\n return $this->_get(3);\n }", "public function getDescriptionList() {\n return $this->_get(3);\n }", "public function getReason();", "public function getReason();", "public function update_reason_list($id)\n {\n $reason_list = $this->cancellation_reason->where('id',$id)->get();\n\n return view('update_cancellation_reason',['reason_list'=>$reason_list]);\n }", "public function actionWarnmessage() {\n $model = new \\common\\models\\WarningReasons();\n $reason_array = array('Please Select');\n if (Yii::$app->request->post()) {\n $post = Yii::$app->request->post();\n $value = $post['value'];\n\n $reasons = $model->find()->where(['type' => $value])->all();\n\n foreach ($reasons as $reason) {\n $reason_array[$reason['options']] = $reason['options'];\n }\n }\n echo json_encode($reason_array);\n die;\n }", "function GetReasonList($reasonIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetReasonList\", array(\"ReasonIds\"=>$reasonIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getDescriptionList() {\n return $this->_get(4);\n }", "public function getDescriptionList() {\n return $this->_get(4);\n }", "public function getDifferentLanguages()\n\t{\n\t\t$sql = <<<TRANSLATIONS\nSELECT\n\t*\nFROM\n\t`i18n_language_codes`\nWHERE l10n IS NOT NULL\nORDER BY\n\tenglish_name ASC\nTRANSLATIONS;\n\n\treturn $this->GetArray( $sql, array( 'tag' => 'List of different languages in DB' ) );\n\t}" ]
[ "0.6950734", "0.6738137", "0.6583615", "0.63204265", "0.61398405", "0.54680496", "0.5436786", "0.5432384", "0.5417683", "0.5389367", "0.5323888", "0.5302068", "0.5121556", "0.5118289", "0.508276", "0.5044917", "0.5044063", "0.50394976", "0.50394976", "0.50301844", "0.5006057", "0.5006057", "0.5003461", "0.5003461", "0.500172", "0.49523455", "0.49372664", "0.49061167", "0.49061167", "0.49024656" ]
0.7837603
0
Operation listsChangereasonChangereasonIdGet Fetch Change Reason specified by changereasonId.
public function listsChangereasonByIdget($changereason_id) { $response = ChangeReason::findOrFail($changereason_id); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsChangereasonput($changereason_id)\r\n {\r\n $input = Request::all();\r\n $reason = ChangeReason::findOrFail($changereason_id);\r\n $reason->update([ 'name' => $input['name'] ]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated change']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update reason');\r\n }\r\n }", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "function GetReason($reasonId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReason\", array(\"ReasonId\"=>$reasonId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "public function getControlListchanges($risk_id) \n\t{\n\t\t$sql = \"select a.*\n\t\t\t\tfrom t_risk_control_change a\n\t\t\t\twhere a.risk_id = ? and switch_flag='P' \";\n\t\t$par = array('uid' => $risk_id);\n\t\t\n\t\t$query = $this->db->query($sql, $par);\n\t\t$res = array();\n\t\tforeach($query->result_array() as $row) {\n\t\t\t$res[] = $row;\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getPendingChangeByRiskId($risk_id) {\n\t\t$sql = \"select \n\t\t\t\ta.*\n\t\t\t\tfrom t_cr_risk a \n\t\t\t\twhere a.cr_status = 0 and a.risk_id = ? \";\n\t\t$query = $this->db->query($sql, array('divid' => $risk_id));\n\t\t$row = $query->row_array();\n\t\treturn $row;\n\t}", "public function getRiskImpactchanges($risk_id) \n\t{\n\t\t$sql = \"select * from t_risk_impact_change\n\t\t\t\twhere risk_id = ? and switch_flag='P' \";\n\t\t$par = array('uid' => $risk_id);\n\t\t\n\t\t$query = $this->db->query($sql, $par);\n\t\t$res = array();\n\t\tforeach($query->result_array() as $row) {\n\t\t\t$res[] = $row;\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public function getRiskByIdchanges($risk_id) \n\t{\n\t\t$sql = \"select \n\t\t\t\ta.*,\n\t\t\t\tb.ref_value as risk_status_v,\n\t\t\t\tc.ref_value as risk_level_v,\n\t\t\t\td.ref_value as impact_level_v,\n\t\t\t\te.l_title as likelihood_v,\n\t\t\t\tf.division_name as risk_owner_v,\n\t\t\t\tg.division_name as division_v,\n\t\t\t\tt_risk_add_user.username,\n\t\t\t\tconcat(h.cat_code, '- Category ', h.cat_name) as risk_category_v,\n\t\t\t\tconcat(i.cat_code, '- Category ', i.cat_name) as risk_sub_category_v,\n\t\t\t\tconcat(j.cat_code, '- Category ', j.cat_name) as risk_2nd_sub_category_v,\n\t\t\t\tk.ref_value as treatment_v,\n\t\t\t\tl.display_name as risk_input_by_v,\n\t\t\t\tm.division_name as risk_input_division_v,\n\t\t\t\tn.risk_code as risk_library_code\n\t\t\t\tfrom t_risk_change a \n\t\t\t\tleft join m_reference b on a.risk_status = b.ref_key and b.ref_context = 'risk.status.user'\n\t\t\t\tleft join m_reference c on a.risk_level = c.ref_key and c.ref_context = 'risklevel.display'\n\t\t\t\tleft join m_reference d on a.risk_impact_level = d.ref_key and d.ref_context = 'impact.display'\n\t\t\t\tleft join m_likelihood e on a.risk_likelihood_key = e.l_key\n\t\t\t\tleft join m_division f on a.risk_owner = f.division_id\n\t\t\t\tleft join m_division g on a.risk_division = g.division_id\n\t\t\t\tleft join m_risk_category h on a.risk_category = h.cat_id\n\t\t\t\tleft join m_risk_category i on a.risk_sub_category = i.cat_id\n\t\t\t\tleft join m_risk_category j on a.risk_2nd_sub_category = j.cat_id\n\t\t\t\tleft join m_reference k on a.suggested_risk_treatment = k.ref_key and k.ref_context = 'treatment.status'\n\t\t\t\tleft join m_user l on a.risk_input_by = l.username\n\t\t\t\tleft join m_division m on a.risk_input_division = m.division_id\n\t\t\t\tleft join t_risk n on a.risk_library_id = n.risk_id\n\t\t\t\tleft join t_risk_add_user on a.risk_id = t_risk_add_user.risk_id\n\t\t\t\t\n\t\t\t\twhere a.risk_id = ? \";\n\t\t$query = $this->db->query($sql, array('divid' => $risk_id));\n\t\t$row = $query->row_array();\n\t\t\n\t\tif ($row) {\n\t\t\t$row['impact_list'] = $this->getRiskImpactchanges($risk_id);\n\t\t\t$row['action_plan_list'] = $this->getActionPlanchanges($risk_id);\n\t\t\t$row['control_list'] = $this->getControlListchanges($risk_id);\n\t\t\t$row['objective_list'] = $this->getObjectiveListChange2($risk_id);\n\t\t}\n\t\t\n\t\treturn $row;\n\t}", "public function update_reason_list($id)\n {\n $reason_list = $this->cancellation_reason->where('id',$id)->get();\n\n return view('update_cancellation_reason',['reason_list'=>$reason_list]);\n }", "public function getActionPlanchanges($risk_id) \n\t{\n\t\t$sql = \"select a.*,\n\t\t\t\tdate_format(a.due_date, '%d-%m-%Y') as due_date_v,\n\t\t\t\tb.division_name as division_v\n\t\t\t\tfrom t_risk_action_plan_change a\n\t\t\t\tleft join m_division b on a.division = b.division_id \n\t\t\t\twhere a.risk_id = ? and switch_flag='P' \";\n\t\t$par = array('uid' => $risk_id);\n\t\t\n\t\t$query = $this->db->query($sql, $par);\n\t\t$res = array();\n\t\tforeach($query->result_array() as $row) {\n\t\t\t$res[] = $row;\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public function get_all_by($id_reason){\n\t\t$this->db->select('*');\n\t\t$this->db->from('reason'); \n\t\t$this->db->where('id_reason',$id_reason); \n\t\t$query_result=$this->db->get();\n\t\t$result=$query_result->result();\n\t\treturn $result;\n\t}", "function getChangeRequests($surferId) {\n $sql = \"SELECT surferchangerequest_data, surferchangerequest_type\n FROM %s\n WHERE surferchangerequest_surferid='%s'\n ORDER BY surferchangerequest_time DESC\";\n $params = array($this->tableChangeRequests, $surferId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $params)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n if (!isset($result[ $row['surferchangerequest_type' ]])) {\n $result[ $row['surferchangerequest_type'] ] = $row['surferchangerequest_data'];\n }\n }\n return $result;\n }\n return FALSE;\n }", "public function get_reason() {\r\r\n\r\r\n $qr = query(\"SELECT DISTINCT reason_deleting FROM worknamedeleting \");\r\r\n\r\r\n\r\r\n\r\r\n $res = $qr->result();\r\r\n\r\r\n header('Content-Type: application/json; charset=utf-8');\r\r\n\r\r\n echo json_encode($res);\r\r\n\r\r\n }", "public function v1PropertyTemplatesClaimsClaimTemplateIdStatusChangeReasonsGet($claim_template_id, $accept_language = null)\n {\n list($response) = $this->v1PropertyTemplatesClaimsClaimTemplateIdStatusChangeReasonsGetWithHttpInfo($claim_template_id, $accept_language);\n return $response;\n }", "function GetReasonSold($reasonSoldId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReasonSold\", array(\"ReasonSoldId\"=>$reasonSoldId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getReason();", "public function getReason();", "public function getReasonCode();", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], GoogleCloudDialogflowCxV3Changelog::class);\n }", "public function getrejectBerkas($id)\n\t{\n\t\t$query = $this->db->where('id_lomba', 1)\n\t\t->where('status_tim', 0)\n\t\t->order_by(\"id_tim\", \"desc\")\n\t\t->get('tim');\n\t\treturn $query->result();\n\t}", "public function getReason()\n {\n }", "public function getReason()\n {\n }", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function getReasonReference()\n {\n return $this->reasonReference;\n }", "public function getReasonCode()\n {\n return $this->reasonCode;\n }", "function GetReasonList($reasonIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetReasonList\", array(\"ReasonIds\"=>$reasonIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getReason()\n\t{\n\t\treturn $this->reason;\n\t}" ]
[ "0.70631766", "0.6992944", "0.6590731", "0.591398", "0.58423525", "0.5819464", "0.5548332", "0.5481365", "0.54550314", "0.54167897", "0.5328435", "0.53172934", "0.5315027", "0.52465236", "0.5175091", "0.50771916", "0.50562185", "0.49742934", "0.49742934", "0.49727884", "0.4971348", "0.4924431", "0.49102414", "0.49102414", "0.48957628", "0.48957628", "0.48388413", "0.4830824", "0.48060018", "0.4760365" ]
0.7799264
0
Operation listsChangereasonPost create a Change Reason.
public function listsChangereasonpost() { $input = Request::all(); $new_reason = ChangeReason::create($input); if($new_reason){ return $this->response->created(); }else{ return $this->response->errorBadRequest(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function listsChangereasonput($changereason_id)\r\n {\r\n $input = Request::all();\r\n $reason = ChangeReason::findOrFail($changereason_id);\r\n $reason->update([ 'name' => $input['name'] ]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated change']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update reason');\r\n }\r\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public function postCreate()\n {\n $chooseReason = $this->chooseReasons->create(Input::get('ChooseReason'));\n\n return Redirect::to('/admin/choose-reason/edit/'.$chooseReason->id)->with('success', 'Choose reason created successfully');\n }", "function changeReasonAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$update = array();\n\t\t\t$update['closed_reason'] = $request['reason'];\n\t\t\t$quote_obj = new Ep_Quote_Quotes();\n\t\t\t$quote_obj->updateQuote($update,$request['quote_id']);\n\t\t}\n\t}", "public function setReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->reason = $var;\n\n return $this;\n }", "public function setReason($reason);", "public function setReason(\\DedexBundle\\Entity\\Ern382\\ReasonType $reason)\n {\n $this->reason = $reason;\n return $this;\n }", "public function run()\n {\n DB::table('reasons')->delete();\n\n reason::create([\n 'name-reason' => 'Terrorismo'\n ]);\n reason::create([\n 'name-reason' => 'Infracción de derechos'\n ]);\n reason::create([\n 'name-reason' => 'Spam'\n ]);\n reason::create([\n 'name-reason' => 'Contenido violento'\n ]);\n reason::create([\n 'name-reason' => 'Contenido sexual'\n ]);\n reason::create([\n 'name-reason' => 'Incumplimiento'\n ]);\n \n /*DB::table('reasons')->insert([\n \t['name-reason' => 'Terrorismo'],\n \t['name-reason' => 'Infracción de derechos'],\n \t['name-reason' => 'Spam'],\n \t['name-reason' => 'Contenido violento'],\n \t['name-reason' => 'Contenido sexual'],\n \t['name-reason' => 'Incumplimiento']\n ]);*/\n }", "public function run()\n {\n Reason::create([\n 'name' => 'Hamil',\n 'abbreviation' => '-',\n ]);\n Reason::create([\n 'name' => 'Ingin Anak Segera',\n 'abbreviation' => 'IAS',\n ]);\n Reason::create([\n 'name' => 'Ingin Anak Tunda',\n 'abbreviation' => 'IAT',\n ]);\n Reason::create([\n 'name' => 'Tidak Ingin Anak Lagi',\n 'abbreviation' => 'TIAL',\n ]);\n }", "public function setReasonAttribute($value)\n {\n $this->reason = $value;\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n return $this;\n }", "function edithistory_edit_page()\n{\n\tglobal $db, $lang, $mybb, $post, $templates, $post_errors, $reason, $postreason;\n\t$lang->load(\"edithistory\");\n\n\tif($mybb->input['previewpost'] || $post_errors)\n\t{\n\t\t$postreason = htmlspecialchars_uni($mybb->input['reason']);\n\t}\n\telse\n\t{\n\t\t$postreason = htmlspecialchars_uni($post['reason']);\n\t}\n\n\teval(\"\\$reason = \\\"\".$templates->get(\"editpost_reason\").\"\\\";\");\n}", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function actionCreate()\n\t{\n\t\t$this->allowUser(EDITOR);\n\t\t$model=new Post;\n\t\t$model->created = date('d.m.Y');\n\t\t$languages = Language::model()->findAllByAttributes(array('active'=>1));\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif (isset($_POST['Post'])) {\n\t\t\t\n\t\t\t$attributes = $_POST['Post'];\n\t\t\t\n\t\t\t$attributes['created'] = date('Y-m-d',strtotime($attributes['created']));\n\t\t\t$attributes['modified'] = new CDbExpression('NOW()');\n\t\t\t$attributes['user_id'] = Yii::app()->user->id;\n\t\t\t$attributes['post_type_id'] = 1;\n\t\t\t$attributes['parent_id'] = null;\n\t\t\t$attributes['guid'] = urlencode($attributes['guid']);\n\t\t\tif (!is_array($attributes['term_id'])) {\n\t\t\t\t$attributes['term_id']=null;\n\t\t\t} else {\n\t\t\t\t$term_has_post = $attributes['term_id']; \n\t\t\t\t$attributes['term_id']=implode(',',$attributes['term_id']);\n\t\t\t}\n\t\t\t\n\t\t\t$model->attributes=$attributes;\n\t\t\t\n\t\t\tif ($model->save()) {\n\t\t\tforeach($languages as $language) {\n \t\t$description = new PostDescription;\n \t\t$description->attributes = array(\n \t\t'post_id' => $model->primaryKey,\n \t\t'language_id'=>$language['id'],\n \t\t'title'=>$model->name,\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$description->save();\n \t} \n\t\t\tif ($term_has_post) {\n\t\t\t\tforeach($term_has_post as $term) {\n\t\t\t\t\t$thp = new TermHasPost;\n\t\t\t\t\t$thp->attributes = array(\n\t\t\t\t\t'term_id' => $term,\n\t\t\t\t\t'post_id'=>$model->primaryKey\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$thp->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t$this->redirect(array('update','id'=>$model->id));\n\t\t\t}\n\t\t}\n\t\t$_SESSION['KCFINDER'] = array();\n\t\t$_SESSION['KCFINDER']['disabled'] = false;\n\t\t$_SESSION['KCFINDER']['uploadURL'] = \"/uploads/editors/\".md5(Yii::app()->user->id); \n\t\t\n\t\t$terms = Term::model()->findAll();\n\t\t\n\t\t$ids = array();\n\t\t$names=array();\n\t\tforeach ($terms as $term) {\n\t\t\t$ids[] = $term['id'];\n\t\t\t$names[] = $term['name'];\n\t\t}\n\t\t$array = array_combine($ids, $names);\n\t\t\n\t\t\n\t\t$model['term_id'] = explode(',',$model['term_id']);\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'terms'=>$array\n\t\t));\n\t}", "public function setReason($reason)\n\t{\n\t\t$this->reason = $reason;\n\t}", "public function update_reason_list($id)\n {\n $reason_list = $this->cancellation_reason->where('id',$id)->get();\n\n return view('update_cancellation_reason',['reason_list'=>$reason_list]);\n }", "public function getReason();", "public function getReason();", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n\n return $this;\n }", "public function getReasonCode();", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function getReasonType()\n {\n return $this->reasonType;\n }", "public function getReason()\n {\n }", "public function getReason()\n {\n }" ]
[ "0.67290795", "0.6399983", "0.6194567", "0.5875351", "0.55685616", "0.5536697", "0.54022706", "0.5305847", "0.52885014", "0.516652", "0.5092372", "0.5057192", "0.49133015", "0.48271003", "0.4813097", "0.48118225", "0.47680548", "0.47592396", "0.47589225", "0.47377142", "0.47271195", "0.47271195", "0.47204784", "0.47096246", "0.4695612", "0.46850792", "0.46850792", "0.46808052", "0.46682364", "0.46682364" ]
0.81263703
0
Operation listsChangereasonChangereasonIdPut Update an existing Change Reason.
public function listsChangereasonput($changereason_id) { $input = Request::all(); $reason = ChangeReason::findOrFail($changereason_id); $reason->update([ 'name' => $input['name'] ]); if($reason->save()){ return response()->json(['msg' => 'Updated change']); }else{ return response('Oops, seems like something went wrong while trying to update reason'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "public function setReason($reason);", "public function setReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->reason = $var;\n\n return $this;\n }", "public function update(ReasonRequest $request, $id)\n {\n $rejection = RejectionReason::find($id);\n $rejection->reason = $request->reason;\n $rejection->save();\n $url = session('SOURCE_URL');\n\n return redirect()->to($url)->with('message', trans('terms.record-successfully-saved'))->with('active_rejection', $rejection ->id);\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function update_reason_list($id)\n {\n $reason_list = $this->cancellation_reason->where('id',$id)->get();\n\n return view('update_cancellation_reason',['reason_list'=>$reason_list]);\n }", "public function setReason(\\DedexBundle\\Entity\\Ern382\\ReasonType $reason)\n {\n $this->reason = $reason;\n return $this;\n }", "public function setReason($reason)\n\t{\n\t\t$this->reason = $reason;\n\t}", "public function setReasonAttribute($value)\n {\n $this->reason = $value;\n }", "public static function updatecheers($challenge_id, $cheers)\n {\n $challenge = Challenge::find($challenge_id);\n $challenge_detail = ChallengeDetail::find($challenge->challenge_detail->id);\n\n // check if the source is from fb and the player type, if so update with the array - FHM\n\n if($cheers['likes']['challenger']['source'] == 'fb')\n {\n $challenge_detail->challenger_cheers = $cheers['likes']['challenger']['count'];\n }\n\n if($challenge_detail->challengetype_id == 2 && ($cheers['likes']['challengee']['source'] == 'fb'))\n {\n $challenge_detail->challengee_cheers = $cheers['likes']['challengee']['count'];\n }\n\n // save to db\n $challenge_detail->save();\n }", "public function merge(int $code, string $reason)\n {\n $code = $this->filterCode($code);\n $reason = $this->filterReasonPhrase($reason);\n $internalCode = $this->fetchCode($reason);\n if ((bool)$internalCode && $internalCode !== $code) {\n throw new InvalidArgumentException(\n \"The reason phrase injected is already present in the default values.\"\n );\n }\n $this->values[$code] = $reason;\n }", "function changeReasonAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$update = array();\n\t\t\t$update['closed_reason'] = $request['reason'];\n\t\t\t$quote_obj = new Ep_Quote_Quotes();\n\t\t\t$quote_obj->updateQuote($update,$request['quote_id']);\n\t\t}\n\t}", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function getReasonCode()\n {\n return $this->reason_code;\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n return $this;\n }", "public function getReasonCode()\n {\n return $this->reasonCode;\n }", "public function postEdit($id)\n {\n $inputs = Input::get('ChooseReason', array());\n\n $chooseReason = $this->chooseReasons->findOrFail($id);\n\n $chooseReason->update($inputs);\n\n return Redirect::back()->with('success', 'Choose reason updated successfully');\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n\n return $this;\n }", "public function getReasonCode();", "public function update(Request $request)\n {\n $this->validate($request, ['id' => 'required']);\n $this->checkAssignmentReasonRequest($request);\n\n DB::transaction(function () use (&$request) {\n $assignmentReason = $this->constructAssignmentReason($request);\n unset($assignmentReason['code']);\n $this->assignmentReasonDao->update(\n $request->companyId,\n $request->id,\n $assignmentReason\n );\n });\n\n $resp = new AppResponse(null, trans('messages.dataUpdated'));\n return $this->renderResponse($resp);\n }", "public function setReason(?string $value): void {\n $this->getBackingStore()->set('reason', $value);\n }", "public function setReasonCode(array $reasonCode = [])\n {\n $this->reasonCode = [];\n if ([] === $reasonCode) {\n return $this;\n }\n foreach($reasonCode as $v) {\n if ($v instanceof FHIRCodeableConcept) {\n $this->addReasonCode($v);\n } else {\n $this->addReasonCode(new FHIRCodeableConcept($v));\n }\n }\n return $this;\n }", "public function updateUserActionReason($userActionReasonId, $request)\n {\n return $this->start()->uri(\"/api/user-action-reason\")\n ->urlSegment($userActionReasonId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function setReason($s_reason) {\r\n\t\t$this->reason = $s_reason;\r\n\t}", "public function update(Request $request, $id)\n {\n //\n $donhang = Donhang::find($id);\n $donhang->kh_ma = $request->input('kh_ma');\n $donhang->dh_thoiGianDatHang = $request->input('dh_thoiGianDatHang');\n $donhang->dh_thoiGianNhanHang = $request->input('dh_thoiGianNhanHang');\n $donhang->dh_nguoiNhan = $request->input('dh_nguoiNhan');\n $donhang->dh_diaChi = $request->input('dh_diaChi');\n $donhang->dh_dienThoai = $request->input('dh_dienThoai');\n $donhang->dh_dienThoai = $request->input('dh_dienThoai');\n $donhang->dh_nguoiGui = $request->input('dh_nguoiGui');\n $donhang->dh_loiChuc = $request->input('dh_loiChuc');\n $donhang->dh_daThanhToan = $request->input('dh_daThanhToan');\n $donhang->nv_xuLy = $request->input('nv_xuLy');\n $donhang->dh_ngayXuLy = $request->input('dh_ngayXuly');\n $donhang->nv_giaoHang = $request->input('nv_giaoHang');\n $donhang->dh_ngayLapPhieuGiao = $request->input('dh_ngayLapPhieuGiao');\n $donhang->dh_ngayGiaoHang = $request->input('dh_ngayGiaoHang');\n $donhang->dh_trangThai = $request->input('dh_trangThai');\n $donhang->vc_ma = $request->input('vc_ma');\n $donhang->tt_ma = $request->input('tt_ma');\n $donhang->save();\n\n Session::flash('alert-warning', 'Cập nhật thành công ^^~!!!');\n return redirect()->route('backend.donhang.index');\n }", "public function update(Request $request, $kho_id)\n {\n $this->validate($request, [\n 'kho_ten' => 'required',\n 'kho_diachi' => 'required',\n ],[\n 'kho_ten.required' => \"Tên kho không được để trống\",\n 'kho_diachi.required' => \"Địa chỉ kho không được để trống\",\n ]);\n\n $kho = kho::where(\"kho_id\", $kho_id)->first();;\n $kho->kho_id = $request->kho_id;\n $kho->kho_ten = $request->kho_ten;\n $kho->kho_diachi = $request->kho_diachi;\n \n $kho->save();\n\n Session::flash('alert-success', 'Cập nhật thành công');\n \n return redirect()->route('admin.kho');\n }" ]
[ "0.59221447", "0.5566776", "0.5501005", "0.53532314", "0.52072465", "0.5070544", "0.5041446", "0.48830456", "0.48655033", "0.4863031", "0.48576936", "0.48082206", "0.47850683", "0.46339715", "0.46273765", "0.46257153", "0.4521535", "0.4521535", "0.44990677", "0.44821316", "0.44600043", "0.44284952", "0.44152528", "0.43699467", "0.4362221", "0.43593755", "0.43560252", "0.42694783", "0.4262362", "0.42341527" ]
0.65368325
0
Operation listsChangereasonChangereasonIdDelete Deletes a Change Reason specified by changereasonId.
public function listsChangereasondelete($changereason_id) { $deleted_change = ChangeReason::destroy($changereason_id); if($deleted_change){ return response()->json(['msg'=>'deleted reason']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public function listsChangereasonput($changereason_id)\r\n {\r\n $input = Request::all();\r\n $reason = ChangeReason::findOrFail($changereason_id);\r\n $reason->update([ 'name' => $input['name'] ]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated change']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update reason');\r\n }\r\n }", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "public function actionDelete($id,$delreason)\n {\t\t\n\t $model = Personcompany::findOne($id); \n\t if(!CommonFunctions::lockThisRecord($id,$model,'bpr_person_company','company_id_pk'))\n\t {\n\t\t\t$session = Yii::$app->session;\n\t\t\t$session->set('LockError', 'This record is locked for you, because another user is accessing same record.');\n\t\t\theader('Location:'.Yii::$app->homeUrl.\"personcompany/personcompany\");\n\t\t\texit;\n\t }\n\t \n\t\tif(strlen(trim($delreason)) > 0){\n\t\t\t$model = $this->findModel($id);\n\t\t\t\n\t\t\t$command = Yii::$app->db->createCommand()\n\t\t\t\t\t\t\t->update('bpr_person_company', ['addedby_person_id_fk'=>Yii::$app->user->id,'isDeleted'=>'1', 'reasonIsDeleted' => $delreason, 'isRestored' => '0', 'deleted_datetime' => date(\"Y-m-d H:i:s\")], 'company_id_pk='.$id)\n\t\t\t\t\t\t\t->execute();\n\t\t\t\t\t\t\t\n\t\t\tActivityLog::logUserActivity(Yii::$app->user->id,Yii::$app->params['audit_log_screen_name']['PersonCompany'],Yii::$app->params['audit_log_action']['DELETE'],'Deleted person company',\"\");\n\t\t\t\n\t\t\t$session = Yii::$app->session;\n\t\t\t$session->set('successDeleteRestore', 'Record deleted successfully.');\n\t\t}else{\n\t\t\t$session = Yii::$app->session;\n\t\t\t$session->set('errorDeleteRestore', 'Please enter valid reason.');\n\t\t}\n return $this->redirect(['index']);\n }", "public function deleteChange($changeId) {\n return $this->query(\"DELETE FROM Changes WHERE id=$changeId\");\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function listsWhostagedelete($whostage_id)\r\n {\r\n $deleted_who = whostage::destroy($whostage_id);\r\n if($deleted_who){\r\n return response()->json(['msg' => 'Deleted who stage']);\r\n }\r\n }", "public function listsInstructiondelete($instruction_id)\r\n {\r\n $deleted_instruction = Instruction::destroy($instruction_id);\r\n if($deleted_instruction){\r\n return response()->json(['msg' => 'Deleted instruction']);\r\n }\r\n }", "public function delete($companyId, $assignmentReasonId)\n {\n DB::table('assignment_reasons')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $companyId],\n ['id', $assignmentReasonId]\n ])\n ->delete();\n }", "public function actionDelete($id)\n \n\t{ \n $clausuras=\"select cod_convencion, nro_clausura from clausuras where id='\".$id.\"'\";\n $verificando1=YII::app()->db->createCommand($clausuras)->queryAll();\n \n $verificar2=\"select id from clausuras where cod_convencion='\".$verificando1[0]['cod_convencion'].\"' and nro_clausura='\".$verificando1[0]['nro_clausura'].\"'\";\n $verificando3=YII::app()->db->createCommand($verificar2)->queryAll();\n foreach($verificando3 as $valor){\n $this->loadModel($valor['id'])->delete();\n }\n \n \n\t\t\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}", "public function destroy($id)\n { $respostas = Resposta::all();\n foreach($respostas as $resposta){\n if($resposta->cdComentario == $id){\n Resposta::find($resposta->id)->delete();\n }\n }\n\n Comentario::find($id)->delete();\n return redirect('/comentario');\n }", "public function actionDelete()\n {\n $id_mata_kuliah_tayang = Yii::$app->getRequest()->getQueryParam('jk');\n $id_mahasiswa = Yii::$app->getRequest()->getQueryParam('js');\n\n $mata_kuliah_tayang = MataKuliahTayang::find()\n ->joinWith('refCpmks')\n ->where([MataKuliahTayang::tableName() . '.id' => $id_mata_kuliah_tayang])\n ->all();\n\n $count = count($mata_kuliah_tayang[0]['refCpmks']);\n\n foreach ($mata_kuliah_tayang as $key => $value) {\n foreach ($value['refCpmks'] as $key => $value) {\n $exist = CapaianMahasiswa::findOne(['id_ref_mahasiswa' => $id_mahasiswa, 'id_ref_cpmk' => $value->id]);\n // $exist->status = 0;\n $exist->delete();\n Yii::$app->session->setFlash('erro', [['Delete', 'Data Berhasil Dihapus']]);\n }\n }\n return $this->redirect(['nilai-upload', 'jk' => $id_mata_kuliah_tayang]);\n }", "public function deleteTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->delete(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }", "public function delete(string $id_or_code): array\n {\n return $this->client->delete(\"transferrecipient/{$id_or_code}\");\n }", "function deleteid($id_cekdahak)\n\t\t{\n\t\t\t$data['dahak'] = $this->Pendataan_model->Deletedahak($id_cekdahak);\n\t\t\tredirect('Cek_dahak/listdahak');\n\t\t\t//$this->load->view(\"cekdahak/form_cekdahak2\", $data);\n\t\t}", "public function deleteHolidaySchemeRevision(\n string $employerId,\n string $holidaySchemeId,\n string $effectiveDate\n ): array {\n $response = $this->guzzleClient->delete(\n \"/Employer/{$employerId}/HolidayScheme/{$holidaySchemeId}/{$effectiveDate}\"\n );\n\n return $this->getResponseData($response);\n }", "public function destroy( $id_dependencia)\n {\n Dependencia::deletedependencia($id_dependencia);\n return redirect()->route('dependencia.index');\n }", "public function deleteHolidaySchemeRevisionByNumber(\n string $employerId,\n string $holidaySchemeId,\n string $revisionNumber\n ): array {\n $response = $this->guzzleClient->delete(\n \"/Employer/{$employerId}/HolidayScheme/{$holidaySchemeId}/Revision/{$revisionNumber}\"\n );\n\n return $this->getResponseData($response);\n }", "public function actionDelete($id)\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_DELETE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n \n $model = AKPenjaminRekM::model()->deleteAllByAttributes(array('penjamin_id'=>$id));\n // $this->loadDelete($id)->delete();\n \n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function actionDelete(int $id) : array\n {\n Yii::$app->response->format = 'json';\n\n $model = Absence::findOne([\n 'event_id' => $id,\n 'kid_id' => Yii::$app->request->post('kid_id')\n ]);\n\n if ($model && $model->delete()) {\n return ['success' => 1];\n } else {\n return ['success' => 0];\n }\n }", "public function deleteUserActionReason($userActionReasonId)\n {\n return $this->start()->uri(\"/api/user-action-reason\")\n ->urlSegment($userActionReasonId)\n ->delete()\n ->go();\n }", "public function delete_holiday_list($id) {\n $this->settings_model->_table_name = \"tbl_holiday\"; //table name \n $this->settings_model->_primary_key = \"holiday_id\"; //id\n $this->settings_model->delete($id);\n $type = \"success\";\n $message = \"Holiday Information Successfully Delete!\";\n set_message($type, $message);\n redirect('admin/settings/holiday_list'); //redirect page\n }", "public function actionDelete($id) {\n if ($this->findModel($id)->delete()) {\n \\Yii::$app->response->format = 'json';\n\n return [\n \"Removed\",\n Yii::$app->urlManager->baseUrl . \"/index.php?r=property/config/files/index\",\n \"Record Removed\",\n \"Record Removed successfully\"\n ];\n }\n //return $this->redirect(['index']);\n else {\n \\Yii::$app->response->format = 'json';\n\n return [\n \"Failed\",\n \"\",\n \"Failed\",\n \"Failed to remove record.\"\n ];\n// return \"Failed to remove record\";\n }\n }", "public function deletePostDatasByPostId($postId)\n {\n \t$criteria = new CDbCriteria();\n \t$criteria->compare(\"post_id\",$postId);\n \t\n \treturn self::model()->updateAll(array(\n \t\t\t\t'status' => self::STATUS_DELETED\n \t\t\t),$criteria);\n }", "public function deleteHolidayScheme(string $employerId, string $holidaySchemeId): array\n {\n $response = $this->guzzleClient->delete(\n \"/Employer/{$employerId}/HolidayScheme/{$holidaySchemeId}\"\n );\n\n return $this->getResponseData($response);\n }", "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "public function destroy($id)\n {\n Chambre::find($id)->delete();\n\n return redirect()->route('chambres.index')->with('success','Chambre deleted successfully');\n }", "public function actionDelete($id)\n\t{\n\t\ttry{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t$this->loadModel($id)->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse{\n $model = $this->loadModel($id);\n \n $project = $model->pbacklogs[0]->project;\n \n $model->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(array('project/productbacklog/'.$project->id));\t\t\n\t\t}\n\t\t}catch(Exception $e){\n throw new CHttpException(\"de sistema \", $e -> getMessage());\n\t\t\t\n\t\t}\n\t}" ]
[ "0.63387686", "0.61706954", "0.59782195", "0.5229526", "0.51992023", "0.518579", "0.51440805", "0.5120332", "0.50684613", "0.50416994", "0.48820886", "0.48062027", "0.4784174", "0.47516286", "0.47456488", "0.4734701", "0.47221115", "0.4712549", "0.4705733", "0.46989673", "0.46871746", "0.4685838", "0.46837795", "0.46799302", "0.4656014", "0.4630468", "0.46187705", "0.46027884", "0.45910433", "0.45855188" ]
0.77858174
0
/////////////////////////// Generic functions // ///////////////////////// Operation listsGenericGet Fetch list of Generic items(for select options).
public function listsGenericget() { $response = Generic::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsGenericgenericByIdget($generic_id)\r\n {\r\n $generic = Generic::findOrFail($generic_id);\r\n return response()->json($generic,200);\r\n }", "abstract public function getList();", "public abstract function get_lists();", "public function getItems(...$types);", "function getItems();", "function getItems();", "public function getSimpleList($ids=''){\n\n\n }", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "public function getList();", "public function getList();", "function getList()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t$db\t=& $this->getDBO();\r\n\r\n\t\t// Determine paging variables\r\n\t\t$limit = $mainframe->getUserStateFromRequest( \"viewlistlimit\", 'limit', 10 );\r\n\t\t$limitstart = $mainframe->getUserStateFromRequest( \"viewlimitstart\", 'limitstart', 0 );\r\n\r\n\t\t// Determine basic variables \r\n\t\t$option = JRequest::getVar('option', '', '', 'string');\r\n\t\t$version = JRequest::getVar('version', '', '', 'string');\r\n\t\t$type = JRequest::getVar('type', '', '', 'string');\r\n\t\t$name = JRequest::getVar('name', '', '', 'string');\r\n\t\t$this->_list['option'] = JRequest::getVar('option', '', '', 'string'); \r\n\t\t$this->_list['version'] = $version;\r\n\t\t$this->_list['stype'] = $type;\r\n\t\t$this->_list['sname'] = $name;\r\n\r\n\t\t// Create option field for servertype\r\n\t\t$types[] = Array();\r\n\t\t$array = Array (0 => Array ('component', JText::_( 'Component')),\r\n\t \t 1 => Array ('module', JText::_( 'Module')),\r\n\t\t 2 => Array ('plugin', JText::_( 'Plugin')),\r\n\t \t 3 => Array ('template', 'Template'),\r\n\t \t 4 => Array ('language', JText::_( 'Language'))\r\n );\r\n\r\n\t\t$types[] = mosHTML::makeOption( '', JText::_('Select Type'));\r\n\t\tfor ($i=0; $i<count($array); $i++) {\r\n\t\t\t$types[] = mosHTML::makeOption( $array[$i][0], $array[$i][1] );\r\n\t\t} # End for\r\n\t\t$this->_list['type'] = mosHTML::selectList( $types, 'type', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $type);\r\n\r\n\t\t// Create option field for package names.\r\n\t\t$query = \"SELECT name FROM #__jpackagedir_packages GROUP BY 1\";\r\n\t\t$db->setQuery($query);\r\n\t\t$rows = $db->loadObjectList();\r\n\r\n\t\t$names[] = mosHTML::makeOption( '', JText::_('Select Package'));\r\n\t\tforeach ($rows as $row) {\r\n\t\t\t$names[] = mosHTML::makeOption( $row->name, $row->name );\r\n\t\t} # End for\r\n\t\t$this->_list['name'] = mosHTML::selectList( $names, 'name', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $name);\r\n\r\n\t\t// Determine where clause\r\n\t\t$this->_list['rows'] = Array();\r\n\t\t$where = Array();\r\n\t\tif (!empty($type)) { $where[] = \"type = '$type'\"; }\r\n\t\tif (!empty($name)) { $where[] = \"name = '$name'\"; }\r\n\t\tif (!empty($version)) { $where[] = \"version = '$version'\"; }\r\n\t\t$where = (count($where) ? \"\\n WHERE \".implode(' AND ', $where) : '');\r\n\r\n\t\t// Get the total number of records, this is used for paging option\r\n\t\t// in form.\r\n\t\t$query = \"SELECT COUNT(*) FROM #__jpackagedir_packages\" . $where;\r\n\t\t$db->setQuery( $query );\r\n\t\t$total = $db->loadResult();\r\n\r\n\t\t// Now read the current dataset, and pass it on...\r\n\t\t$query = \"SELECT * FROM #__jpackagedir_packages $where ORDER BY version\";\r\n\t\t$db->setQuery( $query, $limitstart, $limit );\r\n\t\t$this->_list['rows'] = $this->_db->loadObjectList();\r\n\t\tif ($db->getErrorNum()) {\r\n\t\t\treturn false;\r\n\t\t} # End if\r\n\r\n\r\n\t\t// Initialize the paging, offer the total number of records, the first record\r\n\t\t// for current page and the number of records to render.\r\n\t\tinclude_once(JPATH_BASE.DS.\"includes\".DS.\"pageNavigation.php\");\r\n\t\t$this->_list['pagenav'] = new mosPageNav( $total, $limitstart, $limit );\r\n\r\n\t\treturn $this->_list;\r\n\t}", "public function fetchList();", "public function getItemsList(){\n return $this->_get(4);\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "public function getItemTypeList()\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\nSELECT\n type.rowid as type_id,\n type.name as type_name,\n type.icon as type_icon\n\nFROM\n wbfsys_address_item_type type\n\nORDER BY\n type.name;\n\nSQL;\n\n return $db->select($sql)->getAll();\n\n }", "protected abstract function fetchLists();", "public function getTodoTypeListAction(){\n /** @var Object_Todo $todo */\n $this->getDeviceSession()->getUserId();\n $todo = new Object_Todo();\n $this->_helper->json($todo->getClass()->getFieldDefinition('Todo_type'));\n }", "private static function getList\r\n\t(\r\n\t\t$listType\t\t// <str> Set the type of list to retrieve from the database.\r\n\t)\t\t\t\t\t// RETURNS <array> Returns the designated list.\r\n\t\r\n\t// $listData = self::getList('tables');\r\n\t{\r\n\t\t$list = array();\r\n\t\t$path = self::$path . \"/\" . $listType;\r\n\t\t$files = File_Scan::scanRecursive($path, \"*.json\");\r\n\t\t\r\n\t\tforeach($files as $file) {\r\n\t\t\t$file = str_replace($path . \"/\", \"\", $file);\r\n\t\t\t$file = str_replace(\".json\", \"\", $file);\r\n\t\t\t$list[] = $file;\r\n\t\t}\r\n\t\t\r\n\t\treturn $list;\r\n\t}", "function getFieldList($field_data = false, $type = 'list', $fs_data = false)\n {\n if ($field_data) {\n $txt = new Text($this->language, $this->translation_module_default);\n $result = array();\n $fs_count = 0;\n $prev_fs = 0;\n foreach ($field_data as $data) {\n switch ($type) {\n case 'grid_column':\n $result[] = array(\n 'header' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'dataIndex' => $data['field'],\n 'sortable' => $data['sortable'] ? true : false,\n 'hidden' => $data['hidden'] ? true : false\n );\n break;\n case 'filters':\n switch ($data['type']) {\n case 1: // textfield\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'textfield'\n );\n break;\n case 2: // combobox\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'combobox',\n 'emptyText' => $this->getFieldRelationAllPhrase($data['relation_table']),\n 'ds_fields' => array(\n 'id',\n 'name'\n ),\n 'ds_data' => array(\n 0 => '***ASSOC_ARRAY***',\n 1 => $this->getFieldRelationList($data['relation_table'], true)\n )\n );\n break;\n case 3: // checkbox\n // todo ?\n break; \n case 5: // date\n $result[] = array(\n 'name' => $data['field'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'textfield'\n );\n break;\n default:\n break;\n }\n break;\n case 'detail':\n switch ($data['type']) {\n case 1: // textfield\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'textfield',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n case 2: // combobox\n $result[$data[\"fieldset_id\"]][] = array(\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field']),\n 'type' => 'combobox',\n //'emptyText' => $this->getFieldRelationAllPhrase($data['relation_table']),\n 'ds_fields' => array(\n 'id',\n 'name'\n ),\n 'ds_data' => array(\n 0 => '***ASSOC_ARRAY***',\n 1 => $this->getFieldRelationList($data['relation_table'], false)\n )\n );\n break;\n case 3: // checkbox\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'checkbox',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n case 4: // file\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'pic',\n 'name' => $data['field']\n );\n break;\n case 5: // date\n $result[$data[\"fieldset_id\"]][] = array(\n 'type' => 'datefield',\n 'name' => $data['field'],\n 'tooltip' => $data['tooltip'],\n 'field_title' => $txt->display($data['translation'] ? $data['translation'] : $data['field'])\n );\n break;\n default:\n break;\n }\n break;\n default :\n $result[] = array('name' => $data[\"field\"]);\n break;\n }\n }\n\n if ($type == 'detail' && $fs_data) {\n $t_result = array();\n for ($i = 0; $i < sizeof($fs_data); $i++) {\n for ($j = 0; $j < sizeof($fs_data[$i]); $j++) {\n if (!array_key_exists($fs_data[$i][$j]['fieldset_id'], $result)) {\n $result[$fs_data[$i][$j]['fieldset_id']] = false;\n }\n $t_result[$i][$j] = $result[$fs_data[$i][$j]['fieldset_id']];\n }\n }\n $result = $t_result;\n }\n }\n return JsonEncoder::encode($result);\n }", "public function getItems($type);", "private static function fetchList($listType,$displayCol, $selectedValue, $showIdle=false, $translate=true,$applyRestrictionClause=false) {\r\n//scriptLog(\"fetchList($listType,$displayCol, $selectedValue, $showIdle, $translate)\");\r\n $res=array();\r\n if (! SqlElement::class_exists($listType)) {\r\n debugTraceLog(\"WARNING : SqlElement::fetchList() called for not valid class '$listType'\");\r\n return array();\r\n }\r\n $obj=new $listType();\r\n $calculated=false;\r\n $field=$obj->getDatabaseColumnName($displayCol);\r\n if (property_exists($obj, '_calculateForColumn') and isset($obj->_calculateForColumn[$displayCol])) {\r\n \t$field=$obj->_calculateForColumn[$displayCol];\r\n \t$calculated=true;\r\n }\r\n $query=\"select \" . $obj->getDatabaseColumnName('id') . \" as id, \" . $field . \" as name from \" . $obj->getDatabaseTableName() ;\r\n if ($showIdle or !property_exists($obj, 'idle')) {\r\n $query.= \" where (1=1 \";\r\n } else {\r\n $query.= \" where (idle=0 \";\r\n }\r\n $crit=$obj->getDatabaseCriteria();\r\n foreach ($crit as $col => $val) {\r\n \tif ($obj->getDatabaseColumnName($col)=='idProject' and ($val=='*' or !$val)) {$val=0;}\r\n \tif ($val===null) {\r\n \t $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . ' IS NULL';\r\n \t} else {\r\n $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . '=' . Sql::str($val);\r\n \t}\r\n }\r\n if ($applyRestrictionClause) {\r\n \t$query.=' and '.getAccesRestrictionClause($listType,null,true);\r\n }\r\n $query .=')';\r\n if ($selectedValue) {\r\n \tif ($selectedValue!='*') {\r\n $query .= \" or \" . $obj->getDatabaseColumnName('id') .'= ' . Sql::str($selectedValue) ;\r\n \t}\r\n }\r\n if (property_exists($obj,'_sortCriteriaForList')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.'.$obj->_sortCriteriaForList;\r\n } else if (property_exists($obj,'sortOrder')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.sortOrder, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'order')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.order, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'baselineDate')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.baselineDate, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n }\r\n $result=Sql::query($query);\r\n if (Sql::$lastQueryNbRows > 0) {\r\n while ($line = Sql::fetchLine($result)) {\r\n $name=$line['name'];\r\n if ($obj->isFieldTranslatable($displayCol) and $translate){\r\n \tif ($listType=='Linkable' and substr($name,0,7)=='Context') {\r\n \t\t$name=SqlList::getNameFromId('ContextType', substr($name,7,1));\r\n \t} else {\r\n $name=i18n($name);\r\n \t}\r\n }\r\n if ($displayCol=='name' and property_exists($obj,'_constructForName') and !$calculated) {\r\n \t$nameObj=new $listType($line['id'],true);\r\n \t$name=$nameObj->name;\r\n }\r\n $res[($line['id'])]=$name;\r\n }\r\n }\r\n // Plugin - start - Management for event \"list\"\r\n global $pluginAvoidRecursiveCall;\r\n if (! $pluginAvoidRecursiveCall) {\r\n $pluginAvoidRecursiveCall=true;\r\n $pluginObjectClass=$listType;\r\n $table=$res;\r\n $lstPluginEvt=Plugin::getEventScripts('list',$pluginObjectClass);\r\n foreach ($lstPluginEvt as $script) {\r\n require $script; // execute code\r\n }\r\n $res=$table;\r\n $pluginAvoidRecursiveCall=false;\r\n }\r\n // Plugin - end\r\n if ($translate) {\r\n self::$list[$listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } else {\r\n \tself::$list['no_tr_' . $listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } \r\n return $res;\r\n }", "public function getList() {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();" ]
[ "0.6766206", "0.6530784", "0.6436251", "0.6240082", "0.6233493", "0.6233493", "0.6207505", "0.6202563", "0.61756563", "0.61756563", "0.6066343", "0.6043262", "0.60407084", "0.599181", "0.5967616", "0.5946552", "0.58633", "0.5824105", "0.5784392", "0.57794005", "0.57461464", "0.57410663", "0.5734938", "0.5734938", "0.5734938", "0.5734938", "0.5734938", "0.5734938", "0.5734938", "0.5734938" ]
0.70271236
0
Operation listsGenericGenericIdGet Fetch a Generic item specified by genericId.
public function listsGenericgenericByIdget($generic_id) { $generic = Generic::findOrFail($generic_id); return response()->json($generic,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsGenericdelete($generic_id)\r\n {\r\n $deleted_generic = Generic::destroy($generic_id);\r\n if($deleted_generic){\r\n return response()->json(['msg' => 'Deleted generic']);\r\n }\r\n }", "public function listsGenericget()\r\n {\r\n $response = Generic::all();\r\n return response()->json($response,200);\r\n }", "public function listsgenericGenericput($generic_id)\r\n {\r\n $input = Request::all();\r\n $generic = Generic::findOrFail($generic_id);\r\n $generic->update(['name' => $input['name']]);\r\n if($generic->save()){\r\n return response()->json(['msg' => 'Updated generic']);\r\n }else{\r\n return response('Oops, seems like there was a problem updating the generic');\r\n }\r\n }", "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n //Put owner's name instead of user ID\n //$list['owner'] = $this->User_model->getName($list['owner'])['name'];\n unset($list['owner']);\n\n $this->response($list, 200);\n\n exit;\n } else {\n\n $this->response(\"Invalid ID\", 404);\n\n exit;\n }\n }", "public function get( $iId );", "public function getSimpleList($ids=''){\n\n\n }", "public function get($id=0) \n\t{\n\t\tif($id>0) {\n\t\t\t$items = $this->getOneById($id);\n\t\t} else {\n\t\t\t$items = $this->getAll();\n\t\t}\n\t\treturn $items;\n\t}", "public abstract static function getListID();", "public function getListId();", "public static function getList($id) {\n $list = R::load('list', $id);\n return $list->id ? $list : null;\n }", "public function getTipoById ($id_tib) {\n\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\n\t\t$query = <<<QUERY\n\t\t\t\tSELECT tipo.*, json_object( array_agg(meta.metanome), array_agg(meta.valor) ) as metadata\n\t\t\t\tFROM tp_itembiblioteca tipo\n\t\t\t\tJOIN tp_itembiblioteca_metadata meta ON tipo.id = meta.id_tib\n\t\t\t\tWHERE tipo.id_tib_pai = ?\n\t\t\t\tGROUP BY tipo.id\nQUERY;\n\n\t\t$db = $db->query($query, array($id_tib) );\n \t\t$rowset = $db->fetchAll();\n\n return $rowset;\n\t}", "function get($id_tipo_elemento)\n {\n $filtro = new rest_filtro_sql();\n\t $this->filtrar_ug_sistema($filtro);\n\t $filtro->agregar_campo_simple_local('tipo_elemento', 'tipo_elemento_externo = %s', $id_tipo_elemento);\n\n\t $rs = $this->modelo->get_listado_rest($filtro->get_sql_where());\n\n if ( !$rs ) {\n throw new rest_error(404, 'El tipo de elemento no existe');\n }\n //toba::logger()->error($rs);\n $campos = $this->get_modelo('TipoElemento');\n //toba::logger()->error($campos);\n\n\t\treturn rest_hidratador::hidratar_fila($campos, $rs[0]);\n }", "public function index_get($id = 0)\n\t{\n if(!empty($id)){\n $data = $this->db->get_where(\"mobil\", ['id' => $id])->row_array();\n }else{\n $data = $this->db->get(\"mobil\")->result();\n }\n \n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "private function getItems($type, $id = null, $context = null, $assign = true)\n {\n return $this->data->getItems($type, $id, $context, $assign);\n }", "function listByID($id) {\n $select = $this->select();\n $select = $this->select()->where('id = ?', $id);\n $rows = $this->fetchAll($select);\n return $rows->toArray();\n }", "public function getItem( $id );", "public function index_get($id = 0)\n\t{\n if(!empty($id)){\n $data = $this->db->get_where($_table, [$_id => $id])->row_array();\n }else{\n $data = $this->db->get($_table)->result();\n }\n \n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "public function getTagsByResourceID($resourceID, $getParams = []) {\n\n\t\tif(!isset($getParams['type'])){\n\t\t\t$this->CI->exitCode = 400;\n\t\t\treturn ['message'=> 'Resource type is mandatory'];\n\t\t}\n\n\t\t$tableName = $this->_getTableName($getParams['type']);\n\n\t\t$param = [\n\t\t\t'table' => 'tags_relations',\n\t\t\t'where' => ['resourceID' => $resourceID, 'tableName' => $tableName]\n\t\t];\n\n\t\tif(gettype($resourceID) == 'array'){\n\t\t\tunset($param['where']['resourceID']);\n\t\t\t$param['where_in'] = ['resourceID' => $resourceID];\n\t\t}\n\n\t\tif(isset($getParams['type'])){\n\t\t\t$param['where']['tags.type'] = $getParams['type'];\n\t\t\t$param['join'] = ['tags' => 'tags.tagID = tags_relations.tagID'];\n\t\t}\n\n\t\tif (isset($getParams['fields'])) {\n\t\t\t$param['select'] = $this->_sanitize($getParams['fields']);\n\t\t} else {\n\t\t\t$param['select'] = 'tagID as id';\n\t\t}\n\n\t\tif(strpos($param['select'], 'tags.') !== false && !isset($param['join']['tags'])) {\n\t\t\t$param['join'] = ['tags' => 'tags.tagID = tags_relations.tagID'];\n\t\t}\n\n\t\t$data = $this->CI->model->get($param);\n\t\t$this->CI->exitCode = ($data) ? 200 : 404;\n\t\treturn ['data' => $data];\n\t}", "private function getItems(string $type, $id = null, string $context = null, $assign = true, bool $pagination = false) {\r\n return $this->data->getItems($type, $id, $context, $assign, $pagination);\r\n }", "#[Generic(return: 'T')]\n public function get();", "public function get($typeId);", "abstract protected function fetchFields($listId);", "public function getItem ($id);", "static public function get($type, $id = FALSE) {\n self::debug('*GET*');\n // Full collection\n if (!$id) {\n return self::_getStack($type);\n }\n // Id\n return self::_get($type, $id);\n }", "public function getCollection($id);", "function getItems($id)\n{\n\t$elem = $this->elements[$id];\n\tif (!empty($elem['items'])) {\n\t\treturn $elem['items'];\n\t}\n\n\t$items = array();\n\tif ($elem['list']) $items = $this->getLkpList($elem['list']);\n\telseif ($elem['query']) $items = $this->getLkpQuery($elem['query']);\n\telseif ($elem['lookup']) $items = $this->getLkpLookup($elem['lookup']);\n\telseif ($elem['datasource']) $items = $this->getDataSource($elem['datasource']);\n\n\tif ($this->translator) {\n\t\t$items = $this->translator->translateArray($items);\n\t}\n\n\t$this->elements[$id]['items'] = $items;\n\n\treturn $items;\n}", "function get(string $id);", "public function getItemById($id)\n {\n return $this->type->find($id);\n }", "public function getList();", "public function getList();" ]
[ "0.6039775", "0.58054805", "0.547905", "0.49633735", "0.49293405", "0.48887238", "0.48615044", "0.47987616", "0.47877118", "0.4772229", "0.4750298", "0.47181323", "0.46203026", "0.46165872", "0.45742825", "0.45593637", "0.45497265", "0.45480058", "0.45276773", "0.44826743", "0.44791168", "0.44579962", "0.445462", "0.44490388", "0.44423398", "0.4433461", "0.44330218", "0.4425804", "0.44142875", "0.44142875" ]
0.7864433
0
Operation listsGenericPost Add an generic item.
public function listsgenericpost() { $input = Request::all(); $new_generic = Generic::create($input); if($new_generic){ return response()->json(['msg' => 'Created new generic']); }else{ return response('Oops, seemes like something went wrong while trying to create a new generic'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'sort', 'descript'));\n\t\t$info = $this->_cookData($info);\n\t\t$series = Lock_Service_FileType::getFileTypeByName($info['name']);\n\t\tif($series) $this->output(-1, $info['name'].'已存在');\n\t\t$result = Lock_Service_FileType::addFileType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function addPostAction() {\n $inputVars = $this->getInput(array(\n \t\t'id', 'dataType', //主表字段:id,type\n \t\t \t'data'//子表字段\n ));\n \tlist($news, $itemsList) = $this->checkInput($inputVars);\n \t$news['create_time'] = time();\n \t$result = Admin_Service_Material::add($news, $itemsList);\n \tif (!$result) $this->failPostOutput('操作失败');\n \t$this->successPostOutput($this->actions['listUrl']);\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','name'));\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier) $this->output(-1, '操作失败,该分类已存在');\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fanli_Service_Ptype::addType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "abstract public function add_item();", "public function add($item);", "public function add($item);", "abstract public function addItems(\\Media\\Entity\\Photo\\PhotoBase $item);", "public function add_custom_list_item() {\n\t\t//verify nonce\n\t\tcheck_ajax_referer( 'fsn-admin-edit', 'security' );\n\t\t\n\t\t//verify capabilities\n\t\tif ( !current_user_can( 'edit_post', intval($_POST['post_id']) ) )\n\t\t\tdie( '-1' );\n\t\t\n\t\tglobal $fsn_custom_lists;\t\n\t\t$listID = sanitize_text_field($_POST['listID']);\n\t\t$params = $fsn_custom_lists[$listID]['params'];\n\t\t$uniqueID = uniqid();\t\n\t\techo '<div class=\"custom-list-item\">';\t\t\n\t\t\techo '<div class=\"custom-list-item-details\">';\t\t\t\t\n\t\t\t\tforeach($params as $param) {\n\t\t\t\t\t$param_value = '';\n\t\t\t\t\t$param['param_name'] = (!empty($param['param_name']) ? $param['param_name'] : '') . '-paramid'. $uniqueID;\n\t\t\t\t\t$param['nested'] = true;\n\t\t\t\t\t//check for dependency\n\t\t\t\t\t$dependency = !empty($param['dependency']) ? true : false;\n\t\t\t\t\tif ($dependency === true) {\n\t\t\t\t\t\t$depends_on_field = $param['dependency']['param_name']. '-paramid'. $uniqueID;\n\t\t\t\t\t\t$depends_on_not_empty = !empty($param['dependency']['not_empty']) ? $param['dependency']['not_empty'] : false;\n\t\t\t\t\t\tif (!empty($param['dependency']['value']) && is_array($param['dependency']['value'])) {\n\t\t\t\t\t\t\t$depends_on_value = json_encode($param['dependency']['value']);\n\t\t\t\t\t\t} else if (!empty($param['dependency']['value'])) {\n\t\t\t\t\t\t\t$depends_on_value = $param['dependency']['value'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$depends_on_value = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dependency_callback = !empty($param['dependency']['callback']) ? $param['dependency']['callback'] : '';\n\t\t\t\t\t\t$dependency_string = ' data-dependency-param=\"'. esc_attr($depends_on_field) .'\"'. ($depends_on_not_empty === true ? ' data-dependency-not-empty=\"true\"' : '') . (!empty($depends_on_value) ? ' data-dependency-value=\"'. esc_attr($depends_on_value) .'\"' : '') . (!empty($dependency_callback) ? ' data-dependency-callback=\"'. esc_attr($dependency_callback) .'\"' : '');\n\t\t\t\t\t}\n\t\t\t\t\techo '<div class=\"form-group'. ( !empty($param['class']) ? ' '. esc_attr($param['class']) : '' ) .'\"'. ( $dependency === true ? $dependency_string : '' ) .'>';\n\t\t\t\t\t\techo FusionCore::get_input_field($param, $param_value);\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t\techo '<a href=\"#\" class=\"collapse-custom-list-item\">'. __('collapse', 'fusion') .'</a>';\n\t \t\techo '<a href=\"#\" class=\"remove-custom-list-item\">'. __('remove', 'fusion') .'</a>';\n\t\t\techo '</div>';\n\t\techo '</div>';\n\t\texit;\n\t}", "public function add(...$items);", "public function index_post()\n {\n $input = $this->input->post();\n $this->db->insert('items',$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "public function listsgenericGenericput($generic_id)\r\n {\r\n $input = Request::all();\r\n $generic = Generic::findOrFail($generic_id);\r\n $generic->update(['name' => $input['name']]);\r\n if($generic->save()){\r\n return response()->json(['msg' => 'Updated generic']);\r\n }else{\r\n return response('Oops, seems like there was a problem updating the generic');\r\n }\r\n }", "function add($item);", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function postAddItems()\n\t{\n\t\tif (!$this->request->ajax()) { return $this->ajaxErrorResponse(); }\n\n\t\t// Get the properties that will be applied to the items.\n\t\t$properties = [\n\t\t\t'buyRaw' => $this->request->input('buyRaw' ) ? true : false,\n\t\t\t'buyRecycled' => $this->request->input('buyRecycled' ) ? true : false,\n\t\t\t'buyRefined' => $this->request->input('buyRefined' ) ? true : false,\n\t\t\t'buyModifier' => $this->request->input('buyModifier' ) ? : 0.00,\n\t\t\t'sell' => $this->request->input('sell' ) ? true : false,\n\t\t\t'sellModifier' => $this->request->input('sellModifier') ? : 0.00,\n\t\t\t'lockPrices' => $this->request->input('lockPrices' ) ? true : false,\n\t\t\t'source' => $this->request->input('source' ) ? : \"Jita\",\n\t\t\t'buyPrice' => 0.00,\n\t\t\t'sellPrice' => 0.00,\n\t\t];\n\n\t\t$properties['buyModifier'] = is_numeric($properties['buyModifier'])\n\t\t\t? (double)$properties['buyModifier' ] : 0.00;\n\n\t\t$properties['sellModifier'] = is_numeric($properties['sellModifier'])\n\t\t\t? (double)$properties['sellModifier'] : 0.00;\n\n\t\t// Get the types being added.\n\t\t$ids = $this->request->input('types') ?: [];\n\t\t$types = $this->type_model->whereIn('typeID', $ids)->get();\n\n\t\t// Get the types being added from a group.\n\t\t$ids = $this->request->input('groups') ?: [];\n\t\t$groups = $this->group_model->with('types')->whereIn('groupID', $ids)->get();\n\t\t$groups->each(function ($group) use (&$types) {\n\t\t\t$group->types->each(function ($type) use (&$types) {\n\t\t\t\t$types->push($type);\n\t\t\t});\n\t\t});\n\n\t\t// Get the types being added from a category.\n\t\t$ids = $this->request->input('categories') ?: [];\n\t\t$categories = $this->category_model->with('types')->whereIn('categoryID', $ids)->get();\n\t\t$categories->each(function ($category) use (&$types) {\n\t\t\t$category->types->each(function ($type) use (&$types) {\n\t\t\t\t$types->push($type);\n\t\t\t});\n\t\t});\n\n\t\t// Remove any duplicate types.\n\t\t$types = $types->unique('typeID');\n\n\t\ttry {\n\t\t\tif ($types->count() == 0) {\n\t\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\t\ttrans('buyback.messages.add_items_nothing', $items->count()));\n\t\t\t}\n\n\t\t\tDB::transaction(function () use ($types, $properties) {\n\t\t\t\t$types->each(function ($type) use($properties) {\n\t\t\t\t\t// Ignore items that already exist.\n\t\t\t\t\tif (($item = $this->item_model->find($type->typeID))) { return; };\n\n\t\t\t\t\t// Add the type to the database as an item.\n\t\t\t\t\t$this->item_model->create([\n\t\t\t\t\t\t'typeID' => $type->typeID,\n\t\t\t\t\t\t'typeName' => $type->typeName,\n\t\t\t\t\t\t'buyRaw' => $properties['buyRaw' ],\n\t\t\t\t\t\t'buyRecycled' => $properties['buyRecycled' ],\n\t\t\t\t\t\t'buyRefined' => $properties['buyRefined' ],\n\t\t\t\t\t\t'buyModifier' => $properties['buyModifier' ],\n\t\t\t\t\t\t'buyPrice' => $properties['buyPrice' ],\n\t\t\t\t\t\t'sell' => $properties['sell' ],\n\t\t\t\t\t\t'sellModifier' => $properties['sellModifier'],\n\t\t\t\t\t\t'lockPrices' => $properties['lockPrices' ],\n\t\t\t\t\t\t'sellPrice' => $properties['sellPrice' ],\n\t\t\t\t\t\t'source' => $properties['source' ],\n\t\t\t\t\t]);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn $this->ajaxSuccessResponse(\n\t\t\t\ttrans_choice('buyback.messages.add_items_success', $types->count() == 1 ? 1 : 2));\n\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $this->ajaxFailureResponse(\n\t\t\t\ttrans_choice('buyback.messages.add_items_failure', $types->count() == 1 ? 1 : 2));\n\t\t}\n\t}", "public function add(Post $post);", "public function add(Post $post);", "public function addPost( $post ) {\n if ( count( $this->posteTyps ) < 5 ) {\n $this->posteTyps[] = $post;\n }\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'link', 'img', 'sort', 'status', 'model_id','type_id'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Browser_Service_Recsite::addRecsite($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','ishot', 'title', 'img', 'price', 'hk_price', 'start_time', 'end_time', \n\t\t\t\t'stock_num', 'limit_num', 'sale_num', 'comment_num', 'status','descrip'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fj_Service_Goods::addGoods($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_custom_post_types() {\n //\n }", "public function postAdd()\r\n\t{\r\n\t\t$input = Input::except('_token');\r\n\r\n\t\tif ( ! isset($input['user']) || ! isset($input['title']))\r\n\t\t{\r\n\t\t\tif (Request::ajax())\r\n\t\t\t{\r\n\t\t\t\treturn trans('main.no user/title id');\r\n\t\t\t}\r\n\r\n\t\t\treturn Redirect::back()->withFailure( trans('main.no user/title id') );\r\n\t\t}\r\n\r\n\t\t$this->list->add($input);\r\n\r\n\t\tif (Request::ajax())\r\n\t\t{\r\n\t\t\treturn trans('main.added to list');\r\n\t\t}\r\n\r\n\t\treturn Redirect::back()->withSuccess( trans('main.added to list') );\r\n\t}", "public function addItem($item_id, $item_type) {\n $this->apiCall('items.json', 'POST', array('pio_iid' => $item_id, 'pio_itypes' => $item_type));\n }", "public function addItems(array $items);", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "public function add(CollectionItemInterface $item);", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\tif (isset($this->data['Post']['new_tags'])) {\n\t\t\t\t$new_tags = explode(',', $this->data['Post']['new_tags']);\n\n\t\t\t\tforeach($new_tags as $new_tag) {\n\t\t\t\t\t$tag['Tag']['name'] = ucfirst(strtolower(trim($new_tag)));\n\t\t\t\t\t$this->Post->Tag->create();\n\t\t\t\t\tif ($this->Post->Tag->save($tag)) {\n\t\t\t\t\t\t$this->data['Tag']['Tag'][] = $this->Post->Tag->id;\n\t\t\t\t\t\t// unset( $this->Post->Tag->id );\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($tag);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->Post->create();\n\t\t\tif ($this->Post->saveAll($this->data)) {\n\t\t\t\t$this->Session->setFlash('Your post has been saved.');\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t\t$tags = $this->Post->Tag->find('list');\n\t\t$this->set(compact('tags'));\n\t}", "public function createNewItem();", "function item_post($key = null) {\n $record = json_decode($this->post(), true);\n\n if (($key == null) || ($key == 'id')) {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $record);\n }\n $this->crud_post($record);\n }" ]
[ "0.5661094", "0.5645376", "0.56196237", "0.55953634", "0.55267036", "0.55267036", "0.54680806", "0.5463829", "0.54232913", "0.53565574", "0.5347345", "0.5298685", "0.5285857", "0.5281928", "0.5254188", "0.5254188", "0.52358776", "0.5228154", "0.5197211", "0.5171648", "0.5157676", "0.51194024", "0.5108239", "0.5097634", "0.50739723", "0.5054705", "0.50517976", "0.5015103", "0.50110817", "0.4985499" ]
0.61911577
0
Operation listsGenericGenericIdPut Update an existing Generic item specified by genericId.
public function listsgenericGenericput($generic_id) { $input = Request::all(); $generic = Generic::findOrFail($generic_id); $generic->update(['name' => $input['name']]); if($generic->save()){ return response()->json(['msg' => 'Updated generic']); }else{ return response('Oops, seems like there was a problem updating the generic'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsGenericgenericByIdget($generic_id)\r\n {\r\n $generic = Generic::findOrFail($generic_id);\r\n return response()->json($generic,200);\r\n }", "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('items', $input, array('id'=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "public function listsGenericdelete($generic_id)\r\n {\r\n $deleted_generic = Generic::destroy($generic_id);\r\n if($deleted_generic){\r\n return response()->json(['msg' => 'Deleted generic']);\r\n }\r\n }", "public function index_put($id)\n {\n $input = $this->put();\n $this->write_db->update($_table, $input, array($_id=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "public function updateTicketTags($ticketId, array $tags)\n\t{\n\t\t$request = $this->getHttp()->post(static::URL.'ticket/'.$ticketId.'/tags');\n\n\t\t$request->addPostFields(array('tags' => json_encode($tags)));\n\n\t\t$this->sendPlain($request);\n\t}", "public function updateTicketTags($ticketId, array $tags)\n\t{\n\t\t$request = $this->getHttp()->post($this->url.'ticket/'.$ticketId.'/tags');\n\n\t\t$request->addPostFields(array('tags' => json_encode($tags)));\n\n\t\t$this->sendPlain($request);\n\t}", "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('tblattendance', $input, array('id' => $id));\n\n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "protected function templistIdListsPutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling templistIdListsPut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling templistIdListsPut'\n );\n }\n\n $resourcePath = '/templist/{id}/lists';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function update($id, array $parameters = [])\n {\n $resolver = $this->createOptionsResolver();\n\n $resolver->setDefined('description')\n ->setAllowedTypes('description', 'string');\n\n $resolver->setDefined('type')\n ->setAllowedTypes('type', 'string');\n\n return $this->put('/images/' . $this->encodePath($id), $resolver->resolve($parameters));\n }", "public function setGenericMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1\\GenericOperationMetadata::class);\n $this->generic_metadata = $var;\n\n return $this;\n }", "public function update(Request $request, $id)\n {\n $space_generic_extra = SpaceExtrasGeneric::find($id);\n\n if (!is_null($space_generic_extra)) {\n $rules = [\n 'name' => 'required|string|max:60',\n 'description' => 'required|string|max:200'\n ];\n $space_generic_extra_info = Input::all();\n $validation = Validator::make($space_generic_extra_info, $rules);\n\n if ($validation->passes()) {\n try {\n $space_generic_extra->update($space_generic_extra_info);\n return Redirect::route('space_generic_extras.index')\n ->withInput()\n ->with('message', trans('management_spaces.space_generic_extra_updated_msg'));\n } catch (\\PDOException $queryException) {\n return Redirect::route('space_generic_extras.index')\n ->with('message-error', trans('management_spaces.space_generic_extra_usage_msg'));\n }\n } else {\n return Redirect::route('space_generic_extras.edit', $space_generic_extra)\n ->withInput()\n ->withErrors($validation);\n\n }\n } else {\n return Redirect::route('space_generic_extras.index')\n ->with('message-error', trans('management_spaces.space_generic_extra_not_found_msg'));\n }\n }", "function qruqsp_core_tagsUpdate(&$q, $object, $station_id, $key_name, $key_value, $type, $list) {\n //\n // All arguments are assumed to be un-escaped, and will be passed through dbQuote to\n // ensure they are safe to insert.\n //\n\n // Required functions\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbQuote');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbHashIDQuery');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbDelete');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbInsert');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbUUID');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'objectLoad');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'makePermalink');\n\n //\n // Don't worry about autocommit here, it's taken care of in the calling function\n //\n \n //\n // Load the object definition\n //\n $rc = qruqsp_core_objectLoad($q, $object);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $obj = $rc['object'];\n $module = $rc['pkg'] . '.' . $rc['mod'];\n\n //\n // Get the existing list of tags for the item\n //\n $strsql = \"SELECT id, uuid, $key_name, tag_type AS type, tag_name AS name \"\n . \"FROM \" . $obj['table'] . \" \"\n . \"WHERE $key_name = '\" . qruqsp_core_dbQuote($q, $key_value) . \"' \"\n . \"AND tag_type = '\" . qruqsp_core_dbQuote($q, $type) . \"' \"\n . \"AND station_id = '\" . qruqsp_core_dbQuote($q, $station_id) . \"' \"\n . \"\";\n $rc = qruqsp_core_dbHashIDQuery($q, $strsql, $module, 'tags', 'name');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['tags']) || $rc['num_rows'] == 0 ) {\n $dbtags = array();\n } else {\n $dbtags = $rc['tags'];\n }\n\n //\n // Delete tags no longer used\n //\n foreach($dbtags as $tag_name => $tag) {\n if( !in_array($tag_name, $list, true) ) {\n //\n // The tag does not exist in the new list, so it should be deleted.\n //\n $strsql = \"DELETE FROM \" . $obj['table'] . \" \"\n . \"WHERE id = '\" . qruqsp_core_dbQuote($q, $tag['id']) . \"' \"\n . \"AND station_id = '\" . qruqsp_core_dbQuote($q, $station_id) . \"' \"\n . \"\";\n $rc = qruqsp_core_dbDelete($q, $strsql, $module);\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 3, $obj['table'], $tag['id'], '*', '');\n\n //\n // Sync push delete\n //\n $q['syncqueue'][] = array('push'=>$object, \n 'args'=>array('delete_uuid'=>$tag['uuid'], 'delete_id'=>$tag['id']));\n }\n }\n\n //\n // Add new tags lists\n //\n foreach($list as $tag) {\n if( $tag != '' && !array_key_exists($tag, $dbtags) ) {\n //\n // Get a new UUID\n //\n $rc = qruqsp_core_dbUUID($q, $module);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $uuid = $rc['uuid'];\n\n if( isset($obj['fields']['permalink']) ) {\n //\n // Make the permalink\n //\n $permalink = qruqsp_core_makePermalink($q, $tag);\n\n // \n // Setup the SQL statement to insert the new thread\n //\n $strsql = \"INSERT INTO \" . $obj['table'] . \" (uuid, station_id, $key_name, tag_type, tag_name, \"\n . \"permalink, date_added, last_updated) VALUES (\"\n . \"'\" . qruqsp_core_dbQuote($q, $uuid) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $station_id) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $key_value) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $type) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $tag) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $permalink) . \"', \"\n . \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n } else {\n // \n // Setup the SQL statement to insert the new thread\n //\n $strsql = \"INSERT INTO \" . $obj['table'] . \" (uuid, station_id, $key_name, tag_type, tag_name, \"\n . \"date_added, last_updated) VALUES (\"\n . \"'\" . qruqsp_core_dbQuote($q, $uuid) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $station_id) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $key_value) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $type) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $tag) . \"', \"\n . \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n }\n $rc = qruqsp_core_dbInsert($q, $strsql, $module);\n // \n // Only return the error if it was not a duplicate key problem. Duplicate key error\n // just means the tag name is already assigned to the item.\n //\n if( $rc['stat'] != 'ok' && $rc['err']['code'] != 'qruqsp.core.73' ) {\n return $rc;\n }\n if( isset($rc['insert_id']) ) {\n $tag_id = $rc['insert_id'];\n //\n // Add history\n //\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'uuid', $uuid);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, $key_name, $key_value);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'tag_type', $type);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'tag_name', $tag);\n //\n // Sync push\n //\n $q['syncqueue'][] = array('push'=>$module . '.' . $object, 'args'=>array('id'=>$tag_id));\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "protected function templistIdListId2PutRequest($id, $id2, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling templistIdListId2Put'\n );\n }\n // verify the required parameter 'id2' is set\n if ($id2 === null || (is_array($id2) && count($id2) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id2 when calling templistIdListId2Put'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling templistIdListId2Put'\n );\n }\n\n $resourcePath = '/templist/{id}/list/{id2}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($id2 !== null) {\n $resourcePath = str_replace(\n '{' . 'id2' . '}',\n ObjectSerializer::toPathValue($id2),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('sales', $input, array('sales_id'=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "public function put($path, array $parameters = array(), ApiInterface $api);", "public function putAction() {\n\t\t$rawData = json_decode($this->_request->getRawBody(), true);\n\t\tif (!empty($rawData)) {\n\t\t\t$rawData['name'] = ucfirst($rawData['name']);\n\t\t\t$result = Models_Mapper_Tag::getInstance()->save($rawData);\n\t\t} else {\n\t\t\t$this->_error();\n\t\t}\n\t\tif ($result === null) {\n\t\t\t$this->_error('This tag already exists', self::REST_STATUS_BAD_REQUEST);\n\t\t} else {\n\t\t\treturn $result->toArray();\n\t\t}\n\t}", "public function updateAction(Request $request, $id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SkaphandrusAppBundle:SkSpecies')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SkSpecies entity.');\n }\n\n// // Set parent ID on embedded forms\n// $embedded = $request->request->get('skaphandrus_appbundle_skspecies');\n// foreach ($embedded['imageRefs'] as &$imageRef) {\n// $imageRef['species'] = $id;\n// }\n\n// $entity = new \\Skaphandrus\\AppBundle\\Entity\\SkSpecies();\n\n //http://symfony.com/doc/current/cookbook/form/form_collections.html\n //For deleting prices \n $originalImagesRef = new ArrayCollection();\n // Create an ArrayCollection of the current Tag objects in the database\n foreach ($entity->getImageRefs() as $imageRef) {\n $originalImagesRef->add($imageRef);\n }\n\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n // remove the relationship between the Tag and the Task\n foreach ($originalImagesRef as $imageRef) {\n if (false === $entity->getImageRefs()->contains($imageRef)) {\n // remove the Task from the Tag\n// $imageRef = new \\Skaphandrus\\AppBundle\\Entity\\SkSpeciesImageRef();\n $imageRef->getSpecies()->removeImageRef($imageRef);\n\n // if it was a many-to-one relationship, remove the relationship like this\n // $course->setBusiness(null);\n // $em->persist($course);\n // if you wanted to delete the Tag entirely, you can also do that\n $em->remove($imageRef);\n }\n }\n\n $entity->setUpdatedAt(new \\DateTime('now'));\n \n $em->persist($entity);\n $em->flush();\n\n $this->get('session')->getFlashBag()->add('notice', 'form.common.message.changes_saved');\n return $this->redirect($this->generateUrl('identification_species_admin_edit', array('id' => $id)));\n }\n\n return $this->render('SkaphandrusAppBundle:SkIdentificationSpecies:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "private function uploadProductTag(int $productId, array $tags)\n {\n $productTag = PersistenceFactory::createMapper(ProductTag::class);\n foreach ($tags as $item) {\n $productTag->save($productId, $item);\n }\n }", "public function updateAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StriideInventoryBundle:Item')->find($id);\n $photo = $entity->getPhoto();\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Item entity.');\n }\n\n $editForm = $this->createForm(new ItemType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n $request = $this->getRequest();\n\n $editForm->handleRequest($request);\n\n if ($editForm->isValid())\n {\n $p = $entity->getPhoto();\n if(empty($p) && !empty($photo))\n {\n $entity->setPhoto($photo);\n }\n else if(!empty($p))\n {\n $media = $this->get('striide_inventory.service.media')->save($entity->getPhoto());\n $entity->setPhoto($media->getId());\n }\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('StriideInventoryBundle_admin_item_show', array('id' => $id)));\n }\n\n return $this->render('StriideInventoryBundle:Item:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'edit_form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'delete_form' => $deleteForm->createView(),\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_edit', array('id' => $entity->getId())),\n 'label' => $this->get('translator')->trans('Edit Item'))\n )\n ));\n }", "public function update(Request $request, $id)\n {\n //update item name\n foreach($request->get('tagItemName') as $id => $name):\n $response = TagTopicCategory::find($id);\n $response->name = $name;\n if($response->save()){\n echo \"success update\";\n } else {\n echo \"failed update\";\n }\n endforeach;\n\n ////upload multiple image\n foreach (Input::file('tagItemFileName') as $key => $tempFile) {\n\n if(!empty($tempFile)) {\n\n $destinationPath = Session::get('imgSrcUploadsRead') . '/topic_category'; //'public/img/material';\n\n $files = Input::file('tagItemFileName')[$key];\n\n $ext = $files->getClientOriginalExtension();\n\n $desPath = $destinationPath . '/' . $key. '.' . $ext;\n\n if($files->move($destinationPath, $key. '.' . $ext)){\n echo \"image uploaded<br>\";\n }\n\n // Resize using image intervention\n $img = Image::make($desPath)->resize(140, 140);\n\n $img->save($desPath);\n }\n }\n\n return redirect()->back();\n }", "public function update($tagId, $name)\n {\n $params = ['tag' => ['id' => $tagId, 'name' => $name]];\n return $this->httpPostJson('cgi-bin/tags/update', $params);\n }", "public function put ($parameters)\r\n { \r\n \r\n foreach ($parameters[\"fileTypeItems\"] as $key => $file):\r\n if (!file_exists($file[\"file\"])):\r\n throw new Exception(\"Local file not found\");\r\n endif;\r\n \r\n $parameters[\"fileTypeItems\"][$key][\"data\"] = base64_encode(file_get_contents($file[\"file\"]));\r\n endforeach;\r\n \r\n $response = $this->execute(\"PutFiles\", $parameters);\r\n \r\n return FlexmailAPI::stripHeader($response);\r\n }", "public function patchResourceTags($resourceID = null, $getParams) {\n\n\t\t$post = json_decode($this->CI->input->raw_input_stream, true);\n\n\t\t$this->CI->exitCode = 400;\n\t\tif (!isset($post['type'], $post['tagID'])) {\n\t\t\treturn ['message' => 'Resource type & tagID are mandatory'];\n\t\t}\n\n\t\tif($this->CI->authex->hasGroup(['admin', 'mod'])) {\n\t\t\t$this->_deleteResourceTags($resourceID, ['type' => $post['type']]);\n\t\t\t$tableName = $this->_getTableName($post['type']);\n\n\t\t\t$tagLen = count($post['tagID']);\n\t\t\t$data = [];\n\n\t\t\tfor ($i=0; $i < $tagLen; $i++) {\n\t\t\t\t$params = [\n\t\t\t\t\t'tagID'=> $post['tagID'][$i],\n\t\t\t\t\t'tableName' => $tableName,\n\t\t\t\t\t'resourceID' => $resourceID\n\t\t\t\t ];\n\t\t\t\tarray_push($data, $params);\n\t\t\t}\n\n\t\t\t$data = $this->CI->model->insertBatch([\n\t\t\t\t'table' => 'tags_relations',\n\t\t\t\t'data' => $data\n\t\t\t]);\n\t\t\tif ($data) {\n\t\t\t\t$this->CI->exitCode = 204;\n\t\t\t}\n\t\t}\n\t}", "protected function templistIdPutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling templistIdPut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling templistIdPut'\n );\n }\n\n $resourcePath = '/templist/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['text/csv']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testUpdateMetadata1UsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n //\n //dd($request->all());\n $article = Article::find($id);\n if(!$article){\n return response()->json(array('accessGranted'=>0,'msg'=>'不存在该文章'));\n }\n $data = $request->all();\n $label = $data['label_id'];\n unset($data['label_id']);\n $article->update($data);\n\n foreach($label as $v){\n $article->labels()->sync($v,[\n 'name'=> '测试2332',\n ]);\n }\n\n return response()->json(array('accessGranted'=>1));\n\n\n }", "public function put_update($id){\n\n\t\t$data = Input::get();\n\t\t$note = Note::find($id);\n\t\t$note->fill($data);\n\t\t$note->save();\n\n\t\t$tags = Tag::where(\"note_id\", $id)->get();\n\t\tforeach($tags as $tag)\n\t\t{\n\t\t\t$tag->content = Input::get(\"tags\");\n\t\t\t$tag->updated_at = date(\"Y-m-d H:i:s\");\n\t\t\t$tag->save();\n\t\t\treturn Response::json(compact(\"tag\"), 200 );\t\t\t\n\t\t}\n\n\t\treturn Response::json(compact(\"note\"), 200);\n\n\t}", "public static function put($id, $data, $labels = null) {\n return self::putProper($id, $data, $labels);\n }", "public function updateIssueTypeById($issueTypeId, array $issueType)\n { \n $this->setOptions(array(\"json\" => $issueType));\n $this->uri = \"/rest/api/\".$this->getApiVersion().\"/issuetype/\".$issueTypeId;\n $this->method = \"PUT\";\n }", "public function putTemplateItemWithHttpInfo($id, $body = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\TemplateJsonldTemplateRead';\n $request = $this->putTemplateItemRequest($id, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TemplateJsonldTemplateRead',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }" ]
[ "0.52678907", "0.49055672", "0.4841477", "0.48065895", "0.46027675", "0.45831212", "0.44669732", "0.4463419", "0.4430372", "0.43695116", "0.43570805", "0.42967638", "0.4279594", "0.42685777", "0.42059216", "0.4166487", "0.41586676", "0.4149972", "0.41212052", "0.4089855", "0.4049348", "0.4022921", "0.40221998", "0.40098828", "0.40016726", "0.39962018", "0.39867905", "0.39840972", "0.39679828", "0.395363" ]
0.74089706
0
Operation listsGenericGenericIdDelete Deletes a Generic item specified by genericId.
public function listsGenericdelete($generic_id) { $deleted_generic = Generic::destroy($generic_id); if($deleted_generic){ return response()->json(['msg' => 'Deleted generic']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsGenericgenericByIdget($generic_id)\r\n {\r\n $generic = Generic::findOrFail($generic_id);\r\n return response()->json($generic,200);\r\n }", "public function listsgenericGenericput($generic_id)\r\n {\r\n $input = Request::all();\r\n $generic = Generic::findOrFail($generic_id);\r\n $generic->update(['name' => $input['name']]);\r\n if($generic->save()){\r\n return response()->json(['msg' => 'Updated generic']);\r\n }else{\r\n return response('Oops, seems like there was a problem updating the generic');\r\n }\r\n }", "public function index_delete($id)\n {\n $this->db->delete('items', array('id'=>$id));\n \n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function index_delete($id)\n {\n $this->db->delete('items', array('id'=>$id));\n \n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function index_delete($id)\n {\n $this->write_db->delete($_table, array($_id=>$id));\n \n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function deleteAction($id)\n {\n $service = $this->getModuleService('dictionaryService');\n\n // Batch removal\n if ($this->request->hasPost('batch')) {\n $ids = array_keys($this->request->getPost('batch'));\n\n $service->deleteByIds($ids);\n $this->flashBag->set('success', 'Selected elements have been removed successfully');\n\n } else {\n $this->flashBag->set('warning', 'You should select at least one element to remove');\n }\n\n // Single removal\n if (!empty($id)) {\n $service->deleteById($id);\n $this->flashBag->set('success', 'Selected element has been removed successfully');\n }\n\n return 1;\n }", "public static function bulkDelete($list_id) {\n return db_delete(static::$table)\n ->condition('list_id', $list_id)\n ->execute();\n }", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function ajax_batch_delete(Request $request, $id)\n {\n foreach ($request->id as $id) {\n \n $tag = Tag::find($id);\n Tag::destroy($id);\n }\n echo 1;\n }", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);" ]
[ "0.5616488", "0.51028836", "0.50255215", "0.50255215", "0.49251264", "0.4907145", "0.48699746", "0.4860059", "0.4860059", "0.4860059", "0.4860059", "0.4860059", "0.4860059", "0.48370323", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856", "0.47505856" ]
0.77904016
0
///////////////////////////// Drug instruction functions// /////////////////////////// Operation listsInstructionGet Fetch list ofInstructionsIllnessess(for select options).
public function listsInstructionget() { $response = Instruction::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsInstructionByIdget($instruction_id)\r\n {\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n return response()->json($instruction,200);\r\n }", "public function getList() {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "function load_list($instructions)\n\t{\n\t\t$data = $instructions;\n\t\t$list = array();\n\t\t# Get the search parameters passed with the instructions\n\t\t$data['page'] = !empty($data['p']) && empty($data['__clear'])? $data['p']: 1;\n\t\t$data['pagecount'] = !empty($data['n']) && empty($data['__clear'])? $data['n']: NUM_OF_ROWS_PER_PAGE;\n\t\t$data['phrase'] = !empty($data['phrase']) && empty($data['__clear'])? addslashes(restore_bad_chars($data['phrase'])): '';\n\t\t$data['searchby'] = !empty($data['searchby']) && empty($data['__clear'])? explode('--', $data['searchby']): '';\n\t\t\n\t\tif(!empty($instructions['type']))\n\t\t{\n\t\t\t$data['listid'] = $instructions['type'].'search';\n\t\t\tswitch($instructions['type'])\n\t\t\t{\n\t\t\t\tcase 'user':\n\t\t\t\t\t$this->load->model('_user');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.first_name', 'P.last_name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_user->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'vacancy':\n\t\t\t\t\t$this->load->model('_vacancy');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('V.topic', 'V.summary', 'I.name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_vacancy->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'permission':\n\t\t\t\t\t$this->load->model('_permission');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t# Default search fields\n\t\t\t\t\t\tif(!empty($data['action']) && $data['action'] == 'grouplist') $default = array('notes');\n\t\t\t\t\t\telse if(!empty($data['action']) && $data['action'] == 'userlist') $default = array('P.first_name', 'P.last_name');\n\t\t\t\t\t\telse $default = array('display');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: $default;\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_permission->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'message':\n\t\t\t\t\t$this->load->model('_messenger');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.first_name', 'P.last_name', 'M.subject');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_messenger->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'school':\n\t\t\t\t\t$this->load->model('_school');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('S.name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_school->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'census':\n\t\t\t\t\t$this->load->model('_census');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.first_name', 'P.last_name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_census->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'teacher':\n\t\t\t\t\t$this->load->model('_teacher');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.first_name', 'P.last_name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_teacher->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'job':\n\t\t\t\t\t$this->load->model('_job');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('V.topic', 'V.summary', 'I.name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_job->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'interview':\n\t\t\t\t\t$this->load->model('_interview');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($instructions['action'], array('setdate', 'recommend', 'recommendations'))) \n\t\t\t\t\t\t\t$default = array('V.topic', 'V.summary', 'I.name');\n\t\t\t\t\t\telse if($instructions['action'] == 'shortlist') $default = array('S.shortlist_name', 'V.topic', 'I.name');\n\t\t\t\t\t\telse $default = array('P.first_name', 'P.last_name', 'V.topic');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: $default;\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_interview->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'confirmation':\n\t\t\t\t\t$this->load->model('_confirmation');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P1.last_name', 'P1.first_name', 'D.name', 'I.name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_confirmation->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'retirement':\n\t\t\t\t\t$this->load->model('_retirement');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.last_name', 'P.first_name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_retirement->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'leave':\n\t\t\t\t\t$this->load->model('_leave');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.last_name', 'P.first_name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_leave->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'transfer':\n\t\t\t\t\t$this->load->model('_transfer');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.last_name', 'P.first_name', 'I.name');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_transfer->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'report':\n\t\t\t\t\t$this->load->model('_report');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.last_name', 'P.first_name', 'L.details');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t\tif(strpos($data['phrase'], '@') !== false) $data['searchstring'] = \" (L.details LIKE '%email=\".$data['phrase'].\"%|%' OR L.details LIKE '%username=\".$data['phrase'].\"%|%') \";\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_report->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'approval':\n\t\t\t\t\t$this->load->model('_approval_chain');\n\t\t\t\t\t#Did the UI send any fields to search by?\n\t\t\t\t\tif(empty($data['__clear']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$searchBy = !empty($data['searchby'])? $data['searchby']: array('P.last_name', 'P.first_name', 'A.chain_type');\n\t\t\t\t\t\t$data['searchstring'] = $this->generate_phrase_query($searchBy, $data['phrase']);\n\t\t\t\t\t}\n\t\t\t\t\t$list = $this->_approval_chain->get_list($data);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$data['list'] = $list;\n\t\treturn $data;\n\t}", "protected function getInstrList()\n {\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$query = \"SELECT DISTINCT KINST, INST_NAME, PREFIX from tbl_instrument\" ;\n\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function fetchList();", "public function getInstruction();", "public function getInstructions()\n {\n return $this->_instructions;\n }", "function get_list($instructions=array())\n\t{\n\t\t$searchString = \" V.status='published' \";\n\t\t$orderBy = \" V.date_added DESC \";\n\t\tif(!empty($instructions['action']) && $instructions['action']== 'publish')\n\t\t{\n\t\t\t$searchString = \" V.status IN ('saved','verified') \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'archive')\n\t\t{\n\t\t\t$searchString = \" V.status IN ('saved','archived') \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'verify')\n\t\t{\n\t\t\t$searchString = \" V.status='saved' \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'public')\n\t\t{\n\t\t\t$searchString = \" V.status='published' AND (DATE(V.start_date) < NOW() AND DATE(V.end_date) > NOW()) \";\n\t\t\t$orderBy = \" V.end_date ASC \";\n\t\t}\n\t\t\n\t\t# If a search phrase is sent in the instructions\n\t\tif(!empty($instructions['searchstring']))\n\t\t{\n\t\t\t$searchString .= \" AND \".$instructions['searchstring'];\n\t\t}\n\t\t\n\t\t# Instructions\n\t\t$count = !empty($instructions['pagecount'])? $instructions['pagecount']: NUM_OF_ROWS_PER_PAGE;\n\t\t$start = !empty($instructions['page'])? ($instructions['page']-1)*$count: 0;\n\t\t\n\t\treturn $this->_query_reader->get_list('get_vacancy_list_data',array('search_query'=>$searchString, 'limit_text'=>$start.','.($count+1), 'order_by'=>$orderBy));\n\t}", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "public function getInstructions()\n {\n return $this->instructions;\n }", "function getInstruction($id){\n\t\t\t$str_query=\"SELECT instruction FROM cuisine_instruction WHERE recipe_id='$id'\";\n\t\t\treturn $this->query($str_query);\n\t\t}", "public function listsInstructionpost()\r\n {\r\n $input = Request::all();\r\n $new_instruction = Instruction::create($input);\r\n if($new_instruction){\r\n return response()->json(['msg' => 'Wrote new instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new instruction');\r\n }\r\n }", "protected function importInstructions()\n {\n return [];\n }", "public function getInstrucoes();", "function viewInstruction(){\n $id=$_REQUEST['id'];\n include(\"../model/instruction.php\");\n $obj=new instruction();\n\n if($obj->getInstruction($id)) {\n $row=$obj->fetch();\n echo '{\"result\":1,\"instructions\":[';\n while($row){\n echo json_encode($row);\n $row=$obj->fetch();\n if($row){\n echo \",\";\n }\n }\n echo \"]}\";\n }else {\n echo '{\"result\":0}';\n }\n }", "public function listsList()\n {\n\tthrow new Exception('Not implemented');\n }", "protected abstract function fetchLists();", "public function instructions()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'payment/instruction', $payloads);\n }", "abstract protected function getCommandList();", "public function getTaskListList(){\n return $this->_get(2);\n }", "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'listicdcodes',\n 'lookfor' => get_data('term'),\n )));\n\n $listicdcodes = !empty($listicdcodes) ? json_decode($listicdcodes) : array();\n\n /*Converting to autocomplete understandable format*/\n if (!empty($listicdcodes))\n {\n foreach ($listicdcodes as $val)\n {\n $listicdcodes_arr[] = array('id' => current($val)->ICDCode, 'value' => current($val)->ICDTitle);\n }\n }\n exit(json_encode($listicdcodes_arr));\n }", "abstract public function getList();", "public function getCheckInTaskListList(){\n return $this->_get(2);\n }", "public function getIlinewhoList(){\n return $this->_get(1);\n }", "public function getIops()\n {\n return $this->iops;\n }", "public function getInstructions($action) {\n\t\treturn $this->{$action};\n\t}", "public function getInkLists() {}", "public function get_list($dis=null) {\n\t\t$this->get_query($dis);\n\n\t\tif($this->input->post('length') != -1){\n\t\t\t$this->db->limit($this->input->post('length'),$this->input->post('start'));\n\t\t\t$query = $this->db->get();\n\t\t}else{\n\t\t\t$query = $this->db->get();\n\t\t}\n\n\t\treturn $query->result();\n\t}", "public function getList()\n\t{\n\t\t$this->methodNotAllowed();\t\t\n\t}", "public function getScanInstructions()\n {\n return $this->scan_instructions;\n }" ]
[ "0.6396222", "0.5729592", "0.5694488", "0.5575723", "0.5512754", "0.54761565", "0.54072756", "0.53999907", "0.538245", "0.53760767", "0.5368078", "0.5280385", "0.5247239", "0.5148639", "0.5099625", "0.508488", "0.5077562", "0.5044979", "0.49572375", "0.4940767", "0.49194792", "0.48937777", "0.4893233", "0.4888057", "0.48443562", "0.48427865", "0.4823548", "0.47921047", "0.4773811", "0.47623897" ]
0.6972521
0
Operation listsInstructionInstructionIdGet Fetch a Instruction specified by instructionId.
public function listsInstructionByIdget($instruction_id) { $instruction = Instruction::findOrFail($instruction_id); return response()->json($instruction,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInstruction($id){\n\t\t\t$str_query=\"SELECT instruction FROM cuisine_instruction WHERE recipe_id='$id'\";\n\t\t\treturn $this->query($str_query);\n\t\t}", "public function listsInstructionget()\r\n {\r\n $response = Instruction::all();\r\n return response()->json($response,200);\r\n }", "public function getInstruction();", "public function getId()\n {\n return $this->getData(self::INSTRUCTION_ID);\n }", "public function listsInstructiondelete($instruction_id)\r\n {\r\n $deleted_instruction = Instruction::destroy($instruction_id);\r\n if($deleted_instruction){\r\n return response()->json(['msg' => 'Deleted instruction']);\r\n }\r\n }", "public static function getByOrderId($orderId) {\n $result = db_query('\n SELECT instruction_id as id\n FROM `'.self::tableName.'` \n WHERE order_id = '.(int)$orderId\n )->fetchAll(\\PDO::FETCH_OBJ);\n if(!is_array($result))\n return NULL;\n return new Instruction($result[count($result)-1]->id);\n }", "public function get( $iId );", "function viewInstruction(){\n $id=$_REQUEST['id'];\n include(\"../model/instruction.php\");\n $obj=new instruction();\n\n if($obj->getInstruction($id)) {\n $row=$obj->fetch();\n echo '{\"result\":1,\"instructions\":[';\n while($row){\n echo json_encode($row);\n $row=$obj->fetch();\n if($row){\n echo \",\";\n }\n }\n echo \"]}\";\n }else {\n echo '{\"result\":0}';\n }\n }", "public function index($id)\n {\n $recipe = Recipe::find($id)->load('instructions');\n return $recipe->instructions;\n }", "public function getModelById($id)\n {\n\n $instruction = $this->getMapper()->findOneById((int) $id);\n\n if ($instruction == false) {\n throw new Exception($this->getView()->translate('Instruction not founds.'));\n }\n\n return $instruction;\n }", "public function getInstruction()\n {\n return $this->instruction;\n }", "public function getListId();", "public function fetchIssueDetails($issueId) {\n $endpoint = \"issues/\" . intval($issueId);\n return $this->apiClient->get($endpoint);\n }", "public function listsInstructionput($instruction_id)\r\n {\r\n $input = Request::all();\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n $instruction->update(['name' => $input['name']]);\r\n if($instruction->save()){\r\n return response()->json(['msg'=> 'Updated Instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update instruction');\r\n }\r\n }", "public function selectcartiddetails() {\n if (func_num_args() > 0) {\n $cartid = func_get_arg(0);\n try {\n $select = $this->select()\n ->from($this)\n ->where('id IN (?)', $cartid);\n\n $result = $this->getAdapter()->fetchAll($select);\n\n return $result;\n } catch (Exception $ex) {\n throw new Exception(\"argument not passed: \" . $ex);\n }\n } else {\n throw new Exception(\"argument not passed\");\n }\n }", "public function getInstructionType()\n {\n return $this->type;\n }", "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function get_target_by_id($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/targets/$id.json\");\n }", "public function incidenciaById_get($id_incidencia)\n {\n $this->output->set_header(\"Access-Control-Allow-Origin: *\");\n if ($this->auth_request()) {\n\n $jwt = $this->renewJWT();\n\n $incidencia = $this->api_model->get_incidenciaById($id_incidencia);\n\n if ($incidencia) {\n $message = [\n 'incidencia' => $incidencia,\n 'status' => RestController::HTTP_OK,\n 'token' => $jwt\n ];\n $this->response($message, RestController::HTTP_OK); // CREATED (201) being the HTTP response code\n } else {\n $this->response([\n 'status' => false,\n 'token' => $jwt,\n 'message' => 'No hay incidencias con este id'\n ], 404);\n }\n } else {\n $message = [\n 'status' => $this->auth_code,\n 'token' => $this->token,\n 'message' => 'Bad auth information. ' . $this->error_message\n ];\n $this->set_response($message, $this->auth_code); // 400 / 401 / 419 / 500\n }\n }", "public function listId() {\n\t\treturn $this->employee->get()->pluck('id')->all();\n\t}", "public function listsInstructionpost()\r\n {\r\n $input = Request::all();\r\n $new_instruction = Instruction::create($input);\r\n if($new_instruction){\r\n return response()->json(['msg' => 'Wrote new instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new instruction');\r\n }\r\n }", "public function getIds();", "public function getIds();", "function networkDetail($networkid) {\n $url ='/v2.0/networks/'.$networkid;\n\n return $this->_req->get($url, [], []);\n }", "public function getTask($id);", "public function getIdByIp($ip)\n\t{\n\t\treturn $this->_getResource()->getIdByIp($ip);\n\t}", "public function instructions()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'payment/instruction', $payloads);\n }", "public function getIncidencia($id){\n\t\t$sql = \" SELECT * FROM incidencias WHERE id = '$id' LIMIT 1 \";\n\t\t$resultado = $this->db->query($sql);//ejecutando la consulta con la conexión establecida\n\n\t\t$row = $resultado->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\n\t\treturn $row;\n\n\t}", "public function getEntityId();", "public function getEntityId();" ]
[ "0.6054121", "0.5504442", "0.5468755", "0.52972347", "0.5036937", "0.49868107", "0.49350566", "0.4883642", "0.48831713", "0.46792307", "0.46534947", "0.46503818", "0.45592496", "0.4501799", "0.43683457", "0.43394932", "0.42889836", "0.42859864", "0.42743662", "0.42623588", "0.42309904", "0.41985205", "0.41985205", "0.41806424", "0.41702855", "0.4151801", "0.41232392", "0.41161594", "0.41105273", "0.41105273" ]
0.712564
0
Operation listsInstructionPost Add an illness.
public function listsInstructionpost() { $input = Request::all(); $new_instruction = Instruction::create($input); if($new_instruction){ return response()->json(['msg' => 'Wrote new instruction']); }else{ return response('Oops, seems like something went wrong while trying to create a new instruction'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_postAction() {\n $info = $this->getPost(array('title', 'ad_ptype', 'img_day', 'img_night', 'start_time', 'end_time', 'status'));\n $info['ad_type'] = self::AD_TYPE;\n $this->cookData($info);\n $this->mergeImgParam($info);\n $result = Client_Service_Ad::addAd($info);\n if (! $result) $this->output(- 1, '操作失败');\n $this->output(0, '操作成功');\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', \r\n\t\t\t\t'link', 'activity', 'clientver', 'img', 'start_time', 'end_time', 'status', 'hits',\r\n\t\t\t\t'channel_id', 'module_id', 'cid', 'channel_code', 'ptype_id', 'is_recommend', 'action'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Ad::addAd($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','ishot', 'title', 'img', 'price', 'hk_price', 'start_time', 'end_time', \n\t\t\t\t'stock_num', 'limit_num', 'sale_num', 'comment_num', 'status','descrip'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fj_Service_Goods::addGoods($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort', 'title', 'ad_type', 'ad_ptype', 'link', 'img', 'icon', 'start_time', 'end_time', 'status'));\n\t\t$info['ad_type'] = $this->ad_type;\n\t\t$info = $this->_cookData($info);\n\t\t\n\t\tif($info['ad_ptype'] == 1){\n\t\t\t$adInfo = Resource_Service_Games::getResourceGames($info['link']);\n\t\t\t$tip = \"内容\";\n\t\t} else if($info['ad_ptype'] == 2){\n\t\t\t$adInfo = Resource_Service_Attribute::getResourceAttributeByTypeId($info['link'],1);\n\t\t\t$tip = \"分类\";\n\t\t} else if($info['ad_ptype'] == 3){\n\t\t\t$adInfo = Client_Service_Subject::getSubject($info['link']);\n\t\t\t$tip = \"专题\";\n\t\t}\n\t\t$msg = $this->_getMsg($adInfo, $tip,$info['ad_ptype'],$info['link']);\n\t\t$result = Client_Service_Ad::addAd($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function addPostAction() {\n $inputVars = $this->getInput(array(\n \t\t'id', 'dataType', //主表字段:id,type\n \t\t \t'data'//子表字段\n ));\n \tlist($news, $itemsList) = $this->checkInput($inputVars);\n \t$news['create_time'] = time();\n \t$result = Admin_Service_Material::add($news, $itemsList);\n \tif (!$result) $this->failPostOutput('操作失败');\n \t$this->successPostOutput($this->actions['listUrl']);\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'sort', 'descript'));\n\t\t$info = $this->_cookData($info);\n\t\t$series = Lock_Service_FileType::getFileTypeByName($info['name']);\n\t\tif($series) $this->output(-1, $info['name'].'已存在');\n\t\t$result = Lock_Service_FileType::addFileType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'link', 'img', 'sort', 'status', 'model_id','type_id'));\n\t\t$info = $this->_cookData($info);\n\t\t$result = Browser_Service_Recsite::addRecsite($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Notice::addNotice($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('title', 'guide', 'gtype','ntype','btype','img', 'status', 'start_time', 'update_time'));\n\t\t$info = $this->_cookData($info);\n\t\t$info['start_time'] = strtotime($info['start_time']);\n\t\t$info['update_time'] = Common::getTime();\n\t\t$result = Client_Service_Besttj::addBesttj($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$webroot = Common::getWebRoot();\n\t\t$this->output(0,'操作成功,请添加游戏',$result);\n\t\texit;\n\t}", "public function add_instr()\n {\n $this->instructions++; \n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'img', 'status', 'hits'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Game_Service_Category::addCategory($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "function process_add()\r\n {\r\n include_once($this->_eqdkp->root_path.'plugins/'.$this->_pm->get_data('ctrt','path').'/admin/ctrt_common.php');\r\n\r\n $ignore_item = getWoWHeadItem ($_POST['item']);\r\n\r\n if (!$this->daoIgnoreItem->insert(array('items_wowid' => $ignore_item['wowid'],\r\n 'items_name' => $ignore_item['name'],\r\n 'items_quality' => $ignore_item['quality']\r\n ))) {\r\n // Error out if the item is a duplicate\r\n $failure_message = sprintf($this->_user->lang[\"ctrt_item_duplicate\"],$ignore_item['name']);\r\n $link_list = array(\r\n $this->_user->lang['ctrt_adminmenu_list'] => $this->getControllerLink($this->getMyParam(),'list'),\r\n $this->_user->lang['ctrt_adminmenu_add'] => $this->getControllerLink($this->getMyParam(),'add'),\r\n $this->_user->lang['ctrt_adminmenu_export'] => $this->getControllerLink($this->getMyParam(),'export'),\r\n $this->_user->lang['ctrt_adminmenu_import'] => $this->getControllerLink($this->getMyParam(),'import'));\r\n\r\n $this->admin_die($failure_message, $link_list);\r\n } else {\r\n\r\n /**\r\n * Logging\r\n */\r\n\r\n /**\r\n * Get the member name for this alias\r\n */\r\n $log_action = array(\r\n 'header' => '{L_ACTION_CTRT_IGNORE_ITEM_ADDED}',\r\n '{L_CTRT_LABEL_IGNORE_ITEM}' => $ignore_item['name'],\r\n\r\n '{L_ADDED_BY}' => $this->admin_user);\r\n\r\n $this->log_insert(array(\r\n 'log_type' => $log_action['header'],\r\n 'log_action' => $log_action)\r\n );\r\n\r\n /**\r\n * Success message\r\n */\r\n $success_message = sprintf($this->_user->lang['ctrt_item_success_add'], $ignore_item['name']);\r\n $link_list = array(\r\n $this->_user->lang['ctrt_adminmenu_list'] => $this->getControllerLink($this->getMyParam(),'list'),\r\n $this->_user->lang['ctrt_adminmenu_add'] => $this->getControllerLink($this->getMyParam(),'add'),\r\n $this->_user->lang['ctrt_adminmenu_export'] => $this->getControllerLink($this->getMyParam(),'export'),\r\n $this->_user->lang['ctrt_adminmenu_import'] => $this->getControllerLink($this->getMyParam(),'import'));\r\n $this->admin_die($success_message, $link_list);\r\n }\r\n\r\n return;\r\n }", "public function mass_add()\n {\n }", "public function add_postAction(){\n\t\t$info = $this->getPost(array('name', 'parent_id', 'root_id', 'sort'));\n\t\tif (!$info['name']) $this->output(-1, '名称不能为空.');\n\t\t\n\t\t//检测重复\n\t\t$area = Ola_Service_Area::getBy(array('name'=>$info['name']));\n\t\tif ($area) $this->output(-1, $info['name'].'已存在.');\n\t\t\n\t\t$ret = Ola_Service_Area::add($info);\n\t\tif (!$ret) {\n\t\t\t$this->output(-1, '操作失败.');\n\t\t}\n\t\t$this->output(0, '操作成功.');\n\t}", "public function addInstruction(Instruction $inst)\n\t{\n\t\t$this->instructions[] = $inst;\n\t}", "function addInstruction(){\n $recipe=$_REQUEST['recipe'];\n $instr=$_REQUEST['instruction'];\n\n include(\"../model/instruction.php\");\n $obj = new instruction();\n if($obj->addInstruction($recipe, $instr)){\n echo '{\"result\":1}';\n }else {\n echo '{\"result\":0}';\n }\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','name'));\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier) $this->output(-1, '操作失败,该分类已存在');\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fanli_Service_Ptype::addType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function addAction() {\n \t$dataType = $this->getInput('dataType');\n \tif (!in_array($dataType,$this->DATATYPE)) {\n \t exit(\"参数错误\");\n \t}\n \t$this->assign('dataType', $dataType);\n $this->assign('dataTypes', $this->DATATYPE);\n }", "public function listsIllnessesPost()\r\n {\r\n $input = Request::all();\r\n $new_illness = Illnesses::create($input);\r\n if($new_illness){\r\n return response()->json(['msg' => 'Created new illness'],200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to create a new illness');\r\n }\r\n }", "function addInstruction($recipe,$instruction){\n\t\t\t$str_query=\"INSERT INTO cuisine_instruction SET recipe_id='$recipe', instruction='$instruction'\";\n\t\t\treturn $this->query($str_query);\n\t\t}", "public function annimalAddAction()\n {\n }", "public function add_postAction() {\r\n \t$this->checkRight();\r\n \t//现只保留一个收货地址\r\n \t$gid = $this->getInput('gid');\r\n \t$info = $this->getPost(array('realname','province','city','country','detail_address','postcode', 'mobile','phone'));\r\n \t$info['user_id'] = $this->userInfo['id'];\r\n \t$info['isdefault'] = 1;\r\n \t$info = $this->_cookData($info);\r\n\t\t$result = Gc_Service_UserAddress::addUserAddress($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败.');\r\n\t\tif($gid) {\n\t\t\t$url = $webroot.'/order/detail/?id='.$gid;\n\t\t} else {\n\t\t\t$url = $webroot.'/user/setting/index';\n\t\t}\r\n\t\t$this->output(0, '添加成功.', array('type'=>'redirect', 'url'=>$url));\r\n }", "function add() {\n }", "protected function afterAdd() {\n\t}", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function add() {\n\n $data = array(\n 'defect' => $this->input->post('defect', true),\n 'code' => $this->input->post('code', true),\n 'description' => $this->input->post('description', true),\n 'reason' => $this->input->post('reason', true),\n );\n\n $error = null;\n $id = $this->errors_model->add($data);\n echo $this->repairer->send_json(array('id'=>$id, 'error'=>$error));\n }", "public function add(Post $post);", "public function add(Post $post);", "protected function add() {\n\t}" ]
[ "0.58577967", "0.5701881", "0.56047314", "0.54898065", "0.5433473", "0.5421391", "0.53432715", "0.53324443", "0.52746123", "0.5200551", "0.5163179", "0.51425165", "0.50794995", "0.5057372", "0.50191975", "0.50079864", "0.4982584", "0.49401808", "0.49346584", "0.4931755", "0.4896571", "0.48597547", "0.48469755", "0.48344022", "0.48229533", "0.48229533", "0.48181048", "0.48114058", "0.48114058", "0.48113617" ]
0.586773
0
Operation listsInstructionInstructionIdPut Update an existing Illness specified by instructionId.
public function listsInstructionput($instruction_id) { $input = Request::all(); $instruction = Instruction::findOrFail($instruction_id); $instruction->update(['name' => $input['name']]); if($instruction->save()){ return response()->json(['msg'=> 'Updated Instruction']); }else{ return response('Oops, seems like something went wrong while trying to update instruction'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Instruction $instruction, $recipe_id, $id)\n {\n $instruction = Instruction::find($id);\n $instruction->description = $request->description;\n $instruction->update();\n }", "public function setInstruction($instruction);", "public static function updateInstructions(int $id, string $instructions, mysqli $db) {\n\t\tif($update = $db->prepare('update recipe set instructions=? where id=? limit 1'))\n\t\t\tif($update->bind_param('si', $instructions, $id))\n\t\t\t\tif($update->execute())\n\t\t\t\t\t$update->close();\n\t\t\t\telse\n\t\t\t\t\tself::DatabaseError('Error updating recipe instructions', $update);\n\t\t\telse\n\t\t\t\tself::DatabaseError('Error binding parameters to update recipe instructions', $update);\n\t\telse\n\t\t\tself::DatabaseError('Error preparing to update recipe instructions', $db);\n\t}", "public function updateAction(Request $request, $id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MccASMemberBundle:Ip')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ip entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createForm(new IpType(), $entity);\n $editForm->bind($request);\n\n if ($editForm->isValid()) {\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('ip_edit', array('id' => $id)));\n }\n\n return $this->render('MccASMemberBundle:Ip:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function updateById(int $objectId, array $input, string $additional = null)\r\n {\r\n $this->showHeaderNotFound();\r\n }", "public function update($id, InternetRequest $request)\n\t{\n\t\t$internet = Internet::find($id);\n\t\t$internet->update($request->all());\n\n\t\treturn redirect('internet');\n\t}", "public function update(UpdateIncome $request, $id)\n {\n $request->saveIncome($id);\n }", "public static function updateInstructions() {\n $params = $_POST;\n $hoitopyynto = Hoitopyynto::find($params['pyynto_id']);\n $hoitopyynto->ohje = $params['ohje'];\n $hoitopyynto->updateInstruction();\n Redirect::to('/laakari');\n }", "public function update( $id, array $attribute){\n\n }", "public function update($id, UpdateIncidenceRequest $request)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n $incidence = $this->incidenceRepository->update($request->all(), $id);\n\n Flash::success('Incidence updated successfully.');\n\n return redirect(route('incidences.index'));\n }", "public function update(Request $request, $id)\n {\n //\n $inters =Interest::findOrFail($id);\n $inters->update($request->all());\n\n return redirect('admin/interests');\n }", "public function putAction(int $id)\n {\n // TODO: Implement putAction() method.\n }", "public function listsIllnessesPut($illness_id)\r\n {\r\n $input = Request::all();\r\n $illness = Illnesses::findOrFail($illness_id);\r\n $illness->update(['name' => $input['name']]);\r\n if($illness->save()){\r\n return response()->json(['msg' => 'Updated Illness'], 200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to update the illness');\r\n }\r\n }", "public function update(Request $request, $id)\n {\n \n $industry = Industry::find($id); \n\n $industry->country = $request->country; \n $industry->postal_code = $request->postal_code; \n $industry->industry = $request->industry; \n \n $industry->save();\n }", "public function update(UpdateDiagnosticPut $request, $id)\n {\n try {\n $status = \"activo\";\n if($request->status != \"on\"){\n $status = \"inactivo\";\n }\n $validate = $request->validated();\n DB::beginTransaction();\n $diagnostic = Diagnostic::find($id);\n $diagnostic->code = $request->code;\n $diagnostic->name = $request->name;\n $diagnostic->description = $request->description;\n $diagnostic->status = $status;\n $diagnostic->save();\n DB::commit();\n return redirect()->route('get-diagnostics');\n } catch (Exception $e) {\n DB::rollBack();\n return response()->json(['errors' => $e], 422);\n }\n }", "public function listsInstructionByIdget($instruction_id)\r\n {\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n return response()->json($instruction,200);\r\n }", "public function update(InterestUpdateRequest $request, Interest $interest)\n {\n if ($interest->update($request->all())) {\n return redirect()\n ->route('admin.interest.index')\n ->with('status', \"Interest '{$request->title}' has been updated successfully!\");\n }\n\n return back()\n ->withInput();\n }", "public static function updateIt(int $id, array $request);", "public function update(Request $request, Interest $interest)\n {\n //\n }", "public function update($id, UpdateInclusionRequest $request)\n {\n $inclusion = $this->inclusionRepository->findWithoutFail($id);\n\n if (empty($inclusion)) {\n Flash::error('Inclusion not found');\n\n return redirect(route('inclusions.index'));\n }\n\n $inclusion = $this->inclusionRepository->update($request->all(), $id);\n\n Flash::success('Inclusion updated successfully.');\n\n return redirect(route('inclusions.index'));\n }", "public function update(Request $request, Ip $ip)\n {\n //\n }", "public function addInstruction(Instruction $inst)\n\t{\n\t\t$this->instructions[] = $inst;\n\t}", "public function update(AttributeDetailUpdateRequest $request, $id)\n { \n $attribute_details = AttributeDetail::find($id);\n $attribute_details->fill($request->all())->save();\n return back()->with('response', 'Atributo editado con éxito');\n }", "public function update(Request $request, $id )\n {\n $equipment = Equipment::findOrFail( $id );\n\n $institute = auth()->user()->institute;\n\n if( $equipment->institute_id == $institute->id )\n {\n $equipment->updateEquipment( $request->except( '_token', '_method') );\n }\n\n $institute->updateEquipment( $request->except('_token', '_method') + ['equipment_id' => $id ] );\n\n return redirect()->route('admin.institute-equipments.edit', $id )\n ->withMessage('Institute Equipment Updated Successfully');\n }", "public function update($id, UpdateIcon $request)\n {\n $data = $request->except('file');\n\n $file = $request->file('file', null);\n\n if($file)\n {\n $file = $this->upload->upload( $request->file('file') , 'frontend/icons' , 'icon');\n $data['image'] = $file['name'];\n }\n\n $icon = $this->icon->update($data);\n\n return redirect('admin/icon/'.$icon->id)->with( array('status' => 'success' , 'message' => 'L\\'icone a été mise à jour' ));\n }", "public function update($id, $input);", "public function setInsightId($val)\n {\n $this->_propDict[\"insightId\"] = $val;\n return $this;\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => ['required', 'string', 'max:255'],\n ]);\n\n Institution::where('id', $id)\n ->update(['name' => $request->name]);\n\n return redirect()->back()\n ->with('success', trans('dashboard.institutions.edit-success'));\n }", "public function edit(Interest $interest)\n {\n //\n }", "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('tblattendance', $input, array('id' => $id));\n\n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }" ]
[ "0.5406731", "0.4920397", "0.46311033", "0.4594061", "0.45442614", "0.44969106", "0.44951925", "0.4494692", "0.44739178", "0.44345933", "0.43796307", "0.43511924", "0.43359163", "0.43037754", "0.4302092", "0.4272892", "0.4272037", "0.42649588", "0.42534533", "0.4235382", "0.4224112", "0.42184865", "0.41991466", "0.41738752", "0.4160156", "0.41600052", "0.41582325", "0.41577607", "0.41422465", "0.41309738" ]
0.61308044
0
Operation listsInstructionInstructionIdDelete Deletes a Instruction item specified by instructionId.
public function listsInstructiondelete($instruction_id) { $deleted_instruction = Instruction::destroy($instruction_id); if($deleted_instruction){ return response()->json(['msg' => 'Deleted instruction']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Instruction $instruction, $id)\n {\n $instruction = Instruction::find($id);\n $instruction->delete();\n }", "public function listsInstructionByIdget($instruction_id)\r\n {\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n return response()->json($instruction,200);\r\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('MccASMemberBundle:Ip')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ip entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('ip'));\n }", "public function delete($ip)\n {\n // TODO: Implement delete() method.\n }", "public function deleteIPAccessControlList($ipAccessControlListId)\n {\n return $this->start()->uri(\"/api/ip-acl\")\n ->urlSegment($ipAccessControlListId)\n ->delete()\n ->go();\n }", "public function actionDelete($id)\n {\n if (Yii::app()->request->isPostRequest) {\n // we only allow deletion via POST request\n $OrderItems = OrderItem::model()->findAllByAttributes(array('order_id' => $id));\n foreach ($OrderItems as $OrderItem) {\n $OrderItem->delete();\n }\n $this->loadModel($id)->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n } else {\n throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');\n }\n }", "public function deleteAction($id)\n {\n $service = $this->getModuleService('dictionaryService');\n\n // Batch removal\n if ($this->request->hasPost('batch')) {\n $ids = array_keys($this->request->getPost('batch'));\n\n $service->deleteByIds($ids);\n $this->flashBag->set('success', 'Selected elements have been removed successfully');\n\n } else {\n $this->flashBag->set('warning', 'You should select at least one element to remove');\n }\n\n // Single removal\n if (!empty($id)) {\n $service->deleteById($id);\n $this->flashBag->set('success', 'Selected element has been removed successfully');\n }\n\n return 1;\n }", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "public function actionDelete()\r\n {\r\n $id = intval($_GET['id']);\r\n $this->loadModel($id)->delete();\r\n $this->redirect('/app/IconConfig/index');\r\n }", "public function deleteElement($elementId)\n\t{\n\t\t$this->storage->deleteIndexElement($elementId);\n\t}", "public function delete($idAttrEam);", "public function actionDelete()\n\t{\n\t\t$id = intval($_GET['iId']);\n\t\t$this->loadModel($id)->delete();\n\t\t$this->redirect('/app/DayPush/index');\n\t}", "public function destroy(DeleteTaskRequest $request, $id)\n {\n $task = Task::find($id);\n\n if (is_null($task)) {\n throw new ItemNotFoundException($id);\n }\n\n if($task->tracking_history->isNotEmpty()) {\n throw new InvalidDataException([\n 'tracking_history' => $task->tracking_history->toArray()\n ],\n 'Can\\'t delete!, someone work in this task.');\n }\n\n try {\n $task->delete();\n } catch (\\Throwable $th) {\n throw new ItemNotDeletedException('Task');\n }\n\n return $this->sendResponse(new TaskResource($task), 'Task deleted successfully.');\n }", "public function delete(int $id);", "public function remove($cartId);", "public function deleteItem( $id ) {\n\t}", "public function getId()\n {\n return $this->getData(self::INSTRUCTION_ID);\n }", "public function delete($itemId, $attachmentId, $optParams = array())\n {\n $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params));\n }", "public function delete($id)\n {\n if (!$result = $this->db->query(\"DELETE from `work_experience` WHERE `id` = '$id'\")) {\n throw new \\mysqli_sql_exception(\"Oops! Something has gone wrong on our end. Error Code: workExpDelete\");\n }\n }", "public static function deleteTip(int $tipId)\n\t{\n\t\tif ($stmt = self::db()->prepare(\"DELETE FROM tips WHERE id = ?;\"))\n\t\t{\n\t\t\t$stmt->bind_param('i', $tipId);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->close();\n\t\t}\n\t}", "function deleteWorkflow($workflowId);", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }", "public function deleteNetworkPiiRequest($network_id, $request_id)\n {\n $this->deleteNetworkPiiRequestWithHttpInfo($network_id, $request_id);\n }", "public function delete($id)\n { \n $this->action('delete', array('id' => $id));\n }", "public function delete($taskListId, $priorityId) {\n // Authenticate first\n static::authenticate();\n\n return $this->taskService->tasks->delete($taskListId, $priorityId);\n }", "public static function delete(\\Scrivo\\Context $context, $id) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\t\ttry {\n\t\t\tself::validateDelete($context, $id);\n\n\t\t\t$tmp = self::fetch($context, $id);\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND\n\t\t\t\t(list_item_definition_id = :id OR parent_list_item_definition_id = :id)\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM list_item_definition\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($context->cache[$id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SolMantenimientoIdentificacion entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('solmantenimientoidentificacion'));\n }", "public function delete( $id );", "public function deleteById($ingredientId);", "public function actionDelete($id) {\n if (Yii::app()->request->isPostRequest) {\n $reviews = Review::model()->findAllByAttributes(array(\n 'listing_id' => $id,\n ));\n foreach ($reviews as $review) {\n $review->delete();\n }\n \n $listingFeatures = ListingFeature::model()->findAllByAttributes(array(\n 'listing_id' => $id,\n ));\n foreach($listingFeatures as $listingFeature) {\n $listingFeature->delete();\n }\n \n $seoRecords = SeoData::model()->findAllByAttributes(array(\n 'model_name' => 'Listing',\n 'model_id' => $id,\n ));\n \n foreach($seoRecords as $seoRecord) {\n $seoRecord->delete();\n }\n \n // we only allow deletion via POST request\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax'])) {\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }\n } else {\n throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');\n }\n }" ]
[ "0.58732736", "0.48092917", "0.4639627", "0.46328503", "0.45919377", "0.45766997", "0.45220536", "0.45123997", "0.44835213", "0.44825512", "0.4466729", "0.4439523", "0.4422459", "0.44221088", "0.43992892", "0.43985417", "0.439492", "0.4372998", "0.43631342", "0.43613708", "0.43601716", "0.4344552", "0.43405506", "0.43294412", "0.43266827", "0.43264207", "0.4309111", "0.4305473", "0.42998677", "0.42991164" ]
0.6699512
0
///////////////////////////// Nonaadherence functions // /////////////////////////// Operation listsNonaadherencereasonGet Fetch NonAdherence Reasons (for select options).
public function listsNonaadherencereasonget() { $response = NonAdherenceReason::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonadherencebyIdget($nonadherence_id)\r\n {\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n return response()->json($reason,200);\r\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "function &getNotAccepted( )\n {\n $this->dbInit();\n $link_array = array();\n $return_array = array();\n \n $this->Database->array_query( $link_array, \"SELECT ID FROM eZLink_Link WHERE Accepted='N' ORDER BY Title\" );\n\n for ( $i=0; $i < count( $link_array ); $i++ )\n {\n $return_array[] = new eZLink( $link_array[$i][\"ID\"] );\n }\n\n return $return_array;\n }", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function getUnavailableAdTypes()\n {\n $query = \"SELECT ALL FROM adv_type WHERE is_available = 'n'\";\n return $this->getQueryData($query, $this->getConnection());\n }", "function mfcs_get_unavailability_type_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_UNAVAILABILITY_TYPE_NONE] = 'None';\n }\n\n $options_all[MFCS_UNAVAILABILITY_TYPE_RENOVATION] = 'Renovation';\n $options_all[MFCS_UNAVAILABILITY_TYPE_REPAIR] = 'Repair';\n $options_all[MFCS_UNAVAILABILITY_TYPE_REFURBISHMENT] = 'Planned Refurbishment';\n $options_all[MFCS_UNAVAILABILITY_TYPE_SPECIAL_EVENT] = 'Special Event';\n $options_all[MFCS_UNAVAILABILITY_TYPE_OUTAGE] = 'Outage';\n $options_all[MFCS_UNAVAILABILITY_TYPE_EMERGENCY] = 'Emergency';\n $options_all[MFCS_UNAVAILABILITY_TYPE_CLASS] = 'Class';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n elseif ($option == 'combined') {\n $options_all = array();\n $options_all[MFCS_UNAVAILABILITY_TYPE_RENOVATION] = 'Renovation / Repair';\n $options_all[MFCS_UNAVAILABILITY_TYPE_REPAIR] = 'Renovation / Repair';\n $options_all[MFCS_UNAVAILABILITY_TYPE_REFURBISHMENT] = 'Planned Refurbishment';\n $options_all[MFCS_UNAVAILABILITY_TYPE_SPECIAL_EVENT] = 'Special Event';\n $options_all[MFCS_UNAVAILABILITY_TYPE_OUTAGE] = 'Emergency / Outage';\n $options_all[MFCS_UNAVAILABILITY_TYPE_EMERGENCY] = 'Emergency / Outage';\n $options_all[MFCS_UNAVAILABILITY_TYPE_CLASS] = 'Class';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "function getDenyReasons() {\n return $this->denied_reasons;\n }", "public function getNegativeRespondedGuests()\n {\n $query = 'select attendees.displayName as attendeeName, users.name as userName from users right join attendees on attendees.userID = users.userID where attendees.isAttending = 0 AND users.isRSVP = 1;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $array[] = array('attendeeName' => $row['attendeeName'], 'userName' => $row['userName']);\n }\n return $array;\n }\n else\n {\n return -1;\n } \n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "function mfcs_get_request_problems_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_PROBLEM_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_PROBLEM_CONFLICT] = 'Conflict';\n $options_all[MFCS_REQUEST_PROBLEM_STALE] = 'Stale';\n $options_all[MFCS_REQUEST_PROBLEM_STUCK] = 'Stuck';\n $options_all[MFCS_REQUEST_PROBLEM_BLOCKED] = 'Blocked';\n $options_all[MFCS_REQUEST_PROBLEM_COORDINATOR] = 'Coordinator Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_REQUESTER] = 'Requester Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_ROOM] = 'Room Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_BUILDING] = 'Building Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_LOCATION] = 'Location Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_CACHE_REQUEST] = 'Cache Invalid';\n $options_all[MFCS_REQUEST_PROBLEM_HOLIDAY] = 'Holiday Conflict';\n $options_all[MFCS_REQUEST_PROBLEM_UNAVAILABLE] = 'Room Unavailable';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function findNotSentToCalendar()\n {\n $sql = <<<SQL\n SELECT s.*, p.title as program_name \n FROM ec_shows s, ec_programs p\n WHERE sent_to_calendar like ''\n AND s.program_id = p.id\nSQL;\n $sqlQuery = new SqlQuery($sql);\n return $this->getList($sqlQuery);\n }", "public function testRetrieveListUnsuccessfulReason()\n {\n }", "public function getnonapprouve(){\n $annances = DB::table('annances')\n ->select(['annances.numAnnance','annances.prix','annances.created_at','voitures.marque','pieaces.desPieace','annances.nom','annances.approve'])\n ->join('pieaces', 'pieaces.idPieace', '=', 'annances.pieace_idPieace')\n ->join('voitures', 'voitures.idVoiture', '=', 'annances.voiture_idVoiture')\n ->orderBy('annances.numAnnance', 'desc')\n ->where('approve','non')\n ->get();\n\n\n\n return Response()->json(['annances'=>$annances]);\n }", "public function getNonComplianceReason()\n {\n return $this->non_compliance_reason;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getQueryOptionsAllowableValues();\n if (!is_null($this->container['queryOptions']) && !in_array($this->container['queryOptions'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'queryOptions', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function getPageAccessFailureReasons() {}", "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public function get_not_created_links()\r\n {\r\n \tif (empty($this->course_code))\r\n \t\tdie('Error in get_not_created_links() : course code not set');\r\n \t\r\n \t$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);\r\n\r\n\t\t$sql = 'SELECT id,title from '.$this->get_exercise_table()\r\n\t\t\t\t.' WHERE id NOT IN'\r\n\t\t\t\t.' (SELECT ref_id FROM '.$tbl_grade_links\r\n\t\t\t\t.' WHERE type = '.LINK_EXERCISE\r\n\t\t\t\t.\" AND course_code = '\".$this->get_course_code().\"'\"\r\n\t\t\t\t.')';\r\n\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t$cats=array();\r\n\t\twhile ($data=mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\t$cats[] = array ($data['id'], $data['title']);\r\n\t\t}\r\n\t\treturn $cats;\r\n }", "public function getHideInList() {}", "public function getnonavailabledates() {\n\n if ( self::isEmptyResult() ) {\n return array();\n }\n\n $dates = array();\n\n $non_available = $this->data[self::resultinnernode];\n\n $non_available = $this->normalize($non_available);\n\n foreach ($non_available as $dateObj ) {\n $startDate = new \\DateTime($dateObj['dtFromDate']);\n $endDate = new \\DateTime($dateObj['dtToDate']);\n\n $periodInterval = new \\DateInterval('P1D');\n $period = new \\DatePeriod( $startDate, $periodInterval, $endDate );\n\n foreach ($period as $date ) {\n $dates[] = array(\n 'date' => $date->format('Y-m-d'),\n 'available' => 0,\n 'staytype' => $dateObj['strStayType'],\n 'property_id' => $this->property_id,\n\n // Confirmation number\n 'quotenum' => $dateObj['intQuoteNum'],\n );\n }\n\n }\n\n return $dates;\n }", "public function getMustNotList() {\n return $this->_get(2);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getDynamicDocumentVersionAllowableValues();\n if (!is_null($this->container['dynamic_document_version']) && !in_array($this->container['dynamic_document_version'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'dynamic_document_version', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "function GetAllDeniedPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n $placedOffersModel->GetAllDeniedPlacedOffers();\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['status'] === null) {\r\n $invalidProperties[] = \"'status' can't be null\";\r\n }\r\n $allowedValues = $this->getStatusAllowableValues();\r\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'status', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['reason'] === null) {\r\n $invalidProperties[] = \"'reason' can't be null\";\r\n }\r\n if ($this->container['message'] === null) {\r\n $invalidProperties[] = \"'message' can't be null\";\r\n }\r\n if ($this->container['currentVersion'] === null) {\r\n $invalidProperties[] = \"'currentVersion' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "public function getnonavailabledatesraw() {\n\n if ( self::isEmptyResult() ) {\n return array();\n }\n\n $non_available = $this->data[self::resultinnernode];\n\n $non_available = $this->normalize($non_available);\n\n return $non_available;\n }", "public function getList()\n\t{\n\t\t$this->methodNotAllowed();\t\t\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['resource_id'] === null) {\n $invalidProperties[] = \"'resource_id' can't be null\";\n }\n if ($this->container['resource_type'] === null) {\n $invalidProperties[] = \"'resource_type' can't be null\";\n }\n $allowedValues = $this->getResourceTypeAllowableValues();\n if (!is_null($this->container['resource_type']) && !in_array($this->container['resource_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'resource_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['href'] === null) {\n $invalidProperties[] = \"'href' can't be null\";\n }\n if ($this->container['partner_company_name'] === null) {\n $invalidProperties[] = \"'partner_company_name' can't be null\";\n }\n if ($this->container['partner_system_name'] === null) {\n $invalidProperties[] = \"'partner_system_name' can't be null\";\n }\n return $invalidProperties;\n }", "private function getInvisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(false);\n\t\t}\n\t}" ]
[ "0.67664814", "0.67120826", "0.6191944", "0.60522175", "0.59968936", "0.5774447", "0.57116055", "0.56865025", "0.5679175", "0.55206805", "0.55058354", "0.5496763", "0.54555076", "0.53936404", "0.5340905", "0.5337508", "0.53323376", "0.5329643", "0.5327154", "0.53164726", "0.531388", "0.52962047", "0.5263008", "0.5261434", "0.5235174", "0.5224", "0.52045375", "0.5204392", "0.5199882", "0.51749367" ]
0.79364717
0
Operation listsNonadherenceNonadherenceIdGet Fetch NonAdherence Reason specified by nonadherenceId.
public function listsNonadherencebyIdget($nonadherence_id) { $reason = NonAdherenceReason::findOrFail($nonadherence_id); return response()->json($reason,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function listsNonaadherencereasonget()\r\n {\r\n $response = NonAdherenceReason::all();\r\n return response()->json($response,200);\r\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "function getDenyReasons() {\n return $this->denied_reasons;\n }", "public function getAllNotResponded()\n {\n $query = 'select count(attendees.attendeeID) from users right join attendees on users.userID = attendees.userID where users.isRSVP = 0;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function get_referral_chat_not($user_id,$hospital_id){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM referral_chat_not\n\t\t\t\tWHERE sender_id!=\\\"$user_id\\\"\n\t\t\t\tAND (from_hospital=\\\"$hospital_id\\\" OR receive_hospital=\\\"$hospital_id\\\")\n\t\t\t\tORDER BY notif_id DESC\";\n\t\t$result=$this->select($con,$query);\n\t\treturn $result;\n\t}", "public function get_unseen() {\n $this->authenticate();\n $result = $this->discussion->get_unseen_discussions();\n if (!is_null($result)) {\n exit(json_encode([\n 'flg' => TRUE,\n 'msg' => $result\n ]));\n } else {\n exit(json_encode([\n 'flg' => FALSE\n ]));\n }\n }", "private function getCountNegative($idUtente)\n {\n\n $GET_COUNT_NEGATIVE = \"SELECT microcategoria.nome, COUNT(feedback.id) as negativi\n FROM feedback, annuncio, riferito, microcategoria\n WHERE feedback.id_valutato = '%s' AND\n feedback.valutazione <= 2.5 AND\n feedback.id_annuncio = annuncio.id AND\n riferito.id_annuncio = annuncio.id AND\n riferito.id_microcategoria = microcategoria.id\n GROUP BY microcategoria.nome\";\n $query = sprintf($GET_COUNT_NEGATIVE, $idUtente);\n $result = self::getDB()->query($query);\n\n if ($result) {\n $list = array();\n while ($r = $result->fetch_assoc()) {\n $listElement = new StatisticheProfiloUtenteListObject($r['nome'], \" \", $r['negativi']);\n array_push($list, $listElement);\n }\n return $list;\n }\n return false;\n\n }", "public function getNonComplianceReason()\n {\n return $this->non_compliance_reason;\n }", "public function setNonComplianceReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->non_compliance_reason = $var;\n\n return $this;\n }", "public function nonLeaveAbsences()\n {\n return $this->hasMany('App\\Models\\Absence', 'personnel_no', 'personnel_no')\n ->excludeLeaves();\n }", "public function getNegativeRespondedGuests()\n {\n $query = 'select attendees.displayName as attendeeName, users.name as userName from users right join attendees on attendees.userID = users.userID where attendees.isAttending = 0 AND users.isRSVP = 1;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $array[] = array('attendeeName' => $row['attendeeName'], 'userName' => $row['userName']);\n }\n return $array;\n }\n else\n {\n return -1;\n } \n }", "public function getAllExcept($id);", "public function get_not_in_trail ($trailid = 0)\n\t{\n\n\t\t$sql = 'SELECT * FROM {pre}object WHERE id NOT IN (SELECT objectid FROM {pre}trail_objects WHERE trailid=?)';\n\t\t$data = array($trailid);\n\t\t$query = $this->db->query($sql, $data);\n\n\t\treturn $query->result_array();\n\n\t}", "public function getAllNotAttending()\n {\n $query = 'select count(attendees.attendeeID) from users right join attendees on users.userID = attendees.userID where users.isRSVP = 1 AND attendees.isAttending = 0;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function listDisputeEvidence(string $disputeId): ApiResponse\n {\n //prepare query string for API call\n $_queryBuilder = '/v2/disputes/{dispute_id}/evidence';\n\n //process optional query parameters\n $_queryBuilder = ApiHelper::appendUrlWithTemplateParameters($_queryBuilder, [\n 'dispute_id' => $disputeId,\n ]);\n\n //validate and preprocess url\n $_queryUrl = ApiHelper::cleanUrl($this->config->getBaseUri() . $_queryBuilder);\n\n //prepare headers\n $_headers = [\n 'user-agent' => BaseApi::USER_AGENT,\n 'Square-Version' => $this->config->getSquareVersion(),\n 'Accept' => 'application/json',\n 'Authorization' => sprintf('Bearer %1$s', $this->config->getAccessToken())\n ];\n $_headers = ApiHelper::mergeHeaders($_headers, $this->config->getAdditionalHeaders());\n\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n\n //call on-before Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n // Set request timeout\n Request::timeout($this->config->getTimeout());\n\n // and invoke the API call request to fetch the response\n try {\n $response = Request::get($_queryUrl, $_headers);\n } catch (\\Unirest\\Exception $ex) {\n throw new ApiException($ex->getMessage(), $_httpRequest);\n }\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n if (!$this->isValidResponse($_httpResponse)) {\n return ApiResponse::createFromContext($response->body, null, $_httpContext);\n }\n\n $mapper = $this->getJsonMapper();\n $deserializedResponse = $mapper->mapClass($response->body, 'Square\\\\Models\\\\ListDisputeEvidenceResponse');\n return ApiResponse::createFromContext($response->body, $deserializedResponse, $_httpContext);\n }", "function load_criterio_by_competencia_inverse($idcompetencia)\n\t\t{\n\t\t\t$result = array();\n\t\t\t(string) $dbQuery = \"\";\n\t\t\t$dbQuery = \"SELECT * FROM $this->competencia_rel_table WHERE $idcompetencia = $this->competencia_relN_field\";\n\t\t\t$this->db->query( $dbQuery );\n\t\t\twhile ($this->db->next_record()) \n\t\t\t{\n\t\t\t\t$elemento = new criterio();\n\t\t\t\t$elemento->set_idcriterio ($this->db->f($this->idcriterio_field));\n\t\t\t\t$elemento->load();\n\t\t\t\t$result[] = $elemento;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public function getUnknownSide($sideId);", "public function getNotPoked()\n {\n return $this->select('status_id', 'status_author')\n ->where('author_poked', '=', '0')\n ->get();\n }", "public function getAllHistoryPendidikanNonFormalByID($id_history_pendidikan_non_formal)\n {\n $this->db->select('*');\n $this->db->from('history_pendidikan_non_formal');\n $this->db->join('karyawan', 'history_pendidikan_non_formal.karyawan_id=karyawan.nik_karyawan');\n $this->db->join('jabatan', 'karyawan.jabatan_id=jabatan.id');\n $this->db->join('penempatan', 'karyawan.penempatan_id=penempatan.id');\n $this->db->where('id_history_pendidikan_non_formal', $id_history_pendidikan_non_formal);\n $query = $this->db->get()->row_array();\n return $query;\n }", "public static function get_non_respondents_returns() {\n return new external_single_structure(\n array(\n 'users' => new external_multiple_structure(\n new external_single_structure(\n array(\n 'courseid' => new external_value(PARAM_INT, 'Course id'),\n 'userid' => new external_value(PARAM_INT, 'The user id'),\n 'fullname' => new external_value(PARAM_TEXT, 'User full name'),\n 'started' => new external_value(PARAM_BOOL, 'If the user has started the attempt'),\n )\n )\n ),\n 'total' => new external_value(PARAM_INT, 'Total number of non respondents'),\n 'warnings' => new external_warnings(),\n )\n );\n }", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function giveListBlockedEventsIds(){\r\n $query = \"SELECT id FROM \".$this->tables['eventoTable'].\r\n \" WHERE blocked = TRUE\";\r\n\t\t$result = self::$conn->query($query);\r\n $list = array();\r\n if($result->num_rows == 0)\r\n return $list;\r\n if($result){\r\n while ($row = $result->fetch_assoc()) \r\n $list[] = $row['id'];\r\n $result->free();\r\n }\r\n return $list;\r\n }", "public static function getAlunosNotas($idAvaliacao){\n\t\t\t//cria a query\n\t\t\t$query = \"SELECT * FROM Nota WHERE Avaliacao_Id = {$idAvaliacao};\";\n\n\t\t\t//executa\n\t\t\treturn ProcessaQuery::consultarQuery($query);\n\t\t}", "public function getRiskByIdNoRef($risk_id) \n\t{\n\t\t$sql = \"select \n\t\t\t\ta.*,\n\t\t\t\tl.display_name as risk_input_by_v\n\t\t\t\tfrom t_risk a \n\t\t\t\tleft join m_user l on a.risk_input_by = l.username\n\t\t\t\twhere a.risk_id = ? \";\n\t\t$query = $this->db->query($sql, array('divid' => $risk_id));\n\t\t$row = $query->row_array();\n\t\t\n\t\treturn $row;\n\t}", "public function get_nonces()\n {\n }", "public function getNonEnduserVisibleChain($objectOrID) {\n $chain = $this->getChainFromObject(ConnectUtil::getProductCategoryType($objectOrID)\n ? $objectOrID\n : $this->get($objectOrID)->result);\n\n for($i = count($chain) - 2; $i >= 0; $i--) {\n if (!$this->isEnduserVisible($chain[$i])) {\n return $chain;\n }\n }\n return array();\n }", "public function getReason();", "public function getReason();" ]
[ "0.6612905", "0.60774416", "0.6071305", "0.501311", "0.4954002", "0.46192354", "0.46187776", "0.46173882", "0.4609701", "0.46055922", "0.46006188", "0.4559941", "0.45063978", "0.4485154", "0.44638208", "0.44497603", "0.44389752", "0.44196367", "0.44006813", "0.43970618", "0.43968603", "0.43929246", "0.43704748", "0.43679914", "0.43638775", "0.4344974", "0.43256027", "0.43210027", "0.43205538", "0.43205538" ]
0.789228
0
Operation listsNonaadherencereasonPost create a NonAdherence Reason.
public function listsNonaadherencereasonpost() { $input = Request::all(); $new_reason = NonAdherenceReason::create($input); if($new_reason){ return response()->json(['msg' => 'Created new NonAdherence Reason']); }else{ return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonaadherencereasonget()\r\n {\r\n $response = NonAdherenceReason::all();\r\n return response()->json($response,200);\r\n }", "public function createRejected($reason);", "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "function deny($reason) {\n $this->denied_reasons[] = $reason;\n }", "public function setReason($reason);", "public function listsNonadherencebyIdget($nonadherence_id)\r\n {\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n return response()->json($reason,200);\r\n }", "public function getReason();", "public function getReason();", "function getDenyReasons() {\n return $this->denied_reasons;\n }", "public function setReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->reason = $var;\n\n return $this;\n }", "public function getXsiTypeName() {\n return \"NotWhitelistedError.Reason\";\n }", "public function getReason()\n {\n }", "public function getReason()\n {\n }", "protected function accessDenied()\n\t{\n\t\t$this->title = \"Доступ закрыт!\";\n\t\t$this->meta_desc = \"Доступ к данной странице закрыт.\";\n\t\t$this->meta_key = \"доступ закрыт, доступ закрыт страница, доступ закрыт страница 403\";\n\n\t\t$pm = new PageMessage();\n\t\t$pm->header = \"Доступ закрыт!\";\n\t\t$pm->text = \"У Вас нет прав доступа к данной странице.\";\n\t\t$this->render($pm);\n\t}", "public function getPageAccessFailureReasons() {}", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "protected function reason()\n {\n }", "public function postAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "public function postCreate()\n {\n $chooseReason = $this->chooseReasons->create(Input::get('ChooseReason'));\n\n return Redirect::to('/admin/choose-reason/edit/'.$chooseReason->id)->with('success', 'Choose reason created successfully');\n }", "public function setNonComplianceReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->non_compliance_reason = $var;\n\n return $this;\n }", "public function agregarDislike()\n\t{\n\t\t$this->que_bda = \"INSERT INTO like_comentario \n\t\t(tip_lik_vid, fky_usu_onl, fky_com_vid)\n\t\tVALUES \n\t\t('D', '$this->fky_usu_onl','$this->fky_com_vid');\";\n\t\t// echo json_encode($this->que_bda);\n\t\treturn $this->run();\n\t}", "public function reason()\n {\n }", "function reject_dispute(){\n\t\t$disputeId = $this->uri->segment(4);\n\n\t\t$condition = array('id' => $disputeId);\n\n\t\t$data = array('status' =>'Reject');\n\t\t\n\t\t$this->review_model->update_details(DISPUTE,$data,$condition);\n\n\n\t\t$this->setErrorMessage('success','Dispute rejected successfully');\n\t\tredirect('admin/dispute/display_dispute_list');\n\n\t}", "public function notOkTheWallpostAction()\n {\n try {\n \n //getting the wall post object.\n $wall_post_obj = \\Extended\\wall_post::getRowObject( $this->getRequest()->getParam( 'wallpost_id' ) );\n if( $wall_post_obj )\n {\n\t //Making/removing a entry to like table for wallpost.\n\t \\Extended\\likes::setOrUnsetOK( Auth_UserAdapter::getIdentity()->getId(), 1, $wall_post_obj->getId() );\n\t \n\t /* \tIf post update type is 16 or 17,\n\t\t\t \tthat is POST_UPDATE_TYPE_GROUP_IN_DEFAULT_ALBUM,\n\t\t\t \tPOST_UPDATE_TYPE_GROUP_IN_DEFAULT_ALBUM_BY_SHARING\n\t\t\t \tAnd there is single photo in group in default album\n\t\t\t \tthen also add record in like table for photo. */\n\t\t\tif((\n\t\t\t\t$wall_post_obj->getPost_update_type() == \\extended\\wall_post::POST_UPDATE_TYPE_GROUP_IN_DEFAULT_ALBUM\n\t\t\t\t|| $wall_post_obj->getPost_update_type() == \\extended\\wall_post::POST_UPDATE_TYPE_GROUP_IN_DEFAULT_ALBUM_BY_SHARING\n\t\t\t))\n\t\t\t{\n\t\t \tif( $wall_post_obj->getPhotoGroup()->getSocialisePhoto()->count() == 1 )\n\t\t\t {\n \t\t\t$group_photos = $wall_post_obj->getPhotoGroup()->getSocialisePhoto();\n \t\t\t\\Extended\\likes::setOrUnsetOK( Auth_UserAdapter::getIdentity()->getId(), 1, NULL, $group_photos[0]->getId() );\n \t\t}\n\t\t\t}\n\t \n\t // If post update type is 15,\n \t\t // that is POST_UPDATE_TYPE_ALBUM\n\t if( $wall_post_obj->getPost_update_type() == \\extended\\wall_post::POST_UPDATE_TYPE_ALBUM )\n\t {\n\t \\Extended\\likes::setOrUnsetOK( Auth_UserAdapter::getIdentity()->getId(), 1, null, null, $wall_post_obj->getWall_postsSocialise_album()->getId() );\n\t }\n\t else if( $wall_post_obj->getPost_update_type() == \\extended\\wall_post::POST_UPDATE_TYPE_PROFILE_PHOTO_CHANGED )\n\t {\n\t \\Extended\\likes::setOrUnsetOK( Auth_UserAdapter::getIdentity()->getId(), 1, NULL, $wall_post_obj->getSocialisePhoto()->getId() );\n\t }\n\t \n\t \n\t //fetching likers string.\n\t $ret_arr = array();\n\t $ret_arr['likers_string'] = Helper_common::getLikersStringByWallpostId($this->getRequest()->getParam( 'wallpost_id' ), Auth_UserAdapter::getIdentity()->getId());\n\t $ret_arr['wallpost_id'] = $this->getRequest()->getParam( 'wallpost_id' );\n\t $ret_arr['is_success'] = 1;\n\t echo Zend_Json::encode($ret_arr);\n }\n else\n {\n \t//Wallpost doesnot exist anymore.\n \t$ret_arr = array();\n \t$ret_arr['is_success'] = 2;\n \techo Zend_Json::encode($ret_arr);\n }\t\n \n } catch (Exception $e) {\n $ret_arr = array();\n $ret_arr['is_success'] = 0;\n echo Zend_Json::encode($ret_arr);\n }\n die; \n }", "public function testCreateUnsuccessfulReason()\n {\n }", "function fail_arrangement_discount($parameters) \n\t{\n\t\t$discounts = array();\n\t\t//get_log('scheduling')->Write(print_r($parameters->schedule, true));\n\t\tforeach ($parameters->schedule as $e) \n\t\t{\n\t\t\tif (($e->context == 'arrangement' || $e->context == 'partial') && \n\t\t\t (in_array($e->type, array('adjustment_internal', 'adjustment_internal_fees', 'adjustment_internal_princ')))) {\n\t\t\t \tif ($e->status == 'scheduled') \n\t\t\t\t{\n\t\t\t \t\tRecord_Scheduled_Event_To_Register_Pending($e->date_event, $parameters->application_id, $e->event_schedule_id);\n\t\t\t \t\tRecord_Event_Failure($parameters->application_id, $e->event_schedule_id);\n\t\t\t \t} \n\t\t\t\telseif ($e->status != 'failed') \n\t\t\t\t{\n\t\t\t\t\tRecord_Transaction_Failure($parameters->application_id, $e->transaction_register_id);\n\t\t\t \t}\n\t\t\t}\n\t\t}\n\t}", "public function getReason()\n {\n return $this->reason;\n }" ]
[ "0.59813523", "0.58153325", "0.5623926", "0.55939573", "0.5584104", "0.5536485", "0.55002266", "0.5249346", "0.5164399", "0.5148032", "0.5148032", "0.49987948", "0.4968899", "0.49228406", "0.48672903", "0.48672903", "0.48475158", "0.4837703", "0.48152262", "0.4813835", "0.48113522", "0.47752106", "0.47463104", "0.4737806", "0.4737795", "0.4654808", "0.46346474", "0.46176222", "0.46006063", "0.45960492" ]
0.78025216
0
Operation listsNonadherenceNonadherenceIdPut Update an existing NonAdherence Reason.
public function listsNonadherenceput($nonadherence_id) { $input = Request::all(); $reason = NonAdherenceReason::findOrFail($nonadherence_id); $reason->update(['name'=>$input['name']]); if($reason->save()){ return response()->json(['msg' => 'Updated NonAdherence Reason']); }else{ return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonadherencebyIdget($nonadherence_id)\r\n {\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n return response()->json($reason,200);\r\n }", "public function setReason($reason);", "public function listsNonadherencedelete($nonadherence_id)\r\n {\r\n $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id);\r\n if($deleted_nonAdherenceReason){\r\n return response()->json(['msg' => 'Deleted NonAdherenceReason']);\r\n }\r\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function setReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->reason = $var;\n\n return $this;\n }", "function deny($reason) {\n $this->denied_reasons[] = $reason;\n }", "public function setReason($reason)\n\t{\n\t\t$this->reason = $reason;\n\t}", "public function testUpdateUnsuccessfulReason()\n {\n }", "public function putAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "public function setReasonAttribute($value)\n {\n $this->reason = $value;\n }", "public function testUpdateListNotFoundException(): void\n {\n $this->put('/mailchimp/lists/invalid-list-id');\n\n $this->assertListNotFoundResponse('invalid-list-id');\n }", "public function setReason(\\DedexBundle\\Entity\\Ern382\\ReasonType $reason)\n {\n $this->reason = $reason;\n return $this;\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n return $this;\n }", "public function createRejected($reason);", "public function setNonComplianceReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->non_compliance_reason = $var;\n\n return $this;\n }", "private function documentBlockingReason($reason)\n {\n $this->grav['assets']->addInlineJs(\"/* GA tracking blocked, reason: $reason */\");\n }", "public function getXsiTypeName() {\n return \"NotWhitelistedError.Reason\";\n }", "public function setReason($reason)\n {\n $this->reason = $reason;\n\n return $this;\n }", "public function getReason();", "public function getReason();", "public function apiAuthV1TeachingClassTeacherInvitationTeachingClassTeacherInvitationIdRejectPost()\n {\n $this->apiAuthV1TeachingClassTeacherInvitationTeachingClassTeacherInvitationIdRejectPostWithHttpInfo();\n }", "public function setReason(?string $value): void {\n $this->getBackingStore()->set('reason', $value);\n }", "public function denyItem($reason)\n {\n $item = $this->getItem();\n\n $item->setState(\\Apprecie\\Library\\Items\\ItemState::DENIED);\n $item->setRejectionReason($reason);\n $item->update();\n\n $this->setStatus(\\Apprecie\\Library\\Items\\ApprovalState::DENIED);\n $this->setDeniedReason($reason);\n $this->setVerifiedByUserId($this->getDI()->getDefault()->get('auth')->getAuthenticatedUser()->getUserId());\n return $this->update();\n }", "public function put ($params) {\n return new Response(null, 404);\n }", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function getXsiTypeName() {\n return \"RejectedError.Reason\";\n }", "public function merge(int $code, string $reason)\n {\n $code = $this->filterCode($code);\n $reason = $this->filterReasonPhrase($reason);\n $internalCode = $this->fetchCode($reason);\n if ((bool)$internalCode && $internalCode !== $code) {\n throw new InvalidArgumentException(\n \"The reason phrase injected is already present in the default values.\"\n );\n }\n $this->values[$code] = $reason;\n }", "public function listsNonaadherencereasonget()\r\n {\r\n $response = NonAdherenceReason::all();\r\n return response()->json($response,200);\r\n }", "function reject_dispute(){\n\t\t$disputeId = $this->uri->segment(4);\n\n\t\t$condition = array('id' => $disputeId);\n\n\t\t$data = array('status' =>'Reject');\n\t\t\n\t\t$this->review_model->update_details(DISPUTE,$data,$condition);\n\n\n\t\t$this->setErrorMessage('success','Dispute rejected successfully');\n\t\tredirect('admin/dispute/display_dispute_list');\n\n\t}", "public function setReason($s_reason) {\r\n\t\t$this->reason = $s_reason;\r\n\t}" ]
[ "0.5249493", "0.509218", "0.4892198", "0.48565698", "0.48291373", "0.4604682", "0.45219114", "0.44786498", "0.44095775", "0.43849072", "0.42779723", "0.42695114", "0.42651272", "0.42492974", "0.42307884", "0.42249024", "0.42233807", "0.41894782", "0.41804418", "0.41804418", "0.41428533", "0.40904716", "0.40544918", "0.4054363", "0.4034419", "0.40260914", "0.40110043", "0.4006736", "0.4003702", "0.396747" ]
0.66754013
0
Operation listsNonadherenceNonadherenceIdDelete Deletes a NonAdherence Reason specified by nonadherenceId.
public function listsNonadherencedelete($nonadherence_id) { $deleted_nonAdherenceReason = NonAdherenceReason::destroy($nonadherence_id); if($deleted_nonAdherenceReason){ return response()->json(['msg' => 'Deleted NonAdherenceReason']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonadherencebyIdget($nonadherence_id)\r\n {\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n return response()->json($reason,200);\r\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "public function listsNonaadherencereasonget()\r\n {\r\n $response = NonAdherenceReason::all();\r\n return response()->json($response,200);\r\n }", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function deleteAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "public function listsIndicationsdelete($indication_id)\r\n {\r\n $deleted_indication = Indication::destroy($indication_id);\r\n if($deleted_indication){\r\n return response()->json(['msg' => 'Deleted indication']);\r\n }\r\n }", "public function delete($user_id = false) {\r\n if (!$user_id) {\r\n throw new Exception(\"Cannot delete message - no user ID given\"); \r\n }\r\n \r\n $data = array(\r\n \"privmsgs_id\" => $this->id,\r\n \"user_id\" => $user_id\r\n );\r\n \r\n return $this->db->insert(\"privmsgs_hidelist\", $data); \r\n }", "public function listsInstructiondelete($instruction_id)\r\n {\r\n $deleted_instruction = Instruction::destroy($instruction_id);\r\n if($deleted_instruction){\r\n return response()->json(['msg' => 'Deleted instruction']);\r\n }\r\n }", "public function disableDeleteClause() {}", "function deletePrivateComment($idevent) {\n\n\t\t\t$method = WALL . \"/privatecomments/$idevent\";\n\n\t\t\t$verbmethod = \"DELETE\";\n\n\t\t\t$params = array();\n\n\t\t\t$params = array_filter($params, function($item) { return !is_null($item); });\n\n\t\t\t$response = $this->zyncroApi->callApi($method, $params, $verbmethod);\n\n\t\t\treturn $response;\n\t\t}", "public function admin_delete($help_id) {\n\t\tif ($this->Auth->user('account_level') != 51)\n throw new ForbiddenException;\n\t\t$this->autoRender=false;\n\t\t\n\t\t$conditions = array(\n\t\t\t'Help.id' => $help_id,\n\t\t\t'Help.status'=> 0,\n\t\t);\n\t\t\n\t\tif ($this->Help->hasAny($conditions)){\n\t\t\t$this->Help->delete($help_id);\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Can not delete'), 'error_form', array(), 'error');\n\t\t}\t\t\n\t\t\t\n\t\tif(isset($this->params['url']['redirect_url'])){\t\t\t\n\t\t\treturn $this->redirect(urldecode($this->params['url']['redirect_url']));\n\t\t} else {\n\t\t\treturn $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true));\n\t\t}\n\t\t\n\t}", "private function delete_declined_skill ($discipline_id , $newversion ) {\n $affected = skill::with ('skillcategory' )->\n where('version' , '=' , $newversion)->\n where('approve_status' ,'=','declined')\n ->whereHas('skillcategory', function($q ) use ($discipline_id) {\n $q->where('discipline_id','=',$discipline_id);})\n ->delete();\n return $affected;\n }", "public function actionDelete($id)\n\t{\n $uid = Yii::app()->user->getId(); \n if($uid != 1){\n $value = ComSpry::getUnserilizedata($uid);\n if(empty($value) || !isset($value)){\n throw new CHttpException(403,'You are not authorized to perform this action.');\n }\n if(!in_array(37, $value)){\n throw new CHttpException(403,'You are not authorized to perform this action.');\n }\n }\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n\t\t\t$this->loadModel($id)->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n \n\t}", "public function actionDelete($id)\n\t{\n\t if (!$this->checkRight($id))\n\t {\n\t throw new CHttpException(403);\n\t }\n\t\t$model = $this->loadModel($id);\n\t\t$model->deleteFiles();\n\t\t$model->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('way', 'id'=>$model->id_mentor_ways));\n\t}", "public function delete($idPermisos);", "public function Admin_Action_DeleteBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockid', 0 );\n if ($blockId) {\n $blockIds = implode ( \"','\", $blockId );\n $query = \"DELETE\" . \" FROM [|PREFIX|]dynamic_content_block \" . \" WHERE blockid in ('\" . $blockIds . \"')\";\n\n if ($result = $this->db->Query ( $query )) {\n // Error message\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_DeleteBlock_Success' ), SS_FLASH_MSG_SUCCESS );\n echo GetJSON ( array ('message' => GetFlashMessages (), 'result' => '1' ) );\n return;\n }\n }\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_DeleteBlock_Failure' ), SS_FLASH_MSG_ERROR );\n echo GetJSON ( array ('message' => GetFlashMessages (), 'result' => '0' ) );\n return;\n }", "public function actionDelete($id)\n {\n if (Yii::app()->request->isPostRequest) {\n // we only allow deletion via POST request\n $transaction = Yii::app()->db->beginTransaction();\n try {\n $model = $this->loadModel($id);\n\n if (!$model->podeEditar()) {\n throw new CHttpException(409, 'Nota Fiscal não permite exclusão!');\n }\n\n $model->nfechave = null;\n $model->save();\n\n foreach ($model->NotaFiscalDuplicatass as $dup) {\n $dup->delete();\n }\n\n foreach ($model->NotaFiscalProdutoBarras as $prod) {\n $prod->delete();\n }\n\n foreach ($model->NotaFiscalReferenciadas as $ref) {\n $ref->delete();\n }\n\n foreach ($model->NfeTerceiros as $ter) {\n $ter->codnotafiscal = null;\n $ter->save();\n }\n\n $model->delete();\n $transaction->commit();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax'])) {\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n }\n } catch (CDbException $e) {\n $transaction->rollBack();\n // Cannot delete or update a parent row: a foreign key constraint fails\n if ($e->errorInfo[1] == 7) {\n throw new CHttpException(409, 'Registro em uso, você não pode excluir.');\n } else {\n throw $e;\n }\n }\n } else {\n throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');\n }\n }", "public function listsaccessLeveldelete($accessLevel_id)\r\n {\r\n $deleted_accessLevel = AccessLevel::destroy($accessLevel_id);\r\n if($deleted_accessLevel){\r\n return response()->json(['msg' => 'Deleted accessLevel']);\r\n }\r\n }", "public function action_delete_delete(){\r\n\t\t\t//permission check\r\n\t\t\tif(!$this->user->can('Assumeownership', array('owner' => $this->user->id))){\r\n\t\t\t\t$this->throw_permission_error(Constant::NOT_OWNER);\r\n\t\t\t}\r\n\r\n\t\t\tif(!isset($this->myID) || !isset($this->myID2))\r\n\t\t\t{\r\n\t\t\t\t$error_array = array(\r\n\t\t\t\t\t\"error\" => \"Required Parameters Missing\",\r\n\t\t\t\t\t\"desc\" => \"Required Parameters Missing.\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->modelNotSetError($error_array);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$subject = Ent::eFact($this->myID, $this->myID2);\r\n\t\t\t$subject->delete_with_deps();\r\n\t\t\treturn $subject->getBasics();\r\n\t\t}", "public function excluirdisciplina() {\n\t\t//Recupera id do aluno\n\t\tif(!$this->uri->segment(\"3\"))\n\t\t\tredirect('/administracao/painel');\n\t\telse \n\t\t\t$intID =$this->uri->segment(\"3\");\n\n\t\t/* Carrega o modelo */\n\t\t$this->load->model('disciplinas_model');\n\n\t\t/* Chama a função excluir do modelo */\n\t\tif ($this->disciplinas_model->delete($intID)) {\n\t\t\tlog_message('success', 'Disciplina excluido com sucesso!');\n\t\t\tredirect('/administracao/listadisciplinas');\n\t\t} else {\n\t\t\tlog_message('error', 'Erro ao excluir a disciplina!');\n\t\t}\n\t}", "public function actionDelete($id) {\n if (isset($_REQUEST['id'])) {\n $id = $_REQUEST['id'];\n $model=DistribucionTicket::model()->eliminarDistribucion($id);\n if ($model) {\n $this->registerLog('ESCRITURA', 'ayuda.UnidadRespTicket.eliminarDistribucion', 'EXITOSO', 'Se ha eliminado una unidad responsable de ticket');\n $this->renderPartial(\"//msgBox\", array('class' => 'successDialogBox', 'message' => 'Eliminado con exito.'));\n } else {\n throw new CHttpException(500, 'Error! no se ha completa la operación comuniquelo al administrador del sistema.');\n }\n\n }\n }", "public function actionDeletenode($id)\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t$this->loadModel($id)->delete();\n\t\t\t$this->renderPartial('update',array(\n\t\t\t\t\t'data'=>UFSBaseUtil::printJson(array(\n\t\t\t\t\t\t\t'msg'=>$this->FrameInfo(Yii::app()->params['layouttype']['top'],Yii::t('message','Delete Success'),Yii::app()->params['notytype']['success']),\n\t\t\t\t\t))\n\t\t\t));\n\t\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function actionDeleteRelatorio($id, $n) {\n if(\\Yii::$app->user->can('gerenciamento-cadastros-avançados')){ \n $model = Relatorio::findOne($id);\n $idmodel = $model->idProger;\n $nomeCurso = $this->findModel($idmodel)->nome;\n $model->delete();\n return $this->redirect(['cadastrar', 's' => 3, 'idmodel' => $idmodel, 'n' => $n, 'nome'=>$nomeCurso]);\n }else {\n throw new \\yii\\web\\ForbiddenHttpException('Você não está autorizado a realizar essa ação.');\n }\n }", "public function delete($idconvenio);", "public function delete($nonce) {\n return $this->_mysqli->query(sprintf(\"DELETE FROM tbl_nonces WHERE s_nonce = '%s' \", $this->_mysqli->real_escape_string($nonce)));\n }", "public function actionDelete($id)\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n\t\t\t$this->loadModel($id)->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Solicitação inválida!');\n\t}", "public function actionDelete($id) {\n if (Yii::app()->request->isPostRequest) {\n // we only allow deletion via POST request\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }\n else\n throw new CHttpException(400, Yii::t('default', 'notValidWeb'));\n }" ]
[ "0.64299715", "0.56771564", "0.46626422", "0.46449313", "0.45197663", "0.45167544", "0.44319546", "0.44072786", "0.4400778", "0.4357443", "0.43210804", "0.43118075", "0.42177472", "0.41756326", "0.41490856", "0.41147938", "0.4025001", "0.3996364", "0.39819753", "0.39765322", "0.39727435", "0.39719942", "0.39634097", "0.3959953", "0.39583695", "0.3951149", "0.39267784", "0.39229885", "0.39050603", "0.38950866" ]
0.7701573
0
///////////////////////////// Sources functions // /////////////////////////// Operation listsPatientsourcesGet Fetch Sources list (for select options).
public function listsPatientsourcesget() { $response = Sources::all(); return response()->json($response, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPatientsourcesByIdget($patientsources_id)\r\n {\r\n $source = Sources::findOrFail($patientsources_id);\r\n return response()->json($source,200);\r\n }", "function listSources() {\n\t\n\t}", "function GetSources()\n\t{\n\t\t$result = $this->sendRequest(\"GetSources\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getSources();", "public function listSources() {\n return null;\n }", "public function listSources() {\n $this->resolve();\n return $this->sources;\n }", "public function getDataSourcesList() {\n return $this->_get(10);\n }", "function GetSourceList($sourceIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetSourceList\", array(\"SourceIds\"=>$sourceIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getSources ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/sources.json\",$params);\n\n return $this->createResponse($result,'get All Sources');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getDataSourcesList() {\n return $this->_get(8);\n }", "abstract public function get_sources();", "public function getDataSourcesList() {\n return $this->_get(1);\n }", "function showGetEventSources() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->render($this->getTpl('sourceList', '/account'));\n\t}", "public function listsPatientsourcesput($patientsources_id)\r\n {\r\n $input = Request::all();\r\n $source = Sources::findOrFail($patientsources_id);\r\n $source->update(['name' => $input['name']]);\r\n if($source->save()){\r\n return response()->json(['msg' => 'Update patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the source');\r\n }\r\n }", "public function listSources($data = null) {\n\t\treturn null;\n\t}", "public function get_sources($args) {\n $payload = [];\n if (isset($args['category'])) $payload = $this->queries->get_category($args['category'], $payload);\n if (isset($args['country'])) $payload = $this->queries->get_country($args['country'], $payload);\n if (isset($args['language'])) $payload = $this->queries->get_language($args['language'], $payload);\n return $this->queries->connect($this->queries->constants->urls['sources'], $payload, $this->api_key);\n }", "private function getAllSourcesFromDB() {\n return $this->database->table(\"source\")->fetchAll();\n }", "function listSources() {\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$result = $this->_execute('SHOW TABLES FROM ' . $this->name($this->config['database']) . ';');\n\n\t\tif (!$result) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\n\t\t\twhile ($line = mysql_fetch_row($result)) {\n\t\t\t\t$tables[] = $line[0];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\t\t\treturn $tables;\n\t\t}\n\t}", "public function ListSources(\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesResponse', 'decode'],\n $metadata, $options);\n }", "function listSources() {\n\t\t$db = $this->config['database'];\n\t\t$this->config['database'] = basename($this->config['database']);\n\n\t\t$cache = parent::listSources();\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\n\t\t$result = $this->fetchAll(\"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;\");\n\n\t\tif (!$result || empty($result)) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\t$tables = array();\n\t\t\tforeach ($result as $table) {\n\t\t\t\t$tables[] = $table[0]['name'];\n\t\t\t}\n\t\t\tparent::listSources($tables);\n\n\t\t\t$this->config['database'] = $db;\n\t\t\treturn $tables;\n\t\t}\n\t\t$this->config['database'] = $db;\n\t\treturn array();\n\t}", "public function getPoolSourceslist()\n\t{\n\t\treturn($this->getProperty('sourceslist'));\n\t}", "public function getSpecificPopulationSourcesList() {\n return $this->_get(3);\n }", "protected function getSources()\n\t{\n\t\tif(!$this->sources)\n\t\t{\n\t\t\t$this->sources = Source::orderBy('title', 'asc')->get();\n\t\t}\n\t\t\n\t\treturn $this->sources;\n\t}", "public function fetchSources () {\r\n\t}", "public function listsPatientsourcespost()\r\n {\r\n $input = Request::all();\r\n $new_source = Sources::create($input);\r\n if($new_source){\r\n return response()->json(['msg' => 'Added a new patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to add a new source');\r\n }\r\n }", "public static function getSources($data = array()) {\n\t\t$db = JO_Db::getDefaultAdapter();\n\n\t\t$query = $db->select()\n\t\t\t\t\t->from('pins_sources', array('*', 'pins' => new JO_Db_Expr('('.$db->select()->from('pins','COUNT(pin_id)')->where('source_id = pins_sources.source_id')->limit(1).')')))\n\t\t\t\t\t->order('pins_sources.source_id DESC');\n\n\t\tif(isset($data['filter_source']) && $data['filter_source']) {\n\t\t\t$query->where('source LIKE ?', '%'.str_replace(' ', '%', $data['filter_source']).'%');\n\t\t}\n\t\t\n\t\tif(isset($data['start']) && isset($data['limit'])) {\n\t\t\tif($data['start'] < 0) {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\t\t\t$query->limit($data['limit'], $data['start']);\n\t\t} \n\n\t\treturn $db->fetchAll($query);\n\n\t}", "public function index()\n {\n $sources = $this->allResources($this->sourceRepository);\n\n return SourceResource::collection($sources);\n }", "public function getOtherSourceList() {\n return $this->_get(6);\n }", "public function getSourceAccessionsList(){\n return $this->_get(8);\n }", "public function listsPatientsourcesdelete($patientsources_id)\r\n {\r\n $deleted_source = Sources::destroy($patientsources_id);\r\n if($deleted_source){\r\n return response()->json(['msg' => 'Deleted patient source']);\r\n }\r\n }" ]
[ "0.74945295", "0.6948069", "0.68567514", "0.6584793", "0.65596735", "0.6503078", "0.63856536", "0.6383362", "0.6337697", "0.632587", "0.6313406", "0.62874895", "0.6197408", "0.61087173", "0.6083942", "0.60821855", "0.5995162", "0.5987282", "0.5984512", "0.5972756", "0.5953668", "0.59426004", "0.5933851", "0.5869411", "0.58525056", "0.57108074", "0.56926817", "0.5689904", "0.56802773", "0.56794685" ]
0.8091147
0
Operation listsPatientsourcesPatientsourcesIdGet Fetch Source specified by patientsourcesId.
public function listsPatientsourcesByIdget($patientsources_id) { $source = Sources::findOrFail($patientsources_id); return response()->json($source,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPatientsourcesget()\r\n {\r\n $response = Sources::all(); \r\n return response()->json($response, 200);\r\n }", "public function ListSources(\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesResponse', 'decode'],\n $metadata, $options);\n }", "public function listsPatientsourcesput($patientsources_id)\r\n {\r\n $input = Request::all();\r\n $source = Sources::findOrFail($patientsources_id);\r\n $source->update(['name' => $input['name']]);\r\n if($source->save()){\r\n return response()->json(['msg' => 'Update patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the source');\r\n }\r\n }", "function GetSourceList($sourceIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetSourceList\", array(\"SourceIds\"=>$sourceIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function listsPatientsourcesdelete($patientsources_id)\r\n {\r\n $deleted_source = Sources::destroy($patientsources_id);\r\n if($deleted_source){\r\n return response()->json(['msg' => 'Deleted patient source']);\r\n }\r\n }", "function GetSource($sourceId)\n\t{\n\t\t$result = $this->sendRequest(\"GetSource\", array(\"SourceId\"=>$sourceId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getSourceById ( $id )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/sources/{$id}.json\");\n return $this->createResponse($result,'get Source','Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "function GetSources()\n\t{\n\t\t$result = $this->sendRequest(\"GetSources\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function get_sources($args) {\n $payload = [];\n if (isset($args['category'])) $payload = $this->queries->get_category($args['category'], $payload);\n if (isset($args['country'])) $payload = $this->queries->get_country($args['country'], $payload);\n if (isset($args['language'])) $payload = $this->queries->get_language($args['language'], $payload);\n return $this->queries->connect($this->queries->constants->urls['sources'], $payload, $this->api_key);\n }", "public function getSources()\n {\n return $this->hasMany(Source::className(), ['id_url' => 'id']);\n }", "function getSources();", "public function listSources() {\n $this->resolve();\n return $this->sources;\n }", "function getSources ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/sources.json\",$params);\n\n return $this->createResponse($result,'get All Sources');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "protected function getSources()\n\t{\n\t\tif(!$this->sources)\n\t\t{\n\t\t\t$this->sources = Source::orderBy('title', 'asc')->get();\n\t\t}\n\t\t\n\t\treturn $this->sources;\n\t}", "public static function getSources($data = array()) {\n\t\t$db = JO_Db::getDefaultAdapter();\n\n\t\t$query = $db->select()\n\t\t\t\t\t->from('pins_sources', array('*', 'pins' => new JO_Db_Expr('('.$db->select()->from('pins','COUNT(pin_id)')->where('source_id = pins_sources.source_id')->limit(1).')')))\n\t\t\t\t\t->order('pins_sources.source_id DESC');\n\n\t\tif(isset($data['filter_source']) && $data['filter_source']) {\n\t\t\t$query->where('source LIKE ?', '%'.str_replace(' ', '%', $data['filter_source']).'%');\n\t\t}\n\t\t\n\t\tif(isset($data['start']) && isset($data['limit'])) {\n\t\t\tif($data['start'] < 0) {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\t\t\t$query->limit($data['limit'], $data['start']);\n\t\t} \n\n\t\treturn $db->fetchAll($query);\n\n\t}", "function listSources() {\n\t\n\t}", "public function GetAssetSources(GetAssetSources $parameters)\n {\n return $this->__soapCall('GetAssetSources', array($parameters));\n }", "abstract public function get_sources();", "public function listSources() {\n return null;\n }", "private function getAllSourcesFromDB() {\n return $this->database->table(\"source\")->fetchAll();\n }", "public function setSources($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->sources = $arr;\n\n return $this;\n }", "public function getRowBySource(array $source_id) {\n migrate_instrument_start('mapRowBySource');\n $query = $this->connection->select($this->mapTable, 'map')\n ->fields('map');\n foreach ($this->sourceKeyMap as $key_name) {\n $query = $query->condition(\"map.$key_name\", array_shift($source_id), '=');\n }\n $result = $query->execute();\n migrate_instrument_stop('mapRowBySource');\n return $result->fetchAssoc();\n }", "protected function getSourcesContent(){\n if(empty($this->sources)){\n return;\n }\n $content = array();\n foreach($this->sources as $sourceFile){\n $content[] = file_get_contents($sourceFile);\n }\n return $content;\n }", "public function getSpecificPopulationSourcesList() {\n return $this->_get(3);\n }", "public function GetAssetSourcesIDs(GetAssetSourcesIDs $parameters)\n {\n return $this->__soapCall('GetAssetSourcesIDs', array($parameters));\n }", "public function getPoolSourceslist()\n\t{\n\t\treturn($this->getProperty('sourceslist'));\n\t}", "public function listsPatientsourcespost()\r\n {\r\n $input = Request::all();\r\n $new_source = Sources::create($input);\r\n if($new_source){\r\n return response()->json(['msg' => 'Added a new patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to add a new source');\r\n }\r\n }", "public function sources()\n {\n return $this->hasMany('Didbot\\DidbotApi\\Models\\Source');\n }", "public function listSources($data = null) {\n\t\treturn null;\n\t}", "function showGetEventSources() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->render($this->getTpl('sourceList', '/account'));\n\t}" ]
[ "0.6238661", "0.61906683", "0.61808324", "0.57863027", "0.57759154", "0.5553798", "0.55525506", "0.54568756", "0.5277415", "0.5223663", "0.5194123", "0.5189909", "0.51836735", "0.514848", "0.5140034", "0.51279104", "0.50995797", "0.5019322", "0.4942841", "0.4905973", "0.48948923", "0.48779494", "0.4833372", "0.4770872", "0.4757098", "0.47536558", "0.47397807", "0.47180113", "0.47091025", "0.46973884" ]
0.7809803
0
Operation listsPatientsourcesPost create a Source.
public function listsPatientsourcespost() { $input = Request::all(); $new_source = Sources::create($input); if($new_source){ return response()->json(['msg' => 'Added a new patient source']); }else{ return response('Oops, seems like something went wrong while trying to add a new source'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPatientsourcesput($patientsources_id)\r\n {\r\n $input = Request::all();\r\n $source = Sources::findOrFail($patientsources_id);\r\n $source->update(['name' => $input['name']]);\r\n if($source->save()){\r\n return response()->json(['msg' => 'Update patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the source');\r\n }\r\n }", "public function listsPatientsourcesByIdget($patientsources_id)\r\n {\r\n $source = Sources::findOrFail($patientsources_id);\r\n return response()->json($source,200);\r\n }", "public function listsPatientsourcesget()\r\n {\r\n $response = Sources::all(); \r\n return response()->json($response, 200);\r\n }", "public function store(CreateSourceRequest $request)\n {\n $this->source->create($request->all());\n\n return redirect()->route('admin.pipelines.source.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('pipelines::sources.title.sources')]));\n }", "public function create()\n {\n return view('sources.create');\n }", "public function listsPatientsourcesdelete($patientsources_id)\r\n {\r\n $deleted_source = Sources::destroy($patientsources_id);\r\n if($deleted_source){\r\n return response()->json(['msg' => 'Deleted patient source']);\r\n }\r\n }", "public function create()\n {\n return view('pipelines::admin.sources.create');\n }", "public function create() {\n\n return view('tickets.settings.ticket_sources.create');\n }", "public function create($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo)\n {\n $args = collect($args);\n $data = $args->except('directive')->toArray();\n $source = Source::create($data);\n\n return $this->apiResponse('SUCCESS', 'Created a new Source.', $source);\n }", "public function facetwp_facet_sources( $sources = array() ) {\n\t\t$sources['posts']['choices']['post_status'] = __( 'Post Status', 'facetwp-post-status' );\n\t\treturn $sources;\n\t}", "public function sources()\n {\n return $this->hasMany('Didbot\\DidbotApi\\Models\\Source');\n }", "public function ListSources(\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesResponse', 'decode'],\n $metadata, $options);\n }", "public function add_source( $sources ) {\n\t\t$sources['meta-box'] = array(\n\t\t\t'label' => 'Meta Box',\n\t\t\t'choices' => array(),\n\t\t\t'weight' => 5,\n\t\t);\n\n\t\t$fields = $this->get_fields();\n\t\tforeach ( $fields as $post_type => $list ) {\n\t\t\t$post_type_object = get_post_type_object( $post_type );\n\t\t\tif ( ! $post_type_object ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$post_type_label = $post_type_object->labels->singular_name;\n\t\t\tforeach ( $list as $field ) {\n\t\t\t\tif ( in_array( $field['type'], array( 'heading', 'divider', 'custom_html', 'button' ), true ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$field_label = $field['name'] ? $field['name'] : $field['id'];\n\n\t\t\t\t$sources['meta-box']['choices'][\"meta-box/{$field['id']}\"] = \"[{$post_type_label}] {$field_label}\";\n\t\t\t}\n\t\t}\n\n\t\treturn $sources;\n\t}", "public function get_sources($args) {\n $payload = [];\n if (isset($args['category'])) $payload = $this->queries->get_category($args['category'], $payload);\n if (isset($args['country'])) $payload = $this->queries->get_country($args['country'], $payload);\n if (isset($args['language'])) $payload = $this->queries->get_language($args['language'], $payload);\n return $this->queries->connect($this->queries->constants->urls['sources'], $payload, $this->api_key);\n }", "public function setSources($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->sources = $arr;\n\n return $this;\n }", "public function store()\n {\n $this->validate(request(), [\n 'name' => 'required|unique:lead_sources,name',\n ]);\n\n Event::dispatch('settings.source.create.before');\n\n $source = $this->sourceRepository->create(request()->all());\n\n Event::dispatch('settings.source.create.after', $source);\n\n return response([\n 'data' => new SourceResource($source),\n 'message' => __('admin::app.settings.sources.create-success'),\n ]);\n }", "public function addDataSources($value) {\n return $this->_add(1, $value);\n }", "protected function postSlidesDocumentFromSourceRequest(Requests\\PostSlidesDocumentFromSourceRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling postSlidesDocumentFromSource');\n }\n\n $resourcePath = '/slides/{name}/fromSource';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->sourcePath !== null) {\n $queryParams['sourcePath'] = ObjectSerializer::toQueryValue($request->sourcePath);\n }\n // query params\n if ($request->sourcePassword !== null) {\n $queryParams['sourcePassword'] = ObjectSerializer::toQueryValue($request->sourcePassword);\n }\n // query params\n if ($request->sourceStorage !== null) {\n $queryParams['sourceStorage'] = ObjectSerializer::toQueryValue($request->sourceStorage);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'POST');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n $source = Source::firstOrCreate(['name' => $request->get('name')]);\n return redirect('sources/' . $source->id);\n }", "public function createBulkResourceforResourceSet(\n ResourceSet $sourceResourceSet,\n array $data\n ) {\n $verbName = 'bulkCreate';\n $mapping = $this->getOptionalVerbMapping($sourceResourceSet, $verbName);\n\n $result = [];\n try {\n DB::beginTransaction();\n if (null === $mapping) {\n foreach ($data as $newItem) {\n $raw = $this->getQuery()->createResourceforResourceSet($sourceResourceSet, null, $newItem);\n if (null === $raw) {\n throw new \\Exception('Bulk model creation failed');\n }\n $result[] = $raw;\n }\n } else {\n $keyDescriptor = null;\n $pastVerb = 'created';\n $result = $this->processBulkCustom($sourceResourceSet, $data, $mapping, $pastVerb, $keyDescriptor);\n }\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollBack();\n throw $e;\n }\n return $result;\n }", "public function store(Request $request) {\n $this->validate($request, [\n 'source'=>'required'\n ]);\n\n $source = $request['source'];\n $ticket_source = new TicketSource();\n $ticket_source->source = $source;\n $ticket_source->save();\n\n return redirect()->route('sources.index');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'description' => 'required'\n ]);\n\n $source = new Source;\n $source->name = $request->name;\n $source->description = $request->description;\n $source->save();\n\n // flash('Source has been added');\n\n return redirect()->back();\n }", "public function addDataSources($value) {\n return $this->_add(10, $value);\n }", "public function createSource();", "public function create()\n {\n return view('source.new');\n }", "public function store(PostRequest $request)\n {\n \\Log::debug(\"on posts store\");\n\n $value = array(\"writer\" => $request->writer, \"name\" => $request->name, \"title\" => $request->title, \"content\" => $request->contents);\n\n $list = Post::create($value);\n\n \\Log::debug(\"List ID : \" . $list->id);\n\n if (!$list) {\n return back()->with('flash_message', '글이 저장되지 않았습니다.')->withInput();\n }\n\n if ($request->has('upFiles')) {\n foreach ($request->upFiles as $fid) {\n $attach = Attachment::find($fid);\n $attach->post()->associate($list);\n $attach->save();\n }\n }\n\n event(new \\App\\Events\\PostsEvent($list));\n event(new \\App\\Events\\ModelChanged(['posts']));\n\n return redirect()->route('posts.show', $list)->with('flash_message', \"작성이 완료되었습니다.\");\n\n }", "public function addDataSources($value) {\n return $this->_add(8, $value);\n }", "public function index()\n {\n $sources = $this->source->all();\n\n return view('pipelines::admin.sources.index', compact('sources'));\n }", "function listSources() {\n\t\n\t}", "function add_textual_sources($activity_id, $con){\n\t$date = date('Y-m-d H:i:s');\n\t$counter = 1;\ndo {\n\t\n\tif (isset($_POST[\"source_id_\" . $counter])){\n\t\t\n\t\t$source_id = pg_escape_string($con, $_POST[\"source_id_\" . $counter]);\n\t\t$source_description = pg_escape_string($con, $_POST[\"source_details_\" . $counter]);\n\t\t\n\t\t$sql = <<<sql\nINSERT INTO pro_assertion \n(assertion_type, assertion_id, source_id, source_description, timestamp)\t\nVALUES \n('activity', '$activity_id', '$source_id', '$source_description', '$date');\n\nsql;\n\t\t\n\t\t\n\t\t\n\t\t// if source_id field is not null then add entry in database\n\t\tif ($_POST[\"source_id_\" . $counter] != '') { \n\t\t\t\n\t\t\tif (pg_query($con, $sql)) { printf(\"<p>source added.</p>\");} else { die('Error adding textual source: ' . pg_last_error($con));}\n\t\t\t\t\n\t\t\t}\t\n\t\t$counter++;\n\t} else {\n\t\t// stop the loop if the form field with counter isn't set\n\t\t$counter = -1;\n\t}\n\t\n} while ($counter != -1);\n\n}" ]
[ "0.5617838", "0.51463515", "0.51065695", "0.5055433", "0.501966", "0.49244496", "0.4855131", "0.46057218", "0.4555488", "0.45431733", "0.44736964", "0.44625843", "0.44578138", "0.44246238", "0.4414199", "0.4403861", "0.42971876", "0.4264995", "0.42017144", "0.41881892", "0.41502455", "0.4143471", "0.41269153", "0.41186", "0.41140866", "0.4113742", "0.40709382", "0.40654108", "0.40565518", "0.40396696" ]
0.7046178
0
Operation listsPatientsourcesPatientsourcesIdPut Update an existing Source.
public function listsPatientsourcesput($patientsources_id) { $input = Request::all(); $source = Sources::findOrFail($patientsources_id); $source->update(['name' => $input['name']]); if($source->save()){ return response()->json(['msg' => 'Update patient source']); }else{ return response('Oops, seems like something went wrong while trying to update the source'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Source $source, UpdateSourceRequest $request)\n {\n $this->source->update($source, $request->all());\n\n return redirect()->route('admin.pipelines.source.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('pipelines::sources.title.sources')]));\n }", "public function update(Request $request, Source $source)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n\n $source->name = $request->name;\n $source->save();\n $request->session()->flash('message', 'Successfully modified the source!');\n return redirect('sources/' . $source->id);\n }", "public function updateSources(array $sources): self {\n $this->sources = array_merge($this->sources, $sources);\n return $this;\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'description' => 'required'\n ]);\n\n $source = Source::find($id);\n $source->name = $request->name;\n $source->description = $request->description;\n $source->save();\n\n // flash()->success('Source has been updated.');\n\n return redirect()->route('sources.index');\n }", "public function update($id)\n {\n $this->validate(request(), [\n 'name' => 'required|unique:lead_sources,name,' . $id,\n ]);\n\n Event::dispatch('settings.source.update.before', $id);\n\n $source = $this->sourceRepository->update(request()->all(), $id);\n\n Event::dispatch('settings.source.update.after', $source);\n\n return response([\n 'data' => new SourceResource($source),\n 'message' => __('admin::app.settings.sources.update-success'),\n ]);\n }", "public function update($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo)\n {\n $args = collect($args);\n $data = $args->except('directive', 'id')->toArray();\n\n try {\n $source = Source::findOrFail($args->get('id'));\n } catch (ModelNotFoundException $e) {\n return $this->apiResponse('INVALID_REQUEST', 'Source not found.');\n }\n $source->update($data);\n return $this->apiResponse('SUCCESS', 'Updated a source.', $source);\n }", "public function listsPatientsourcesByIdget($patientsources_id)\r\n {\r\n $source = Sources::findOrFail($patientsources_id);\r\n return response()->json($source,200);\r\n }", "public function SetAssetSourcesByID(SetAssetSourcesByID $parameters)\n {\n return $this->__soapCall('SetAssetSourcesByID', array($parameters));\n }", "public function setSources($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->sources = $arr;\n\n return $this;\n }", "public function setSourceId(?string $sourceId): void\n {\n $this->sourceId['value'] = $sourceId;\n }", "public function addSource($source) {\n // We keep this is a variable as well so we can use it when preparing the\n // request.\n $this->source = $source;\n $this->setFieldValue('source', $source);\n }", "public function listsPatientsourcesdelete($patientsources_id)\r\n {\r\n $deleted_source = Sources::destroy($patientsources_id);\r\n if($deleted_source){\r\n return response()->json(['msg' => 'Deleted patient source']);\r\n }\r\n }", "public function listsPatientsourcespost()\r\n {\r\n $input = Request::all();\r\n $new_source = Sources::create($input);\r\n if($new_source){\r\n return response()->json(['msg' => 'Added a new patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to add a new source');\r\n }\r\n }", "public function update(InventorySourceRequest $inventorySourceRequest, $id)\n {\n $data = $inventorySourceRequest->all();\n\n $data['status'] = ! isset($data['status']) ? 0 : 1;\n\n $inventorySource = $this->getRepositoryInstance()->update($data, $id);\n\n return response([\n 'data' => new InventorySourceResource($inventorySource),\n 'message' => __('rest-api::app.common-response.success.update', ['name' => 'Inventory source']),\n ]);\n }", "public function update($appId, $profileId, $sourceId, SourceBuilder $input, array $queryParams = [])\n {\n $response = $this->api->applications()->profiles()->sources()->update($appId, $profileId, $sourceId, $input->toArray(), $queryParams);\n\n return new SourceResponse($response);\n }", "public function setSourceId(?string $value): void {\n $this->getBackingStore()->set('sourceId', $value);\n }", "public function update(Request $request, $id)\n {\n $rules=$this->source->getValidationRules();\n $request->validate($rules);\n $this->source=$this->source->find($id);\n //dd($request->request);\n $data=$request->all();\n if(isset($request->status)){\n $data['status']=1;\n }else{\n $data['status']=0;\n }\n $this->source->fill($data);\n $success=$this->source->save();\n if($success){\n return redirect()->route('source.index')->with('flash_message', 'Source Has Been Updated');\n }\n }", "public function setUpdate(array $source_key) {\n $query = $this->connection->update($this->mapTable)\n ->fields(array('needs_update' => MigrateMap::STATUS_NEEDS_UPDATE));\n $count = 1;\n foreach ($source_key as $key_value) {\n $query->condition('sourceid' . $count++, $key_value);\n }\n $query->execute();\n }", "public function update(Request $request, $id)\n {\n $source = $this->courseThematicSourceRepository->find($id);\n if (!$source) {\n return redirect()->with('status', config('langVN.data_not_found'));\n }\n $param = $request->all();\n\n // update source\n try {\n $this->courseThematicSourceRepository->update($param, $id);\n return redirect()->back()->with('status', config('langVN.update_success'));\n } catch (\\Exception $exception) {\n Log::error($exception);\n }\n\n return redirect()->back()->with('status', config('langVN.update_failed'));\n }", "public function testUpdateDatasource()\n {\n Log::info(__FUNCTION__);\n\n //Preparation -----------------------------\n //Add original data for update\n $postDataAdd = [\n 'datasource_name' => 'datasource_name',\n 'table_id' => 1,\n 'starting_row_number' => 2,\n ];\n //TODO need to use \"V1\" in the url\n $addResponse = $this->post('api/add/data-source', $postDataAdd);\n $addResponseJson = json_decode($addResponse->content());\n $targetDataSourceId = $addResponseJson->id;\n\n // Execute -----------------------------\n $updatePostData = [\n 'id' => $targetDataSourceId,\n 'datasource_name' => 'datasource_name_changed',\n 'table_id' => 3,\n 'starting_row_number' => 4,\n ];\n //TODO need to use \"V1\" in the url\n $updateResponse = $this->post('api/update/data-source', $updatePostData);\n\n //checking -----------------------------\n $updatedTable = Datasource::where('id', $targetDataSourceId)->first();\n\n // Check table data of 'datasource' table\n $this->assertEquals($updatePostData['datasource_name'], $updatedTable->datasource_name);\n $this->assertEquals($updatePostData['table_id'], $updatedTable->table_id);\n $this->assertEquals($updatePostData['starting_row_number'], $updatedTable->starting_row_number);\n $this->assertTrue($updatedTable->created_at != null);\n $this->assertTrue($updatedTable->updated_at != null);\n $this->assertTrue($updatedTable->created_by == null);\n $this->assertTrue($updatedTable->updated_by == null);\n\n //Check response\n $updateResponse\n ->assertStatus(200)\n ->assertJsonFragment([\n 'id' => $updatedTable->id,\n 'datasource_name' => $updatePostData['datasource_name'],\n 'table_id' => $updatePostData['table_id'],\n 'starting_row_number' => $updatePostData['starting_row_number'],\n ]);\n }", "public function setAttributeSource(?AccessPackageResourceAttributeSource $value): void {\n $this->getBackingStore()->set('attributeSource', $value);\n }", "public function setSource($source);", "public function setSource($source)\n {\n if (\\File::exists($source)) {\n $remoteSource = basename($source);\n\n \\Storage::disk('blueprints')->put($remoteSource, file_get_contents($source));\n\n $source = $remoteSource;\n }\n\n $this->resource->source = $source;\n }", "public function edit(Source $source)\n {\n $source = Source::findOrFail($source->id);\n\n return view('source.edit', compact('source'));\n }", "public function update(StoreRessourceRequest $request, Ressource $ressource)\n {\n $validated = $request->validated();\n\n $ressource->text = Arr::get($validated, 'text');\n $ressource->formation_id = Arr::get($validated, 'formation_id');\n\n $ressource->save();\n\n return redirect('/ressources');\n }", "public function setSource(array $source): Mapping\n {\n return $this->setParam('_source', $source);\n }", "public function edit(Source $source)\n {\n return view('sources.edit', compact('source', $source));\n }", "public function setSource($source)\n {\n $this->source = $source;\n }", "public function setSource($source)\n {\n $this->source = $source;\n }", "public function setSource($source)\n {\n $this->source = $source;\n }" ]
[ "0.55158323", "0.5221065", "0.505271", "0.49237734", "0.48848748", "0.4806753", "0.47617802", "0.46584862", "0.46243158", "0.45808053", "0.45083895", "0.44590622", "0.4415172", "0.44054908", "0.43727362", "0.43676326", "0.43507496", "0.43111002", "0.43031305", "0.42670444", "0.42619988", "0.4260754", "0.41778997", "0.41589022", "0.41518927", "0.41346326", "0.41300997", "0.41058472", "0.41058472", "0.41058472" ]
0.61277264
0
Operation listsPatientsourcesPatientsourcesIdDelete Deletes a Source specified by patientsourcesId.
public function listsPatientsourcesdelete($patientsources_id) { $deleted_source = Sources::destroy($patientsources_id); if($deleted_source){ return response()->json(['msg' => 'Deleted patient source']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPatientsourcesByIdget($patientsources_id)\r\n {\r\n $source = Sources::findOrFail($patientsources_id);\r\n return response()->json($source,200);\r\n }", "public function listsPatientsourcesput($patientsources_id)\r\n {\r\n $input = Request::all();\r\n $source = Sources::findOrFail($patientsources_id);\r\n $source->update(['name' => $input['name']]);\r\n if($source->save()){\r\n return response()->json(['msg' => 'Update patient source']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the source');\r\n }\r\n }", "public function deleteById($appId, $profileId, $sourceId, array $queryParams = [])\n {\n $response = $this->api->applications()->profiles()->sources()->deleteById($appId, $profileId, $sourceId, $queryParams);\n\n return new BaseResponse($response);\n }", "public function destroy(Request $request, Source $source)\n {\n $source->delete();\n $request->session()->flash('message', 'Successfully deleted the source!');\n return redirect('sources');\n }", "public function destroy($id)\n {\n $this->source=$this->source->find($id);\n $success=$this->source->delete();\n if($success){\n return redirect()->route('source.index')->with('flash_message', 'Source Has Been Deleted');\n }\n }", "public function destroy(Source $source)\n {\n\n $source->delete();\n\n // flash()->success('Source has been deleted.');\n\n return redirect()->route('sources.index');\n }", "public function deleteAction($id)\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n $typeRessourceRepository = $entityManager->getRepository(\"RessourceBundle:TypeRessource\");\n $typeRessource = $typeRessourceRepository->findOneById($id);\n if ($typeRessource != null) {\n $entityManager->remove($typeRessource);\n }\n $entityManager->flush();\n\n return $this->redirect($this->generateUrl('RessourceBundle_TypeRessource_index'));\n }", "public function destroy(Source $source)\n {\n $this->source->destroy($source);\n\n return redirect()->route('admin.pipelines.source.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('pipelines::sources.title.sources')]));\n }", "public function deleteLinkAction($id, LinkSource $source, LinkService $service)\n {\n $this->allows('delete');\n\n /** @var Link $link */\n $link = $source->findByPK($id);\n if (empty($link)) {\n return [\n 'status' => 400,\n 'error' => sprintf($this->say('No link found by id \"%s\".'), $id)\n ];\n }\n\n if (!$service->deleteAllowed($link)) {\n return [\n 'status' => 400,\n 'error' => $this->say('Can\\'t delete, remove from all domain trees first.')\n ];\n }\n\n $link->delete();\n\n return [\n 'status' => 200,\n 'message' => $this->say('Link deleted.')\n ];\n }", "public function deletePreRegisteredSubjectDetail(Request $request, $id) {\n $pre_registered_subject_detail = PreRegisteredSubjectDetail::find($id);\n if (is_null($pre_registered_subject_detail)) {\n return response()->json([\n 'success' => false,\n 'statusCode' => 404,\n 'message' => 'Pre-registered Subject Details not found']);\n }\n $pre_registered_subject_detail ->delete();\n return response()->json([\n 'success' => true,\n 'statusCode' => 204,\n 'message' => 'Successfully deleted student pre-registered subject detail',\n 'data' => null]);\n }", "public function delete(Request $request, $patient_id)\n {\n\n return [\n 'text' => \"Successfully deleted patient ID {$patient_id}\"\n ];\n }", "public function destroy($id)\n\t{\n\t\t//\n\t\t$ressource = Ressource::find($id);\n\t\t$domaine_id = $ressource->domaine_id;\n\t\t$ressource->delete();\n\t\treturn redirect('/ressource/list/'.$domaine_id);\n\t}", "public function actionDelete($id, $PSD_Type_Id)\n {\n $this->findModel($id, $PSD_Type_Id)->delete();\n\n return $this->redirect(['index']);\n }", "public function IsPrinterDeleteSource(IsPrinterDeleteSource $parameters)\n {\n return $this->__soapCall('IsPrinterDeleteSource', array($parameters));\n }", "public function IsFFPMDeleteSource(IsFFPMDeleteSource $parameters)\n {\n return $this->__soapCall('IsFFPMDeleteSource', array($parameters));\n }", "public function delete(int $id): void\n {\n $this->request(\n method: 'delete',\n path: 'contacts/'.$id\n );\n }", "public function destroy($id)\n {\n try {\n Event::dispatch('settings.source.delete.before', $id);\n\n $this->sourceRepository->delete($id);\n\n Event::dispatch('settings.source.delete.after', $id);\n\n return response([\n 'message' => __('admin::app.settings.sources.delete-success'),\n ]);\n } catch (\\Exception $exception) {\n return response([\n 'message' => __('admin::app.settings.sources.delete-failed'),\n ], 500);\n }\n }", "public function actionDelete_printers($id)\n {\n $this->findModel_printers($id)->delete();\n\n return $this->redirect(['/printers/index']);\n }", "public function actionDelete_printers($id)\n {\n $this->findModel_printers($id)->delete();\n\n return $this->redirect(['/printers/index']);\n }", "public function ListSources(\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\ListSourcesResponse', 'decode'],\n $metadata, $options);\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('NumaCCCAdminBundle:Customers')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Customers entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('customers'));\n }", "public function deletePassangers($id)\n {\n $rowUser = $this->find($id)->current();\n if($rowUser) {\n $rowUser->delete();\n }else{\n throw new Zend_Exception(\"Could not delete user. User not found!\");\n }\n }", "public function delete($campaignId);", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('VentesBundle:DetailsProduits')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find DetailsProduits entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('detailsproduits'));\n }", "public function deleteAction($id)\n\t{\n\t\t$contact = Contacts::findFirst($id);\n\n\t\tif(!$contact){\n\t\t\t$this->flash->error(\"Don’t try to remove a contact that doesn’t even exist in the first please.\");\n\t\t}\n\t\telse {\n\t\t\tif(!$contact->delete()){\n\t\t\t\t\n\t\t\t\tforeach ($contact->getMessages() as $message) {\n\t\t\t\t\t$this->flash->error($message);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->flash->success(\"The Contact R.I.P successful!!!\");\n\t\t\t}\n\n\t\t}\n\n\t\t$this->dispatcher->forward(['action' => 'index']);\n\t}", "public function delete($id = null) \r\n\t{\r\n\t\tif ($id == null) \r\n\t\t{\r\n\t\t\tshow_error('No identifier provided', 500);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$this->country->remove($id);\r\n\t\t\t// Set flash data \r\n\t\t\t$this->session->set_flashdata('message', '<div style=\"text-align:center; color:#4C8C18\">Successfully deleted the country information!</div>');\r\n\t\t\tredirect('country/listing'); // back to the listing\r\n\t\t}\r\n\t}", "public function destroy($id)\n {\n $delete = $this->courseThematicSourceRepository->delete($id);\n if ($delete == false) {\n return redirect()->back()->with('status', config('langVN.delete_failed'));\n }\n\n return redirect()->back()->with('status', config('langVN.delete_success'));\n }", "public function delete(array $source_key, $messages_only = FALSE) {\n if (!$messages_only) {\n $map_query = $this->connection->delete($this->mapTable);\n }\n $message_query = $this->connection->delete($this->messageTable);\n $count = 1;\n foreach ($source_key as $key_value) {\n if (!$messages_only) {\n $map_query->condition('sourceid' . $count, $key_value);\n }\n $message_query->condition('sourceid' . $count, $key_value);\n $count++;\n }\n\n if (!$messages_only) {\n $map_query->execute();\n }\n $message_query->execute();\n }", "public function deleteById($dpRedirectId);", "public function deleteRulesBySourceTarget($tracker_id, $field_source_id, $field_target_id) {\n $deleted = $this->rules_dao->deleteRulesBySourceTarget($tracker_id, $field_source_id, $field_target_id);\n return $deleted;\n }" ]
[ "0.56046116", "0.5466162", "0.4995644", "0.4908109", "0.4815008", "0.4764825", "0.46750915", "0.4671269", "0.4618493", "0.44524857", "0.4439042", "0.44239753", "0.4397946", "0.43776262", "0.43751004", "0.43628415", "0.43570453", "0.43350804", "0.43350804", "0.43337566", "0.43191466", "0.43089208", "0.42914432", "0.42871928", "0.42803934", "0.42681164", "0.42671716", "0.42667884", "0.4264722", "0.4261234" ]
0.75158834
0
Operation listsPepreasonPepreasonIdGet Fetch PEP Reason specified by pepreasonId.
public function listsPepreasonByIdget($pepreason_id) { $pep = Pepreason::findOrFail($pepreason_id); return response()->json($pep,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "function GetReason($reasonId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReason\", array(\"ReasonId\"=>$reasonId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public static function GetPlatParPrestaID($id)\n\t{\n\t\t$sql = 'CALL get_plat_prestaID(:pID)';\n\t\t$param = array(':pID' => $id);\n\t\treturn DatabaseHandler::GetAll($sql,$param);\n\t}", "public function readListByPostId( $post_id ) {\r\n $this->validateReadLists( $post_id );\r\n\r\n $sql = \"SELECT * FROM \" . $this->table . \" WHERE \" . $this->table . \".id = {$post_id}\";\r\n $result = $this->db->getLists( $sql );\r\n\r\n if (!$result) {\r\n throw new Exception(\"Invalid post ID!\");\r\n }\r\n\r\n return $result;\r\n }", "public function propietario_listarPacientes($idPropietario){\n \t\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t M.nombre, E.nombre AS nombreEspecie, R.nombre AS nombreRaza\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_mascotas AS M\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_especies AS E ON E.idEspecie = M.idEspecie\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_razas AS R ON R.idRaza = M.idRaza\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t M.idPropietario = '$idPropietario' \";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }", "public function getPesertaById($id){\n $q = $this->db->get_where('v_peserta', ['id_pendaftar' => $id]);\n return $q->row();\n }", "public function get_all_by($id_reason){\n\t\t$this->db->select('*');\n\t\t$this->db->from('reason'); \n\t\t$this->db->where('id_reason',$id_reason); \n\t\t$query_result=$this->db->get();\n\t\t$result=$query_result->result();\n\t\treturn $result;\n\t}", "public function getPenDetails($pen_id)\r\n\t\t{\r\n\t\t\t\t$link = $this->connect();\r\n\t\t\t\t$pquery = \"SELECT p.pen_id, \r\n\t\t\t\t\t\t\tp.pen_no,\r\n\t\t\t\t\t\t\tp.function,\r\n\t\t\t\t\t\t\tp.house_id,\r\n\t\t\t\t\t\t\th.loc_id\r\n\t\t\t\t\t\tFROM pen p\r\n\t\t\t\t\t\tINNER JOIN house h on p.house_id = h.house_id \r\n\t\t\t\t\t\tWHERE p.pen_id = '\" . $pen_id . \"'\";\r\n\t\t\t\t$presult = mysqli_query($link, $pquery);\r\n\t\t\t\t$pen = array();\r\n\t\t\t\t$arr_pen = array();\r\n\t\t\t\twhile ($row = mysqli_fetch_row($presult)) {\r\n\t\t\t\t\t\t$pen['pen_no'] = $row[1];\r\n\t\t\t\t\t\t$pen['pen_id'] = $row[0];\r\n\t\t\t\t\t\t$pen['fxn'] = $row[2];\r\n\t\t\t\t\t\t$pen['h_id'] = $row[3];\r\n\t\t\t\t\t\t$pen['loc_id'] = $row[4];\r\n\t\t\t\t\t\t$arr_pen[] = $pen;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $arr_pen;\r\n\t\t}", "function GetReasonSold($reasonSoldId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReasonSold\", array(\"ReasonSoldId\"=>$reasonSoldId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getrejectBerkas($id)\n\t{\n\t\t$query = $this->db->where('id_lomba', 1)\n\t\t->where('status_tim', 0)\n\t\t->order_by(\"id_tim\", \"desc\")\n\t\t->get('tim');\n\t\treturn $query->result();\n\t}", "function lista_partidas_dependientes($aper_id,$par_depende){\n $sql = 'select pg.par_id,pg.partida as par_codigo,p.par_nombre,p.par_depende,pg.importe\n from ptto_partidas_sigep pg\n Inner Join partidas as p On p.par_id=pg.par_id\n where pg.aper_id='.$aper_id.' and pg.estado!=\\'3\\' and pg.g_id='.$this->gestion.' and p.par_depende='.$par_depende.'\n order by pg.partida asc';\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function GetReasons()\n\t{\n\t\t$result = $this->sendRequest(\"GetReasons\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function findPourDefinitionPartie($definitionPartieId) {\n \n $queryTxt = 'SELECT * FROM DefinitionPartie_Pion\r\n WHERE DefinitionPartieId = :id';\r\n $query = self::$db->prepare($queryTxt);\r\n $query->bindValue(':id', $definitionPartieId);\n \r\n $query->setFetchMode(PDO::FETCH_ASSOC);\n $query->execute();\n $listeItems = array();\n // $query contient les id des pions a creer\n foreach($query as $row) {\n $unItem = $this->find(array($row['PionId']));\n if ($unItem <> null) {\n $listeItems[] = $unItem;\n }\n }\n return $listeItems;\n }", "function get_by_id_p($id_p)\n {\n $this->db2->select('pp.id as id_pp, pp.real_keu, pp.real_fisik, pp.tgl_progress, pp.pekerjaan, pp.progress, pp.tgl_n_progress, pp.ket, pp.create_date, p.nama, p2.nama as next_progress');\n $this->db2->from('progress_pekerjaan pp');\n $this->db2->join('progress p', 'p.id=pp.progress', 'left');\n $this->db2->join('progress p2', 'p2.id=pp.next_progress', 'left');\n $this->db2->where('pp.pekerjaan', $id_p);\n $this->db2->order_by('pp.progress','desc');\n $this->db2->order_by('pp.tgl_progress','desc');\n $this->db2->order_by('id_pp','desc');\n return $this->db2->get()->result();\n }", "public function listeEmployeeByDepartementId($id){\n\t\t\t\t\t$sql = \"SELECT * FROM employee WHERE employee.id_departement = \".$id.\" \";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "public function get($id)\n {\n return $this->run('GET', 'pedidovenda-rest/pessoas/'.$id);\n }", "public function obtenerPacientesExpediente($id)\n {\n return DB::table('paciente')\n ->join('paciente_usuarios', 'paciente_usuarios.id_paciente', '=', 'paciente.id')\n ->select('paciente_usuarios.*', 'paciente.*')\n ->where('paciente_usuarios.medico_asociado', '=', $id)\n ->get();\n }", "function get_pejabat($idpejabat)\n {\n return $this->db->get_where('pejabat',array('idpejabat'=>$idpejabat))->row_array();\n }", "private function getParagraphByMaterialId($material_id = NULL) {\n try {\n $query = \\Drupal::entityQuery('paragraph');\n\n $query->condition('type', 'sap_documents', '=');\n $query->condition('field_sap_material_code.value', $material_id, '=');\n\n $ids = $query->execute();\n $ids = array_values($ids);\n\n $entity_storage = \\Drupal::entityTypeManager()->getStorage('paragraph');\n\n // Load multiple nodes.\n $paragraphs = $entity_storage->loadMultiple($ids);\n }\n catch (\\Exception $error) {\n return new JsonResponse($error->getMessage(), 400);\n }\n return $paragraphs;\n }", "public function ProveedorPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from proveedores where codproveedor = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codproveedor\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public function get_data_res($id_prospektus)\n {\n \treturn $this->db->get_where('resources', array('id_prospektus' => $id_prospektus));\n }", "public function ProveedoresPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from proveedores where codproveedor = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function GetReasonStalled($reasonStalledId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReasonStalled\", array(\"ReasonStalledId\"=>$reasonStalledId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function get_pelanggan($id_pelanggan)\n {\n return $this->db->get_where('pelanggan',array('id_pelanggan'=>$id_pelanggan))->row_array();\n }", "public function consultarCabeceraplanifica($pla_id, $per_id) {\n $con = \\Yii::$app->db_academico;\n \n $sql = \"SELECT plan.mod_id, \n plan.pla_periodo_academico,\n plae.pes_carrera\n FROM \" . $con->dbname . \".planificacion plan\n INNER JOIN \" . $con->dbname . \".planificacion_estudiante plae ON plae.pla_id = plan.pla_id\n WHERE plan.pla_id = :pla_id and plae.per_id = :per_id\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":pla_id\", $pla_id, \\PDO::PARAM_INT);\n $comando->bindParam(\":per_id\", $per_id, \\PDO::PARAM_INT);\n $resultData = $comando->queryOne();\n return $resultData;\n }", "public function get_cites_mod_presupuestaria($mp_id){\n $sql = 'select *\n from modificacion_presupuestaria mp\n Inner Join _distritales as ds On ds.dist_id=mp.dist_id\n Inner Join _departamentos as d On d.dep_id=ds.dep_id\n where mp_id='.$mp_id.' and mp.g_id='.$this->gestion.'\n order by mp_id asc ';\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function printPayslipProvidentFund($id) {\n $self = 'provident-fund';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $payslip = ProvidentFund::find($id);\n $payroll = Payroll::where('emp_id', $payslip->emp_id)->where('provident_fund', '!=', '0')->get();\n $employee_share = Payroll::where('emp_id', $payslip->emp_id)->where('provident_fund', '!=', '0')->sum('provident_fund');\n $organization_share = $payslip->total - $employee_share;\n\n if ($payslip) {\n return view('admin.provident-fund-print-payslip', compact('payslip', 'payroll', 'organization_share', 'employee_share'));\n } else {\n return redirect('provident-fund/all')->with([\n 'message' => '没有找到福利信息',\n 'message_important' => true\n ]);\n }\n }", "public function getSelectedReason($deleteReasonId)\n {\n return $this->createQueryBuilder()->field('id')->equals($deleteReasonId)->getQuery()->getSingleResult();\n }" ]
[ "0.57601076", "0.5585517", "0.5547955", "0.5409901", "0.5078635", "0.50220454", "0.49953038", "0.4993361", "0.49322146", "0.48917928", "0.4873751", "0.48717922", "0.48194277", "0.4817733", "0.47892696", "0.47752345", "0.47686088", "0.47487113", "0.47236377", "0.47236085", "0.46985197", "0.46916467", "0.46864787", "0.46721074", "0.4671178", "0.4669935", "0.46657905", "0.4658987", "0.46504116", "0.4642516" ]
0.6484605
0
Operation listsPepreasonPost create a PEP Reason.
public function listsPepreasonpost() { $input = Request::all(); $new_pepreaosn = Pepreason::create($input); if($new_pepreaosn){ return response()->json(['msg' => 'Added a new pep reason']); }else{ return response('Oops, it seems like there was a problem adding the pep reason'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function listsChangereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = ChangeReason::create($input);\r\n if($new_reason){\r\n return $this->response->created();\r\n }else{\r\n return $this->response->errorBadRequest(); \r\n }\r\n }", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function ADPost_Get_Post_List(){\n\t \n\t $result_key = parent::Initial_Result('posts');\n\t $result = &$this->ModelResult[$result_key];\n\t \n\t try{\n\t \n\t\t// 查詢資料庫\n\t\t$DB_OBJ = $this->DBLink->prepare(parent::SQL_Permission_Filter(SQL_AdPost::ADMIN_POST_GET_POST_LIST()));\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\t// 取得最新消息清單\n\t\t$data_list = array();\n\t\t$data_list = $DB_OBJ->fetchAll(PDO::FETCH_ASSOC);\t\t\n\t\t$time_now = strtotime('now');\n\t\t\n\t\tforeach($data_list as &$data){\n\t\t $data['@list_filter'][] = ($time_now > strtotime($data['post_time_end'])) && $data['post_level']!=4 ? 'over' : 'inuse';\n\t\t $data['@list_status'][] = $data['post_display'] ? '' : 'mask';\n\t\t}\n\t\t\t\n\t\t$result['action'] = true;\t\t\n\t\t$result['data'] = $data_list;\t\t\n\t \n\t } catch (Exception $e) {\n $result['message'][] = $e->getMessage();\n }\n\t return $result;\n\t}", "public function postCreate()\n {\n $chooseReason = $this->chooseReasons->create(Input::get('ChooseReason'));\n\n return Redirect::to('/admin/choose-reason/edit/'.$chooseReason->id)->with('success', 'Choose reason created successfully');\n }", "public function listsWhostagepost()\r\n {\r\n $input = Request::all();\r\n $new_who = whostage::create($input);\r\n if($new_who){\r\n return response()->json(['msg' => 'Added a new who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the whostage');\r\n }\r\n }", "private function runPost()\n {\n $numDraftPost = (int) $this->ask('How many records do you want to create for the draft posts table?');\n $numPublicPost = (int) $this->ask('How many records do you want to create for the public posts table?');\n\n $sum = (int) ($numDraftPost + $numPublicPost);\n\n for ($i = 0; $i < $sum; $i++) {\n factory(Post::class)->create(\n [\n 'publication_status' => ($i < $numDraftPost) ? 'draft' : 'public',\n ]\n );\n }\n }", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }", "public function getPostPendiente()\n {\n return $this->getPosts()->pending()->all();\n }", "public function actionPost() {\n\t\t// Inisialisasi\n\t\t$id = $this->request->get('id');\n\t\t$this->data->set('parseCode', true);\n\n\t\t// Cek ACL\n\t\tif ($this->acl->isAllowed(Acl::WRITE, $id)) $this->data->set('allowWriteArticle', true);\n\t\tif ($this->acl->isAllowed(Acl::EDIT, $id)) $this->data->set('allowEditor', true);\n\n\t\tif ($this->data->get('getData[new]','false',true) == 'true') {\n\t\t\t$this->data->set('allowEditor', true);\n\t\t\t$isList = true;\n\t\t\t$editorTitle = 'Buat Post';\n\t\t\t$editor = ModelBase::buildEditor('/provider/post','Masukkan judul tulisan','/community/post');\n\t\t\t$data = ModelBase::factory('Template')->getComPostData(compact('isList', 'editorTitle', 'editor'));\n\t\t} elseif (empty($id)) {\n\t\t\t// Inisialisasi post section\n\t\t\t$isList = true;\n\t\t\t$listTitle = 'Semua Post';\n\t\t\t$page = $this->data->get('getData[page]',1,true);\n\t\t\t$query = $this->data->get('getData[query]','',true);\n\t\t\t$filter = array();\n\n\t\t\tif ($_POST && isset($_POST['query'])) {\n\t\t\t\t$query = $_POST['query'];\n\n\t\t\t\t// Reset page\n\t\t\t\t$page = 1;\n\t\t\t}\n\n\t\t\tif ( ! empty($query)) {\n\t\t\t\t$listTitle = 'Pencarian \"'.$query.'\"';\n\n\t\t\t\t$filter = array(\n\t\t\t\t\tarray('column' => 'Title', 'value' => '%'.$query.'%', 'chainOrStatement' => TRUE),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$searchQuery = $query;\n\n\t\t\t$posts = ModelBase::factory('Node')->getAllpost(7, $page, $filter);\n\n\t\t\t// Tambahkan filter post\n\t\t\t$filter[] = array('column' => 'Type', 'value' => 'post');\n\t\t\t$pagination = ModelBase::buildPagination($posts,'PhpidNodeQuery', $filter, $page, 10);\n\n\t\t\t$data = ModelBase::factory('Template')->getComPostData(compact('isList','posts','listTitle','listPage','pagination','searchQuery'));\n\t\t} else {\n\t\t\t// Detail post\n\t\t\t$isList = false;\n\n\t\t\t$post = ModelBase::factory('Node')->getPost($id,true);\n\n\t\t\tif ( ! $post->get('Nid')) {\n\t\t\t\tthrow new \\RuntimeException('Post tidak dapat ditemukan');\n\t\t\t}\n\n\t\t\t// Ambil comments data\n\t\t\t$comments = $post->get('comments') instanceof \\PropelObjectCollection ? $post->get('comments')->toArray() : array();\n\t\t\t$title = strip_tags($post->get('previewText'));\n\t\t\t$posts = ModelBase::factory('Node')->getAllpost(5);\n\n\t\t\t$data = ModelBase::factory('Template')->getComPostData(compact('title','isList','posts', 'post','comments'));\n\t\t}\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/community/post.tpl';\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function postCreateParagraph(){\n\t\t$paraData = Input::all();\n\t\t$paraNum = (int)Input::get('num_paragraph');\n\n\t\t//This is the validation section////////////////////\n\t\t//if use alpha_num does not work, treat num_paragraph as string, max is then the string length\n\t\t$rules = array(\n\t\t\t'num_paragraph' => array('numeric', 'required', 'min:1', 'max:20')\n\t\t);\n\n\t\t$message = array(\n\t\t\t'numeric' => 'Please enter a number.',\n\t\t\t'required' => 'This field is required',\n\t\t\t'min' => 'Please enter a number larger than or equal to 1',\n\t\t\t'max' => 'Please enter a numbe less than or equal to 20'\n\t\t);\n\n\t\t$validator = Validator::make($paraData, $rules, $message);\n\n\t\tif ($validator->fails() ) {\n\t\t\treturn Redirect::to('paragraph')->withInput()->withErrors($validator);\n\n\t\t}\n\n\t\t//////////////////////////////////////////////////////////////\n\n\n\n\t\t$generator = new Badcow\\LoremIpsum\\Generator();\n\t\t$paragraphs = $generator->getParagraphs($paraNum);\n\n\t\t//modify the usage accordingly\n\t\techo '<p>'.implode('</p><p>', $paragraphs).'</p>';\n\n\t}", "public function actionCreate()\n\t{\n\t\t$this->allowUser(EDITOR);\n\t\t$model=new Post;\n\t\t$model->created = date('d.m.Y');\n\t\t$languages = Language::model()->findAllByAttributes(array('active'=>1));\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif (isset($_POST['Post'])) {\n\t\t\t\n\t\t\t$attributes = $_POST['Post'];\n\t\t\t\n\t\t\t$attributes['created'] = date('Y-m-d',strtotime($attributes['created']));\n\t\t\t$attributes['modified'] = new CDbExpression('NOW()');\n\t\t\t$attributes['user_id'] = Yii::app()->user->id;\n\t\t\t$attributes['post_type_id'] = 1;\n\t\t\t$attributes['parent_id'] = null;\n\t\t\t$attributes['guid'] = urlencode($attributes['guid']);\n\t\t\tif (!is_array($attributes['term_id'])) {\n\t\t\t\t$attributes['term_id']=null;\n\t\t\t} else {\n\t\t\t\t$term_has_post = $attributes['term_id']; \n\t\t\t\t$attributes['term_id']=implode(',',$attributes['term_id']);\n\t\t\t}\n\t\t\t\n\t\t\t$model->attributes=$attributes;\n\t\t\t\n\t\t\tif ($model->save()) {\n\t\t\tforeach($languages as $language) {\n \t\t$description = new PostDescription;\n \t\t$description->attributes = array(\n \t\t'post_id' => $model->primaryKey,\n \t\t'language_id'=>$language['id'],\n \t\t'title'=>$model->name,\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$description->save();\n \t} \n\t\t\tif ($term_has_post) {\n\t\t\t\tforeach($term_has_post as $term) {\n\t\t\t\t\t$thp = new TermHasPost;\n\t\t\t\t\t$thp->attributes = array(\n\t\t\t\t\t'term_id' => $term,\n\t\t\t\t\t'post_id'=>$model->primaryKey\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$thp->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t$this->redirect(array('update','id'=>$model->id));\n\t\t\t}\n\t\t}\n\t\t$_SESSION['KCFINDER'] = array();\n\t\t$_SESSION['KCFINDER']['disabled'] = false;\n\t\t$_SESSION['KCFINDER']['uploadURL'] = \"/uploads/editors/\".md5(Yii::app()->user->id); \n\t\t\n\t\t$terms = Term::model()->findAll();\n\t\t\n\t\t$ids = array();\n\t\t$names=array();\n\t\tforeach ($terms as $term) {\n\t\t\t$ids[] = $term['id'];\n\t\t\t$names[] = $term['name'];\n\t\t}\n\t\t$array = array_combine($ids, $names);\n\t\t\n\t\t\n\t\t$model['term_id'] = explode(',',$model['term_id']);\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'terms'=>$array\n\t\t));\n\t}", "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "public function addPost() {\n\n if ($this->request->is('post')) {\n\n $this->Post->create();\n\n $data = $this->getPreparedPostData($this->request);\n\n if ($this->Post->save($data)) {\n $this->Session->setFlash('Your post has been saved.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Unable to add your post.');\n }\n }\n }", "public function addPostAction() {\n $inputVars = $this->getInput(array(\n \t\t'id', 'dataType', //主表字段:id,type\n \t\t \t'data'//子表字段\n ));\n \tlist($news, $itemsList) = $this->checkInput($inputVars);\n \t$news['create_time'] = time();\n \t$result = Admin_Service_Material::add($news, $itemsList);\n \tif (!$result) $this->failPostOutput('操作失败');\n \t$this->successPostOutput($this->actions['listUrl']);\n }", "public function listPost()\n {\n $this->areaAdmin->verifyAdmin();\n\n $posts = $this->postManager->getList(\"admin\");\n\n $this->renderview->generateView(array('name' => \"AdminPost\", 'function' => $posts, 'nameFunction' => 'posts'), 'layoutPageAdmin');\n }", "public function createPostTypes()\n {\n }", "public function getListPost() {\n\n $postsModel = new Posts();\n $posts = $postsModel->getListPost();\n $this->data['posts'] = $posts;\n\n return view('admin.post_list', $this->data);\n }", "public function actionList() {\n $models = Post::model()->findAll();\n $rows = array();\n foreach($models as $model) \n $rows[] = $model->attributes;\n\t\t$data_response = array(\n\t\t\t'error'=> array('status'=>200, 'message'=>''),\n\t\t\t'datas'=>$rows\n\t\t);\n $this->response($data_response);\n }", "public function addPost( $post ) {\n if ( count( $this->posteTyps ) < 5 ) {\n $this->posteTyps[] = $post;\n }\n }", "public function get_posti_disponibili(){\r\n $id_prenotazione = $this->getIdPrenotazione();\r\n Prenotazione::posti_disponibili($id_prenotazione);\r\n }", "function index_post(){\n\t\t$data = array(\n\t\t\t'pid' => $this->post('pid'),\n\t\t\t'name' => $this->post('name'),\n\t\t\t'email' => $this->post('email'),\n\t\t\t'description' => $this->post('description'));\n\t\t$insert = $this->db->insert('pendaftaran', $data);\n\n\t\t$this->response(array('result' =>$data, 200));\n\n\t}", "public function actionCreate()\n {\n $model = new Post();\n $post_types = ArrayHelper::map(PostType::find()->orderBy('name')->all(), 'id', 'name');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'post_types' => $post_types,\n ]);\n }\n }", "public function addPost($post)\n {\n $this->post[] = $post;\n }", "function index_post() {\n $this->crud_post($this->post());\n }", "public function actionAddPost()\n {\n return Post::addPost(self::jsonDecoder());\n //return self::jsonDecoder()[0];\n }", "public function listsPurposepost()\r\n {\r\n $input = Request::all();\r\n $new_purpose = Purpose::create($input);\r\n if($new_purpose){\r\n return response()->json(['msg' => 'Added a new Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Purpose');\r\n }\r\n }", "public function CreateNewPosts()\n {\n $this->sql = \"SELECT product.title, variant_id, product_id, sku FROM product_variants \n JOIN projekt_klon.product ON \n product_variants.product_id = product.pid ORDER BY product_id;\";\n\n $this->prepQuery($this->sql);\n $this->getAll();\n\n return self::$data;\n }", "public function actionCreate()\n {\n $model = new Pembelian();\n\n if ($model->load(Yii::$app->request->post())) {\n $transaction = Yii::$app->db->beginTransaction();\n try {\n $model->jenis_ppn = 'NON-PPN';\n \n $model->listPembelian = Yii::$app->request->post('ItemPembelian', []);\n if (($model->save())) {\n $transaction->commit();\n return $this->redirect(['index']);\n }\n } catch (\\Exception $ecx) {\n $transaction->rollBack();\n throw $ecx;\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n return $this->redirect(['index']);\n } else {\n $model->tanggal = date(\"Y-m-d\");\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Post();\n if (\\Yii::$app->user->can('createPost'))\n {\n if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->savePost()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }\n else\n {\n throw new ForbiddenHttpException('Доступ Закрыт');\n }\n }" ]
[ "0.617121", "0.6034267", "0.55652416", "0.5457918", "0.5438052", "0.5385466", "0.5375133", "0.53420424", "0.5275794", "0.5245137", "0.5235936", "0.52267224", "0.5217475", "0.51609445", "0.51279885", "0.5105963", "0.5064257", "0.5050664", "0.49726528", "0.49663398", "0.49429867", "0.49163243", "0.4883257", "0.4873013", "0.48590916", "0.48449698", "0.48425525", "0.48403975", "0.48208115", "0.48089212" ]
0.73780596
0
Operation listsPepreasonPepreasonIdPut Update an existing PEP Reason.
public function listsPepreasonput($pepreason_id) { $input = Request::all(); $pep = Pepreason::findOrFail($pepreason_id); $pep->update(['name' => $input['name']]); if($pep->save()){ return response()->json(['msg' => 'Update pep reason']); }else{ return response('Oops, it seems like there was a problem updating the pep reason'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'kategori_pmkp' => 'required',\n 'kode_pmkp' => 'required',\n 'nama_ind_mutu' => 'required',\n 'def_oprs' => 'required',\n 'p_jawab' => 'required',\n 'kbjkan_mutu' => 'required',\n 'd_pemikiran' => 'required',\n 'numerator' => 'required',\n 'denominator' => 'required',\n 'formula' => 'required', \n 'k_inklusi' => 'required',\n 'k_eksklusi' => 'required',\n 'metode' => 'required',\n 'type' => 'required',\n 'area_monitor' => 'required|max:191',\n 'w_lapor' => 'required',\n 'p_analisa' => 'required',\n 'n_standar' => 'required',\n 't_kerja' => 'required',\n 'j_sampel' => 'required',\n 'h_komunikasi' => 'required',\n 'unitkerja' => 'required',\n 'capaian'=> 'required'\n ]);\n\n Pmkp::find($id)->update($request->all());\n\n return redirect()->route('pmkp.index')->with('success', \"Data berhasil di edit!!!\");\n\n\n\n }", "public function listsPepreasonByIdget($pepreason_id)\r\n {\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n return response()->json($pep,200);\r\n }", "public function listsChangereasonput($changereason_id)\r\n {\r\n $input = Request::all();\r\n $reason = ChangeReason::findOrFail($changereason_id);\r\n $reason->update([ 'name' => $input['name'] ]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated change']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update reason');\r\n }\r\n }", "public function edit(Pekan $pekan)\n {\n //\n }", "public function listsNonadherenceput($nonadherence_id)\r\n {\r\n $input = Request::all();\r\n $reason = NonAdherenceReason::findOrFail($nonadherence_id);\r\n $reason->update(['name'=>$input['name']]);\r\n if($reason->save()){\r\n return response()->json(['msg' => 'Updated NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update the NonAdherence Reason');\r\n }\r\n }", "public function actionUpdate($id)\n {\n $this->checkPrivilege();\n $model = $this->findModel($id);\n $modelsPembimbing = $model->pembimbingPenelitian;\n $modelsTempat = $model->tempatPenelitianLain;\n\n if ($model->load(Yii::$app->request->post())) {\n\n $oldIDs = ArrayHelper::map($modelsPembimbing, 'id', 'id');\n $modelsPembimbing = Model::createMultiple(PembimbingPenelitian::classname(), $modelsPembimbing);\n Model::loadMultiple($modelsPembimbing, Yii::$app->request->post());\n $deletedIDs = array_diff($oldIDs, array_filter(ArrayHelper::map($modelsPembimbing, 'id', 'id')));\n\n // validate all models\n $valid = $model->validate();\n $valid = Model::validateMultiple($modelsPembimbing) && $valid;\n\n if ($valid) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n if ($flag = $model->save(false)) {\n if (!empty($deletedIDs)) {\n PembimbingPenelitian::deleteAll(['id' => $deletedIDs]);\n }\n foreach ($modelsPembimbing as $modelPembimbing) {\n $modelPembimbing->id_peneliti = $model->id;\n if (! ($flag = $modelPembimbing->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n }\n if ($flag) {\n $transaction->commit();\n ///Post Data Tempat\n $oldIDs = ArrayHelper::map($modelsTempat, 'id', 'id');\n $modelsTempat = Model::createMultiple(TempatPenelitianLain::classname(), $modelsTempat);\n Model::loadMultiple($modelsTempat, Yii::$app->request->post());\n $deletedIDs = array_diff($oldIDs, array_filter(ArrayHelper::map($modelsTempat, 'id', 'id')));\n\n // validate all models\n $valid = $model->validate();\n $valid = Model::validateMultiple($modelsTempat) && $valid;\n\n if ($valid) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n if ($flag = $model->save(false)) {\n if (!empty($deletedIDs)) {\n TempatPenelitianLain::deleteAll(['id' => $deletedIDs]);\n }\n foreach ($modelsTempat as $modelTempat) {\n $modelTempat->id_peneliti = $model->id;\n if (! ($flag = $modelTempat->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n }\n if ($flag) {\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n }\n\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'modelsPembimbing' => (empty($modelsPembimbing)) ? [new PembimbingPenelitian] : $modelsPembimbing,\n 'modelsTempat' => (empty($modelsTempat)) ? [new TempatPenelitianLain] : $modelsTempat,\n ]);\n }", "public function edit(pelanggan $pelanggan)\n {\n //\n }", "protected function putSetParagraphPortionPropertiesRequest(Requests\\PutSetParagraphPortionPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'portion_index' is set\n if ($request->portionIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $portionIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putSetParagraphPortionProperties');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"portionIndex\", $request->portionIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function update(Request $request, $id)\n {\n\n $request->validate([\n 'nik'=>'required|unique:pelanggan,nik,'. $id,\n 'nama'=>'required',\n 'alamat'=>'required',\n 'hp'=>'required',\n 'paket_id'=>'required',\n 'tgl_gabung'=>'required',\n 'status_langganan'=>'required',\n 'kordinat_rumah'=>'required',\n 'letakserver_id'=>'required'\n ],\n [\n 'nik.required'=>'nik harus diisi',\n 'nik.unique'=>'nik telah digunakan',\n ]);\n\n $paket_nama=\"Paket Tidak ditemukan atau terhapus\";\n //ambil nama PAKET\n $ambilpaket = DB::table('paket')->where('id',$request->paket_id)->get();\n foreach($ambilpaket as $ambil){\n $paket_nama=$ambil->nama;\n $paket_harga=$ambil->harga;\n $paket_kecepatan=$ambil->kecepatan;\n }\n\n $letakserver_nama=\"Server Tidak ditemukan atau terhapus\";\n $letakserver_koordinat=\"Koordinat Server Tidak ditemukan atau terhapus\";\n //ambil nama letakserver\n $ambilnamas4rver = DB::table('letakserver')->where('id',$request->letakserver_id)->get();\n foreach($ambilnamas4rver as $ambil2){\n $letakserver_nama=$ambil2->nama;\n $letakserver_koordinat=$ambil2->koordinat;\n }\n //aksi update\n pelanggan::where('id',$id)\n ->update([\n 'nik'=>$request->nik,\n 'nama'=>$request->nama,\n 'alamat'=>$request->alamat,\n 'hp'=>$request->hp,\n 'status_langganan'=>$request->status_langganan,\n 'tgl_gabung'=>$request->tgl_gabung,\n 'paket_id'=>$request->paket_id,\n 'paket_nama'=>$paket_nama,\n 'paket_harga'=>$paket_harga,\n 'paket_id'=>$request->paket_id,\n 'paket_kecepatan' => $paket_kecepatan,\n 'kordinat_rumah' => $request->kordinat_rumah,\n 'letakserver_id' => $request->letakserver_id,\n 'status_langganan' => $request->status_langganan,\n 'letakserver_nama' => $letakserver_nama,\n 'letakserver_koordinat' => $letakserver_koordinat,\n 'paket_kecepatan' => $paket_kecepatan,\n 'panggilan' => $request->panggilan,\n 'updated_at'=>date(\"Y-m-d H:i:s\")\n ]);\n\n\n //periksa apakah nik thbln skrg sudah ada\n $ambildatatagihan= DB::table('tagihan')\n ->where('nik',$request->nik)\n ->where('thbln', date(\"Y-m\"))\n ->count();\n\n if($ambildatatagihan>0){\n //update data tagihan nik&&blnskrg\n // dd(\"update\");\n\n DB::table('tagihan')\n ->where('nik', $request->nik)\n ->where('thbln', date(\"Y-m\"))\n ->update([\n 'nama' => $request->nama,\n 'paket_id' => $request->paket_id,\n 'paket_nama' => $paket_nama,\n 'paket_harga' => $paket_harga,\n 'paket_kecepatan' => $paket_kecepatan,\n ]);\n return redirect('/admin/pelanggan')->with('status','Data berhasil ditambah dan tagihan bulan ini berhasil diupdate!');\n\n }else{\n //simpan\n // dd(\"simpan\");\n\n\n // simpan ke tabel tagihan\n DB::table('tagihan')->insert(\n array(\n 'nik' => $request->nik,\n 'nama' => $request->nama,\n 'total_bayar' => 0,\n 'tgl_bayar' => date(\"Y-m-d H:i:s\"),\n 'paket_id' => $request->paket_id,\n 'paket_nama' => $paket_nama,\n 'paket_harga' => $paket_harga,\n 'paket_kecepatan' => $paket_kecepatan,\n 'thbln' => date(\"Y-m\"),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\")\n )\n);\n\nreturn redirect(URL::to('/').'/admin/pelanggan')->with('status','Data berhasil di update!');\n }\n }", "public function update(Request $request,$id)\n {\n \n $paiement = paiement::find($id);\n $paiement->reste = $request->reste;\n $paiement->paye = $request->paye;\n $paiement->date_reglement = $request->date_reglement;\n $paiement->date_echenace = $request->date_echenace;\n $paiement->save();\n return response()->json('List saved');\n\n }", "public function listsWhostageput($whostage_id)\r\n {\r\n $input = Request::all();\r\n $who = whostage::findOrFail($whostage_id);\r\n $who->update(['name' => $input['name']]);\r\n if($who->save()){\r\n return response()->json(['msg' => 'Update who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the whostage');\r\n }\r\n }", "public function listsProphylaxisput($prophylaxis_id)\r\n {\r\n $input = Request::all();\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n $prophylaxis->update(['name' => $input['name']]);\r\n if($prophylaxis->save()){\r\n return response()->json(['msg' => 'Updated Prophylaxis']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Prophylaxis');\r\n }\r\n }", "public function edit(pelanggan $pelanggan)\n {\n // \n }", "public function update(ReasonRequest $request, $id)\n {\n $rejection = RejectionReason::find($id);\n $rejection->reason = $request->reason;\n $rejection->save();\n $url = session('SOURCE_URL');\n\n return redirect()->to($url)->with('message', trans('terms.record-successfully-saved'))->with('active_rejection', $rejection ->id);\n }", "function edit($id_pengetahuan)\n { \n // check if the pengetahuan exists before trying to edit it\n $data['pengetahuan'] = $this->Pengetahuan_model->get_pengetahuan($id_pengetahuan);\n \n if(isset($data['pengetahuan']['id_pengetahuan']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'kode_penyakit' => $this->input->post('kode_penyakit'),\n\t\t\t\t\t'id_gejala' => $this->input->post('id_gejala'),\n\t\t\t\t\t'mb' => $this->input->post('mb'),\n\t\t\t\t\t'md' => $this->input->post('md'),\n );\n\n $this->Pengetahuan_model->update_pengetahuan($id_pengetahuan,$params); \n redirect('pengetahuan/index');\n }\n else\n {\n $data['_view'] = 'pengetahuan/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The pengetahuan you are trying to edit does not exist.');\n }", "function index_put() {\n $id = $this->put('id_penumpang');\n $data = array(\n 'id_penumpang' => $this->put('id_penumpang'),\n 'nama_penumpang' => $this->put('nama_penumpang'),\n 'nomor' => $this->put('nomor'));\n $this->db->where('id', $id);\n $update = $this->db->update('telepon', $data);\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function edit(Peternak $peternak)\n {\n //\n }", "public function deliveredPPE(Request $request)\n {\n $ppe = null;\n // Read in request objects\n if (array_key_exists('ppe', $request->all())) {\n $ppe = $request['ppe'];\n } else {\n return response()->json(['error' => 'Could not update Ppe (values have to be in a \"ppe\" array)'], 400);\n }\n $company = Auth::user()->company;\n $stock = Stock::where('company_ID', $company['company_ID'])->get()->first();\n\n $oldPPE = Ppe::findOrFail($ppe['sn']);\n if ($oldPPE['delivered'] != false) {\n return response()->json(['error' => 'Could not update Ppe (the PPE already got delivered)'], 400);\n }\n if (!array_key_exists('newSN', $ppe)) {\n return response()->json(['error' => 'Could not update Ppes (at least one newSN is missing for the PPEs)'], 400);\n }\n\n $sizeranges = sizerange_ppe::where('sn', $ppe['sn'])->get();\n if (count($sizeranges) != 0) {\n foreach ($sizeranges as $sizerange) {\n $sizerange->delete();\n }\n }\n\n $properties = property_ppe::where('sn', $ppe['sn'])->get();\n if (count($properties) != 0) {\n foreach ($properties as $property) {\n $property->delete();\n }\n }\n\n $oldPPE->sn = $ppe['newSN'];\n $oldPPE->delivered = true;\n $oldPPE->stock()->associate($stock);\n $oldPPE->save();\n\n if (count($sizeranges) != 0) {\n foreach ($sizeranges as $sizerange) {\n $sizer = Size_Range::findOrFail($sizerange['sizer_ID']);\n $oldPPE->size_ranges()->attach($sizerange->sizer_ID);\n }\n }\n if (count($properties) != 0) {\n foreach ($properties as $property) {\n $propertyEnt = Property::findOrFail($property['property_ID']);\n $oldPPE->properties()->attach($property->property_ID);\n }\n }\n\n $oldPPE->save();\n\n $order = OrderEnt::findOrFail($oldPPE['order_ID']);\n $allPPEsSend = true;\n $ppes = Ppe::where('order_ID', $oldPPE['order_ID'])->get();\n foreach ($ppes as $ppe) {\n if (!$ppe['delivered']) {\n $allPPEsSend = false;\n }\n }\n if ($allPPEsSend) {\n $date = date(\"Y-m-d\");\n $order->commitedDeliveryDate = $date;\n $order->state = \"delivered\";\n $order->save();\n }\n return response()->json($oldPPE, 201);\n }", "public function postEdit($id)\n {\n $inputs = Input::get('ChooseReason', array());\n\n $chooseReason = $this->chooseReasons->findOrFail($id);\n\n $chooseReason->update($inputs);\n\n return Redirect::back()->with('success', 'Choose reason updated successfully');\n }", "public function setReason($reason);", "public function index_put() {\n $id = $this->put('id');\n $data = array (\n 'id_pembeli' => $this->put('id_pembeli'),\n 'nama_pembeli' => $this->put('nama_pembeli'),\n 'jk' => $this->put('jk'),\n 'no_telp' => $this->put('no_telp'),\n 'alamat' => $this->put('alamat'));\n $this->db->where('id_pembeli', $id);\n $update = $this->db->update('pembeli', $data);\n if ($update) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function update(Request $request, $id_preguntas) {\n try{\n \n $method = $request->method(); //captura el método que enviamos (put o patch)\n $statusCode = 200;\n $preguntas = pregunta::find($id_preguntas);//devuelve la pregunta con el id pedido\n \n //captura todos los inputs enviados\n $id_tipo = $request->input('id_tipo');\n $descripcion = $request->input('descripcion');\n \n if($request->isMethod('PATCH'))//si es un método patch significa que solo algunos campos van a ser editados (no todos)\n {\n $bandera = false;//cuando la bandera sea true, significa que ese campo va a ser editado\n if ($id_tipo) {\n $preguntas->id_tipo = $id_tipo;\n $bandera = true;\n }\n\n if ($descripcion) {\n $preguntas->descripcion = $descripcion;\n $bandera = true;\n }\n\n if ($bandera) {\n // Almacenamos en la base de datos el registro.\n $preguntas->save();\n\n return \\Response::json(array(\n 'error' => false,\n 'message' => 'Pregunta actualizada'), 200\n );\n }\n\n }\n //si no es un método patch es post, entonces todos los campos van a ser editados y luego almacenados en la bd\n $preguntas->id_tipo = $request->id_tipo;\n $preguntas->descripcion = $request->descripcion;\n $preguntas->save();\n \n } catch (Exception $ex) {\n $statusCode = 404;\n } finally{\n return \\Response::json(array('preguntas' => $preguntas->toArray(), $statusCode));\n \n }\n \n }", "public function update($id)\n\t{\n\t\t$rules = array(\n\t\t\t'nipbaru'\t\t=> 'required',\n\t\t\t'nama'\t\t\t=> 'required',\n\t\t\t'jeniskelamin'\t=> 'required',\n\t\t\t'agama'\t\t\t=> 'required',\n\t\t\t'tempatlahir'\t=> 'required',\n\t\t\t'tanggallahir'\t=> 'required',\n\t\t\t'hukum'\t\t\t=> 'required',\n\t\t\t'jenis'\t\t\t=> 'required'\n\t\t\t);\n\n\t\t$validation = Validator::make(Input::all(),$rules);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to('data/pns/'.$id.'/edit')->with('message', errorMsg(json_decode($validation->messages(), true)))->with('type', 2)->withInput();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pns = PNS::find($id);\n\t\t\t$pns->nipbaru = Input::get('nipbaru');\n\t\t\t$pns->NIPLama = Input::get('niplama');\n\t\t\t$pns->nama = Input::get('nama');\n\t\t\t$pns->jenisKelamin = Input::get('jeniskelamin');\n\t\t\t$pns->agama = Input::get('agama');\n\t\t\t$pns->gelarDepan = Input::get('gelardepan');\n\t\t\t$pns->gelarBelakang = Input::get('gelarbelakang');\n\t\t\t$pns->tempatLahir = Input::get('tempatlahir');\n\t\t\t$pns->tanggalLahir = Input::get('tanggallahir');\n\t\t\t$pns->kedudukanHukum = Input::get('hukum');\n\t\t\t$pns->jenisPegawai = Input::get('jenis');\n\t\t\t\n\t\t\tif ($pns->save()) \n\t\t\t\treturn Redirect::to('data/pns')->with('message', 'Data PNS telah diperbarui')->with('type', 1);\n\t\t\t\n\t\t\telse\n\t\t\t\treturn Redirect::to('data/pns/'.$id.'/edit')->with('message', 'Kesalahan pada server')->with('type', 2)->withInput();\n\t\t}\n\t}", "public function update(Request $request, pelanggan $pelanggan)\n {\n //\n }", "public function update(Request $request, pelanggan $pelanggan)\n {\n //\n }", "public function setReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->reason = $var;\n\n return $this;\n }", "public function listsInstructionput($instruction_id)\r\n {\r\n $input = Request::all();\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n $instruction->update(['name' => $input['name']]);\r\n if($instruction->save()){\r\n return response()->json(['msg'=> 'Updated Instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update instruction');\r\n }\r\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n $pegawai = Pegawai::findOne($model->id_pegawai);\n $kriteria = Kriteria::find()->all();\n $data_pegawai = [];\n\n $data_penilaian = json_decode($model->penilaian, true);\n\n $data_pegawai[$pegawai->id_pegawai] = $pegawai->nip . ' | ' . $pegawai->nama_pegawai;\n\n $post_data = Yii::$app->request->post();\n\n if (!empty($post_data)) {\n $model->load($post_data);\n\n if (!empty($post_data['Penilaian']['penilaian'])) {\n $model->penilaian = json_encode($post_data['Penilaian']['penilaian']); \n }\n \n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'data_pegawai' => $data_pegawai,\n 'data_penilaian' => $data_penilaian,\n 'kriteria' => $kriteria,\n ]);\n }" ]
[ "0.5091582", "0.49158177", "0.45895773", "0.4563976", "0.45439264", "0.44994482", "0.4455717", "0.44481984", "0.44094706", "0.44017968", "0.43587476", "0.4348734", "0.43142894", "0.43079287", "0.43039992", "0.4301925", "0.4298002", "0.42977285", "0.42897534", "0.42803517", "0.4279943", "0.4270646", "0.4207427", "0.4205959", "0.42033848", "0.419996", "0.419996", "0.41948164", "0.41704252", "0.41637447" ]
0.7095144
0
Operation listsPepreasonPepreasonIdDelete Deletes a PEP Reason specified by pepreasonId.
public function listsPepreasondelete($pepreason_id) { $deleted_pepreason = Pepreason::destroy($pepreason_id); if($deleted_pepreason){ return response()->json(['msg' => 'Deleted pep reason']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsChangereasondelete($changereason_id)\r\n {\r\n $deleted_change = ChangeReason::destroy($changereason_id);\r\n if($deleted_change){\r\n return response()->json(['msg'=>'deleted reason']);\r\n }\r\n }", "function deletePorId($idPlato) {\r\n return $this->delete(new Plato($idPlato));\r\n }", "public function delete($PsId) {\n\t\t//Delete the PackingList\n\t\t$packList = $this->findByPackingSheet($PsId);\n\t\t\n\t\t$this->packingListPartDAO->deleteAll($packList->getId());\n\t\t$this->getDb()->delete('t_packinglist', array('pl_id' => $packList->getId()));\n\t}", "public function listsPepreasonByIdget($pepreason_id)\r\n {\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n return response()->json($pep,200);\r\n }", "public function actionDelete($id,$id_p)\n {\n\n $avance = $this->findModel($id);\n if($avance->archivo !== null){ unlink('juridico/' .$id_p.'/avances/'.$avance->archivo);}\n $avance->delete();\n\n return $this->redirect(['index?id_p='.$id_p]);\n }", "public function delete($id_pelanggan)\n {\n $this->model('pelanggan_model')->hapuspelanggan($id_pelanggan);\n\n //redirect setelah berhasil delete data\n header('Location:'.BASEURL.'/pelanggan');\n }", "public function listsProphylaxisdelete($prophylaxis_id)\r\n {\r\n $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id);\r\n if($deleted_prophylaxis){\r\n return response()->json(['msg' => 'Deleted Prophylaxis']);\r\n }\r\n }", "public function delete($idPermisos);", "public function delete($prc_id)\n\t{\n\t return Recebimentos::destroy($prc_id);\n\t}", "public function delete($id = 0){\r\n\t\t\t$pessoa = new Pessoa();\r\n\t\t\t$pessoa->setId($id);\r\n\t\t\t$this->pessoaModel->delete($pessoa);\r\n\t\t}", "public function deletePostWithId($id_post)\n {\n $query = 'Delete From lite_post WHERE id = ?';\n $post = $this->pdo->prepare($query);\n return $post->execute([$id_post]);\n }", "public function deleteProvidentFund($id) {\n\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('provident-fund/all')->with([\n 'message' => '当前是试用模式,这个功能不可用。',\n 'message_important' => true\n ]);\n }\n\n $self = 'provident-fund';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $pfund = ProvidentFund::find($id);\n if ($pfund) {\n $pfund->delete();\n return redirect('provident-fund/all')->with([\n 'message' => '福利删除成功'\n ]);\n } else {\n return redirect('provident-fund/all')->with([\n 'message' => '没有找到福利信息',\n 'message_important' => true\n ]);\n }\n }", "public function listsPepreasonput($pepreason_id)\r\n {\r\n $input = Request::all();\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n $pep->update(['name' => $input['name']]);\r\n if($pep->save()){\r\n return response()->json(['msg' => 'Update pep reason']); \r\n }else{\r\n return response('Oops, it seems like there was a problem updating the pep reason');\r\n }\r\n }", "public function delete($idPost);", "public function listsWhostagedelete($whostage_id)\r\n {\r\n $deleted_who = whostage::destroy($whostage_id);\r\n if($deleted_who){\r\n return response()->json(['msg' => 'Deleted who stage']);\r\n }\r\n }", "public function actionDeletep($id)\n {\n $this->findModel($id)->delete();\n\n }", "public function destroy( $id)\n {\n //\n $pencipta = pencipta::findOrFail($id);\n $pencipta->delete();\n return redirect(route('pencipta.index'));\n }", "function delete_pelanggan($id_pelanggan)\n {\n return $this->db->delete('pelanggan',array('id_pelanggan'=>$id_pelanggan));\n }", "public function perma_del($id)\n {\n if (! Gate::allows('project_tab_delete')) {\n return abort(401);\n }\n if ( isDemo() ) {\n return prepareBlockUserMessage( 'info', 'crud_disabled' );\n }\n $project_tab = ProjectTab::onlyTrashed()->findOrFail($id);\n $project_tab->forceDelete();\n\n return back();\n }", "public function actionDelete($id)\n {\n if (Yii::$app->user->can('paskibradelete')) {\n $model = $this->findModel($id);\n $this->photo->deleteProntPhoto($model->front_photo);\n $this->photo->deleteProntPhotoThumb($model->front_photo);\n $this->photo->deleteSidePhoto($model->side_photo);\n $this->photo->deleteIdentityCardPhoto($model->identity_card);\n $this->photo->deleteCertificatePhoto($model->certificate_of_organization);\n $model->delete();\n return $this->redirect(['index', 'action' => 'member-paskibra-list']);\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "public function destroy($id_pelanggan)\n {\n // Fungsi eloquent untuk menghapus data\n Pelanggan::find($id_pelanggan)->delete();\n return redirect()->route('pelanggan.index')\n -> with('success', 'Pelanggan Berhasil Dihapus');\n }", "public function delete($idPersonas);", "public function actionDelete($id)\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_DELETE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n \n $model = AKPenjaminRekM::model()->deleteAllByAttributes(array('penjamin_id'=>$id));\n // $this->loadDelete($id)->delete();\n \n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function delete($post_id) {\n\t\t$where_condition = 'WHERE post_id = '.$post_id;\n\t\tDB::instance(DB_NAME)->delete('posts', $where_condition);\n\t\t\n\t\t# Send them back\n\t\tRouter::redirect(\"/posts/edit\");\n\n\n\t}", "public function delete($p_id) {\n $project = Project::find($p_id);\n\n return response()->success($project->delete());\n }", "public function deletePost($id_post)\n {\n Post::destroy($id_post);\n return back();\n }", "public function delete($companyId, $assignmentReasonId)\n {\n DB::table('assignment_reasons')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $companyId],\n ['id', $assignmentReasonId]\n ])\n ->delete();\n }", "public function actionDelete($id, $PSD_Type_Id)\n {\n $this->findModel($id, $PSD_Type_Id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id); \n \n If($model->delation()){\n return $this->redirect(['host/view', 'id' => $model->parId]);\n } else {\n Yii::$app->session->setFlash('error', 'The record has not been deleted with the server since it is related to other elements.');\n return $this->redirect(['view', 'id' => $id]);\n }\n }", "public function perma_del($id)\n {\n if (! Gate::allows('presentacionproducto_delete')) {\n return abort(401);\n }\n $presentacionproducto = Presentacionproducto::onlyTrashed()->findOrFail($id);\n $presentacionproducto->forceDelete();\n\n return redirect()->route('admin.presentacionproductos.index');\n }" ]
[ "0.56948197", "0.55997044", "0.55340654", "0.53399336", "0.5293813", "0.52580506", "0.52415067", "0.52218825", "0.5219788", "0.5204896", "0.51495874", "0.5149044", "0.51388973", "0.51336646", "0.5068338", "0.5067824", "0.50663453", "0.5027436", "0.5014343", "0.499013", "0.4979044", "0.49747592", "0.4965985", "0.49550048", "0.49542114", "0.49481383", "0.49470145", "0.4931337", "0.49311703", "0.48995945" ]
0.7561733
0
///////////////////////////// Prophylaxis functions // /////////////////////////// Operation listsProphylaxisGet Fetch Prophylaxis (for select options).
public function listsProphylaxisget() { $response = Prophylaxis::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsProphylaxisByIdget($prophylaxis_id)\r\n {\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n return response()->json($prophylaxis,200);\r\n }", "public function listsProphylaxispost()\r\n {\r\n $input = Request::all();\r\n $new_prophylaxis = Prophylaxis::create($input);\r\n if($new_prophylaxis){\r\n return response()->json(['msg' => 'Added a new Prophylaxis']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Prophylaxis');\r\n }\r\n }", "public function getAllProtypes(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM protypes\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "public function list_procesos($tipo_proceso)\n {\n \n $_listprocesos = \\common\\models\\cda\\PsProceso::find()\n ->where(['in', 'id_proceso', $tipo_proceso])->asArray()->all();\n\n return $_listprocesos;\n }", "public function listaTipos(){\n\t\t$query = 'Select GRAL_PAR_PRO_ID, GRAL_PAR_PRO_DESC, GRAL_PAR_PRO_COD\n\t\t\t\t From gral_param_propios \n\t\t\t\t where GRAL_PAR_PRO_GRP = 1500 and GRAL_PAR_PRO_COD <> 0';\n\t\treturn $this->mysql->query($query);\n\t}", "public function getProductList()\n {\n $output = $this->product->getProuductList();\n return $output;\n }", "public function index()\n {\n return Profesion::all();\n }", "function listarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_PRE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('gestion','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listaProyectos(){\n\t\t$query = \"SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) ORDER BY alm_proy_estado\";\n\t\treturn $this->mysql->query($query);\n\t}", "public function getProds($paged)\r\n {\r\n $date = new Zend_Db_Expr('CURDATE()');\r\n $select = $this->select()\r\n ->from('promozione')\r\n ->join('category', 'promozione.tipo_prom = category.catId')\r\n ->join('aziende', 'promozione.P_Iva = aziende.P_Iva')\r\n ->where('promozione.data_fine > ?', $date)\r\n ->setIntegrityCheck(false);\r\n \r\n if (null !== $paged) {\r\n\t\t\t$adapter = new Zend_Paginator_Adapter_DbTableSelect($select);\r\n\t\t\t$paginator = new Zend_Paginator($adapter);\r\n\t\t\t$paginator->setItemCountPerPage(6)\r\n\t\t \t ->setCurrentPageNumber((int) $paged);\r\n\t\t\treturn $paginator;\r\n }\r\n \r\n return $this->fetchAll($select);\r\n \r\n }", "function list_cites_requerimientos_proy($proy_id){\n $sql = 'select *\n from cite_mod_requerimientos ci\n Inner Join funcionario as f On ci.fun_id=f.fun_id\n Inner Join _componentes as c On ci.com_id=c.com_id\n Inner Join _proyectofaseetapacomponente as pfe On pfe.pfec_id=c.pfec_id\n Inner Join _proyectos as p On p.proy_id=pfe.proy_id\n where p.proy_id='.$proy_id.' and pfe.pfec_estado=\\'1\\' and pfe.estado!=\\'3\\' and ci.cite_estado!=\\'3\\'\n order by ci.cite_id asc';\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function listarCotizacionProcesoCompra(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getProfessionList(){\n return $this->_get(20);\n }", "public function ListarProductos()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function getAll() {\n $this->getConnection();\n $request = \"SELECT P.ID_PRODUIT, P.DATE_CREATION, P.NOM, P.PRIX, P.DESCRIPTION, P.ID_CATEGORIE, P.IMAGE, C.NOM AS CATEGORIE \n FROM PRODUIT P INNER JOIN CATEGORIE C ON P.ID_CATEGORIE=C.ID_CATEGORIE\";\n $result = $this->select($request);\n return $result;\n }", "public function listsProphylaxisdelete($prophylaxis_id)\r\n {\r\n $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id);\r\n if($deleted_prophylaxis){\r\n return response()->json(['msg' => 'Deleted Prophylaxis']);\r\n }\r\n }", "public function ListarProveedores()\n{\n\tself::SetNames();\n\t$sql = \" select * from proveedores \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function getProvincias()\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch,\tarray(\tCURLOPT_RETURNTRANSFER\t=> TRUE,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_HEADER\t\t\t=> FALSE,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_CONNECTTIMEOUT\t=> 5,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_USERAGENT\t\t=> $this->setUserAgent(),\n\t\t\t\t\t\t\t\t\t\tCURLOPT_URL\t\t\t\t=> \"{$this->webservice_url}/oep_tracking/Oep_Track.asmx/GetProvincias\",\n\t\t\t\t\t\t\t\t\t\tCURLOPT_FOLLOWLOCATION\t=> TRUE));\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXml(curl_exec($ch));\n\t\t$xpath = new DOMXPath($dom);\n\t\t\n\t\t$provincias = array();\n\t\tforeach (@$xpath->query(\"//Provincias/Provincia\") as $provincia)\n\t\t{\n\t\t\t$provincias[] = array( \t'id' \t\t=> $provincia->getElementsByTagName('IdProvincia')->item(0)->nodeValue,\n\t\t\t\t\t\t\t\t\t'provincia' => $provincia->getElementsByTagName('Descripcion')->item(0)->nodeValue, \n\t\t\t\t\t\t\t\t);\n\t\t}\n\t\t\n\t\treturn $provincias;\n\t}", "public function getProvincias()\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch,\tarray(\tCURLOPT_RETURNTRANSFER\t=> TRUE,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_HEADER\t\t\t=> FALSE,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_CONNECTTIMEOUT\t=> 5,\n\t\t\t\t\t\t\t\t\t\tCURLOPT_USERAGENT\t\t=> $this->setUserAgent(),\n\t\t\t\t\t\t\t\t\t\tCURLOPT_URL\t\t\t\t=> \"{$this->webservice_url}/oep_tracking/Oep_Track.asmx/GetProvincias\",\n\t\t\t\t\t\t\t\t\t\tCURLOPT_FOLLOWLOCATION\t=> TRUE));\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXml(curl_exec($ch));\n\t\t$xpath = new DOMXPath($dom);\n\t\t\n\t\t$provincias = array();\n\t\tforeach (@$xpath->query(\"//Provincias/Provincia\") as $provincia)\n\t\t{\n\t\t\t$provincias[] = array( \t'id' \t\t=> $provincia->getElementsByTagName('IdProvincia')->item(0)->nodeValue,\n\t\t\t\t\t\t\t\t\t'provincia' => $provincia->getElementsByTagName('Descripcion')->item(0)->nodeValue, \n\t\t\t\t\t\t\t\t);\n\t\t}\n\t\t\n\t\treturn $provincias;\n\t}", "public function pesquisaProfissionalAction()\r\n\t{\r\n\t\t$this->_helper->viewRenderer->setNoRender(true);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\r\n\t\t// Recupera os parametros enviados por get\r\n\t\t$cd_objeto = $this->_request->getParam('cd_objeto',0);\r\n\r\n\t\t// Caso tenha sido enviada a opcao selecione do combo. Apenas para garantir caso o js falhe nesta verificacao\r\n\t\tif ($cd_objeto == -1) {\r\n\t\t\techo '';\r\n\t\t} else {\r\n\t\t\t/*\r\n\t\t\t * Cria uma instancia do modelo e pesquisa pelos profissionais alocado ao projeto selecionado e aos profissionais que nao estao\r\n\t\t\t * alocados ao mesmo \r\n\t\t\t */\r\n\t\t\t$profissional = new ProfissionalObjetoContrato($this->_request->getControllerName());\r\n\r\n\t\t\t// Recordset de profissionais que nao se encontram no projeto selecionado\r\n $foraObjeto = $profissional->pesquisaProfissionalForaObjeto($cd_objeto);\r\n\r\n\t\t\t// Recordset de profissionais que se encontram no projeto selecionado\r\n\t\t\t$noObjeto = $profissional->pesquisaProfissionalNoObjeto($cd_objeto,true);\r\n\r\n\t\t\t/*\r\n\t\t\t * Os procedimentos abaixo criam os options dos selects de acordo com o seu respectivo recordset. \r\n\t\t\t * Posteriormente eh criado um json que eh enviado ao client (javascript) que adiciona os options aos selects\r\n\t\t\t */\r\n\t\t\t$arr1 = \"\";\r\n\r\n\t\t\tforeach ($foraObjeto as $fora) {\r\n\t\t\t\t$arr1 .= \"<option value=\\\"{$fora['cd_profissional']}\\\">{$fora['tx_profissional']}</option>\";\r\n\t\t\t}\r\n\r\n\t\t\t$arr2 = \"\";\r\n\t\t\tforeach ($noObjeto as $no) {\r\n\t\t\t\t$arr2 .= \"<option value=\\\"{$no['cd_profissional']}\\\">{$no['tx_profissional']}</option>\";\r\n\t\t\t}\r\n\r\n\t\t\t$retornaOsDois = array($arr1, $arr2);\r\n\r\n\t\t\techo Zend_Json_Encoder::encode($retornaOsDois);\r\n\t\t}\r\n\t}", "function listar_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_procesos\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function get_catalogos() {\n $this->db->flush_cache();\n $this->db->reset_query();\n $resutado = $this->db->get('catalogos.programas_proyecto');\n return $resutado->result_array();\n }", "function afficherprods(){\r\n\t\t$sql=\"SElECT * From categorie\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "function afficherProduits(){\n\t\t$sql=\"SElECT * From product\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function index(){\n\t\t$catalogos = array(\n\t\t\t\t'clasificacion_proyectos'=>ClasificacionProyecto::all(),\n\t\t\t\t'origenes_financiamiento' => OrigenFinanciamiento::all()\n\t\t\t);\n\t\treturn parent::loadIndex('EXP','PROYECTOS',$catalogos);\n\t}", "function show_cart_product($pro){\r\n\t\t\treturn $this->select(\"*\",\"items\",\"pro_id in($pro) order by pro_id desc\");\r\n\t\t}", "function listarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getPrequestList(){\n return $this->_get(5);\n }", "public static function getAllSellPro()\n {\n return DB::table(static::$table)\n ->select('sell_product.*')\n ->where('is_deleted', ACTIVE)\n ->where('display', 0)\n ->where('display_top', 1)\n ->paginate(LIMIT_ITEM_PAGE); \n }" ]
[ "0.70654243", "0.62621325", "0.61869496", "0.60065407", "0.5926069", "0.5914465", "0.58454716", "0.58189976", "0.58144057", "0.57994056", "0.5791135", "0.5779151", "0.5754823", "0.5720115", "0.5690111", "0.5675786", "0.5630801", "0.5619885", "0.55933523", "0.55933523", "0.5582158", "0.55764234", "0.55505294", "0.55373394", "0.55055726", "0.550163", "0.550112", "0.54903364", "0.54883546", "0.548565" ]
0.78301907
0
Operation listsProphylaxisProphylaxisIdGet Fetch Prophylaxis specified by prophylaxisId.
public function listsProphylaxisByIdget($prophylaxis_id) { $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id); return response()->json($prophylaxis,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsProphylaxisget()\r\n {\r\n $response = Prophylaxis::all();\r\n return response()->json($response,200);\r\n }", "public function getHipotesisProyecto($proyectoId)\n {\n $dql = 'SELECT h.hipHipotesis, h.hipEstado, h.id\n FROM sgiiBundle:TblHipotesis h\n WHERE h.proyectoId =:proyectoId';\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n return $query->getResult();\n }", "public function listsProphylaxisdelete($prophylaxis_id)\r\n {\r\n $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id);\r\n if($deleted_prophylaxis){\r\n return response()->json(['msg' => 'Deleted Prophylaxis']);\r\n }\r\n }", "function get_prop_detail($prop_id)\n {\n return $this->db->get_where('prop_details',array('prop_id'=>$prop_id))->row_array();\n }", "function list_cites_requerimientos_proy($proy_id){\n $sql = 'select *\n from cite_mod_requerimientos ci\n Inner Join funcionario as f On ci.fun_id=f.fun_id\n Inner Join _componentes as c On ci.com_id=c.com_id\n Inner Join _proyectofaseetapacomponente as pfe On pfe.pfec_id=c.pfec_id\n Inner Join _proyectos as p On p.proy_id=pfe.proy_id\n where p.proy_id='.$proy_id.' and pfe.pfec_estado=\\'1\\' and pfe.estado!=\\'3\\' and ci.cite_estado!=\\'3\\'\n order by ci.cite_id asc';\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function getProduk($id_produk)\n\t{\n\t\t$id_produk = $this->db->escape($id_produk);\n\n\t\treturn $this->db->query(\"SELECT * FROM produk WHERE id_produk = \".$id_produk)->row();\n\t}", "public function BuscarProductos_XProporcion($IdProporcion)\n\t{\n\t\t// return $query->result();\n\t\t\n\t\t$this->db->select('producto.*');\n\t\t$this->db->from('proporcionproductos');\n\t\t$this->db->join('producto', 'producto.IdProducto = proporcionproductos.IdProducto');\n\t\t$this->db->where('proporcionproductos.idproductoproporcion', $IdProporcion);\n\t\t$query = $this->db->get();\n\t\treturn $query->row();\n\t}", "public function getProdsId($id_prod) {\n try{\n $products = DB::table('categs_prods')->where('id_prod', '=', $id_prod)->get();\n return response()->json(['status' => 1, 'relations by id_prod' => $products]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0, 'relations by id_prod' => []], 500);\n }\n }", "public function ProveedoresPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from proveedores where codproveedor = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getById($id)\n {\n return $this->profissionalRepository->getById($id);\n }", "public function DetalleProductosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function listar_procesos_por_producto($id_producto){\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tb.id, b.nombre, b.tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_productos_procesos a\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\tprd_procesos b on a.id_proceso = b.id\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\ta.id_producto = \" . $id_producto;\n\t\treturn $this->queryArray($sql);\n\t}", "public function listIdproducforproductsale($id){\n try{\n $sql = \"Select * from product p inner join productforsale p2 on p.id_product = p2.id_product where p2.id_productforsale = ?\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n\n $result = $stm->fetch();\n $result = $result->id_product;\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), 'Inventory|listProductprice');\n $result = 0;\n }\n\n return $result;\n }", "public function show($id)\n {\n $profesion = Profesion::find($id);\n return isset($profesion) ? $profesion : [];\n }", "public function get_data_id_pros($id_pros)\n\t{\n\t\t$this->db->from('prospektus as p');\n\t\t$this->db->join('unit as u', 'u.id_unit = p.unit', 'inner');\n\t\t$this->db->join('blok as b', 'b.id_blok = u.id_blok', 'inner');\n\t\t$this->db->join('kawasan as k', 'k.id_kawasan = b.id_kawasan', 'inner');\n\t\t$this->db->where('p.id_prospektus', $id_pros);\n\n\t\treturn $this->db->get();\n\t}", "public function ProveedorPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from proveedores where codproveedor = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codproveedor\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function getProdotto($id){\n $db = databaseConnection();\n $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $query = \"SELECT * FROM Prodotto WHERE ID=$id;\";\n $rows = $db -> query($query);\n return $rows -> fetchAll(PDO::FETCH_ASSOC);\n}", "function getRelatedProdsById($pId){\n\t\t$query = \"SELECT GROUP_CONCAT(DISTINCT relatedto_id ORDER BY relatedto_id ASC SEPARATOR ',') AS prodRelated, GROUP_CONCAT(DISTINCT relatedto_offerid ORDER BY relatedto_offerid ASC SEPARATOR ',') AS offerRelated FROM product_related WHERE `relatedfrom_id`=$pId\";\n\t\t//$data = mysql_query($query);\n\t\t//print_r($data);\n\t\t$result = $this->selectQueryForAssoc($query);\n\t\treturn $result;\t\n\t}", "public function listsProphylaxisput($prophylaxis_id)\r\n {\r\n $input = Request::all();\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n $prophylaxis->update(['name' => $input['name']]);\r\n if($prophylaxis->save()){\r\n return response()->json(['msg' => 'Updated Prophylaxis']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Prophylaxis');\r\n }\r\n }", "public function getAllOrderedHierableProds($orderRefId)\n {\n $preOrderProdDetArr = DB::table($this->DBTables['Pre_Orders_Products'] . ' as pop')\n ->join($this->DBTables['Products'] . ' as p', 'pop.product_id', '=', 'p.id')\n ->where([\n ['pop.order_reference_id', '=', $orderRefId],\n ['p.product_type', '=', 5]\n ])\n ->select('p.*', 'pop.pre_order_id', 'pop.quantity as ord_qty', 'pop.sub_total_amnt')\n ->get();\n return $preOrderProdDetArr;\n }", "public function ProductosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getUsuariosProyecto($proyectoId)\n {\n $dql = 'SELECT up.id, up.usuarioProyectoTipo, u.usuLog, u.usuNombre, u.usuApellido, u.id AS usuarioId\n FROM sgiiBundle:TblUsuarioProyecto up\n JOIN sgiiBundle:TblUsuario u WITH u.id = up.usuarioId\n WHERE up.proyectoId =:proyectoId\n ORDER BY up.usuarioProyectoTipo';\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n return $query->getResult();\n }", "public function list_procesos($tipo_proceso)\n {\n \n $_listprocesos = \\common\\models\\cda\\PsProceso::find()\n ->where(['in', 'id_proceso', $tipo_proceso])->asArray()->all();\n\n return $_listprocesos;\n }", "public function checkProId(){\n if($this->check_id()){\n $this->check_branch();\n $sql_check_id_product = \"SELECT * FROM \".USER_PRODUCTS.\"\n WHERE usp_id = \" . $this->id . \"\n AND usp_branch_id = \" . $this->branch_id . \"\n AND usp_use_parent_id = \" . $this->admim_id . \" LIMIT 1\";\n $db_query_check_id_product = new db_query($sql_check_id_product);\n return mysqli_fetch_assoc($db_query_check_id_product->result);\n }\n return array();\n }", "public static function getProtagonistiDaSezione($id_sezione){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_sezione = DB_Functions::esc($id_sezione);\r\n $query = \"SELECT *\r\n FROM \t PROTAGONISTA\r\n\t WHERE ID_SEZIONE = $id_sezione; \";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $protagonisti= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $protagonista = new Protagonista($row[0],$row[1]);\r\n $protagonisti[$i] = $protagonista;\r\n $i++;\r\n }\r\n return $protagonisti;\r\n }", "public function getProdById($id){\n\t\t$pid = $this->fm->validation($id);\n\t\t$pid = mysqli_real_escape_string($this->db->link, $pid);\n\t\t$sql = \"SELECT * FROM tbl_product WHERE pid = '$pid' \";\n\t\t$result = $this->db->select($sql);\n\t\treturn $result;\n\t}", "public function get_data_res($id_prospektus)\n {\n \treturn $this->db->get_where('resources', array('id_prospektus' => $id_prospektus));\n }", "public function getKotaByPropinsi($propid) {\r\n $sql = $this->db->query(\"SELECT * FROM ms_kota WHERE kota_propid = '$propid' ORDER BY kota_deskripsi\");\r\n if ($sql->num_rows() > 0) {\r\n return $sql->result();\r\n }\r\n return null;\r\n }", "function get_projeto($id_projeto)\n {\n return $this->db->get_where('projetos',array('id_projeto'=>$id_projeto))->row_array();\n }", "public function listsPepreasonByIdget($pepreason_id)\r\n {\r\n $pep = Pepreason::findOrFail($pepreason_id);\r\n return response()->json($pep,200);\r\n }" ]
[ "0.60418355", "0.5876344", "0.5845085", "0.569247", "0.5624038", "0.5507673", "0.54072094", "0.5374573", "0.530802", "0.52784854", "0.52725774", "0.5261318", "0.5253428", "0.52254945", "0.521819", "0.52154446", "0.52125883", "0.51497906", "0.51495665", "0.5133356", "0.5095771", "0.5074354", "0.50680083", "0.505402", "0.5016", "0.4986918", "0.4985785", "0.49678645", "0.49595952", "0.49523458" ]
0.76433337
0
Operation listsProphylaxisPost create a Prophylaxis.
public function listsProphylaxispost() { $input = Request::all(); $new_prophylaxis = Prophylaxis::create($input); if($new_prophylaxis){ return response()->json(['msg' => 'Added a new Prophylaxis']); }else{ return response('Oops, it seems like there was a problem adding the Prophylaxis'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsProphylaxisput($prophylaxis_id)\r\n {\r\n $input = Request::all();\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n $prophylaxis->update(['name' => $input['name']]);\r\n if($prophylaxis->save()){\r\n return response()->json(['msg' => 'Updated Prophylaxis']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Prophylaxis');\r\n }\r\n }", "public function CreateNewPosts()\n {\n $this->sql = \"SELECT product.title, variant_id, product_id, sku FROM product_variants \n JOIN projekt_klon.product ON \n product_variants.product_id = product.pid ORDER BY product_id;\";\n\n $this->prepQuery($this->sql);\n $this->getAll();\n\n return self::$data;\n }", "function propuestasPostType() {\n\t$supports = array(\n\t'title', // post title\n\t'editor', // post content\n\t'author', // post author\n\t'thumbnail', // featured images\n\t'excerpt', // post excerpt\n\t'custom-fields', // custom fields\n\t// 'comments', // post comments\n\t// 'revisions', // post revisions\n\t'post-formats', // post formats\n\t'page-attributes'\n\t);\n\t$labels = array(\n\t'name' => _x('Propuesta', 'plural'),\n\t'singular_name' => _x('Propuestas', 'singular'),\n\t'menu_name' => _x('Propuestas', 'admin menu'),\n\t'name_admin_bar' => _x('Propuestas', 'admin bar'),\n\t'add_new' => _x('Añadir propuesta', 'add new'),\n\t'add_new_item' => __('Añadir nueva propuesta'),\n\t'new_item' => __('Nueva propuesta'),\n\t'edit_item' => __('Editar propuesta'),\n\t'view_item' => __('Ver propuesta'),\n\t'all_items' => __('Todas las propuestas'),\n\t'search_items' => __('Buscar'),\n\t'not_found' => __('No hay resultados.'),\n\t);\n\t$args = array(\n\t'supports' => $supports,\n\t'labels' => $labels,\n\t'public' => true,\n\t'query_var' => true,\n\t'rewrite' => array('slug' => 'propuestas'),\n\t'has_archive' => true,\n\t'hierarchical' => true,\n\t);\n\tregister_post_type('propuestasPostType', $args);\n\t}", "public function createproductActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n if (hasKeyPost(\"doCreate\")) {\n $name = getPost(\"name\");\n\n // Executes SQL statement\n $this->admin->createProduct($name);\n\n // Retrieves id\n $id = $this->app->db->lastInsertId();\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/editproduct?id=$id\");\n }", "public function create()\n {\n $rs_categories = DB::select('call ListAllCategoryProcedure()');\n $categories = json_decode(json_encode($rs_categories), true);\n return view('admin.posttype.create',compact('categories'));\n }", "public function listsProphylaxisget()\r\n {\r\n $response = Prophylaxis::all();\r\n return response()->json($response,200);\r\n }", "public function createPostTypes()\n {\n }", "public function create()\n {\n $lista_t_propiedads = Tipo_Propiedad::all();\n $data=array();\n return response()->view(\"Administrador/Tipo_Propiedad/create\");\n \n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $pelicula = new Peliculas();\n $pelicula->id = $this->request->getPost(\"id\");\n $pelicula->nombre = $this->request->getPost(\"nombre\");\n $pelicula->idGenero = $this->request->getPost(\"id_genero\");\n $pelicula->year = $this->request->getPost(\"year\");\n $pelicula->idIdioma = $this->request->getPost(\"id_idioma\");\n \n\n if (!$pelicula->save()) {\n foreach ($pelicula->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"pelicula was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"peliculas\",\n 'action' => 'index'\n ]);\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "public function listsProphylaxisdelete($prophylaxis_id)\r\n {\r\n $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id);\r\n if($deleted_prophylaxis){\r\n return response()->json(['msg' => 'Deleted Prophylaxis']);\r\n }\r\n }", "public function createActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n if (hasKeyPost(\"doCreate\")) {\n $title = getPost(\"contentTitle\");\n\n // Calls createProduct method\n $this->admin->createBlogpost($title);\n\n // Retrieves id\n $id = $this->app->db->lastInsertId();\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/edit?id=$id\");\n }", "function premio_products_create() {\n global $wpdb;\n $product_container_table = $wpdb->prefix . \"premio_product_container\";\n $program_table = $wpdb->prefix . \"premio_program\";\n $product_containers = $wpdb->get_results(\"SELECT * from $product_container_table\");\n $programs = $wpdb->get_results(\"SELECT * from $program_table\");\n\n $name = $_POST[\"name\"];\n $description = $_POST[\"description\"];\n $product_container_id = $_POST['productContainerDpw'];\n\n //insert\n if (isset($_POST['insert'])) {\n $table_name = $wpdb->prefix . \"premio_product\";\n\n $wpdb->query(\"CALL create_product('{$name}', '{$description}', '{$product_container_id}')\");\n\n if(!empty($_POST['checkbox'])) {\n foreach($_POST[\"checkbox\"] as $v) {\n $program_id_to_int = (int)$v;\n\n $last_inserted_product_id = $wpdb->get_row($wpdb->prepare(\n \"SELECT product_id as last_inserted_product_id FROM wp_premio_product ORDER BY product_id DESC LIMIT 1\"\n ));\n\n $wpdb->insert(\n $wpdb->prefix.'premio_product_by_program', \n array(\n 'product_by_program_id' => NULL,\n 'program_id_fk' => $program_id_to_int, \n 'product_id_fk' => $last_inserted_product_id->last_inserted_product_id)\n );\n }\n }\n \n $message.=\"Product inserted\";\n }\n ?>\n <link type=\"text/css\" href=\"<?php echo plugins_url(); ?>/premio-products/style-admin.css\" rel=\"stylesheet\" />\n <div class=\"wrap\">\n <h2 class=\"testJC\">Add New Product</h2>\n <?php if (isset($message)): ?><div class=\"updated\"><p><?php echo $message; ?></p></div><?php endif; ?>\n <form method=\"post\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\">\n <table class='wp-list-table widefat fixed'>\n <tr>\n <th class=\"ss-th-width\">Name</th>\n <td><input type=\"text\" name=\"name\" value=\"<?php echo $name; ?>\" class=\"ss-field-width\" /></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Description</th>\n <td><textarea name=\"description\" rows=\"5\" cols=\"40\" class=\"ss-field-width\" /><?php echo $description; ?></textarea></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Container</th>\n <td>\n <select name=\"productContainerDpw\">\n <?php foreach ($product_containers as $container) { ?>\n <option value=\"<?php echo $container->product_container_id; ?>\"><?php echo $container->name; ?></option>\n <?php } ?>\n </select>\n </td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Programs</th>\n <td>\n <?php foreach ($programs as $program) { ?>\n <input name=\"checkbox[]\" type=\"checkbox\" id=\"checkbox[]\" value=\"<?php echo $program->program_id; ?>\"> <?php echo $program->name; ?> <br>\n <?php } ?>\n </td>\n </tr>\n </table>\n <input type='submit' name=\"insert\" value='Save' class='button'>\n </form>\n <div class=\"tablenav top\">\n <div class=\"alignleft actions\">\n <a href=\"<?php echo admin_url('admin.php?page=premio_products_list'); ?>\">Back to Products</a>\n </div>\n <br class=\"clear\">\n </div>\n </div>\n <?php\n}", "public function create()\n\t{\n\t\t$proyectos = Proyecto::all();\n\t\t$this->layout->nest(\n\t\t\t'content',\n\t\t\t'Adquisicion.create',\n\t\t\tarray(\n\t\t\t\t\t'proyectos' => $proyectos\n\n\t\t\t\t)\n\t\t);\n\t}", "public function actionCreate()\n {\n $model = new Post();\n $post_types = ArrayHelper::map(PostType::find()->orderBy('name')->all(), 'id', 'name');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'post_types' => $post_types,\n ]);\n }\n }", "function crear_post_type_presentaciones() {\n\t$labels = array(\n\t\t'name' => _x( 'Presentaciones', 'Post Type General Name', 'molino9' ),\n\t\t'singular_name' => _x( 'Presentacion', 'Post Type Singular Name', 'molino9' ),\n\t\t'menu_name' => __( 'Presentaciones', 'molino9' ),\n\t\t'parent_item_colon' => __( 'Presentacion Padre', 'molino9' ),\n\t\t'all_items' => __( 'Todas las Presentaciones', 'molino9' ),\n\t\t'view_item' => __( 'Ver Presentacion', 'molino9' ),\n\t\t'add_new_item' => __( 'Agregar Nuevo Presentacion', 'molino9' ),\n\t\t'add_new' => __( 'Agregar Nuevo Presentacion', 'molino9' ),\n\t\t'edit_item' => __( 'Editar Presentacion', 'molino9' ),\n\t\t'update_item' => __( 'Actualizar Presentacion', 'molino9' ),\n\t\t'search_items' => __( 'Buscar Presentacion', 'molino9' ),\n\t\t'not_found' => __( 'No encontrado', 'molino9' ),\n\t\t'not_found_in_trash' => __( 'No encontrado en la papelera', 'molino9' ),\n\t);\n\n// Otras opciones para el post type\n\n\t$args = array(\n\t\t'label' => __( 'presentaciones', 'molino9' ),\n\t\t'description' => __( 'Presentacion news and reviews', 'molino9' ),\n\t\t'labels' => $labels,\n\t\t// Todo lo que soporta este post type\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions','page-attributes','post-formats'),\n\t\t/* Un Post Type hierarchical es como las paginas y puede tener padres e hijos.\n\t\t* Uno sin hierarchical es como los posts\n\t\t*/\n\t\t'hierarchical' => true, /* Es un comportamiento como las páginas */\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 25,\n\t\t'menu_icon' => 'dashicons-format-video',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\t// Por ultimo registramos el post type\n\tregister_post_type( 'presentaciones', $args );\n\n}", "public function createAction(Request $request)\n {\n $entity = new IdeaPrize();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity->setCreateDate(new \\DateTime(\"now\"));\n $place = $em->getRepository('SiteBundle:Project')->find($entity->getProject()->getId())->getIdeaPrizes()->count();\n $place++;\n $entity->setPrizePlace($place);\n\n $em->persist($entity);\n $em->flush();\n\n $project = $em->getRepository('SiteBundle:Project')->find($entity->getProject()->getId());\n $totalAmount = $this->_sumTotalAmount($project);\n $project->setTotalPrize($totalAmount);\n $em->persist($project);\n $em->flush();\n\n return $this->redirect($this->generateUrl('projetos_show_2', array('id' => $entity->getProject()->getId(), 'aba' => 'premiados')));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "private function Create() {\r\n $cadastra = new Create;\r\n $cadastra->ExeCreate(self::Entity, $this->Data);\r\n if ($cadastra->getResult()):\r\n $this->Result = $cadastra->getResult();\r\n $this->Error = [\"O poste <b>{$this->Data['post_title']}</b> foi cadastrado com sucesso no sistema!\", WS_SUCCESS];\r\n endif;\r\n }", "public function create()\n {\n $data['rightButton']['iconClass'] = 'fa fa-list';\n $data['rightButton']['text'] = 'Product List';\n $data['rightButton']['link'] = 'products';\n $data[\"all_categories\"] = Category::where(\"parent_id\", 0)->get();\n $data[\"size_lists\"] = Attribute::Size()->orderBy('title')->pluck('title', 'id');\n $data[\"color_lists\"] = Attribute::Color()->orderBy('title')->pluck('title', 'id');\n $data[\"all_brands\"] = Brand::orderBy('title')->pluck('title', 'id');\n $data[\"all_units\"] = Unit::orderBy('title')->pluck('title', 'id');\n $data[\"author_lists\"] = Author::orderBy('title')->pluck('title', 'id');\n $data[\"publisher_lists\"] = Publisher::orderBy('title')->pluck('title', 'id');\n $data[\"country_lists\"] = Country::orderBy('name')->pluck('name', 'id');\n\n return view(\"nptl-admin/common/product/add_product\", $data);\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','name'));\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier) $this->output(-1, '操作失败,该分类已存在');\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fanli_Service_Ptype::addType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }", "public function create_post_types() {\n }", "public function create()\n {\n $mainManues=Category::whereNull('category_id')->get();\n $hierarchies=CatProds::with('prod','parnt')->get();\n // return $hierarchies;\n // $data = CatProds::\n // where('category_id', '!=', null)\n // ->whereHas('subCats')\n // ->with('subCats')\n // ->get();\n // return $data;\n // return $hierarchies->parnt->parnt->parnt->parnt['name'];\n return view('backend.products.create',compact('mainManues','hierarchies'));\n }", "public function create()\n {\n $categories=$this->model->getCategories();\n \n $colors=$this->model->getColours();\n return view(\"admin.pages.insertProduct\",['categories'=>$categories,'colors'=>$colors]);\n \n }", "public function actionCreate()\n\t{\n\n\t\t\t$catPuesto = new CatPuesto();\n\n // Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($catPuesto);\n\n\t\tif(isset($_POST['CatPuesto']))\n\t\t{\n\t\t\t$catPuesto->attributes=$_POST['CatPuesto'];\n\n\n $catPuesto->fecha_creacion = date('Y-m-d h:i:s');\n $catPuesto->persona_creacion = Yii::app()->user->id;\n $catPuesto->fecha_modificacion = date('Y-m-d h:i:s');\n $catPuesto->persona_modificacion = Yii::app()->user->id;\n $catPuesto->activo = 1;\n\n\n if($catPuesto->save())\n\t\t\t\t$this->redirect(array('index','id_cat_puesto'=>$catPuesto->id_cat_puesto));\n \t\t}\n\n\t\t$this->render('create',array(\n'catPuesto'=>$catPuesto,\n\t\t));\n\t}", "public function create()\n {\n $data = [\n \"product_edit\" => new Product,\n \"publiches_list\" => Publish::get()->pluck(\"label\",\"id\")\n ];\n\n return view('admin.products.create',$data);\n }", "public function store(\\App\\Http\\Requests\\CreatePostRequest $request)\n {\n //\n\n $post = \\App\\Models\\Post::create($request -> all());\n\n //dd($request -> all());\n\n //move file from temp location to images\n\n $filename = \\Carbon\\Carbon::now() -> timestamp.\"_post.jpg\";\n\n $request -> file ('image') -> move('images', $filename);\n\n $post -> image = $filename;\n $post -> save();\n\n $labelIDs = $request->get('labels');\n\n\n foreach($labelIDs as $labelID){\n $post -> labels() -> attach($labelID); // many to many relationships\n }\n\n \n\n return redirect('posts/'.$post -> id);\n }", "function index_post() {\n $this->crud_post($this->post());\n }", "public function createList(Request $request)\n {\n // Is the Menu published, if so, you cannot create product.\n if (Menu::find($request->input('menu_id'))->period->status == 'visible') {\n return response()->json(['status' => 2]); // forbidden\n } else {\n $products = json_decode($request->input('products'), true);\n\n foreach ($products as $product) {\n Product::create( array_only($product, [\n 'menu_id',\n 'name',\n 'unit_type',\n 'inventory',\n 'price',\n 'description'\n ]));\n }\n\n return response()->json($products);\n }\n }", "public function create()\n {\n $objs = DB::table('users')\n ->select(\n 'users.*'\n )\n ->where('users.id', Auth::user()->id)\n ->first();\n // dd($objs);\n $data['objs'] = $objs;\n\n $department = department::all();\n\n $data['department'] = $department;\n $data['method'] = \"post\";\n $data['url'] = url('product_user');\n\n return view('my_pro.create', $data);\n }" ]
[ "0.5305087", "0.5301464", "0.52193445", "0.5184325", "0.5028927", "0.49722978", "0.4962392", "0.49575308", "0.49332657", "0.49194053", "0.49118215", "0.49085456", "0.49043036", "0.48775008", "0.48480278", "0.4846303", "0.4845637", "0.4792948", "0.47768816", "0.4773945", "0.47720814", "0.47680768", "0.47226557", "0.47165805", "0.47068003", "0.4706609", "0.46823046", "0.4681077", "0.46573663", "0.4653933" ]
0.71116656
0
Operation listsProphylaxisProphylaxisIdPut Update an existing Prophylaxis.
public function listsProphylaxisput($prophylaxis_id) { $input = Request::all(); $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id); $prophylaxis->update(['name' => $input['name']]); if($prophylaxis->save()){ return response()->json(['msg' => 'Updated Prophylaxis']); }else{ return response('Oops, it seems like there was a problem updating the Prophylaxis'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsProphylaxisByIdget($prophylaxis_id)\r\n {\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n return response()->json($prophylaxis,200);\r\n }", "public function listsProphylaxispost()\r\n {\r\n $input = Request::all();\r\n $new_prophylaxis = Prophylaxis::create($input);\r\n if($new_prophylaxis){\r\n return response()->json(['msg' => 'Added a new Prophylaxis']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Prophylaxis');\r\n }\r\n }", "protected function putSetParagraphPortionPropertiesRequest(Requests\\PutSetParagraphPortionPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'portion_index' is set\n if ($request->portionIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $portionIndex when calling putSetParagraphPortionProperties');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putSetParagraphPortionProperties');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"portionIndex\", $request->portionIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "protected function putSetSubshapeParagraphPortionPropertiesRequest(Requests\\PutSetSubshapeParagraphPortionPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putSetSubshapeParagraphPortionProperties');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putSetSubshapeParagraphPortionProperties');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putSetSubshapeParagraphPortionProperties');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putSetSubshapeParagraphPortionProperties');\n }\n // verify the required parameter 'portion_index' is set\n if ($request->portionIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $portionIndex when calling putSetSubshapeParagraphPortionProperties');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putSetSubshapeParagraphPortionProperties');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{path}/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"path\", $request->path);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"portionIndex\", $request->portionIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function update($id, CreateProyectosRequest $request)\n\t{\n\t\t$proyectos = $this->proyectosRepository->findProyectosById($id);\n\n\t\tif(empty($proyectos))\n\t\t{\n\t\t\tFlash::error('Proyectos not found');\n\t\t\treturn redirect(route('proyectos.index'));\n\t\t}\n\n\t\t$proyectos = $this->proyectosRepository->update($proyectos, $request->all());\n\n\t\tFlash::message('Proyectos updated successfully.');\n\n\t\treturn redirect(route('proyectos.index'));\n\t}", "protected function putSetSubshapeParagraphPropertiesRequest(Requests\\PutSetSubshapeParagraphPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putSetSubshapeParagraphProperties');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putSetSubshapeParagraphProperties');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putSetSubshapeParagraphProperties');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putSetSubshapeParagraphProperties');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putSetSubshapeParagraphProperties');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{path}/{shapeIndex}/paragraphs/{paragraphIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"path\", $request->path);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BookingBundle:Propietario')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Propietario entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('propietario_edit', array('id' => $id)));\n }\n\n return $this->redirect($this->generateUrl('propietario'));\n }", "public function listsProphylaxisdelete($prophylaxis_id)\r\n {\r\n $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id);\r\n if($deleted_prophylaxis){\r\n return response()->json(['msg' => 'Deleted Prophylaxis']);\r\n }\r\n }", "public function update(EPIRequest $request, $id)\n {\n try {\n $input = $request->all();\n $produto = Produto::findOrFail($id);\n $produto->nome = $input['nome'];\n $produto->medida = $input['medida'];\n if ($request->has('ca')) {\n $produto->ca = $input['ca'];\n }\n\n $categoria = Categoria::findOrFail($input['categoria']);\n\n $produto->categoria()->associate($categoria);\n\n $produto->save();\n\n return redirect()->route('epis.index');\n\n } catch (Exception $e) {\n return redirect()->back()\n ->with('error', $e->getMessage())\n ;\n }\n }", "protected function putSetParagraphPropertiesRequest(Requests\\PutSetParagraphPropertiesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putSetParagraphProperties');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putSetParagraphProperties');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putSetParagraphProperties');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putSetParagraphProperties');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putSetParagraphProperties');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('PCFicheBundle:PIFEClassique')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PIFEClassique entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('pifeclassique_edit', array('id' => $id)));\n }\n\n return $this->render('PCFicheBundle:PIFEClassique:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function addProductTagAssociationsProductIdIndex ()\n\t{\n\t\tif ($this->IndexExists('[|PREFIX|]product_tagassociations', 'productid')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$query = \"ALTER TABLE [|PREFIX|]product_tagassociations ADD INDEX (`productid`)\";\n\t\tif (!$this->db->Query($query)) {\n\t\t\t$this->SetError($this->db->GetErrorMsg());\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function update($id, UpdateProyectosRequest $request)\n {\n $proyectos = $this->proyectosRepository->find($id);\n\n if (empty($proyectos)) {\n Flash::error('Proyectos not found');\n\n return redirect(route('proyectos.index'));\n }\n\n $proyectos = $this->proyectosRepository->update($request->all(), $id);\n\n Flash::success('Proyectos updated successfully.');\n\n return redirect(route('proyectos.index'));\n }", "public function update($id, UpdatepropietarioRequest $request)\n {\n $propietario = $this->propietarioRepository->findWithoutFail($id);\n\n if (empty($propietario)) {\n Flash::error('propietario not found');\n\n return redirect(route('propietarios.index'));\n }\n\n $propietario = $this->propietarioRepository->update($request->all(), $id);\n\n Flash::success('propietario updated successfully.');\n\n return redirect(route('propietarios.index'));\n }", "public static function documentos_iniciales_proyecto($id_proyecto){\n \n $presupuesto = DocumentoProyecto::where('id_proyecto', '=', $id_proyecto)\n ->where('id_formato_tipo_documento', '=', FormatoTipoDocumento::where('nombre', '=', 'Presupuesto')->first()->id)->first();\n \n $presentacion_proyecto = DocumentoProyecto::where('id_proyecto', '=', $id_proyecto)\n ->where('id_formato_tipo_documento', '=', FormatoTipoDocumento::where('nombre', '=', 'Presentacion proyecto')->first()->id)->first(); \n \n $acta_inicio = DocumentoProyecto::where('id_proyecto', '=', $id_proyecto)\n ->where('id_formato_tipo_documento', '=', FormatoTipoDocumento::where('nombre', '=', 'Acta inicio')->first()->id)->first(); \n \n return ['presupuesto' => $presupuesto, 'presentacion_proyecto' => $presentacion_proyecto, 'acta_inicio' => $acta_inicio];\n }", "public function update($id, PiktoRequest $request)\n {\n $pikto = Auth::user()->piktos()->findOrFail($id);\n $xml = $this->generateXML($request, $pikto->name);\n $response = $this->sendXML($xml);\n $pikto->title = $request->input('title.0.title');\n $pikto->save();\n return redirect()->route('pikto.index')->with('success', 'updated');\n }", "protected function putUpdateNotesSlideShapePortionRequest(Requests\\PutUpdateNotesSlideShapePortionRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putUpdateNotesSlideShapePortion');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putUpdateNotesSlideShapePortion');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putUpdateNotesSlideShapePortion');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putUpdateNotesSlideShapePortion');\n }\n // verify the required parameter 'portion_index' is set\n if ($request->portionIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $portionIndex when calling putUpdateNotesSlideShapePortion');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putUpdateNotesSlideShapePortion');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/notesSlide/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"portionIndex\", $request->portionIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function update(Request $request, $id)\n {\n $proceeding = Proceeding::findOrFail($id);\n\n $action_point_ids = array();\n foreach($request->input('action_points') as $key => $rackp) {\n $action_point_ids[] = $key;\n }\n //dd($action_point_ids);\n\n $proceeding->date_of_order = date('Y-m-d', strtotime($request->input('date_of_order')));\n $proceeding->litigation_id = $request->input('litigation_id');\n $proceeding->act = $request->input('act');\n $proceeding->document_type = $request->input('document_type');\n $proceeding->order_from = $request->input('order_from');\n //$proceeding->action_points = implode(\",\", $request->input('action_points'));\n $proceeding->notes = $request->input('notes');\n $proceeding->save();\n $proceeding->actpoints()->sync($action_point_ids);\n $request->session()->flash('message', 'Proceeding Updated Successfully');\n return back();\n }", "public function updateProdotto(Request $request, $idFornitore, $idProdotto)\n { \n $prodotto = Product::findOrFail($request->id);\n $prodotto->update($request->all());\n\n return $prodotto;\n }", "public function storeProva(Request $request)\n {\n PermissionController::temPermissao('cursos.update');\n $input = $request->all();\n $extensao = $request->file('caminhoProva')->extension();\n\n if ($extensao != 'pdf') {\n Flash::error('O arquivo não é do tipo PDF.');\n\n return redirect()->action('CursoController@addProva', ['id' => $request->id]);\n\n } else {\n\n $caminho = Storage::disk('public')->putFile('provas', $request->file('caminhoProva'));\n DB::update('update curso set nomeProva = ?, caminhoProva = ? where id = ?', [$request->nomeProva, $caminho, $request->id]);\n $curso = DB::table('curso')->get()->where('id', $request->id)->first();\n\n Flash::success('Prova adicionada com sucesso.');\n\n return redirect()->action('CursoController@provas', ['id' => $request->id, 'curso' => $curso]);\n }\n }", "public function update(UpdateProceduresRequest $request, $id)\n {\n if (! Gate::allows('procedure_edit')) {\n return abort(401);\n }\n $procedure = Procedure::findOrFail($id);\n $procedure->update($request->all());\n\n\n\n return redirect()->route('admin.procedures.index');\n }", "protected function putUpdateNotesSlideShapeParagraphRequest(Requests\\PutUpdateNotesSlideShapeParagraphRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling putUpdateNotesSlideShapeParagraph');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling putUpdateNotesSlideShapeParagraph');\n }\n // verify the required parameter 'shape_index' is set\n if ($request->shapeIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $shapeIndex when calling putUpdateNotesSlideShapeParagraph');\n }\n // verify the required parameter 'paragraph_index' is set\n if ($request->paragraphIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $paragraphIndex when calling putUpdateNotesSlideShapeParagraph');\n }\n // verify the required parameter 'dto' is set\n if ($request->dto === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $dto when calling putUpdateNotesSlideShapeParagraph');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/notesSlide/shapes/{shapeIndex}/paragraphs/{paragraphIndex}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"shapeIndex\", $request->shapeIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"paragraphIndex\", $request->paragraphIndex);\n $_tempBody = null;\n if (isset($request->dto)) {\n $_tempBody = $request->dto;\n }\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function update(Request $request,$user_id, $apropos_id)\n {\n //\n \n $a=Apropos::find($apropos_id); \n $a->update($request->all()); \n\n\n $image = $request->source_profil;\n $name = $request->photo_profil.\"-\".time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n \\Image::make($request->source_profil)->save(public_path('photos_profils/').$name);\n\n\n $a->photo_profil='http://127.0.0.1:8887/photos_profils/'.$name;\n $a->save();\n\n return response()->json($image,200);\n }", "public function update(ProdutoRequest $request, $id)\n\t{\n\t\t$update = Produto::findOrFail($id)->update($request->all());\n\n\t\tif($update){\n\t\t\treturn redirect()->route('product.index');\n\t\t}else{\n\t\t\treturn redirect()->back();\n\t\t}\n\t}", "public function update(ProdiRequest $request, $id)\n {\n $data = $request->all();\n\n $item = Prodi::findOrFail($id);\n $item->update($data);\n\n return redirect()->route('prodi.index')->with('status', 'Data berhasil diubah!');\n }", "public function deleteHipotesis($proyectoId)\n {\n $dql = \"DELETE FROM sgiiBundle:TblHipotesis h\n WHERE h.proyectoId =:proyectoId\";\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n $query->getResult();\n }", "public function testUpdatePayslipByID()\n {\n }", "public function update(ProspectoRequest $request,Prospectos $prospecto)\n {\n $prospecto->update($request->all());\n\n return response(200)->json($prospecto);\n }", "public function editarProyectoAction(Request $request, $id)\n {\n// $project->setNombre($nombre);\n// $project->setDescripcion($nombre);\n//\n// $em = $this->getDoctrine()->getManager();\n// $em->persist($project);\n// $em->flush();\n//\n// return new Response(\n// 'Created project id: '.$project->getId()\n// );\n\n $em = $this->getDoctrine()->getManager();\n $project = $em->getRepository('DecathlonDevOpsBundle:Proyecto')->findOneBy(array('id' => $id));\n $form = $this->createForm(new ProyectoEditFormType(), $project);\n\n if ($request->isMethod('POST')) {\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n //persist cascade\n// foreach ($project->getMiembros() as $member) {\n// $em->persist($member);\n// }\n $em->persist($project);\n\n }\n $em->flush();\n }\n\n return $this->render('DecathlonDevOpsBundle::editarproyecto.html.twig', array(\n 'proyecto' => $project,\n 'form' => $form->createView(),\n ));\n }", "public function asignarProyecto($id_equipamiento, $id_proyecto)\n {\n $gn_proyecto = new GnProyecto();\n if($gn_proyecto->asignarProyecto($id_equipamiento, $id_proyecto)){\n return true;\n }\n else{\n return false;\n }\n }" ]
[ "0.45775652", "0.4517322", "0.44740707", "0.4473438", "0.43258697", "0.42301464", "0.4213402", "0.41970327", "0.41603142", "0.41235936", "0.406655", "0.39511037", "0.39297023", "0.39135584", "0.39087754", "0.3899912", "0.38582823", "0.38529927", "0.38391244", "0.38378", "0.3826531", "0.38168764", "0.37843826", "0.37821537", "0.37761423", "0.37432483", "0.37269968", "0.370558", "0.36763725", "0.36705938" ]
0.6406795
0
Operation listsProphylaxisProphylaxisIdDelete Deletes a Prophylaxis specified by prophylaxisId.
public function listsProphylaxisdelete($prophylaxis_id) { $deleted_prophylaxis = Prophylaxis::destroy($prophylaxis_id); if($deleted_prophylaxis){ return response()->json(['msg' => 'Deleted Prophylaxis']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_prodi($id_prodi)\n {\n return $this->db->delete('prodi',array('id_prodi'=>$id_prodi));\n }", "public function deleteHipotesis($proyectoId)\n {\n $dql = \"DELETE FROM sgiiBundle:TblHipotesis h\n WHERE h.proyectoId =:proyectoId\";\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n $query->getResult();\n }", "public function listsProphylaxisByIdget($prophylaxis_id)\r\n {\r\n $prophylaxis = Prophylaxis::findOrFail($prophylaxis_id);\r\n return response()->json($prophylaxis,200);\r\n }", "function deletePorId($idPlato) {\r\n return $this->delete(new Plato($idPlato));\r\n }", "public function deleteCategsProdsByProdId($id_prod) {\n try{\n $relationid = DB::table('categs_prods')->where('id_prod', '=', $id_prod)->delete();\n\n return response()->json(['status' => 1, 'deleted_relation' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0], 500);\n }\n }", "public function deleteUsuariosProyecto($proyectoId)\n {\n $dql = \"DELETE FROM sgiiBundle:TblUsuarioProyecto up\n WHERE up.proyectoId =:proyectoId\";\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n $query->getResult();\n }", "public function delete_faseetapa($id_p){ \n\n $this->db->where('proy_id', $id_p);\n $this->db->delete('_proyectofaseetapacomponente');\n }", "public function delete($idPermisos);", "public function deleteCategsProdsIds($id_categ, $id_prod) {\n try{\n $relationid = DB::table('categs_prods')->where('id_categ', '=', $id_categ)->where('id_prod', '=', $id_prod)->delete();\n\n return response()->json(['status' => 1, 'deleted_relation' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0], 500);\n }\n }", "public function delete($id = 0){\r\n\t\t\t$pessoa = new Pessoa();\r\n\t\t\t$pessoa->setId($id);\r\n\t\t\t$this->pessoaModel->delete($pessoa);\r\n\t\t}", "public function deleteProperty(Request $request, $property_id)\n {\n // dd($property_id);\n $delete_panel = Property::destroy($property_id);\n $delete_var = DB::table('property_variations')->where('property_id', $property_id)->delete();\n\n Toastr::success('Property deleted successfully');\n\n return back();\n // dd($property_id);\n }", "function delete_projeto($id_projeto)\n {\n return $this->db->delete('projetos',array('id_projeto'=>$id_projeto));\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('gemaBundle:Productosprogramas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Productosprogramas entity.');\n }\n \n $accion = 'Producto o Programa eliminado';\n $guid=$entity->getGuid();\n $webPath = $this->get('kernel')->getRootDir().'/../web/productoprograma/'.$guid;\n $webPathl = $this->get('kernel')->getRootDir().'/../web/productoprograma/'.$guid.DIRECTORY_SEPARATOR.'l';\n $this->get(\"gema.utiles\")->traza($accion);\n $em->remove($entity);\n $em->flush();\n $helper=new MyHelper();\n $helper->RemoveFolder($webPath);\n $helper->RemoveFolder($webPathl);\n\n return $this->redirect($this->generateUrl('admin_productosprogramas'));\n }", "function eliminar_procesos_produccion($producto){\n\t\t$sql = \"DELETE FROM prd_productos_procesos WHERE id_producto = \" . $producto;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "public function destroy($id)\n {\n try {\n $proyecto = Project::find($id);\n $investigatorxproyects = Investigatorxproject::where('id_proyecto',$proyecto->id)->get();\n foreach ($investigatorxproyects as $relationship) {\n $relationship->delete();\n }\n //Restricciones de logica de negocio\n\n $proyecto->delete();\n return redirect()->route('proyecto.index')->with('success', 'El proyecto se ha eliminado exitosamente');\n } catch (Exception $e) {\n return redirect()->back()->with('warning', 'Ocurrió un error al hacer esta acción');\n }\n }", "public function delete($prc_id)\n\t{\n\t return Recebimentos::destroy($prc_id);\n\t}", "function delete_prop_detail($prop_id)\n {\n return $this->db->delete('prop_details',array('prop_id'=>$prop_id));\n }", "public function deleteAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $produit = $em->getRepository('KountacBundle:Produits_1')->find($id);\n \n $em->remove($produit);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('success','Produit supprimé avec succès');\n \n return $this->redirectToRoute('adminProduits_index');\n }", "public function deleteById($id)\n {\n DB::beginTransaction();\n\n try {\n $profissional = $this->profissionalRepository->delete($id);\n } catch (Exception $e) {\n DB::rollBack();\n Log::info($e->getMessage());\n\n throw new InvalidArgumentException('Não foi possível excluir o profissional');\n }\n\n DB::commit();\n\n return $profissional;\n }", "public function deletePurchaseOrderProd($id){\n\t \t$query = $this->db->delete('purchase_order_products',array('id'=>$id));\n\t\treturn 1;\n\t }", "public function deleteObjetivos($proyectoId)\n {\n $dql = \"DELETE FROM sgiiBundle:TblObjetivo o\n WHERE o.proyectoId =:proyectoId AND o.objetivoId IS NOT NULL\";\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n $query->getResult();\n $dql = \"DELETE FROM sgiiBundle:TblObjetivo o\n WHERE o.proyectoId =:proyectoId\";\n $query = $this->em->createQuery($dql);\n $query->setParameter('proyectoId', $proyectoId);\n $query->getResult();\n }", "public function delete($id=null){\n $produkModel=new ProdukModel();\n $data['produk'] = $produkModel->where('id', $id)->delete($id);\n return $this->response->redirect(site_url('/produk-list'));\n }", "public function delete($professionAreaId) {\n\t\t$ocupatinSubUse = $this->areaProfesion->findOrFail($professionAreaId);\n\t\t\n\t\t$this->areaProfesion->delete($ocupatinSubUse->id);\n\n\t\tsession()->flash('success', 'Se eliminó el Área de Profesión ['. $ocupatinSubUse->nombre .'] éxitosamente');\n\t\treturn redirect()->route($this->routes['index']);\n }", "public function delete($prot_id)\n {\n $result = 0;\n $products_type = new \\models\\Products_Type();\n $products_type->setProtId($prot_id);\n if($products_type->delete())\n {\n $result = 1;\n }\n echo $result;\n }", "public function destroy($idPartidoPolitico)\n {\n $partido = Diputado::find($idPartidoPolitico);\n $partido->delete();\n }", "public function deletePessoa($id)\n {\n $sql = '\n DELETE FROM professor WHERE id = ?\n ';\n $this->db->query($sql, $id);\n \n if ($this->db->affected_rows() == 1) {\n return true;\n }\n \n throw new RuntimeException('Erro ao deletar professor!');\n }", "public function delete($PsId) {\n\t\t//Delete the PackingList\n\t\t$packList = $this->findByPackingSheet($PsId);\n\t\t\n\t\t$this->packingListPartDAO->deleteAll($packList->getId());\n\t\t$this->getDb()->delete('t_packinglist', array('pl_id' => $packList->getId()));\n\t}", "public function delete(Propriete $propriete)\n {\n $this->em->remove($propriete);\n $this->em->flush();\n }", "public static function delete($id) {\n $id = intval($id);\n $SQL = 'DELETE FROM product WHERE product_id = ?;';\n $prep = DataBase::getInstance()->prepare($SQL);\n return $prep->execute([$id]);\n }", "public function del($product_id){\n\t\tunset($_SESSION['panier'][$product_id]);\n\t}" ]
[ "0.6020599", "0.5768351", "0.55759203", "0.55396277", "0.54388535", "0.5344637", "0.53330505", "0.5294298", "0.5263773", "0.52439314", "0.5209907", "0.5186218", "0.5177534", "0.5171641", "0.51455915", "0.51115763", "0.5109428", "0.50983864", "0.5089833", "0.50874704", "0.50850445", "0.5084462", "0.50530565", "0.50487", "0.5045408", "0.5017692", "0.49710193", "0.49667332", "0.49632844", "0.49618083" ]
0.7567534
0
///////////////////////////// Purpose functions // /////////////////////////// Operation listsPurposeGet Fetch Purpose list (for select options).
public function listsPurposeget() { $response = Purpose::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPurposeByIdget($purpose_id)\r\n {\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n return response()->json($purpose,200);\r\n }", "public function getPurpose(){\n \t$Purpose = HPP::where('hpp_kind','purpose')->get();\n \treturn view('Admin.HistoryPlanPurpose.Purpose.Purpose',compact('Purpose'));\n }", "public function listsPurposepost()\r\n {\r\n $input = Request::all();\r\n $new_purpose = Purpose::create($input);\r\n if($new_purpose){\r\n return response()->json(['msg' => 'Added a new Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Purpose');\r\n }\r\n }", "public function listsPurposedelete($purpose_id)\r\n {\r\n $deleted_purpose = Purpose::destroy($purpose_id);\r\n if($deleted_purpose){\r\n return response()->json(['msg' => 'Deleted Purpose']);\r\n }\r\n }", "public function listsPurposeput($purpose_id)\r\n {\r\n $input = Request::all();\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n $purpose->update(['name' => $input['name']]);\r\n if($purpose->save()){\r\n return response()->json(['msg' => 'Update Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Purpose');\r\n }\r\n }", "public function all_choose_us_info_for_admin(){\r\n $query = \"SELECT * FROM tbl_aboutus_choose_us\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "private static function fetchList($listType,$displayCol, $selectedValue, $showIdle=false, $translate=true,$applyRestrictionClause=false) {\r\n//scriptLog(\"fetchList($listType,$displayCol, $selectedValue, $showIdle, $translate)\");\r\n $res=array();\r\n if (! SqlElement::class_exists($listType)) {\r\n debugTraceLog(\"WARNING : SqlElement::fetchList() called for not valid class '$listType'\");\r\n return array();\r\n }\r\n $obj=new $listType();\r\n $calculated=false;\r\n $field=$obj->getDatabaseColumnName($displayCol);\r\n if (property_exists($obj, '_calculateForColumn') and isset($obj->_calculateForColumn[$displayCol])) {\r\n \t$field=$obj->_calculateForColumn[$displayCol];\r\n \t$calculated=true;\r\n }\r\n $query=\"select \" . $obj->getDatabaseColumnName('id') . \" as id, \" . $field . \" as name from \" . $obj->getDatabaseTableName() ;\r\n if ($showIdle or !property_exists($obj, 'idle')) {\r\n $query.= \" where (1=1 \";\r\n } else {\r\n $query.= \" where (idle=0 \";\r\n }\r\n $crit=$obj->getDatabaseCriteria();\r\n foreach ($crit as $col => $val) {\r\n \tif ($obj->getDatabaseColumnName($col)=='idProject' and ($val=='*' or !$val)) {$val=0;}\r\n \tif ($val===null) {\r\n \t $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . ' IS NULL';\r\n \t} else {\r\n $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . '=' . Sql::str($val);\r\n \t}\r\n }\r\n if ($applyRestrictionClause) {\r\n \t$query.=' and '.getAccesRestrictionClause($listType,null,true);\r\n }\r\n $query .=')';\r\n if ($selectedValue) {\r\n \tif ($selectedValue!='*') {\r\n $query .= \" or \" . $obj->getDatabaseColumnName('id') .'= ' . Sql::str($selectedValue) ;\r\n \t}\r\n }\r\n if (property_exists($obj,'_sortCriteriaForList')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.'.$obj->_sortCriteriaForList;\r\n } else if (property_exists($obj,'sortOrder')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.sortOrder, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'order')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.order, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'baselineDate')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.baselineDate, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n }\r\n $result=Sql::query($query);\r\n if (Sql::$lastQueryNbRows > 0) {\r\n while ($line = Sql::fetchLine($result)) {\r\n $name=$line['name'];\r\n if ($obj->isFieldTranslatable($displayCol) and $translate){\r\n \tif ($listType=='Linkable' and substr($name,0,7)=='Context') {\r\n \t\t$name=SqlList::getNameFromId('ContextType', substr($name,7,1));\r\n \t} else {\r\n $name=i18n($name);\r\n \t}\r\n }\r\n if ($displayCol=='name' and property_exists($obj,'_constructForName') and !$calculated) {\r\n \t$nameObj=new $listType($line['id'],true);\r\n \t$name=$nameObj->name;\r\n }\r\n $res[($line['id'])]=$name;\r\n }\r\n }\r\n // Plugin - start - Management for event \"list\"\r\n global $pluginAvoidRecursiveCall;\r\n if (! $pluginAvoidRecursiveCall) {\r\n $pluginAvoidRecursiveCall=true;\r\n $pluginObjectClass=$listType;\r\n $table=$res;\r\n $lstPluginEvt=Plugin::getEventScripts('list',$pluginObjectClass);\r\n foreach ($lstPluginEvt as $script) {\r\n require $script; // execute code\r\n }\r\n $res=$table;\r\n $pluginAvoidRecursiveCall=false;\r\n }\r\n // Plugin - end\r\n if ($translate) {\r\n self::$list[$listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } else {\r\n \tself::$list['no_tr_' . $listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } \r\n return $res;\r\n }", "public function getPaymentPurposeCode()\n {\n return $this->paymentPurposeCode;\n }", "public function getInfoList() {\n return $this->_get(21);\n }", "public function getTravelPurpose()\n {\n return $this->travelPurpose;\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getListMode(): string;", "public function show($purpose_id)\n {\n \n \n $purpose = finance_national_government_expenditure_purpose_model::findOrfail($purpose_id);\n\n \n echo json_encode($purpose); \n }", "public function getInfoList() {\n return $this->_get(11);\n }", "function mfcs_get_technical_equipment_details_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_SCREEN] = 'Projector / Screen';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_COMPUTER] = 'Computer';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_SOUND] = 'Sound for Presentation / Music / Etc.';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_MICROPHONE] = 'Microphone';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n elseif ($option == 'column_name') {\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_SCREEN] = 'screen';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_COMPUTER] = 'computer';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_SOUND] = 'sound';\n $options_all[MFCS_REQUEST_TECHNICAL_EQUIPMENT_MICROPHONE] = 'microphone';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function getInfoList() {\n return $this->_get(3);\n }", "public function setCompactPurpose($purpose, $creq= '') {\n $this->_setCompact('purpose', $purpose.$creq);\n }", "public function get_list_admin()\n {\n $this->db->where('type', 1);\n $query = $this->db->get('user');\n return $query->result();\n }", "private function secundaryUserTypes() {\n $query = \"select * from secondary_users_types;\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n return $this->AccentialApi->urlRequestToGetData('users', 'query', $params);\n }", "function listAccess($con, $def_access)\n\t{\n\t\t$sql_access = \"SELECT accessID, accessRole FROM access\";\n\t\t$result_access = $con->query($sql_access) or die(mysqli_error($con));\n\n\t\t$list_access = \"\";\n\t\twhile($row = mysqli_fetch_array($result_access))\n\t\t{\n\t\t\t$accessID = $row['accessID'];\n\t\t\t$accessRole = htmlspecialchars($row['accessRole']);\n\n\t\t\tif($accessID == $def_access) { $selected = \"selected='true'\"; } else { $selected = \"\"; }\n\n\t\t\t$list_access .= \"<option value='$accessID' $selected>$accessRole</option>\";\n\t\t}\n\t\t\n\t\treturn $list_access;\n\t}", "public function selectAllInfoByListIdAndType($listId, $type = null)\n {\n /*if (empty($type)) {\n return QcTool::orderBy('name', 'ASC')->select('*');\n } else {\n return QcTool::where('type', $type)->orderBy('name', 'ASC')->select('*');\n }*/\n }", "function OptionsList($membercount = 0)\n\t{\tob_start();\n\t\n\t\t// build list of filter options\n\t\t$filter_applied = array();\n\t\t$link_paras = array();\n\t\t\n\t\tif ($_GET['morf'])\n\t\t{\tswitch ($_GET['morf'])\n\t\t\t{\tcase 'M': $filter_applied[] = '<strong>Male only</strong>'; break;\n\t\t\t\tcase 'F': $filter_applied[] = '<strong>Female only</strong>'; break;\n\t\t\t}\n\t\t\t$link_paras[] = 'morf=' . $_GET['morf'];\n\t\t}\n\n\t\tif ($_GET['ctry'])\n\t\t{\t$filter_applied[] = 'from ' . $this->GetCountry($_GET['ctry']);\n\t\t\t$link_paras[] = 'ctry=' . $_GET['ctry'];\n\t\t}\n\n\t\tif ($_GET['name'])\n\t\t{\t$filter_applied[] = 'in name or email <strong>\"' . $this->InputSafeString($_GET['name']) . '\"</strong>';\n\t\t\t$link_paras[] = 'name=' . $_GET['name'];\n\t\t}\n\t\t\n\t\techo '<div class=\"cblFilterInfo\"><div class=\"cblFilterInfoFilter\">filter applied: ';\n\t\tif ($filter_applied)\n\t\t{\techo implode('; ', $filter_applied);\n\t\t\t$link_para_string = '?' . implode('&', $link_paras);\n\t\t} else\n\t\t{\techo 'none';\n\t\t}\n\t\techo ' ... ', $membercount, ' members found</div>';\n\t\tif ($membercount)\n\t\t{\techo '<ul><li><a href=\"members_csv.php', $link_para_string, '\" target=\"_blank\">download csv of these members</a></li>';\n\t\t\tif ($this->CanAdminUser('site-emails'))\n\t\t\t{\n\t\t\t\techo '<li><a href=\"members_setmaillist.php', $link_para_string, '\" target=\"_blank\">send email to these members</a></li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t}\n\t\techo '<div class=\"clear\"></div></div>';\n\t\treturn ob_get_clean();\n\t}", "public function helpPrivacy()\n {\n\t// make the call\n\treturn $this->doCall(\n\t 'help/privacy.json'\n\t);\n }", "public function getList() {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "public function getTaskListList(){\n return $this->_get(2);\n }", "public function memberAdminMemberList($eid)\n {\n $config = SimpleConregConfig::getConfig($eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::memberTypes($eid, $config);\n $badgeTypes = SimpleConregOptions::badgeTypes($eid, $config);\n $days = SimpleConregOptions::days($eid, $config);\n $communicationsOptions = SimpleConregOptions::communicationMethod($eid, $config);\n $displayOptions = SimpleConregOptions::display();\n $yesNo = SimpleConregOptions::yesNo();\n $digits = $config->get('member_no_digits');\n\n $content = [\n '#attached' => [\n 'library' => ['simple_conreg/conreg_tables'],\n ]\n ];\n\n $pageOptions = [];\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n $pageOptions['sort'] = 'desc';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'MID':\n $order = 'm.mid';\n $pageOptions['order'] = 'MID';\n break;\n case 'First name':\n $order = 'm.first_name';\n $pageOptions['order'] = 'First name';\n break;\n case 'Last name':\n $order = 'm.last_name';\n $pageOptions['order'] = 'Last name';\n break;\n case 'Badge name':\n $order = 'm.badge_name';\n $pageOptions['order'] = 'Badge name';\n break;\n case 'Email':\n $order = 'm.email';\n $pageOptions['order'] = 'Email';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content['message'] = array(\n '#markup' => $this->t('Here is a list of all paid convention members.'),\n );\n\n $this->memberAdminMemberListSummary($eid, $content);\n\n $rows = array();\n $headers = array(\n 'member_type' => ['data' => t('Member type'), 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'days' => ['data' => t('Days'), 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_no' => ['data' => t('Member no'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'first_name' => ['data' => t('First name'), 'field' => 'm.first_name'],\n 'last_name' => ['data' => t('Last name'), 'field' => 'm.last_name'],\n 'email' => ['data' => t('Email'), 'field' => 'm.email'],\n 'badge_name' => ['data' => t('Badge name'), 'field' => 'm.badge_name'],\n 'badge_type' => ['data' => t('Badge type'), 'class' => [RESPONSIVE_PRIORITY_LOW]],\n t('Street'),\n t('Street line 2'),\n t('City'),\n t('County'),\n t('Postcode'),\n t('Country'),\n t('Phone'),\n t('Birth Date'),\n t('Age'),\n 'display' => ['data' => t('Display'), 'class' => [RESPONSIVE_PRIORITY_LOW]],\n t('Communication Method'),\n t('Paid'),\n t('Price'),\n t('Comments'),\n t('Approved'),\n 'mid' => ['data' => t('Internal ID'), 'field' => 'm.mid', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n t('Date joined'),\n );\n\n foreach ($entries = SimpleConregStorage::adminPaidMemberListLoad($eid, $direction, $order) as $entry) {\n if (!empty($entry['member_no']))\n $entry['member_no'] = $entry['badge_type'] . sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n if (!empty($entry['days'])) {\n $dayDescs = [];\n foreach(explode('|', $entry['days']) as $day) {\n $dayDescs[] = isset($days[$day]) ? $days[$day] : $day;\n }\n $entry['days'] = implode(', ', $dayDescs);\n }\n $entry['member_type'] = isset($types->types[$entry['member_type']]) ? $types->types[$entry['member_type']]->name : $entry['member_type'];\n $entry['badge_type'] = isset($badgeTypes[$entry['badge_type']]) ? $badgeTypes[$entry['badge_type']] : $entry['badge_type'];\n $entry['country'] = isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country'];\n $entry['communication_method'] = isset($communicationsOptions[$entry['communication_method']]) ? $communicationsOptions[$entry['communication_method']] : $entry['communication_method'];\n $entry['display'] = isset($displayOptions[$entry['display']]) ? $displayOptions[$entry['display']] : $entry['display'];\n $entry['is_paid'] = isset($yesNo[$entry['is_paid']]) ? $yesNo[$entry['is_paid']] : $entry['is_paid'];\n $entry['is_approved'] = isset($yesNo[$entry['is_approved']]) ? $yesNo[$entry['is_approved']] : $entry['is_approved'];\n // Sanitize each entry.\n $rows[] = $entry;\n }\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n '#sticky' => TRUE,\n );\n // Don't cache this page.\n $content['#cache']['max-age'] = 0;\n\n return $content;\n }", "public function getList($postArray=NULL)\n\t{\n \t$params = BaseMtc_member::getParams();\n\t\t//Remove sensitive fields\n\t\tunset($params['password']);\n\t\tunset($params['password_hint']);\n\t\tunset($params['password_hint_answer']);\n\t\tunset($params['uuid']);\n\t\treturn $this->selectItemsUsing($postArray, $params);\n\t}", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "private function getListOptions(){\n return $this->listOptions;\n }", "public function getInfoList() {\n return $this->_get(6);\n }" ]
[ "0.7138095", "0.60864484", "0.6054905", "0.60016286", "0.58486545", "0.53378403", "0.50692147", "0.50583184", "0.50159806", "0.50048584", "0.4937881", "0.49256012", "0.48684487", "0.48572955", "0.4847314", "0.4841244", "0.4839858", "0.48128203", "0.48081604", "0.48035845", "0.48001358", "0.47870994", "0.47851437", "0.4780817", "0.47793707", "0.47672316", "0.47529572", "0.4737915", "0.47370026", "0.47347054" ]
0.7519739
0
Operation listsPurposePurposeIdGet Fetch Purpose specified by purposeId.
public function listsPurposeByIdget($purpose_id) { $purpose = Purpose::findOrFail($purpose_id); return response()->json($purpose,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPurposedelete($purpose_id)\r\n {\r\n $deleted_purpose = Purpose::destroy($purpose_id);\r\n if($deleted_purpose){\r\n return response()->json(['msg' => 'Deleted Purpose']);\r\n }\r\n }", "public function listsPurposeput($purpose_id)\r\n {\r\n $input = Request::all();\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n $purpose->update(['name' => $input['name']]);\r\n if($purpose->save()){\r\n return response()->json(['msg' => 'Update Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Purpose');\r\n }\r\n }", "public function listsPurposeget()\r\n {\r\n $response = Purpose::all();\r\n return response()->json($response,200);\r\n }", "public function getPurpose(){\n \t$Purpose = HPP::where('hpp_kind','purpose')->get();\n \treturn view('Admin.HistoryPlanPurpose.Purpose.Purpose',compact('Purpose'));\n }", "public function listsPurposepost()\r\n {\r\n $input = Request::all();\r\n $new_purpose = Purpose::create($input);\r\n if($new_purpose){\r\n return response()->json(['msg' => 'Added a new Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Purpose');\r\n }\r\n }", "public function show($purpose_id)\n {\n \n \n $purpose = finance_national_government_expenditure_purpose_model::findOrfail($purpose_id);\n\n \n echo json_encode($purpose); \n }", "public function getPaymentPurposeCode()\n {\n return $this->paymentPurposeCode;\n }", "public function editPurposePage($id){\n $editableRecord=HPP::find($id);\n return view('Admin.HistoryPlanPurpose.Purpose.EditPurpose',compact('editableRecord'));\n }", "public function getTravelPurpose()\n {\n return $this->travelPurpose;\n }", "public function setPurpose($channel, $purpose)\n {\n return $this->method('setPurpose', compact('channel', 'purpose'));\n }", "public function select_education_details($id){\n \t$query =\"SELECT * FROM `education` WHERE `uid`='$id'\";\n\t\t$result =mysql_query($query); \t\t\n\t\tif($result){\n\t\t\treturn $result;\n\t\t}else{\n\t\t\tdie('can not select'.mysql_errno());\n\t\t} \t\n }", "public function setTravelPurpose($travelPurpose)\n {\n $this->travelPurpose = $travelPurpose;\n return $this;\n }", "public function setCompactPurpose($purpose, $creq= '') {\n $this->_setCompact('purpose', $purpose.$creq);\n }", "public function newPurpose(){\n\n return view('Admin.HistoryPlanPurpose.Purpose.NewPurpose');\n }", "public function getProductEmissionsByMaterialComponentId( $materialComponentId );", "public function setPaymentPurposeCode(\\horstoeko\\ubl\\entities\\cbc\\PaymentPurposeCode $paymentPurposeCode)\n {\n $this->paymentPurposeCode = $paymentPurposeCode;\n return $this;\n }", "public function getTherapistList($memberId)\n {\n $result = DB::select(\"SELECT admins.id, CONCAT_WS(' ', admins.first_name, admins.last_name, '-', admins.username) AS username FROM members LEFT OUTER JOIN vlcc_centers ON members.crm_center_id = vlcc_centers.crm_center_id LEFT OUTER JOIN admin_centers ON vlcc_centers.id = admin_centers.center_id LEFT OUTER JOIN admins ON admin_centers.user_id = admins.id WHERE members.id=\" . $memberId . \" AND (admins.user_type_id=5 OR admins.user_type_id=9 OR admins.user_type_id=10) AND admins.status=1\");\n $result = collect($result)->toArray();\n $result = array_column($result, 'username', 'id');\n return $result;\n }", "public function getUserPurpose(): ?UserPurpose {\n $val = $this->getBackingStore()->get('userPurpose');\n if (is_null($val) || $val instanceof UserPurpose) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'userPurpose'\");\n }", "function GetReason($reasonId)\n\t{\n\t\t$result = $this->sendRequest(\"GetReason\", array(\"ReasonId\"=>$reasonId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->get(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }", "public function getUsecase($id, $projectid) {\n\t\t\t$this->query(\"SELECT * FROM usecase WHERE id={$id} AND projectid = {$projectid};\");\n\t\t\treturn $this->resultSet();\n\t\t}", "public function roleDetails(int $roleId);", "public function doEditPurpose(Request $request ,$id){\n $this->validate($request,\n ['New_Purpose' => 'required'],\n ['New_Purpose.required' => 'مقدار هدف نباید خالی باشد']);\n\n $editedRecord=HPP::find($id);\n $editedRecord->hpp_data = $request->New_Purpose;\n if($editedRecord->save()){\n return redirect()->route('Get_Purpose')->with('success','هدف با موفقیت به روز رسانی شد');\n }else{\n return redirect()->route('Get_Purpose')->with('error','خطای سیستمی، دوباره سعی کنید');\n }\n }", "public function dataProviderRetrieveSkuById()\n {\n return [\n [\n null,\n 2,\n ['sku_1' => [1 => 1]]\n ],\n [\n 'sku_1',\n 1,\n ['sku_1' => [1 => 1]]\n ],\n [\n null,\n 1,\n ['sku_1' => [2 => 1]]\n ],\n ];\n }", "public function setUserPurpose(?UserPurpose $value): void {\n $this->getBackingStore()->set('userPurpose', $value);\n }", "public static function get( $material_id ) {\n\t\t$material_helper = new Material();\n\t\treturn $material_helper->get_item( $material_id );\n\t}", "public function getInstitutionGrade($institutionId, $gradeId)\n {\n return self::where('education_grade_id', $gradeId)\n ->where('institution_id', $institutionId)->get()->first();\n }", "public static function getDetailsByLearnersId($id) {\n try {\n $details = DB::table('learner_documents')\n \t->select('id', 'filename', 'extension', 'filesize', 'location', 'learners_id')\n \t->where('learners_id', '=', $id)\n \t->distinct();\n }\n catch(PDOException $exception) {\n die(var_dump($exception->getMessage()));\n }\n return $details;\n }", "static function getSkills($id) {\n\n include('loginBDD.php');\n $req = $bdd->prepare('SELECT skills.name FROM offer INNER JOIN need ON need.id_offer = offer.id INNER JOIN skills ON skills.id = need.id_skills WHERE offer.id = ?');\n\n if(!$req->execute([$id]))\n print_r($bdd->errorInfo());\n else {\n //var_dump(hash('sha256',$password));\n if($donnees = $req->fetchAll()) {\n $req->closeCursor();\n return $donnees;\n }\n echo 'No Result';\n \n }\n \n\n }", "function getCapitalDetailById($id,$tran_type){\r\n \t$db = $this->getAdapter();\r\n \t$this->_name='cs_capital_detail';\r\n \t$sql = \" SELECT * FROM \". $this->_name .\" WHERE tran_id = $id AND tran_type = $tran_type AND status=1 LIMIT 1 \";\r\n \treturn $db->fetchRow($sql);\r\n }" ]
[ "0.6808287", "0.6730325", "0.6498369", "0.597833", "0.5782739", "0.5689757", "0.5508724", "0.54614496", "0.5008324", "0.47427565", "0.47094953", "0.4699696", "0.4671941", "0.46311626", "0.45758653", "0.45317045", "0.42740154", "0.42690545", "0.42063656", "0.41726986", "0.4166361", "0.4122733", "0.41152468", "0.40818295", "0.4060074", "0.40486008", "0.40155748", "0.3993259", "0.39912242", "0.3951255" ]
0.8158595
0
Operation listsPurposePost create a Purpose.
public function listsPurposepost() { $input = Request::all(); $new_purpose = Purpose::create($input); if($new_purpose){ return response()->json(['msg' => 'Added a new Purpose']); }else{ return response('Oops, it seems like there was a problem adding the Purpose'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPurposeput($purpose_id)\r\n {\r\n $input = Request::all();\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n $purpose->update(['name' => $input['name']]);\r\n if($purpose->save()){\r\n return response()->json(['msg' => 'Update Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Purpose');\r\n }\r\n }", "public function storepurpose(Request $request)\n {\n $data = Purpose::create($request->all());\n return redirect()->route('create-rating', $data->id);\n }", "public function listsPurposedelete($purpose_id)\r\n {\r\n $deleted_purpose = Purpose::destroy($purpose_id);\r\n if($deleted_purpose){\r\n return response()->json(['msg' => 'Deleted Purpose']);\r\n }\r\n }", "public function newPurpose(){\n\n return view('Admin.HistoryPlanPurpose.Purpose.NewPurpose');\n }", "public function listsPurposeget()\r\n {\r\n $response = Purpose::all();\r\n return response()->json($response,200);\r\n }", "public function listsPurposeByIdget($purpose_id)\r\n {\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n return response()->json($purpose,200);\r\n }", "public function create()\n {\n return view('admin.visit_purpose.add_visit_purpose');\n }", "public function store(Request $request)\n {\n $this->validate(request(), [\n 'name' => 'required',\n 'status' => 'required',\n \n ]); \n $visit_purpose = VisitPurpose::create([\n 'name' => $request['name'],\n 'status' => $request['status'],\n\n ]);\n\n return redirect('admin/visit_purpose')->with('success','User Visitor Purpose successfully!');\n }", "public function setUserPurpose(?UserPurpose $value): void {\n $this->getBackingStore()->set('userPurpose', $value);\n }", "public function getPurpose(){\n \t$Purpose = HPP::where('hpp_kind','purpose')->get();\n \treturn view('Admin.HistoryPlanPurpose.Purpose.Purpose',compact('Purpose'));\n }", "public function setPurpose($channel, $purpose)\n {\n return $this->method('setPurpose', compact('channel', 'purpose'));\n }", "public function post($list_id = null, $name, $type = 'Active', $description = '', $favorite = false, $criteria = array())\n {\n $this->method = '';\n $this->request_type = 'POST';\n $this->body = '';\n $this->query = array();\n \n $parameters = array(\n 'list_id' => (int) $list_id,\n 'name' => $name,\n 'type' => $type,\n 'description' => $description,\n 'favorite' => $favorite,\n 'criteria' => $criteria\n );\n \n $this->body = json_encode($parameters);\n return $this;\n }", "public function addPostAction() {\n $inputVars = $this->getInput(array(\n \t\t'id', 'dataType', //主表字段:id,type\n \t\t \t'data'//子表字段\n ));\n \tlist($news, $itemsList) = $this->checkInput($inputVars);\n \t$news['create_time'] = time();\n \t$result = Admin_Service_Material::add($news, $itemsList);\n \tif (!$result) $this->failPostOutput('操作失败');\n \t$this->successPostOutput($this->actions['listUrl']);\n }", "public static function create($value, $purpose, $usages)\n {\n return new self(\n sprintf(\n 'The \"%s\" token with value \"%s\" was used times \"%s\".',\n $purpose,\n $value,\n $usages\n )\n );\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','name'));\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier) $this->output(-1, '操作失败,该分类已存在');\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fanli_Service_Ptype::addType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function postCreate(Request $request) {\n\n $this->validate($request, [\n 'description' => 'required',\n 'subject' => 'required',\n 'totalPoint' => 'required|integer',\n ]);\n\n // $description = $request->input('description');\n // $subject = $request->input('subject');\n // $totalPoint = $request->input('totalPoint');\n $list = new \\App\\Lists();\n $list->subject = $request->subject;\n $list->description = $request->description;\n $list->totalPoint = $request->totalPoint;\n $list->user_id = \\Auth::id();\n\n $list->save();\n\n \\Session::flash('message','Your list was created');\n return redirect('/profile');\n }", "public function offers_suppression_list_post()\n {\n $this->verify_request(); \n $data = array(\n 'name' => $this->input->post('name'),\n 'download_url' => $this->input->post('download_url'),\n 'unsubscribe_url' => $this->input->post('unsubscribe_url')\n );\n $result = $this->Offer_model->insert_offers_sup_list($data);\n $status = parent::HTTP_OK;\n $this->response(['offer Suppression List created successfully.'], $status);\n }", "public function setCompactPurpose($purpose, $creq= '') {\n $this->_setCompact('purpose', $purpose.$creq);\n }", "public function __construct($purpose = 'validation') {\n $this->setPurpose($purpose);\n $this->setToken();\n $this->setExpiration();\n\n $this->setIpAddress();\n }", "function _postUserList($ac_token, $list_name, $description = '', $private = false) {\n $api = 'https://api.twitter.com/1/lists/create.json';\n $data = array('name' => $list_name,\n 'description' => $description,\n 'mode' => ($private) ? 'private' : 'public');\n return $this->_execTwApi($ac_token, $api, $data, 'post');\n }", "public function store(CreatePostskillRequest $request)\n\t{\n\t\tif(Auth::user()->identifier == 1)\n\t\t\t$request['individual_id'] = Auth::user()->induser_id;\n\t\telse\n\t\t\t$request['corporate_id'] = Auth::user()->corpuser_id;\n\t\t$request['post_type'] = 'skill';\n\t\t\n\t\t$skillIds = explode(',', $request['linked_skill_id']);\n\t\tunset ($skillIds[count($skillIds)-1]);\n\t\t$request['unique_id'] = \"S\".rand(111,999).rand(111,999);\n\n\t\t$post = Postjob::create($request->all());\n\n\t\t$post->skills()->attach($skillIds);\n\n\t\treturn redirect(\"/home\");\n\t}", "public function creating(Matter $matter)\n {\n\n }", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }", "protected function check_create_permission($post)\n {\n }", "public function create($scope, $name, $description);", "public function listsInstructionpost()\r\n {\r\n $input = Request::all();\r\n $new_instruction = Instruction::create($input);\r\n if($new_instruction){\r\n return response()->json(['msg' => 'Wrote new instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new instruction');\r\n }\r\n }", "public function store() {\n \n // Form processing\n try {\n\n $this->purposeForm->create(Input::all());\n if (Input::get('redirect') == '1') {\n// // coutinue\n return Redirect::route('purposes.create')->with('success', 'Tạo mới thành công');\n }\n return Redirect::route('purposes.index')->with('success', 'Tạo mới thành công');\n } catch (ValidationException $ex) {\n\n return Redirect::back()->withInput()->withErrors($ex->getErrors())->with('error', 'Đã xảy ra lỗi');\n }\n \n }", "public function addItemsDetails($description,$price,$quantity,$reference){\r\n\t\tif ( $this->_requestDetails==null )\r\n\t\t\t$this->_requestDetails = array();\r\n\t\t$nItem = count($this->_requestDetails);\r\n\t\tarray_push($this->_requestDetails, array(\"L_PAYMENTREQUEST_0_NAME\".$nItem=>$description,\"L_PAYMENTREQUEST_0_AMT\".$nItem=>$price,\"L_PAYMENTREQUEST_0_QTY\".$nItem=>$quantity,\"L_PAYMENTREQUEST_0_NUMBER\".$nItem=>$reference ));\r\n\t}", "public function create($post)\n {\n // validate the data\n $this->validate($post);\n\n\t\t// storage data\n\t\t$data = array(\n\t\t\t'job_id' \t\t\t=> $post['job_id'],\n\t\t\t'client_id' \t\t=> $post['client_id'],\n 'name' \t\t\t\t=> $post['name'],\n 'email' \t\t\t=> $post['email'],\n 'previous_job_title' => $post['previous_job_title'],\n 'cover_letter' \t\t=> !empty($post['cover_letter']) ? $post['cover_letter'] : NULL,\n 'resume' \t\t\t=> !empty($post['resume']) ? $post['resume'] : NULL,\n\t\t\t'created_ts' \t\t=> time()\n\t\t);\n\n\t\treturn $this->_db->insert('applicants', $data);\n }", "public static function createPermission($name, $description){\n $auth = Yii::$app->authManager;\n\n $new_permission = $auth->createPermission($name);\n $new_permission->description = $description;\n\n $auth->add($new_permission);\n }" ]
[ "0.60100603", "0.58402914", "0.556853", "0.54544044", "0.5229432", "0.5170796", "0.4854615", "0.45432675", "0.4462892", "0.44611374", "0.44565502", "0.4421425", "0.4373711", "0.43506473", "0.4350429", "0.43145105", "0.4277634", "0.42487365", "0.42134354", "0.42052892", "0.41918945", "0.41722518", "0.41702345", "0.4158693", "0.4150068", "0.41277403", "0.41172192", "0.4094026", "0.40914407", "0.4084536" ]
0.7872619
0
Operation listsPurposePurposeIdPut Update an existing Purpose.
public function listsPurposeput($purpose_id) { $input = Request::all(); $purpose = Purpose::findOrFail($purpose_id); $purpose->update(['name' => $input['name']]); if($purpose->save()){ return response()->json(['msg' => 'Update Purpose']); }else{ return response('Oops, it seems like there was a problem updating the Purpose'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPurposeByIdget($purpose_id)\r\n {\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n return response()->json($purpose,200);\r\n }", "public function listsPurposedelete($purpose_id)\r\n {\r\n $deleted_purpose = Purpose::destroy($purpose_id);\r\n if($deleted_purpose){\r\n return response()->json(['msg' => 'Deleted Purpose']);\r\n }\r\n }", "public function setUserPurpose(?UserPurpose $value): void {\n $this->getBackingStore()->set('userPurpose', $value);\n }", "public function listsPurposepost()\r\n {\r\n $input = Request::all();\r\n $new_purpose = Purpose::create($input);\r\n if($new_purpose){\r\n return response()->json(['msg' => 'Added a new Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Purpose');\r\n }\r\n }", "public function setPurpose($channel, $purpose)\n {\n return $this->method('setPurpose', compact('channel', 'purpose'));\n }", "public function doEditPurpose(Request $request ,$id){\n $this->validate($request,\n ['New_Purpose' => 'required'],\n ['New_Purpose.required' => 'مقدار هدف نباید خالی باشد']);\n\n $editedRecord=HPP::find($id);\n $editedRecord->hpp_data = $request->New_Purpose;\n if($editedRecord->save()){\n return redirect()->route('Get_Purpose')->with('success','هدف با موفقیت به روز رسانی شد');\n }else{\n return redirect()->route('Get_Purpose')->with('error','خطای سیستمی، دوباره سعی کنید');\n }\n }", "public function setCompactPurpose($purpose, $creq= '') {\n $this->_setCompact('purpose', $purpose.$creq);\n }", "public function storepurpose(Request $request)\n {\n $data = Purpose::create($request->all());\n return redirect()->route('create-rating', $data->id);\n }", "public function editPurposePage($id){\n $editableRecord=HPP::find($id);\n return view('Admin.HistoryPlanPurpose.Purpose.EditPurpose',compact('editableRecord'));\n }", "public function setUserPurposeV2(?MailboxRecipientType $value): void {\n $this->getBackingStore()->set('userPurposeV2', $value);\n }", "public function update(Request $request, $id)\n {\n $visit_purpose=VisitPurpose::find($id);\n //dd($user);\n \n $request->validate([\n 'name' => 'required',\n 'status'=>'required', \n \n ]);\n $visit_purpose['name']=$request['name'];\n \n $visit_purpose['status']=$request['status'];\n\n \n $visit_purpose->save();\n \n return redirect('admin/visit_purpose')->with('success','Visitor Purpose updated successfully!'); \n }", "public function setTravelPurpose($travelPurpose)\n {\n $this->travelPurpose = $travelPurpose;\n return $this;\n }", "public function listsPurposeget()\r\n {\r\n $response = Purpose::all();\r\n return response()->json($response,200);\r\n }", "public function getPurpose(){\n \t$Purpose = HPP::where('hpp_kind','purpose')->get();\n \treturn view('Admin.HistoryPlanPurpose.Purpose.Purpose',compact('Purpose'));\n }", "public function edit(benefits $benefits)\n {\n //\n }", "public function newPurpose(){\n\n return view('Admin.HistoryPlanPurpose.Purpose.NewPurpose');\n }", "public function getPaymentPurposeCode()\n {\n return $this->paymentPurposeCode;\n }", "public function show($purpose_id)\n {\n \n \n $purpose = finance_national_government_expenditure_purpose_model::findOrfail($purpose_id);\n\n \n echo json_encode($purpose); \n }", "public function updateSchoolWithDetails(array $data, $id);", "public function editAction(Request $request, UseBenefit $useBenefit)\n {\n $deleteForm = $this->createDeleteForm($useBenefit);\n $editForm = $this->createForm('AppBundle\\Form\\UseBenefitType', $useBenefit);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('usebenefit_edit', array('idUseBenefit' => $useBenefit->getIdusebenefit()));\n }\n\n return $this->render('usebenefit/edit.html.twig', array(\n 'useBenefit' => $useBenefit,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function update(AboutUsStoreRequest $request, $id)\n {\n $item = AboutUs::withTrashed()->findOrFail($id);\n $message = \"You have successfully updated {$item->title}\";\n\n $item = AboutUs::store($request, $item);\n\n return response()->json([\n 'message' => $message,\n ]);\n }", "public function edit(Aboutus $aboutus)\n {\n //\n }", "public function edit(Institute $institute)\n {\n //\n }", "function editProfile( $indId )\n\t{\n\t\t$this->load->helper('form');\n\t\t\n\t\t$user \t= $this->user->getSingle( $indId );\n\t\t$userId\t= $this->user->getUserId( $indId );\n\t\t$causes = $this->usercause->getAllForUser( $userId );\n\t\t\n\t\tif(isset($_REQUEST[\"first_name\"]))\n\t\t{\n\t\t\t// user has edited the profile - make necessary changes\n\t\t\t// validate the submitted data!\n\t\t\t$errors = array();\n\t\t\t$valid = true;\n\t\t\t\n\t\t\tif($valid)\n\t\t\t{\n\t\t\t\t$individualUpdates = Array();\n\t\t\t\t$fnameChanged = false;\n\t\t\t\t\n\t\t\t\t// set new values if they exist\n\t\t\t\tif( $user['firstName'] != $this->input->post('first_name'))\n\t\t\t\t{\n\t\t\t\t\t$fnameChanged = true;\n\t\t\t\t\t$individualUpdates['first_name'] = $this->input->post('first_name');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $user['lastName'] != $this->input->post('last_name'))\n\t\t\t\t{\n\t\t\t\t\t$individualUpdates['last_name'] = $this->input->post('last_name');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $user['about'] != $this->input->post('about_me'))\n\t\t\t\t{\n\t\t\t\t\t$individualUpdates['about_me'] = $this->input->post('about_me');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update individual database\n\t\t\t\t$this->db->update('individual', $individualUpdates, \"indid = $indId\");\n\t\t\t\t\t\n\t\t\t\t// check causes for this user\n\t\t\t\t\n\t\t\t\t$cause_animals = false;\n\t\t\t\t$cause_environment = false;\n\t\t\t\t$cause_welfare = false;\n\t\t\t\t$cause_disabilities = false;\n\t\t\t\t\n\t\t\t\tif( $this->input->post('cause_animals') )\n\t\t\t\t{\n\t\t\t\t\t$cause_animals = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->input->post('cause_environment') )\n\t\t\t\t{\n\t\t\t\t\t$cause_environment = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->input->post('cause_welfare') )\n\t\t\t\t{\n\t\t\t\t\t$cause_welfare = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->input->post('cause_disabilities') )\n\t\t\t\t{\n\t\t\t\t\t$cause_disabilities = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// cycle through existing causes and compare with selected ones\n\t\t\t\t\n\t\t\t\t$cause_animals_current = false;\n\t\t\t\t$cause_environment_current = false;\n\t\t\t\t$cause_welfare_current = false;\n\t\t\t\t$cause_disabilities_current = false;\n\t\t\t\t\n\t\t\t\tforeach( $causes as $cause )\n\t\t\t\t{\n\t\t\t\t\tif($cause['cause'] == 'animals')\n\t\t\t\t\t{\n\t\t\t\t\t\t$cause_animals_current = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if($cause['cause'] == 'disabilities')\n\t\t\t\t\t{\n\t\t\t\t\t\t$cause_disabilities_current = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if($cause['cause'] == 'environment')\n\t\t\t\t\t{\n\t\t\t\t\t\t$cause_environment_current = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if($cause['cause'] == 'welfare')\n\t\t\t\t\t{\n\t\t\t\t\t\t$cause_welfare_current = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if we need to add or remove a cause entry, do it!\n\t\t\t\tif($cause_animals_current != $cause_animals)\n\t\t\t\t{\n\t\t\t\t\tif($cause_animals_current == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->addCause( $userId, 1 );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->removeCause( $userId, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($cause_environment_current != $cause_environment)\n\t\t\t\t{\n\t\t\t\t\tif($cause_environment_current == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->addCause( $userId, 2 );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->removeCause( $userId, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($cause_welfare_current != $cause_welfare)\n\t\t\t\t{\n\t\t\t\t\tif($cause_welfare_current == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->addCause( $userId, 3 );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->removeCause( $userId, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($cause_disabilities_current != $cause_disabilities)\n\t\t\t\t{\n\t\t\t\t\tif($cause_disabilities_current == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->addCause( $userId, 4 );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->removeCause( $userId, 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check if session user name data must be refreshed\n\t\t\t\tif($fnameChanged)\n\t\t\t\t{\n\t\t\t\t\t$this->session->unset_userdata(\"user_name\");\n\t\t\t\t\t$this->session->set_userdata('user_name', $this->input->post('first_name'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// return to profile\n\t\t\t\tredirect(\"/user/$indId\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar_dump($errors);\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t\t$this->data['errors'] = $errors;\n\t\t\t\t$this->data['pagebody'] = 'registerIndividual';\n\t\t\t\t$this->render();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t$this->data['pagebody'] = 'userProfileEdit'; // show the userProfile page\n\t\t\t\n\t\t\t// set text editable data\n\t\t\t$this->data['first_name'] = set_value('first_name', $user['firstName']);\n\t\t\t$this->data['last_name'] = set_value('last_name', $user['lastName']);\n\t\t\t$this->data['about_me'] = set_value('last_name', $user['about']);\n\t\t\t\n\t\t\t// set checkbox data\n\t\t\t$this->data['animals'] = \"\";\n\t\t\t$this->data['disabilities'] = \"\";\n\t\t\t$this->data['environment'] = \"\";\n\t\t\t$this->data['welfare'] = \"\";\n\t\t\t\n\t\t\t// set checked if the user has selected it\n\t\t\tforeach( $causes as $cause )\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif($cause['cause'] == 'animals')\n\t\t\t\t{\n\t\t\t\t\t$this->data['animals'] = \"checked\";\n\t\t\t\t}\n\t\t\t\telse if($cause['cause'] == 'disabilities')\n\t\t\t\t{\n\t\t\t\t\t$this->data['disabilities'] = \"checked\";\n\t\t\t\t}\n\t\t\t\telse if($cause['cause'] == 'environment')\n\t\t\t\t{\n\t\t\t\t\t$this->data['environment'] = \"checked\";\n\t\t\t\t}\n\t\t\t\telse if($cause['cause'] == 'welfare')\n\t\t\t\t{\n\t\t\t\t\t$this->data['welfare'] = \"checked\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->render();\n\t\t}\n\t}", "public function update($id, UpdateTopicMistakeRequest $request)\n {\n $topicMistake = $this->topicMistakeRepository->findWithoutFail($id);\n\n if (empty($topicMistake)) {\n Flash::error('Topic Mistake not found');\n\n return redirect(route('topicMistakes.index'));\n }\n\n $topicMistake = $this->topicMistakeRepository->update($request->all(), $id);\n\n Flash::success('Topic Mistake updated successfully.');\n\n return redirect(route('topicMistakes.index'));\n }", "public function update(Request $request, benefits $benefits)\n {\n //\n }", "public function updateTwitter($id, $name, $email, $avatar, $profile);", "public function update($member_id, $education_id)\n\t{\n\t\t$user = User::current();\n\n\t\tif (!Member::canUseResource($user->member_id, $member_id))\n\t\t{\n\t\t\treturn Response::json(array(\n\t\t\t\t\"message\" => \"Not authroized to use this resource.\"\n\t\t\t), 403);\n\t\t}\n\n\t\t$validator = Validator::make(\n\t\t\tarray(\n\t\t\t\t\"degree\" => Input::get(\"degree\"),\n\t\t\t\t\"start_year\" => Input::get(\"start_year\"),\n\t\t\t\t\"finish_year\" => Input::get(\"finish_year\"),\n\t\t\t\t\"status\" => Input::get(\"status\")\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"degree\" => \"required|in:none,elementary,intermediate,secondary,diploma,licentiate,bachelor,master,doctorate\",\n\t\t\t\t\"start_year\" => \"numeric\",\n\t\t\t\t\"finish_year\" => \"numeric\",\n\t\t\t\t\"status\" => \"in:ongoing,finished,pending,dropped\"\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Response::json(array(\n\t\t\t\t\"message\" => \"Bad request.\"\n\t\t\t), 400);\n\t\t}\n\n\t\t// Check if the education does exist.\n\t\t$education = MemberEducation::where(\"member_id\", \"=\", $member_id)->where(\"id\", \"=\", $education_id)->first();\n\n\t\tif (is_null($education))\n\t\t{\n\t\t\treturn Response::json(array(\n\t\t\t\t\"message\" => \"Bad request.\"\n\t\t\t), 400);\n\t\t}\n\n\t\t$major = Input::get(\"major\");\n\t\t$finish_year = Input::get(\"finish_year\");\n\n\t\t// Check if the major is not empty.\n\t\tif (!empty($major))\n\t\t{\n\t\t\t$found_major = EducationMajor::where(\"name\", \"=\", $major)->first();\n\n\t\t\tif (is_null($found_major))\n\t\t\t{\n\t\t\t\t// Create a major.\n\t\t\t\t$found_major = EducationMajor::create(array(\"name\" => $major));\n\t\t\t\t$major_id = $found_major->id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$major_id = $found_major->id;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$major_id = null;\n\t\t}\n\n\t\t// If finish year is there, then status is finished.\n\t\t$status = is_null(Input::get(\"status\")) ? \"ongoing\" : Input::get(\"status\");\n\n\t\tif (!empty($finish_year) and !in_array($status, array(\"dropped\", \"pending\")))\n\t\t{\n\t\t\t$status = \"finished\";\n\t\t}\n\n\t\t// Update the education of the member.\n\t\t$education->update(\n\t\t\tarray(\n\t\t\t\t\"degree\" => Input::get(\"degree\"),\n\t\t\t\t\"major_id\" => $major_id,\n\t\t\t\t\"start_year\" => Input::get(\"start_year\"),\n\t\t\t\t\"finish_year\" => $finish_year,\n\t\t\t\t\"status\" => $status\n\t\t\t)\n\t\t);\n\n\t\t// Done.\n\t\treturn Response::json(\n\t\t\t$education->with(\"major\")->first()\n\t\t, 200);\n\t}", "public function editOwnProduct($editProductName, $editProductDescription, $editProductImage, $editProductQuantity, $editProductPrice, $productId) {\n\n $query = $this->db->prepare(\"UPDATE `products` SET `product_name` = ?, `product_description` = ?, `product_image_url` = ?, `product_quantity` = ?, `product_price` = ? WHERE `product_id` = ?\");\n\n $query->bindValue(1, $editProductName);\n $query->bindValue(2, $editProductDescription);\n $query->bindValue(3, $editProductImage);\n $query->bindValue(4, $editProductQuantity);\n $query->bindValue(5, $editProductPrice);\n $query->bindValue(6, $productId);\n\n\n try {\n\n $query->execute();\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function update(Request $request, $id){\n\t\tif(Auth::check()){\n\t\t\t$user=Auth::user();\n\t\t\tif($user->isSiteAdmin()){\n\t\t\t\t$material = Material::find($id);\n\t\t\t\tif($material!=null){\n\n\t\t\t\t\t$material->name_material=htmlentities($request->name_material);\n\t\t\t\t\t$material->desc_material=htmlentities($request->desc_material);\n\t\t\t\t\t$material->category_material=htmlentities($request->category_material);\n\t\t\t\t\t$material->save();\n\n\t\t\t\t\treturn response()->json(['success'=>'The material \"'.$material->name_material.'\" has been successfully edited.']);\n\t\t\t\t}else{\n\t\t\t\t\treturn response()->json(['error'=>'This material does not exist.']);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn response()->json(['error','You do not have enough rights to do this.']);\n\t\t\t}\n\t\t}else{\n\t\t\treturn response()->json(['error','Please log in to perform this action.']);\n\t\t}\n\t}" ]
[ "0.5581976", "0.5335638", "0.53172725", "0.52907616", "0.5290178", "0.5155959", "0.515062", "0.48143467", "0.4772426", "0.44108874", "0.43712515", "0.43461618", "0.43171805", "0.43101802", "0.4273523", "0.41690072", "0.4148936", "0.40132076", "0.39652237", "0.39278132", "0.3894538", "0.38854316", "0.38814345", "0.38795248", "0.38663375", "0.3861784", "0.38397184", "0.38269648", "0.37947592", "0.37926772" ]
0.6915177
0
Operation listsPurposePurposeIdDelete Deletes a Purpose specified by purposeId.
public function listsPurposedelete($purpose_id) { $deleted_purpose = Purpose::destroy($purpose_id); if($deleted_purpose){ return response()->json(['msg' => 'Deleted Purpose']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsPurposeByIdget($purpose_id)\r\n {\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n return response()->json($purpose,200);\r\n }", "public function listsPurposeput($purpose_id)\r\n {\r\n $input = Request::all();\r\n $purpose = Purpose::findOrFail($purpose_id);\r\n $purpose->update(['name' => $input['name']]);\r\n if($purpose->save()){\r\n return response()->json(['msg' => 'Update Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Purpose');\r\n }\r\n }", "public function destroy($id)\n {\n $visit_purpose=VisitPurpose::find($id);\n $visit_purpose->delete();\n return redirect('admin/visit_purpose')->with('success','Visitor Purpose deleted successfully!');\n }", "public function listsPurposepost()\r\n {\r\n $input = Request::all();\r\n $new_purpose = Purpose::create($input);\r\n if($new_purpose){\r\n return response()->json(['msg' => 'Added a new Purpose']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Purpose');\r\n }\r\n }", "public function deleteTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->delete(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }", "public function deleteTasksIDMembersID($user_id, $task_id, $zap_trace_span = null)\n {\n $this->deleteTasksIDMembersIDWithHttpInfo($user_id, $task_id, $zap_trace_span);\n }", "public static function delete($profile_id) {\n $db = Db::instance(); // create db connection\n $q = sprintf(\"DELETE FROM members WHERE `profile_id` = %d;\",\n $profile_id\n );\n $result = $db->query($q); // execute query\n }", "public function delete($id_setting);", "public function setCompactPurpose($purpose, $creq= '') {\n $this->_setCompact('purpose', $purpose.$creq);\n }", "public function listsPurposeget()\r\n {\r\n $response = Purpose::all();\r\n return response()->json($response,200);\r\n }", "public function deleteEducation(int $educationID)\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new EducationDAO($dbObj);\n return $this->DAO->deleteEducation($educationID);\n }", "public function editPurposePage($id){\n $editableRecord=HPP::find($id);\n return view('Admin.HistoryPlanPurpose.Purpose.EditPurpose',compact('editableRecord'));\n }", "public function delete($itemId, $attachmentId, $optParams = array())\n {\n $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params));\n }", "public function delete($idPersonas);", "public function deleteWebAuthnCredential($id)\n {\n return $this->start()->uri(\"/api/webauthn\")\n ->urlSegment($id)\n ->delete()\n ->go();\n }", "public function delete($idAttrEam);", "public function deleteTechnique ($id) {\n\t\t$this->technique->deleteTechnique($id);\n\t\tredirect(base_url('admin/techniques'));\n\t}", "public function delete($material_id){\r\n\t\t$sql = 'DELETE FROM material WHERE material_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($material_id);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "public function delete_about($id)\n {\n if($this->About_model->aboutmon_soft_delete($id)){\n $data['success'] = \"About deleted successfully\";\n }\n else{\n $data['error'] = \"About deleted not successfully\";\n }\n $this->session->set_flashdata($data);\n redirect('add_about');\n }", "public function deleting($educationType)\n {\n\t\tparent::deleting($educationType);\n\n }", "public function removeCredential($id): void;", "public function deleteAction(Request $request, UseBenefit $useBenefit)\n {\n $form = $this->createDeleteForm($useBenefit);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($useBenefit);\n $em->flush();\n }\n\n return $this->redirectToRoute('usebenefit_index');\n }", "public function deleteEducationById($id)\n {\n $this->db->setStatement(\"DELETE FROM t:bildungsgaenge WHERE Bildungsgang_Id = :id \");\n $this->db->bindParameter(\"id\", \"i\", $id);\n return $this->db->pdbquery();\n }", "public function actionDeleteUserProfile() {\n\t\t$id = $_REQUEST['UserProfile']['id'];\n\t\tif( true == $this->loadModel( $id )->delete() ) {\n\t\t\t// success message\n\t\t\t//parent::sendResponse( 'Deleted successfully' ); \n\t\t\t$str = 'Deleted successfully';\n\t\t} else {\n\t\t\t//parent::errorMessage( 'Failed to delete.' );\n\t\t\t$str = 'Failed to delete.';\n\t\t}\n\t\t\treturn $str;\n\t}", "public function delete($id_materi);", "public function deleteProfile($profile);", "public function deleteBucketsIDMembersID($user_id, $bucket_id, $zap_trace_span = null)\n {\n $this->deleteBucketsIDMembersIDWithHttpInfo($user_id, $bucket_id, $zap_trace_span);\n }", "public function getPaymentPurposeCode()\n {\n return $this->paymentPurposeCode;\n }", "public function DeleteAllCharacteristicsAsId() {\n\t\t\tif ((is_null($this->intIdcharacteristic)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateCharacteristicAsId on this unsaved Characteristic.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Characteristic::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Characteristic::LoadArrayByCharacteristicIdcharacteristic($this->intIdcharacteristic) as $objCharacteristic) {\n\t\t\t\t\t$objCharacteristic->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`characteristic`\n\t\t\t\tWHERE\n\t\t\t\t\t`characteristic_idcharacteristic` = ' . $objDatabase->SqlVariable($this->intIdcharacteristic) . '\n\t\t\t');\n\t\t}", "function delete_role_descr($role_id) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__); \n\ttry\n\t{\n\t\t// Sql String\n\t\t$sqlString = \"DELETE FROM role_descr\n\t\t\t\tWHERE role_id = ?\";\n\t\t\t\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\t\n\t\t$stmt->bind_param(\"i\", $role_id );\n\t\t$stmt->execute();\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error deleting role_descr, role ids: \" . $role_id ; \n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}" ]
[ "0.6225812", "0.5837221", "0.5303401", "0.48656195", "0.46778572", "0.4553216", "0.45179752", "0.4448132", "0.44370958", "0.4420927", "0.43867105", "0.43851662", "0.43699095", "0.43286422", "0.43195283", "0.43092737", "0.42856225", "0.42844808", "0.42735502", "0.42651784", "0.42537746", "0.42329374", "0.42010254", "0.4189613", "0.41858363", "0.4170683", "0.4168471", "0.4163234", "0.4157712", "0.41451418" ]
0.77415115
0
Operation listsWhostageWhostageIdGet Fetch a list of WHO stages specified by whostageId.
public function listsWhostageByIdget($whostage_id) { $who = whostage::findOrFail($whostage_id); return response()->json($who,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStagesForWS() {}", "public function listsWhostagedelete($whostage_id)\r\n {\r\n $deleted_who = whostage::destroy($whostage_id);\r\n if($deleted_who){\r\n return response()->json(['msg' => 'Deleted who stage']);\r\n }\r\n }", "public function listsWhostageget()\r\n {\r\n $response = Whostage::all();\r\n return response()->json($response,200);\r\n }", "public function listsWhostageput($whostage_id)\r\n {\r\n $input = Request::all();\r\n $who = whostage::findOrFail($whostage_id);\r\n $who->update(['name' => $input['name']]);\r\n if($who->save()){\r\n return response()->json(['msg' => 'Update who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the whostage');\r\n }\r\n }", "public function listsWhostagepost()\r\n {\r\n $input = Request::all();\r\n $new_who = whostage::create($input);\r\n if($new_who){\r\n return response()->json(['msg' => 'Added a new who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the whostage');\r\n }\r\n }", "public function getStagesForWSUser() {}", "public function getWages()\n {\n //call getWages method from TravelWarrantRepository to get wages\n $wages = $this->repo->getWages();\n\n //if response status = '0' show error page\n if ($wages['status'] == 0)\n {\n return view('errors.500');\n }\n\n return view('app.travelWarrants.wages.list', ['wages' => $wages['data']]);\n }", "public function get_warehouses($id){\n\n if(\\Gate::any(['isSuperAdmin', 'isCompanyCEO', 'isAccountant'])){\n\n //Query Builder is 10x faster than Eloquent ORM.\n $warehouses = DB::table('warehouse')\n ->where(\"company_id\", $id)\n ->pluck(\"id\", \"name\");\n\n return json_encode($warehouses);\n\n } else {\n return abort(403, 'Sorry you cannot view this page');\n }\n }", "public function getVoyagesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $voyages = $em->getRepository('SiteBundle:Voyage')->findAll();\n\n return array('voyages' => $voyages);\n }", "function get_wht($pl_id)\n {\n return $this->db->where(['delivery_id' => $pl_id])->get('sales_delivery_whtax')->row_array();\n }", "public function findWeekHours($employeeId, $weekDate)\r\n {\r\n return array();\r\n }", "public function wlistAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n\n if ($type == \"MASTER\") {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.bill IS NOT NULL')\n ->andwhere('g.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = $em->getRepository('NvCargaBundle:Agency')->findByMaincompany($maincompany);\n } else {\n $entities = $em->getRepository('NvCargaBundle:Guide')->createQueryBuilder('g')\n ->where('g.agency = :ag' )\n ->andwhere('g.bill IS NOT NULL')\n ->setParameters(array('ag' => $agency))\n ->orderBy('g.creationdate', 'DESC')\n ->setMaxResults(200)\n ->setFirstResult(0)\n ->getQuery()\n ->getResult();\n $agencies = null;\n }\n return array(\n 'entities' => $entities,\n 'agencies' => $agencies,\n );\n }", "public function companyWorklogsReporting($company_id)\n {\n //\n // by developer\n //\n // by hours\n\n $worklogs_segmented_by_proj = [];\n $company_projects = $this->getCompanyProjects($company_id);\n\n error_log(\">>> \".count($company_projects).json_encode($company_projects));\n\n foreach ($company_projects as $ndx => $company_project)\n {\n $worklogs_by_user = Werklog::with('user')\n ->selectRaw('user_id, COUNT(user_id) as user_occurrences, SUM(minutes) as user_project_total_time')\n ->where('project_id', $company_project->id)\n ->groupBy('user_id')\n ->orderBy('user_project_total_time', 'DESC')\n ->take(static::$_numrows)\n ->get();\n\n $worklogs_segmented_by_proj[$company_project->id] = $worklogs_by_user;\n }\n\n Debugbar::info($worklogs_segmented_by_proj);\n\n return $worklogs_segmented_by_proj;\n }", "public function getHabboBadges($habboId);", "public function getAll($companyId)\n {\n $tenantId = $this->requester->getTenantId();\n\n return\n DB::table('workflows')\n ->select(\n 'workflows.id',\n 'workflows.lov_wfty as lovWfty',\n 'workflows.is_default as isDefault',\n 'workflows.unit_code as unitCode',\n 'workflows.employee_id as employeeId',\n 'wfty.val_data as valData'\n )\n ->join('lovs as wfty', function ($join) use ($companyId, $tenantId) {\n $join->on('wfty.key_data', '=', 'workflows.lov_wfty')\n ->where([\n ['wfty.lov_type_code', 'WFTY'],\n ['wfty.tenant_id', $tenantId],\n ['wfty.company_id', $companyId]\n ]);\n })\n ->where([\n ['workflows.tenant_id', $this->requester->getTenantId()],\n ['workflows.company_id', $companyId],\n ['wfty.tenant_id', $this->requester->getTenantId()],\n ['wfty.company_id', $companyId]\n ])\n ->get();\n }", "public function actionGetWard($id)\n {\n $avaliableLga = Lga::findOne(['lga_id'=>$id]);\n $lgaName = $avaliableLga->lga_name; // We use this to track down the lga_name\n\n //////////////////////////////////////\n //////////////////////////////////////\n\n $PDP = $DPP = $ACN = $PPA = $CDC = $JP = $ANPP = $LABOUR = $CPP = 0;\n\n //////////////////////////////////////\n //////////////////////////////////////\n\n // We get the Ward Count\n $countWard = Ward::find()\n ->where(['lga_id'=>$id])\n ->count();\n\t\n\t\t// We get the Ward Content\n $avaliableWard = Ward::find()\n ->where(['lga_id'=>$id])\n ->all();\n\n // Looping through the Ward data\n foreach ($avaliableWard as $key) {\n\n \t\t$wardUniqueId = $key->ward_id;\n\n\t // We get the PollingUnit Count\n\t $countPollingUnit = PollingUnit::find()\n\t ->where(['ward_id'=>$wardUniqueId])\n\t ->count();\n\n\t // We get the PollingUnit Content\n\t $avaliablePollingUnit = PollingUnit::find()\n\t ->where(['ward_id'=>$wardUniqueId])\n\t ->all();\n\n \t\t// Looping through the PollingUnit data\n\t foreach ($avaliablePollingUnit as $key) {\n\n\t\t \t\t$pollUniqueId = $key->ward_id;\n\n\t\t\t // We get the AnnouncedPuResults Count\n\t\t\t $countPollingUnit = AnnouncedPuResults::find()\n\t\t\t ->where(['polling_unit_uniqueid'=>$wardUniqueId])\n\t\t\t ->count();\n\n\t\t\t // We get the AnnouncedPuResults Content\n\t\t\t $avaliablePollingUnit = AnnouncedPuResults::find()\n\t\t\t ->where(['polling_unit_uniqueid'=>$wardUniqueId])\n\t\t\t ->all();\n\n\t\t\t foreach ($avaliablePollingUnit as $key) {\n $loadPartyName = $key->party_abbreviation;\n\n // We are collating the score for each party using the party name\n //if ($partyName == $partyName[$key->party_abbreviation]) {\n// 'a'=>'PDP','b'=>'DPP','c'=>'ACN','d'=>'PPA','e'=>'CDC','f'=>'JP','g'=>'ANPP','LABOUR'=>'LABOUR','CPP'=>'CPP'\n\n if($loadPartyName == 'PDP'){\n $PDP = $PDP + $key->party_score;\n\n }elseif($loadPartyName == 'DPP'){\n $DPP = $DPP + $key->party_score;\n\n }elseif($loadPartyName == 'ACN'){\n $ACN = $ACN + $key->party_score;\n\n }elseif($loadPartyName == 'PPA'){\n $PPA = $PPA + $key->party_score;\n\n }elseif($loadPartyName == 'CDC'){\n $CDC = $CDC + $key->party_score;\n\n }elseif($loadPartyName == 'JP'){\n $JP = $JP + $key->party_score;\n\n }elseif($loadPartyName == 'ANPP'){\n $ANPP = $ANPP + $key->party_score;\n\n }elseif($loadPartyName == 'LABO'){\n $LABOUR = $LABOUR + $key->party_score;\n\n }elseif($loadPartyName == 'CPP'){\n $CPP = $CPP + $key->party_score;\n }\n\t\t\t }\n\t }\n }\n\n // Displaying the result of our Vote in the local goverment\n ?>\n <option style=\"font-size: 30px;\"> <?= $lgaName ?> LGA </option>\n <option style=\"font-size: 20px;\"> PDP &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $PDP ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> DPP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $DPP ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> ACN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $ACN ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> PPA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $PPA ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> CDC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $CDC ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> JP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $JP ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> ANPP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $ANPP ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> LABOUR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $LABOUR ;?> </option> <hr/>\n <option style=\"font-size: 20px;\"> CPP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?= $CPP ;?> </option>\n <?php\n }", "public function index(int $board_id)\n {\n $professions = $this->professionRepository\n ->pushCriteria(new ByBoardIdCriteria($board_id))\n ->all();\n\n return response()->json(compact('professions'));\n }", "function getWines() {\n\t\t$wines = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/wines.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $wines;\n\t}", "function getRoutesWithStage($stop_id){\n\t\t\t$routes_stops_ids = query(\"SELECT `route_id` FROM `tbl_route_stops` WHERE `stop_id` = ?\", $stop_id);\n\t\t\tforeach ($routes_stops_ids as $key => $routes_stops_id) {\n\t\t\t\t$routes_stops[] = $this->getRoute($routes_stops_id['route_id']);\n\t\t\t}\n\t\t\treturn $routes_stops;\n\t\t}", "function GetWPContentByid_wph($id,&$wpHeader,&$nWP) { // id, wp_Name, get1, get2, get3, lang\n\t\t$SQLStrQuery=\"CALL GetWPContentByid_wph($id)\"; //\"SELECT * FROM WPSContent WHERE id_wph=\".$id.\" ORDER BY sec\";\n\t\tSQLQuery($rPointer,$nWP,$SQLStrQuery,true);\n\t\tConvertPointerToArray($rPointer,$wpHeader,$nWP,6);\n\t}", "public static function Rechercher_Stages(){\n\t\t \t//connexion à la base de données\n\t\t \t$oMysqliLib = new MySqliLib();\n\t\t \t//requête de recherche du Document\n\t\t \t$sRequete = \"SELECT * FROM stages\";\t\t \t\t\n\t\t \t\n\t\t \t//exécuter la requête\n\t\t \t$oResult = $oMysqliLib->executer($sRequete); \n\t\t \t//récupérer le tableau des enregistrements\n\t\t \t$aStage= $oMysqliLib->recupererTableau($oResult);\n\t\t\t\n\t\t \t//retourner array contenant les stages\n\t\t \treturn $aStage;\t\n\t\t }", "public function findHostGroups(?int $hostId): array;", "protected function getWarehouses()\n {\n $amount = $this->warehouseRepository->getCollection();\n\n\n if (isset($_GET[\"w1\"]) && isset($_GET[\"w2\"])) {\n // Put the two words together with a space in the middle to form \"hello world\"\n $hello = $_GET[\"w1\"] . \" \" . $_GET[\"w2\"];\n\n\n // Print out some JavaScript with $hello stuck in there which will put \"hello world\" into the javascript.\n\n echo \"<script language='text/javascript'>function sayHiFromPHP() { alert('Just wanted to say $hello!'); }</script>\";\n\n }\n\n\n $allOptions = [];\n\n for($i=0; $i<count($amount); $i++){\n\n $opt_val['value'] = $amount[$i][\"warehouse_name\"];\n $opt_val['label'] = $amount[$i][\"warehouse_name\"];\n\n $allOptions[] = $opt_val;\n }\n\n return $allOptions;\n\n }", "public function get_holidays($id = '*') {\n $loc_holdidays = Yii::app()->db->createCommand()\n ->select('l.loc_name, h.hol_name, h.hol_description, h.hol_date')\n ->from('shop_control.shop_holidays sh, locations l, holidays h')\n ->where('l.loc_id = sh.loc_id and sh.hol_id = h.hol_id')\n ->queryAll();\n\n return $loc_holdidays;\n }", "public function index()\n {\n $stages = Stage::all();\n return view('stages.index', compact('stages'));\n }", "public function getHouseDetails($h_id)\r\n\t\t{\r\n\t\t\t$link = $this->connect();\r\n\t\t\t$hquery = \"SELECT house_id, \r\n\t\t\t\t\t\t\thouse_no, \r\n\t\t\t\t\t\t\thouse_name,\r\n\t\t\t\t\t\t\tfunction,\r\n\t\t\t\t\t\t\tloc_id\r\n\t\t\t\t\t\tFROM house \r\n\t\t\t\t\t\tWHERE house_id = '\" . $h_id . \"'\";\r\n\t\t\t$hresult = mysqli_query($link, $hquery);\r\n\t\t\t$house = array();\r\n\t\t\t$arr_house = array();\r\n\t\t\twhile ($row = mysqli_fetch_row($hresult)) {\r\n\t\t\t\t\t$house['h_id'] = $row[0];\r\n\t\t\t\t\t$house['h_no'] = $row[1];\r\n\t\t\t\t\t$house['h_name'] = $row[2];\r\n\t\t\t\t\t$house['fxn'] = $row[3];\r\n\t\t\t\t\t$house['loc_id'] = $row[4];\r\n\t\t\t\t\t$arr_house[] = $house;\r\n\t\t\t}\r\n\r\n\t\t\treturn $arr_house;\r\n\t\t\r\n\t\t\t\r\n\t\t}", "public function actionGetOpenHours($entity_id)\n {\n return OpenHours::find()->where(['entity_id' => $entity_id])->select(['id', 'week_day', 'from', 'to'])->all();\n }", "public function getHouseListAttribute(){\n return $this->houses->lists('id')->all();\n }", "public function getPBByJobId($jobId)\n {\n $job = $this->jobRepo->getById($jobId);\n $boards = $job->productionBoards()->withPivot('archived')->get();\n\n return ApiResponse::success(\n $this->response->collection($boards, function ($board) {\n\n return [\n 'id' => $board->id,\n 'name' => $board->name,\n 'archived' => $board->pivot->archived,\n ];\n })\n );\n }", "public function getWarehouseList() {\n $options = array();\n $warehouses = Mage::getModel('inventoryplus/warehouse')->getCollection();\n foreach ($warehouses as $warehouse) {\n $options[$warehouse->getId()] = $warehouse->getWarehouseName();\n }\n\n return $options;\n }" ]
[ "0.55258244", "0.5523922", "0.5503421", "0.5457933", "0.49940598", "0.4911607", "0.4903028", "0.47981906", "0.47752404", "0.47171038", "0.4649371", "0.45274565", "0.45258468", "0.45038968", "0.4496387", "0.44916633", "0.44252717", "0.4406184", "0.44060498", "0.44015968", "0.43759665", "0.43680844", "0.4360194", "0.4228207", "0.4222508", "0.42190826", "0.42181674", "0.42082125", "0.41914564", "0.4190053" ]
0.66442186
0
Operation listsWhostageWhostageIdPut Update an existing Who Stage.
public function listsWhostageput($whostage_id) { $input = Request::all(); $who = whostage::findOrFail($whostage_id); $who->update(['name' => $input['name']]); if($who->save()){ return response()->json(['msg' => 'Update who stage']); }else{ return response('Oops, it seems like there was a problem updating the whostage'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Warehouse $warehouse, Request $request)\n {\n if ($request->isMethod('put')) {\n $Satff = new Warehouse();\n return $Satff->updateData($request->all(), $warehouse);\n }\n }", "public static function updateWaterBill(Property $property, BillWaterSourceDetail $water_bill, AddEditWaterBillRequest $request)\n {\n \tDB::beginTransaction();\n\n \t$water_bill->consumption = str_replace(',','',$request->get('consumption'));\n \t$water_bill->bill = str_replace(',','',$request->get('bill'));\n \t$water_bill->payment = str_replace(',','',$request->get('payment'));\n \t$water_bill->date_payment = $request->get('date_payment');\n \t$water_bill->remarks = $request->get('remarks');\n \t$return[\"success\"] = $water_bill->touch();\n\n \tif($return[\"success\"]) {\n \t\tDB::commit();\n \t} else {\n \t\tDB::rollback();\n \t}\n\n \treturn $return;\n }", "public function update(Request $request, Swp $swp)\n {\n $attributes = $this->validateSwp();\n\n if(isset($request->swp_status_id) && !empty($request->swp_status_id)) {\n $attributes['swp_status_id'] = 2; \n } else if ($swp->swp_status_id == 2){\n $attributes['swp_status_id'] = 0; \n }\n\n $attributes['updated_by'] = auth()->id();\n\n $result = $swp->update($attributes);\n\n return response()->json($result);\n }", "public function update(UpdateRequest $request, warehouse $warehouse)\n {\n if (auth()->user()->can('warehouse.view', $warehouse)) {\n $warehouse->name_en = $request->name;\n $warehouse->name_ar = $request->name_ar;\n $warehouse->location_en = $request->location;\n $warehouse->location_ar = $request->location_ar;\n $warehouse->shipping_price = $request->shipping_price;\n $warehouse->save();\n $this->updateRelatedLocations($request, $warehouse);\n return redirect()->route('warehouses.index')->with('status', trans('Updated Successfully'));\n }\n abort(403);\n }", "public function update(Request $request, Stage $stage)\n {\n $messages = [\n 'required' => 'Поле :attribute обязательно к заполнению.',\n 'numeric' => 'Поле :attribute должно быть числом',\n ];\n\n $this->validate(\n $request,\n [\n 'name' => 'required|string|min:1',\n 'sort' => 'required|numeric',\n ],\n $messages\n );\n\n if ($request->active) {\n $active = 1;\n } else {\n $active = 0;\n }\n\n $stage->name = $request->name;\n $stage->sort = $request->sort;\n $stage->active = $active;\n\n $stage->save();\n\n return redirect(\n route('stages.index')\n )->with('status', 'Успешно обновлено');\n }", "public function update(Request $request, $id)\n {\n //\n $warehouse = Warehouse::findOrFail($id);\n $warehouse->warehouse_name = $request->warehouse_name;\n $warehouse->warehouse_detalls = $request->warehouse_detalls;\n \n $warehouse->location_id = $request->location_id;\n\n $warehouse->is_active = $request->is_active;\n\n\n if($warehouse->save())\n {\n return new WarehouseResource($warehouse);\n }\n }", "public function update(Request $request, ItemWastage $itemwise_offer, $id)\n {\n \n $itemwastage = ItemWastage::find($id);\n $itemwastage->location_id = $request->location_id;\n $itemwastage->entry_date = date(\"Y-m-d\", strtotime($request->entry_date));\n $itemwastage->item_id = $request->item_id;\n $itemwastage->quantity = $request->_quantity;\n $itemwastage->remark = $request->remark;\n $itemwastage->created_by = 0;\n $itemwastage->updated_by = 0;\n\n if ($itemwastage->save()) {\n return Redirect::back()->with('success', 'Successfully Updated');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }", "public function update(Request $request, VwPerson $vwPerson)\n {\n //\n }", "public function update(Request $request, Wear $wear)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'stage_name' => 'required|string|max:255',\n 'theme_id' => 'required|exists:themes,id',\n ]);\n\n $Stage = Stage::find($id);\n $Stage->stage_name = $request->input('stage_name');\n $Stage->theme_id = $request->input('theme_id');\n $Stage->save();\n\n return redirect()->route('teacher_stage');\n }", "public function update(Request $request, WasteProduct $wasteProduct)\n {\n //\n }", "public function listsWhostagepost()\r\n {\r\n $input = Request::all();\r\n $new_who = whostage::create($input);\r\n if($new_who){\r\n return response()->json(['msg' => 'Added a new who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the whostage');\r\n }\r\n }", "public function update(Request $request, Voyage $voyage)\n {\n $voyage->label = $request->label;\n $voyage->description = $request->description;\n $voyage->country = $request->country;\n $voyage->period = $request->period;\n $voyage->save();\n\n return redirect()->route('voyages.index');\n }", "public function update(Request $request, $id, WarehousesRequest $warehousesRequest)\n {\n $warehouse = Warehouse::find($id);\n\n $warehouse->country_id = Auth::user()->country_id;\n $warehouse->name = $request->nombre;\n $warehouse->sap_code = !empty($request->sap_code) ? $request->sap_code : 0;\n $warehouse->modified_by = Auth::user()->id;\n $warehouse->estatus = $request->estatus;\n $warehouse->save();\n\n\n\n\n return response()->json($warehouse);\n }", "public function update(Request $request, absensiswa $absensiswa)\n {\n //\n }", "public function setW($dw) {}", "public function update(Request $request)\n {\n $this->validate($request, [\n 'mission' => 'required',\n 'vision' => 'required',\n 'story' => 'required',\n 'sponsor'=> 'array',\n 'sponsor.*'=> 'integer'\n /*'founder' => 'required',\n 'college' => 'required|integer',\n 'date_of_foundation' => 'required|date'*/\n ]);\n $hih = \\App\\HIH::first();\n \\App\\HIHSponsors::truncate();\n if($request->input('sponsor')){\n foreach ($request->input('sponsor') as $sponsor) {\n $HIHSponsor = new \\App\\HIHSponsors;\n $HIHSponsor->sponsor_id = $sponsor;\n $HIHSponsor->save();\n }\n }\n \\App\\Highboard::truncate();\n if($request->input('highboard')){\n foreach ($request->input('highboard') as $highboard) {\n $Highboard = new \\App\\Highboard;\n $Highboard->member_id = $highboard;\n $Highboard->save();\n }\n }\n $hih->mission = $request->input('mission');\n $hih->vision = $request->input('vision');\n $hih->story = $request->input('story');\n $hih->save();\n\n return redirect('/aboutus')->with('success', 'The Hand In Hand\\'s information has been updated.');\n }", "public function actionWarehouseAdminSave()\n {\n $request = Yii::$app->request->post();\n $infoWarehouse = '';\n\n if($request){\n $infoWarehouse = Warehouse::find()\n ->where(['_id'=>new ObjectID($request['id'])])\n ->one();\n\n $userId = [];\n if(!empty($request['idUsers'])){\n foreach($request['idUsers'] as $item){\n $userId[] = $item;\n }\n }\n $infoWarehouse->idUsers = $userId;\n\n\n $infoWarehouse->headUser = ($request['headUser'] !== 'placeh' ? new ObjectID($request['headUser']) : '');\n\n $infoWarehouse->responsible = ($request['responsible'] !== 'placeh' ? new ObjectID($request['responsible']) : '');\n\n\n if($infoWarehouse->save()){\n $error = [\n 'typeAlert' => 'success',\n 'message' => 'Сохранения применились.',\n ];\n\n } else {\n $error = [\n 'typeAlert' => 'danger',\n 'message' => 'Сохранения не применились, что то пошло не так!!!',\n ];\n }\n\n\n } else {\n $error = [\n 'typeAlert' => 'danger',\n 'message' => 'Сохранения не применились, что то пошло не так!!!',\n ];\n }\n\n return $this->renderPartial('_update-users-warehouse',[\n 'language' => Yii::$app->language,\n 'infoWarehouse' => $infoWarehouse,\n 'error' => $error\n ]);\n }", "function update_week(){\n\t\t$time = array('id'=>1, 'ending_date' => date('Y-m-d'));\n\t\treturn $this->save($time);\n\t}", "public function updateAction($id) {\n parse_str(file_get_contents('php://input'),$_PUT);\n $wine = $_PUT;\n $sql = \"UPDATE wines SET name=:name, grapes=:grapes, country=:country, region=:region, year=:year, description=:description, picture=:picture WHERE id=:id\";\n try {\n $db = $this->dbh;\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"name\", $wine['name']);\n $stmt->bindParam(\"grapes\", $wine['grapes']);\n $stmt->bindParam(\"country\", $wine['country']);\n $stmt->bindParam(\"region\", $wine['region']);\n $stmt->bindParam(\"year\", $wine['year']);\n $stmt->bindParam(\"description\", $wine['description']);\n $stmt->bindParam(\"picture\", $wine['picture']);\n $stmt->bindParam(\"id\", $id);\n $stmt->execute();\n $db = null;\n echo json_encode($wine);\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n }", "public function update($shoe){\n if(auth()->user()->role != 1){\n abort(401);\n }\n\n $data = request()->validate([\n 'name' => 'required',\n 'price' => 'required|min:100|numeric',\n 'description' => 'required',\n 'image' => 'image',\n ]);\n\n if(request('image')){\n $imagePath = request('image')->store('images', 'public');\n }\n else {\n $imagePath = request('oldImage');\n }\n\n Shoe::find($shoe)->update([\n 'name' => $data['name'],\n 'price' => $data['price'],\n 'description' => $data['description'],\n 'image' => $imagePath\n ]);\n\n return redirect('/shoes');\n }", "public function update(Request $request, Wish $wish)\n {\n if(Auth::user()->admin){\n $wish->wish_name = $request->name;\n $wish->description = $request->description;\n $wish->price = $request->price;\n $wish->url = $request->url;\n $wish->push();\n return redirect('/wish/'.$wish->id);\n }else if(Auth::user()->id == $wish->uuid){\n $wish->wish_name = $request->name;\n $wish->description = $request->description;\n $wish->price = $request->price;\n $wish->url = $request->url;\n $wish->push();\n return redirect('/wish/'.$wish->id);\n }else{\n return redirect('/');\n }\n }", "public function update(Request $request, Cow $cow)\n {\n $this->validate($request, [\n 'name' => 'required|max:50',\n ]);\n\n $cow->update($request->only(['name']));\n\n// $milkOutputs = $cow->milkOutputs()->get();\n//\n// if (count($milkOutputs)) {\n// foreach($milkOutputs as $milkOutput) {\n// $milkOutput->update($request->only('milk_output', 'cow_id'));\n// }\n// }\n\n return new CowResource($cow);\n }", "public function update($id, CreateSowing $request)\n\t{\n\t\t$sowing = Sowing :: findOrFail($id);\n\t\t$sowing->update($request->all());\n\t\t\n\t\treturn redirect('sowings/' . $sowing->year);\n\t}", "public function update(Request $request, Wilaya $wilaya)\n {\n //\n }", "public function update(){\r\n $query = DB::connection()->prepare('\r\n UPDATE Wine\r\n SET name=:name, \r\n region=:region, \r\n winetext=:winetext,\r\n type=:type\r\n WHERE id=:id');\r\n $query->execute(array(\r\n 'id' => $this->id,\r\n 'name' => $this->name, \r\n 'region' => $this->region, \r\n 'winetext' => $this->winetext, \r\n 'type' => $this->type));\r\n }", "protected function updateRelatedLocations(Request $request, $warehouse)\n {\n $warehouse->related_locations()->delete();\n $related_locations = explode(',', $request->related_locations);\n foreach ($related_locations as $location) {\n $warehouse->related_locations()->create(['location_name' => $location]); \n }\n }", "public function update(Request $request, Woman $woman)\n {\n //\n }", "public function update($id, UpdateIWomenPostAudioRequest $request)\n\t{\n\t\t$iWomenPostAudio = $this->iWomenPostAudioRepository->find($id);\n\n\t\tif(empty($iWomenPostAudio))\n\t\t{\n\t\t\tFlash::error('IWomenPostAudio not found');\n\n\t\t\treturn redirect(route('iWomenPostAudios.index'));\n\t\t}\n\n\t\t$this->iWomenPostAudioRepository->updateRich($request->all(), $id);\n\n\t\tFlash::success('IWomenPostAudio updated successfully.');\n\n\t\treturn redirect(route('iWomenPostAudios.index'));\n\t}", "public function update(Request $request, Technology $technology)\n {\n //\n }" ]
[ "0.49598718", "0.48928046", "0.47900924", "0.47759628", "0.46762773", "0.46699008", "0.4632281", "0.45887017", "0.4574337", "0.457028", "0.4535039", "0.45296878", "0.45191395", "0.4506292", "0.442187", "0.44197288", "0.4413052", "0.44102424", "0.43998265", "0.4396451", "0.43906894", "0.43716133", "0.4370964", "0.4353913", "0.43268856", "0.43244693", "0.43219307", "0.4316302", "0.4302063", "0.42954895" ]
0.64289373
0
Operation listsWhostageWhostageIdDelete Deletes a service specified by whostageId.
public function listsWhostagedelete($whostage_id) { $deleted_who = whostage::destroy($whostage_id); if($deleted_who){ return response()->json(['msg' => 'Deleted who stage']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteServiceHebergement(int $idHebergement)\n {\n $req = $this->getBdd()->prepare('DELETE from service_propose_hebergement WHERE id_hebergement = ?');\n $req->execute(array($idHebergement));\n }", "public function deleteVoyageAction($id)\n {\n $em = $this ->getDoctrine()->getManager();\n $voyage = $em->getRepository('SiteBundle:Voyage')->find($id);\n\n $em->remove($voyage);\n $em->flush();\n }", "public function deletePrint($publicId);", "public function deleteWPOrder($deleteid) {\n global $wpdb;\n\n $delete_log_form_sql = \"SELECT * FROM `\" . WPSC_TABLE_CART_CONTENTS . \"` WHERE `purchaseid`='$deleteid'\";\n $cart_content = $wpdb->get_results( $delete_log_form_sql, ARRAY_A );\n $wpdb->query( \"DELETE FROM `\" . WPSC_TABLE_CART_CONTENTS . \"` WHERE `purchaseid`='$deleteid'\" );\n $wpdb->query( \"DELETE FROM `\" . WPSC_TABLE_SUBMITED_FORM_DATA . \"` WHERE `log_id` IN ('$deleteid')\" );\n $wpdb->query( \"DELETE FROM `\" . WPSC_TABLE_PURCHASE_LOGS . \"` WHERE `id`='$deleteid' LIMIT 1\" );\n }", "public function deleteDosage($id) {\n $dosage = Dosage::find($id);\n $this->authorize('delete', $dosage);\n DB::beginTransaction();\n try {\n $dosage->delete();\n } catch (\\Exception $e) {\n DB::rollback();\n return back()->with('error', 'The entry cannot be deleted');\n }\n DB::commit();\n return back()->with('success', 'Entry deleted successfully');\n }", "function delete_pagina_web($pagina_id)\r\n {\r\n return $this->db->delete('pagina_web',array('pagina_id'=>$pagina_id));\r\n }", "public function delete($idPersonas);", "public function deleteById($id)\n {\n return $this->wallpaperMapper->deletePage($id);\n }", "public function delete($id = 0){\r\n\t\t\t$pessoa = new Pessoa();\r\n\t\t\t$pessoa->setId($id);\r\n\t\t\t$this->pessoaModel->delete($pessoa);\r\n\t\t}", "public function delete( $id ) {\r\r\n global $wpdb;\r\r\n\r\r\n $this->refresh = true;\r\r\n\r\r\n return $wpdb->query(\r\r\n $wpdb->prepare(\"DELETE FROM \" . wd_asp()->db->table('main') . \" WHERE id=%d\", $id)\r\r\n );\r\r\n }", "public function delete($idPost);", "public function destroy(ItemWastage $item_wastage, $id)\n {\n $itemwise_offer = ItemWastage::find($id);\n if ($itemwise_offer->delete()) {\n return Redirect::back()->with('success', 'Deleted successfully');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }", "public function destroy($id)\n {\n $page = DB::table(\"page_service\")->where('id', $id)->first();\n DB::table(\"page_service\")->where('id', $id)->delete();\n return redirect('page/'. $page->page_id.'/edit');\n }", "public function deleteById($postsId);", "public function deleteMailing($pageId) {\n\t\t$page = new Page();\n\t\t$page -> deletePage($pageId);\n\t\treturn $page -> getPages(1, null, true);\n\t}", "public function delete($id) {\n throw new RestWSException('Not implemented', 501);\n\n }", "function delete_pagamentopedidopdv($idpagamentopedidomesa)\n {\n return $this->db->delete('pagamentopedidopdv',array('idpagamentopedidomesa'=>$idpagamentopedidomesa));\n }", "function delete($id) {\n Ad::deleteAd($id);\n unset($_GET['delete']);\n }", "public function actionDelete($id,$id_p)\n {\n\n $avance = $this->findModel($id);\n if($avance->archivo !== null){ unlink('juridico/' .$id_p.'/avances/'.$avance->archivo);}\n $avance->delete();\n\n return $this->redirect(['index?id_p='.$id_p]);\n }", "public function delete_page($id)\n {\n $record = LanguagePage::where('id', $id)->get()->first();\n if(!env('DEMO_MODE')) {\n $record->delete();\n }\n $response['status'] = 1;\n $response['message'] = LanguageHelper::getPhrase('record_deleted_successfully');\n return json_encode($response);\n }", "public function destroy($id)\n {\n $service = list_services::find($id);\n $service->delete();\n return redirect('services')->with('thongbao','Xóa thành công');\n }", "public function delete_age_group($agegroup_id){\n $address = AgeGroup::find($agegroup_id)->delete();\n\n return response()->json('Age Group successfully deleted', 200);\n }", "public function perma_del($id)\n {\n $create_letter = IndustryType::onlyTrashed()->findOrFail($id);\n $create_letter->forceDelete();\n\n return redirect()->route('admin.industry_type.index');\n }", "public function delete($id = -1){\n\n $delete = $this\n ->db\n ->where(\"id\",$id)\n ->delete(\"personel\");\n\n echo $delete;\n }", "public function destroy($id)\n {\n \n $lead = Lead::delete_images($this->path_image, $id);\n \n flash('Elemento borrado');\n return redirect('/admin/prospecto');\n }", "public function delete($printer_id){\r\n\t\t$sql = 'DELETE FROM printer WHERE printer_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($printer_id);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "public function perma_del($id)\n {\n $create_letter = CreateLetter::onlyTrashed()->findOrFail($id);\n $create_letter->forceDelete();\n\n return redirect()->route('admin.create_letters.index');\n }", "public function delete($id)\n {\n return Guests::find($id)->delete();\n }", "public static function delete_post( $id ) {\n\t\tglobal $wpdb;\n\n\t\t$wpdb->delete(\n\t\t\t\"{$wpdb->prefix}posts\",\n\t\t\t[ 'ID' => $id ],\n\t\t\t[ '%d' ]\n\t\t);\n\t}", "function deleteWS($wsId = 0) {\n try {\n if ($wsId != 0) {\n $this->db->delete('tbl_ws_info', array('iWSID' => $wsId));\n return 1;\n } return -1;\n } catch (Exception $ex) {\n throw new Exception('Error in deleteWS function - ' . $ex);\n }\n }" ]
[ "0.5789348", "0.5687936", "0.5552114", "0.5463275", "0.5393796", "0.538516", "0.5336639", "0.52912825", "0.52430284", "0.522825", "0.5227816", "0.51803327", "0.51697105", "0.5135002", "0.5058931", "0.5057", "0.50531226", "0.50523716", "0.50498724", "0.5043349", "0.50378984", "0.50299454", "0.50283784", "0.50280434", "0.50070417", "0.49933264", "0.49891344", "0.4982302", "0.4964466", "0.49606204" ]
0.7111662
0
///////////////////////////// Supporter functions // /////////////////////////////////////////////////////////////////////////////////// /////////////////////////// Operation listssupporterGet Fetch Supporter (for select options).
public function listsSupporterget() { $response = Supporter::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_support($limit=0) {\n\t\t$_Partner = DB::table('support')->select('id','name','phone','skype','yahoo')->where('status','=',1)->orderBy('create_time')->take($limit)->get();\t\n\t\treturn $_Partner;\n\t}", "function babeliumsubmission_get_available_exercise_list(){\n Logging::logBabelium(\"Getting available exercise list\");\n $this->exercises = $this->getBabeliumRemoteService()->getExerciseList();\n return $this->getExercisesMenu();\n }", "public function listsSupporterByIdget($supporter_id)\r\n {\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n return response()->json($supporter,200);\r\n }", "public function getSupport() {\n $pdoStat = PdoMedProjet::$conn->prepare('SELECT * FROM supports');\n $pdoStat->execute();\n return $pdoStat->fetchAll();\n }", "public function getManageFeaturedSellers()\n\t{\n\t\t$d_arr = array();\n\t\t$d_arr['pageTitle'] = trans('featuredsellers::featuredsellers.featured_sellers');\n\t\t$d_arr['allow_to_change_status'] = true;\n\t\t$user_list = $user_details = array();\n\t\t$shop_action = array('' => trans('common.select_option'), 'deactivate' => trans('admin/manageMembers.deactivate_shop'), 'activate' => trans('admin/manageMembers.activate_shop'));\n\n\t\t$is_shop_owner = array('' => trans('common.select_option'), 'Yes' => trans('common.yes'), 'No' => trans('common.no'));\n\t\t$is_allowed_to_add_product = array('' => trans('common.select_option'), 'Yes' => trans('common.yes'), 'No' => trans('common.no'));\n\t\t$status = array('' => trans('common.select_option'), 'blocked' => Lang::get('common.blocked'), 'active' => Lang::get('common.active'), 'inactive' => Lang::get('common.inactive'));\n\t\t$shop_status = array('' => trans('common.select_option'), 'active' => Lang::get('common.active'), 'inactive' => Lang::get('common.inactive'), 'inactive' => Lang::get('common.inactive'));\n\n\t\t$this->featured_sellers_service->setFeaturedSellersFilterArr();\n\t\t$this->featured_sellers_service->setFeaturedSellersSrchArr(Input::All());\n\n\t\t$q = $this->featured_sellers_service->buildFeaturedSellersQuery();\n\n\t\t$page \t\t= (Input::has('page')) ? Input::get('page') : 1;\n\t\t$start \t\t= (Input::has('start')) ? Input::get('start') : Config::get('featuredsellers::featuredsellers.featured_sellers_list_per_row');\n\t\t$perPage\t= Config::get('featuredsellers::featuredsellers.featured_sellers_list_per_row');\n\t\t$user_list \t= $q->paginate($perPage);\n\n\t\t///Get all group details\n\t\t$group_details = array();\n\t\t$groups = \\Sentry::findAllGroups();\n\t\tif(count($groups) > 0) {\n\t\t\tforeach($groups as $key => $values) {\n\t\t\t\t$group_details[$values->id] = $values->name;\n\t\t\t}\n\t\t}\n\n\t\t//$this->header->setMetaTitle(trans('meta.admin_manage_shops_title'));\n\t\treturn View::make('featuredsellers::admin.featuredSellers', compact('d_arr', 'user_list', 'shop_action', 'is_shop_owner', 'is_allowed_to_add_product', 'status', 'shop_status'));\n\t}", "private function getListOptions(){\n return $this->listOptions;\n }", "public function fetchList();", "public function list_get()\n\t{\n\t\ttry{\n\n\t\t\t$this->checkCanCandidateId();\n\t\t\t$filters = array(\n\t\t\t\t\"{$this->_candidateIdFkKey}\" =>$this->getCanCandidateId()\n\t\t\t);\n\t\t\t$list = $this->_model->getBy($filters);\n\t\t\t$this->response($list);\n\t\t}catch( Exception $e ){\n\t\t\t$message = $e->getMessage();\n\t\t\t$code = $e->getCode();\n\t\t\t$this->error_response($message,$code);\n\t\t}\n\n\t}", "public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "function getList()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t$db\t=& $this->getDBO();\r\n\r\n\t\t// Determine paging variables\r\n\t\t$limit = $mainframe->getUserStateFromRequest( \"viewlistlimit\", 'limit', 10 );\r\n\t\t$limitstart = $mainframe->getUserStateFromRequest( \"viewlimitstart\", 'limitstart', 0 );\r\n\r\n\t\t// Determine basic variables \r\n\t\t$option = JRequest::getVar('option', '', '', 'string');\r\n\t\t$version = JRequest::getVar('version', '', '', 'string');\r\n\t\t$type = JRequest::getVar('type', '', '', 'string');\r\n\t\t$name = JRequest::getVar('name', '', '', 'string');\r\n\t\t$this->_list['option'] = JRequest::getVar('option', '', '', 'string'); \r\n\t\t$this->_list['version'] = $version;\r\n\t\t$this->_list['stype'] = $type;\r\n\t\t$this->_list['sname'] = $name;\r\n\r\n\t\t// Create option field for servertype\r\n\t\t$types[] = Array();\r\n\t\t$array = Array (0 => Array ('component', JText::_( 'Component')),\r\n\t \t 1 => Array ('module', JText::_( 'Module')),\r\n\t\t 2 => Array ('plugin', JText::_( 'Plugin')),\r\n\t \t 3 => Array ('template', 'Template'),\r\n\t \t 4 => Array ('language', JText::_( 'Language'))\r\n );\r\n\r\n\t\t$types[] = mosHTML::makeOption( '', JText::_('Select Type'));\r\n\t\tfor ($i=0; $i<count($array); $i++) {\r\n\t\t\t$types[] = mosHTML::makeOption( $array[$i][0], $array[$i][1] );\r\n\t\t} # End for\r\n\t\t$this->_list['type'] = mosHTML::selectList( $types, 'type', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $type);\r\n\r\n\t\t// Create option field for package names.\r\n\t\t$query = \"SELECT name FROM #__jpackagedir_packages GROUP BY 1\";\r\n\t\t$db->setQuery($query);\r\n\t\t$rows = $db->loadObjectList();\r\n\r\n\t\t$names[] = mosHTML::makeOption( '', JText::_('Select Package'));\r\n\t\tforeach ($rows as $row) {\r\n\t\t\t$names[] = mosHTML::makeOption( $row->name, $row->name );\r\n\t\t} # End for\r\n\t\t$this->_list['name'] = mosHTML::selectList( $names, 'name', 'class=\"inputbox\" size=\"1\"' . 'onchange=\"document.adminForm.submit();\"', 'value', 'text', $name);\r\n\r\n\t\t// Determine where clause\r\n\t\t$this->_list['rows'] = Array();\r\n\t\t$where = Array();\r\n\t\tif (!empty($type)) { $where[] = \"type = '$type'\"; }\r\n\t\tif (!empty($name)) { $where[] = \"name = '$name'\"; }\r\n\t\tif (!empty($version)) { $where[] = \"version = '$version'\"; }\r\n\t\t$where = (count($where) ? \"\\n WHERE \".implode(' AND ', $where) : '');\r\n\r\n\t\t// Get the total number of records, this is used for paging option\r\n\t\t// in form.\r\n\t\t$query = \"SELECT COUNT(*) FROM #__jpackagedir_packages\" . $where;\r\n\t\t$db->setQuery( $query );\r\n\t\t$total = $db->loadResult();\r\n\r\n\t\t// Now read the current dataset, and pass it on...\r\n\t\t$query = \"SELECT * FROM #__jpackagedir_packages $where ORDER BY version\";\r\n\t\t$db->setQuery( $query, $limitstart, $limit );\r\n\t\t$this->_list['rows'] = $this->_db->loadObjectList();\r\n\t\tif ($db->getErrorNum()) {\r\n\t\t\treturn false;\r\n\t\t} # End if\r\n\r\n\r\n\t\t// Initialize the paging, offer the total number of records, the first record\r\n\t\t// for current page and the number of records to render.\r\n\t\tinclude_once(JPATH_BASE.DS.\"includes\".DS.\"pageNavigation.php\");\r\n\t\t$this->_list['pagenav'] = new mosPageNav( $total, $limitstart, $limit );\r\n\r\n\t\treturn $this->_list;\r\n\t}", "public function listsSupporterpost()\r\n {\r\n $input = Request::all();\r\n $new_supporter = Supporter::create($input);\r\n if($new_supporter){\r\n return response()->json(['msg' => 'Added a new supporter', 'data' => $new_supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the supporter');\r\n }\r\n }", "public function getResearcherList() {\n return CHtml::listData(User::model()->findAll(array('order' => 'short_name')), 'uniquename', 'short_name');\n }", "function vcn_get_career_names_select_list () {\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry()), 'json');\r\n\t$select_list_array = array('' => 'Select a Career');\r\n\r\n\tif (count($data) > 0) {\r\n\t\tforeach ($data as $value) {\r\n\t\t\t$select_list_array[$value->onetcode] = $value->title;\r\n\t\t}\r\n\t}\r\n\treturn $select_list_array;\r\n}", "public function getByList() {\n return $this->_get(4);\n }", "public function getList() {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "public function getTheSupports();", "public function getFeaturesList(){\n return $this->_get(1);\n }", "function get_drivres_list()\r\n\t{\r\n\t\t//get the driver details\r\n\t\t$sql=\"select b.name,b.employee_id,b.contact_no from m_employee_roles as a\r\n\t\t\t\t\tjoin m_employee_info as b on a.role_id=b.job_title2\r\n\t\t\t\t\twhere a.role_id=? and b.is_suspended=0\";\r\n\t\t\r\n\t\treturn $driver_details=$this->db->query($sql,array('7'))->result_array();\r\n\t\t\r\n\t}", "public function getSupports()\n {\n return $this->hasMany(Support::class, ['indigent_id' => 'id']);\n }", "function getListBySupportLevel($prj_id, $support_level_id, $support_options = false)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getListBySupportLevel($support_level_id, $support_options);\n }", "private static function fetchList($listType,$displayCol, $selectedValue, $showIdle=false, $translate=true,$applyRestrictionClause=false) {\r\n//scriptLog(\"fetchList($listType,$displayCol, $selectedValue, $showIdle, $translate)\");\r\n $res=array();\r\n if (! SqlElement::class_exists($listType)) {\r\n debugTraceLog(\"WARNING : SqlElement::fetchList() called for not valid class '$listType'\");\r\n return array();\r\n }\r\n $obj=new $listType();\r\n $calculated=false;\r\n $field=$obj->getDatabaseColumnName($displayCol);\r\n if (property_exists($obj, '_calculateForColumn') and isset($obj->_calculateForColumn[$displayCol])) {\r\n \t$field=$obj->_calculateForColumn[$displayCol];\r\n \t$calculated=true;\r\n }\r\n $query=\"select \" . $obj->getDatabaseColumnName('id') . \" as id, \" . $field . \" as name from \" . $obj->getDatabaseTableName() ;\r\n if ($showIdle or !property_exists($obj, 'idle')) {\r\n $query.= \" where (1=1 \";\r\n } else {\r\n $query.= \" where (idle=0 \";\r\n }\r\n $crit=$obj->getDatabaseCriteria();\r\n foreach ($crit as $col => $val) {\r\n \tif ($obj->getDatabaseColumnName($col)=='idProject' and ($val=='*' or !$val)) {$val=0;}\r\n \tif ($val===null) {\r\n \t $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . ' IS NULL';\r\n \t} else {\r\n $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . '=' . Sql::str($val);\r\n \t}\r\n }\r\n if ($applyRestrictionClause) {\r\n \t$query.=' and '.getAccesRestrictionClause($listType,null,true);\r\n }\r\n $query .=')';\r\n if ($selectedValue) {\r\n \tif ($selectedValue!='*') {\r\n $query .= \" or \" . $obj->getDatabaseColumnName('id') .'= ' . Sql::str($selectedValue) ;\r\n \t}\r\n }\r\n if (property_exists($obj,'_sortCriteriaForList')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.'.$obj->_sortCriteriaForList;\r\n } else if (property_exists($obj,'sortOrder')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.sortOrder, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'order')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.order, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'baselineDate')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.baselineDate, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n }\r\n $result=Sql::query($query);\r\n if (Sql::$lastQueryNbRows > 0) {\r\n while ($line = Sql::fetchLine($result)) {\r\n $name=$line['name'];\r\n if ($obj->isFieldTranslatable($displayCol) and $translate){\r\n \tif ($listType=='Linkable' and substr($name,0,7)=='Context') {\r\n \t\t$name=SqlList::getNameFromId('ContextType', substr($name,7,1));\r\n \t} else {\r\n $name=i18n($name);\r\n \t}\r\n }\r\n if ($displayCol=='name' and property_exists($obj,'_constructForName') and !$calculated) {\r\n \t$nameObj=new $listType($line['id'],true);\r\n \t$name=$nameObj->name;\r\n }\r\n $res[($line['id'])]=$name;\r\n }\r\n }\r\n // Plugin - start - Management for event \"list\"\r\n global $pluginAvoidRecursiveCall;\r\n if (! $pluginAvoidRecursiveCall) {\r\n $pluginAvoidRecursiveCall=true;\r\n $pluginObjectClass=$listType;\r\n $table=$res;\r\n $lstPluginEvt=Plugin::getEventScripts('list',$pluginObjectClass);\r\n foreach ($lstPluginEvt as $script) {\r\n require $script; // execute code\r\n }\r\n $res=$table;\r\n $pluginAvoidRecursiveCall=false;\r\n }\r\n // Plugin - end\r\n if ($translate) {\r\n self::$list[$listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } else {\r\n \tself::$list['no_tr_' . $listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } \r\n return $res;\r\n }", "function mfcs_get_reviewer_classification_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n if (!is_bool($hidden)) {\n $hidden = FALSE;\n }\n\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REVIEWER_CLASSIFICATION_NONE] = 'None';\n }\n\n $options_all[MFCS_REVIEWER_CLASSIFICATION_SYSTEM_ADMINISTRATOR] = 'System Administrator';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_MANAGER] = 'Manager';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_REQUESTER] = 'Requester';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_SYSTEM] = 'System';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_VENUE_COORDINATOR] = 'Venue Coordinator';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_VENUE_COORDINATOR_PROXY] = 'Venue Coordinator Proxy';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_ADMINISTRATIVE_ACCOUNTING] = 'Administrative Accounting';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_CUSTODIAL] = 'Custodial';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_UNIVERSITY_EVENTS] = 'University Events';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_FACILITIES_CUSTODIAL] = 'Facilities / Custodial Services';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_FACILITIES] = 'Facilities';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_FACULTY_ADVISER] = 'Faculty Adviser';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_FOOD_SERVICES] = 'Food Services';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_HOUSING] = 'Housing';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_MAINTENANCE] = 'Maintenance';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_PURCHASING] = 'Purchasing / Insurance';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_SECURITY] = 'Security / University Police';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_STUDENT_ACTIVITIES_ADMINISTRATION] = 'Student Activities Administration';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_UNIVERSITY_SERVICES] = 'University Services';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_GROUNDS] = 'Grounds';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_FINANCIAL] = 'Financial';\n $options_all[MFCS_REVIEWER_CLASSIFICATION_INSURANCE] = 'Insurance';\n\n\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n if (!$hidden) {\n unset($options[MFCS_REVIEWER_CLASSIFICATION_VENUE_COORDINATOR]);\n unset($options[MFCS_REVIEWER_CLASSIFICATION_VENUE_COORDINATOR_PROXY]);\n unset($options[MFCS_REVIEWER_CLASSIFICATION_SYSTEM_ADMINISTRATOR]);\n unset($options[MFCS_REVIEWER_CLASSIFICATION_MANAGER]);\n unset($options[MFCS_REVIEWER_CLASSIFICATION_REQUESTER]);\n unset($options[MFCS_REVIEWER_CLASSIFICATION_SYSTEM]);\n }\n\n if (!$disabled) {\n unset($options[MFCS_REVIEWER_CLASSIFICATION_FACILITIES_CUSTODIAL]);\n }\n\n asort($options);\n\n return $options;\n}", "function get_forum_list() {\n return $this->call('get_forum_list');\n }", "function dev_list() {\r\n\tglobal $gResult;\r\n\t$dev_controller = new Developer_Controller(new Developer);\r\n\t$msg = $dev_controller->getAllDevelopers();\r\n\t$gResult = $gResult.$msg;\r\n\treturn cCmdStatus_OK; \r\n}", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getOffersProducts_List (array $options = array()) {\n global $app;\n $options['sort'] = 'shop_products.DateUpdated';\n $options['order'] = 'DESC';\n $options['_fshop_products.Status'] = join(',', dbquery::getProductStatusesWhenAvailable()) . ':IN';\n $options['_fIsOffer'] = true;\n // $options['_fPrevPrice'] = 'Price:>';\n $config = dbquery::shopGetProductList($options);\n if (empty($config))\n return null;\n $self = $this;\n $callbacks = array(\n \"parse\" => function ($items) use($self) {\n $_items = array();\n foreach ($items as $key => $orderRawItem) {\n $_items[] = $self->getProductByID($orderRawItem['ID']);\n }\n return $_items;\n }\n );\n $dataList = $app->getDB()->getDataList($config, $options, $callbacks);\n return $dataList;\n }", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "public function getListMode(): string;", "public function getSupportId() {\n return $this->supportId;\n }", "function get_field_cordinators_list()\r\n\t{\r\n\t\t//get the driver details\r\n\t\t$sql=\"select b.name,b.employee_id,b.contact_no from m_employee_roles as a\r\n\t\t\t\t\tjoin m_employee_info as b on a.role_id=b.job_title2\r\n\t\t\t\t\twhere a.role_id=? and b.is_suspended=0\";\r\n\t\t\r\n\t\treturn $this->db->query($sql,array('6'))->result_array();\r\n\t}" ]
[ "0.6251571", "0.6107481", "0.5956418", "0.58981246", "0.58529943", "0.578101", "0.56865674", "0.56361216", "0.56343424", "0.5556649", "0.5551875", "0.5545124", "0.5501868", "0.54897934", "0.5486278", "0.544008", "0.54316044", "0.54306746", "0.54085153", "0.53985405", "0.5398433", "0.5383261", "0.5378445", "0.53506255", "0.5329745", "0.5289257", "0.52845705", "0.5275401", "0.52700114", "0.52554935" ]
0.67413175
0
Operation listssupporterByIdGet Fetch a list of Supporter specified by whostageId.
public function listsSupporterByIdget($supporter_id) { $supporter = Supporter::findOrFail($supporter_id); return response()->json($supporter,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsSupporterget()\r\n {\r\n $response = Supporter::all();\r\n return response()->json($response,200);\r\n }", "public function listsSupporterdelete($supporter_id)\r\n {\r\n $deleted_supporter = Supporter::destroy($supporter_id);\r\n if($deleted_supporter){\r\n return response()->json(['msg' => 'Deleted supporter']);\r\n }\r\n }", "function getListBySupportLevel($prj_id, $support_level_id, $support_options = false)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getListBySupportLevel($support_level_id, $support_options);\n }", "public function listsSupporterput($supporter_id)\r\n {\r\n $input = Request::all();\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n $supporter->update(['name' => $input['name']]);\r\n if($supporter->save()){\r\n return response()->json(['msg' => 'Update Supporter', 'data'=> $supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Supporter');\r\n }\r\n }", "public function userList($id)\n {\n return app(UserList::class)($id);\n }", "public static function getList($id) {\n $list = R::load('list', $id);\n return $list->id ? $list : null;\n }", "public function getUsersList($employer_id)\n {\n $em = $this->getEntityManager();\n\n\t\t$recs = $em->createQuery(\"SELECT DISTINCT ec.userId, CONCAT(u.firstname,' ',u.surname) AS username\n\t\t\tFROM AppBundle:ExtraChecks ec \n\t\t\tLEFT JOIN AppBundle:Users u WITH ec.userId = u.id\n\t\t\tWHERE ec.employerId = :eid AND ec.checkType NOT LIKE 'DBS%'\n\t\t\tORDER BY u.firstname,u.surname\")\n\t\t\t->setParameters(array(\"eid\"=>$employer_id))\n\t\t\t->getResult();\n\t\t$output = array('0'=>array('userId'=>0, 'username'=>'All'));\n\t\t$output = array_merge($output,$recs);\n\t\t//print \"<pre>\"; var_dump($output); die;\n\t\treturn $output;\n\t}", "public function list_support($limit=0) {\n\t\t$_Partner = DB::table('support')->select('id','name','phone','skype','yahoo')->where('status','=',1)->orderBy('create_time')->take($limit)->get();\t\n\t\treturn $_Partner;\n\t}", "function getFighterList() {\n $fighterList = $this->find('all', array(\n 'order' => 'Fighters.level DESC'\n ));\n $fighterListArray = $fighterList->toArray();\n return $fighterListArray;\n }", "public function list($id){\n try{\n $sql = 'select * from user where id_user = ? limit 1';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "public function get($id) {\n $wishList = WishList::where(\"users_id\",$id)->with(\"product\")->get();\n return $wishList;\n }", "public function lists($id)\n {\n $person = $this->modelPath::with('lists')->findOrFail($id);\n\n $availableLists = config('models.people_list', \\Bookkeeper\\CRM\\PeopleList::class)::all()\n ->diff($person->lists)\n ->pluck('name', 'id')\n ->toArray();\n\n return $this->compileView('people.lists', compact('person', 'availableLists'), $person->full_name);\n }", "public function get_ppe_inspection_workers($idPPEInspection) \n\t\t{\t\t\n\t\t\t\t$this->db->select(\"W.*, CONCAT(first_name, ' ', last_name) name\");\n\t\t\t\t$this->db->join('user U', 'U.id_user = W.fk_id_user', 'INNER');\n\t\t\t\t$this->db->where('W.fk_id_ppe_inspection', $idPPEInspection); \n\t\t\t\t$this->db->order_by('U.first_name, U.last_name', 'asc');\n\t\t\t\t$query = $this->db->get('ppe_inspection_workers W');\n\n\t\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t\treturn $query->result_array();\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}", "function listByID($id) {\n $select = $this->select();\n $select = $this->select()->where('id = ?', $id);\n $rows = $this->fetchAll($select);\n return $rows->toArray();\n }", "public function get_sup_staff($id){\r\n\t\r\n\t$users = $this->data_client->get_sup_staff($id);\r\n\treturn $users;\r\n\t }", "function getList($id = null) {\n $arg = array();\n if($id != null){\n $arg = array('idTeacher' => $id);\n }\n $this->db->getCursorParameters(self::TABLA, '*', $arg);\n $respuesta = array();\n while ($fila = $this->db->getRow()) {\n $objeto = new Teacher();\n $objeto->set($fila);\n $respuesta[] = $objeto;\n }\n return $respuesta;\n }", "public function listsSupporterpost()\r\n {\r\n $input = Request::all();\r\n $new_supporter = Supporter::create($input);\r\n if($new_supporter){\r\n return response()->json(['msg' => 'Added a new supporter', 'data' => $new_supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the supporter');\r\n }\r\n }", "public function getSupport() {\n $pdoStat = PdoMedProjet::$conn->prepare('SELECT * FROM supports');\n $pdoStat->execute();\n return $pdoStat->fetchAll();\n }", "public function supportItems()\n {\n return $this->belongsToMany(Support::class)->withTimestamps();\n }", "public function getSuppliers($suppliers_id);", "public function getResearcherList() {\n return CHtml::listData(User::model()->findAll(array('order' => 'short_name')), 'uniquename', 'short_name');\n }", "public function show($id)\n {\n $supports = Support::where('id', $id)->first();\n return response()->json($supports, 200);\n }", "public function getVotersPolling($id){\n $Query = \"SELECT v.id, v.firstname, v.middlename, v.lastname, v.datebirth, v.gender, v.residentialaddress, \n v.voterIDnumber, v.lifestatus, p.name\n FROM voters2015 v\n JOIN pollingstations p ON v.pollingstation_id = p.id\n JOIN pollingstation_shehia ps ON v.pollingstation_id = ps.pollingstation_id\n WHERE ps.shehia_id = $id\n ORDER BY p.name, v.gender, v.firstname, v.middlename, v.lastname ASC\";\n $stmt = $this->con->prepare($Query);\n $stmt->bind_param(\"i\",$id);\n $stmt->execute();\n $pollVoters = $stmt->get_result();\n $stmt->close();\n return $pollVoters;\n }", "public function listAllbyUser($id){\n try{\n $sql = 'select * from user u inner join person p on u.id_person = p.id_person where id_user = ?';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "public function show($id)\n {\n // $auth = Mailchimp::makeAuth($apiKey);\n // $url = $url = 'https://'. $auth['dc'] .'.api.mailchimp.com/3.0/lists/'. $id;\n //\n // $response = Mailchimp::request($auth, $url);\n //\n // return view('lists.show', ['list'=>$response, 'key'=> $apiKey]);\n\n $mailchimp = new Mailchimp();\n $members = $mailchimp->members($id)->get();\n\n return $members;\n }", "public function getLectureList() {\n \n $lecturer = \\DB::table('staffs')->where('designation','Teacher')\n ->orderby(\"Name\")\n ->pluck('name', 'emp_number');\n return $lecturer;\n \n \n }", "public function listIdOfListStaffId($listStaffId)\n {\n return QcCompanyStaffWork::whereIn('staff_id', $listStaffId)->pluck('work_id');\n }", "public function getSupports()\n {\n return $this->hasMany(Support::class, ['indigent_id' => 'id']);\n }", "public function utilisateurListerUn($id)\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\",\"idUtilisateur\",$id);//type object\n\t}", "public function findSupportUsers($user_id, $num) {\n $user = $this->getUser($user_id);\n if (!$user) {\n return array();\n }\n $level = $user['level'];\n\n $user_level_config = $this->getGameConfig('user_level');\n $level_boundary = $user_level_config['level_exp_boundary'];\n $max_level = count($level_boundary);\n\n $start_level = $level - 3;\n if ($start_level <= 0) $start_level = 1;\n $end_level = $level + 3;\n if ($start_level > $max_level) $end_level = $max_level;\n\n\n # find friends\n $frnd_lib = $this->_di->getShared('frnd_lib');\n $frnd_uids = $frnd_lib->getRandFriends($user_id, 5);\n # find strangers\n $loginindex_lib = $this->_di->getShared('loginindex_lib');\n $users = $loginindex_lib->findUsers($start_level, $end_level, 5, gettimeofday()['usec']);\n $card_lib = $this->_di->getShared('card_lib');\n $mercenaries = array();\n $uids = array_merge($frnd_uids, array_keys($users));\n $uids = array_unique($uids);\n foreach ($uids as $uid) {\n if ($uid == $user_id) {\n continue;\n }\n $deck_cards = @$card_lib->getDeckCard($uid);\n if (!$deck_cards) {\n syslog(LOG_WARNING, \"mision_prepare: deck cards not found for $uid\");\n continue;\n }\n $leader_card = $deck_cards[USER_DECK_LEADER_POSITION - 1];\n $uinfo = $this->getUser($uid);\n $name = $uinfo['name'];\n $mercenaries []= array(\n 'user_id'=> $uid,\n 'name'=> $name,\n 'card'=> $leader_card,\n 'isfriend'=> in_array($uid, $frnd_uids)\n );\n }\n return $mercenaries;\n }" ]
[ "0.5827175", "0.56754696", "0.5543269", "0.5524992", "0.5444901", "0.52714556", "0.5074047", "0.5021898", "0.50168717", "0.49753076", "0.49174076", "0.49028853", "0.49012017", "0.48319402", "0.48204452", "0.4818645", "0.48073313", "0.47945327", "0.4784794", "0.4770748", "0.47688714", "0.47607404", "0.4695422", "0.4694911", "0.46911627", "0.46895358", "0.4671226", "0.46592245", "0.46576336", "0.46532595" ]
0.703828
0
Operation listssupporterPost create a Supporter.
public function listsSupporterpost() { $input = Request::all(); $new_supporter = Supporter::create($input); if($new_supporter){ return response()->json(['msg' => 'Added a new supporter', 'data' => $new_supporter]); }else{ return response('Oops, it seems like there was a problem adding the supporter'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsSupporterput($supporter_id)\r\n {\r\n $input = Request::all();\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n $supporter->update(['name' => $input['name']]);\r\n if($supporter->save()){\r\n return response()->json(['msg' => 'Update Supporter', 'data'=> $supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Supporter');\r\n }\r\n }", "public function listsSupporterdelete($supporter_id)\r\n {\r\n $deleted_supporter = Supporter::destroy($supporter_id);\r\n if($deleted_supporter){\r\n return response()->json(['msg' => 'Deleted supporter']);\r\n }\r\n }", "public function offers_suppression_list_post()\n {\n $this->verify_request(); \n $data = array(\n 'name' => $this->input->post('name'),\n 'download_url' => $this->input->post('download_url'),\n 'unsubscribe_url' => $this->input->post('unsubscribe_url')\n );\n $result = $this->Offer_model->insert_offers_sup_list($data);\n $status = parent::HTTP_OK;\n $this->response(['offer Suppression List created successfully.'], $status);\n }", "public function listsSupporterget()\r\n {\r\n $response = Supporter::all();\r\n return response()->json($response,200);\r\n }", "public function store(PostRequest $request)\n {\n \\Log::debug(\"on posts store\");\n\n $value = array(\"writer\" => $request->writer, \"name\" => $request->name, \"title\" => $request->title, \"content\" => $request->contents);\n\n $list = Post::create($value);\n\n \\Log::debug(\"List ID : \" . $list->id);\n\n if (!$list) {\n return back()->with('flash_message', '글이 저장되지 않았습니다.')->withInput();\n }\n\n if ($request->has('upFiles')) {\n foreach ($request->upFiles as $fid) {\n $attach = Attachment::find($fid);\n $attach->post()->associate($list);\n $attach->save();\n }\n }\n\n event(new \\App\\Events\\PostsEvent($list));\n event(new \\App\\Events\\ModelChanged(['posts']));\n\n return redirect()->route('posts.show', $list)->with('flash_message', \"작성이 완료되었습니다.\");\n\n }", "public function supportItems()\n {\n return $this->belongsToMany(Support::class)->withTimestamps();\n }", "public function listsSupporterByIdget($supporter_id)\r\n {\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n return response()->json($supporter,200);\r\n }", "public function _action_add_feedback_support(){\n\n\t\t$post_types = fw_get_db_ext_settings_option( 'feedback', 'post_types', array('post' => true) );\n\n\t\tforeach ( $post_types as $slug => $value ) {\n\t\t\tadd_post_type_support( $slug, 'comments' );\n\t\t\tadd_post_type_support( $slug, $this->supports_feature_name );\n\t\t}\n\t}", "public function run()\n {\n Support::create([\n 'supp' =>0.02\n ]);\n }", "public function create()\n {\n return view('user.support.create');\n }", "public function actionCreate_printers()\n {\n $model = new Printers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/printers/view', 'id' => $model->id_printer]);\n } else {\n return $this->render('/printers/create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate_printers()\n {\n $model = new Printers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/printers/view', 'id' => $model->id_printer]);\n } else {\n return $this->render('/printers/create', [\n 'model' => $model,\n ]);\n }\n }", "private function actionListPost() {\n $donneur = new Donneur;\n $donneur->first_name = $_POST['first_name'];\n $donneur->last_name = $_POST['last_name'];\n $donneur->age = $_POST['age'];\n $donneur->gender = $_POST['gender'];\n $donneur->address = $_POST['address'];\n $donneur->phone = $_POST['phone'];\n $donneur->groupe_sangun = $_POST['groupe_sangun'];\n $donneur->email = $_POST['email'];\n $donneur->vehicle = $_POST['vehicle'];\n \n $donneur->date_donation = ($_POST['date_donation']==='1970-01-01') ? null : $_POST['date_donation'];\n if ($donneur->save()) {\n echo CJSON::encode($donneur);\n } else {\n header(\"HTTP/1.1 501 Internal Server Error\");\n echo \"Update failed for Donneur: \";\n }\n }", "function widget_supporters($args) {\r\n\t\tglobal $wpdb, $current_site;\r\n\t\textract($args);\r\n\t\t$defaults = array('count' => 10, 'supportername' => 'wordpress');\r\n\t\t$options = (array) get_option('widget_supporters');\r\n\r\n\t\tforeach ( $defaults as $key => $value )\r\n\t\t\tif ( !isset($options[$key]) )\r\n\t\t\t\t$options[$key] = $defaults[$key];\r\n\r\n\t\t?>\r\n\t\t<?php echo $before_widget; ?>\r\n\t\t\t<?php echo $before_title . __($options['supporters-title']) . $after_title; ?>\r\n <br />\r\n <?php\r\n\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t\t\t//=================================================//\r\n\t\t\t\t$now = time();\r\n\t\t\t\tif ( $options['supporters-order'] == 'most_recent' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY supporter_ID DESC LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t} else if ( $options['supporters-order'] == 'random' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY RAND() LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t}\r\n\t\t\t\t$supporters = $wpdb->get_results( $query, ARRAY_A );\r\n\t\t\t\tif (count($supporters) > 0){\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '<ul>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ($supporters as $supporter){\r\n\t\t\t\t\t\t$blog_details = get_blog_details( $supporter['blog_ID'] );\r\n\t\t\t\t\t\tif ( $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_blog_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t\techo ' ';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'avatar' ) {\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '</ul>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//=================================================//\r\n\t\t\t?>\r\n\t\t<?php echo $after_widget; ?>\r\n<?php\r\n\t}", "public function postCreate(ServicerRequest $request)\n {\n $servicer = $this->servicerRepository->createOrUpdate($request->input());\n\n event(new CreatedContentEvent(SERVICER_MODULE_SCREEN_NAME, $request, $servicer));\n\n if ($request->input('submit') === 'save') {\n return redirect()->route('servicer.list')->with('success_msg', trans('core.base::notices.create_success_message'));\n } else {\n return redirect()->route('servicer.edit', $servicer->id)->with('success_msg', trans('core.base::notices.create_success_message'));\n }\n }", "public static function add_plugin_support_rep( $post, $user ) {\n\t\t$post = Plugin_Directory::get_plugin_post( $post );\n\t\t$user = new WP_User( $user );\n\t\tif ( ! $post || ! $user->exists() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = wp_add_object_terms( $post->ID, $user->user_nicename, 'plugin_support_reps' );\n\n\t\twp_cache_delete( $post->post_name, 'plugin-support-reps' );\n\t\twp_cache_delete( $user->user_nicename, 'support-rep-plugins' );\n\n\t\tTools::audit_log(\n\t\t\tsprintf(\n\t\t\t\t'Added <a href=\"%s\">%s</a> as a support rep.',\n\t\t\t\tesc_url( 'https://profiles.wordpress.org/' . $user->user_nicename . '/' ),\n\t\t\t\t$user->user_login\n\t\t\t),\n\t\t\t$post\n\t\t);\n\n\t\t$committers = Tools::get_plugin_committers( $post );\n\n\t\t// Only notify if the current process is interactive - a user is logged in.\n\t\t$should_notify = (bool) get_current_user_id();\n\t\t// Don't notify if a plugin admin is taking action on a plugin they're not a committer for.\n\t\tif ( current_user_can( 'plugin_approve' ) && ! in_array( wp_get_current_user()->user_login, $committers, true ) ) {\n\t\t\t$should_notify = false;\n\t\t}\n\n\t\tif ( $should_notify ) {\n\t\t\t$email = new Support_Rep_Added_Email(\n\t\t\t\t$post,\n\t\t\t\t$committers,\n\t\t\t\t[\n\t\t\t\t\t'rep' => $user,\n\t\t\t\t]\n\t\t\t);\n\t\t\t$email->send();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function created(SupportStaffAppraisal $model)\n {\n $data = ['action' => 'New Appraisal has been created!', 'model_name' => 'SupportStaffAppraisal', 'supportStaffAppraisal' => $model];\n $users = \\App\\User::whereHas('roles', function ($q) {\n return $q->where('title', 'HOD2', 'head_of_department_id');\n })->get();\n Notification::send($users, new AssignedSupportstaffNotification($data));\n }", "public function list($body = [])\n {\n return $this->apiClient->post('/senders/list', $body);\n }", "public function create(Request $request)\n\t{\n\t\t$userData = $request->user();\n\n\t\t$request->validate([\n\t\t\t'support_text' => 'required|string',\n\t\t]);\n\n\t\ttry {\n\t\t\t$request->request->add(['user_id' => $userData->id]);\n\t\t\t$insert = SupportModel::create($request->all());\n\t\t\treturn response()->json(['status' => 'success', 'message' => 'data submitted successfully!.'], 200);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn response()->json(['error' => 'failed to submit data!.'], 400);\n\t\t}\n\t}", "public function listsWhostagepost()\r\n {\r\n $input = Request::all();\r\n $new_who = whostage::create($input);\r\n if($new_who){\r\n return response()->json(['msg' => 'Added a new who stage']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the whostage');\r\n }\r\n }", "public function add_to_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t // try {\n\t\t // # setup your custom fields\n\t\t // $custom_fields->create(array('name' => 'Car'));\n\t\t // $custom_fields->create(array('name' => 'Color'));\n\t\t // }\n\t\t // catch(AWeberAPIException $exc) {\n\t\t // # errors would be raised if we already had these fields, or\n\t\t // # we couldnt add anymore, so skip it and keep going\n\t\t // # uncomment the line below to see any errors related to custom fields:\n\t\t // # handle_errors($exc);\n\t\t // }\n\t\t //$ip = $_SERVER[\"REMOTE_HOST\"] ?: gethostbyaddr($_SERVER[\"REMOTE_ADDR\"]);\n\t\t # create a subscriber\n\t\t $params = array(\n\t\t 'email' => $post_data['email'],\n\t\t 'ip_address' => '127.0.0.1',\n\t\t 'ad_tracking' => 'client_lib_example',\n\t\t 'last_followup_message_number_sent' => 0,\n\t\t 'misc_notes' => 'my cool app',\n\t\t 'name' => $post_data['name'],\n\t\t 'tags' => array('digitalkheops')\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\n\t\t $paramss = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\t\t $found_subscribers = $subscribers->find($paramss);\n\t\t //dd($found_subscribers);\n\n\t\t if($found_subscribers->data['total_size']==0){\n\t\t \t$new_subscriber = $subscribers->create($params);\n\t\t }\n\t\t \n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "public function action_addList() {\n $data = Arr::extract($_POST, array('listname', 'rating', 'description', 'typelist'));\n //Arr::_print($data);\n //$data['name'] = trim($this->request->post('listname'));\n// $rating = trim($this->request->post('rating'));\n// $description = trim($this->request->post('description'));\n// $type = $this->reques->post('type');\n if(!$this->user->id) exit('error - action_addList - not user');\n \n $list_id = Model::factory('ElectList')->add($this->user->id, $data);\n\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if(!$res) exit('error - action_addList');\n else $this->redirect('/');\n }", "public function create()\n {\n return view('admin.joiners.create');\n }", "public function listsPepreasonpost()\r\n {\r\n $input = Request::all();\r\n $new_pepreaosn = Pepreason::create($input);\r\n if($new_pepreaosn){\r\n return response()->json(['msg' => 'Added a new pep reason']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the pep reason');\r\n }\r\n }", "function add_user_list($post_data)\n\t{\t\t\n\t\t$this->db->insert('users_list', $post_data); \n\t}", "public function supportticket(){\n return $this->hasMany('App\\SupportTicket', 'department_id', 'id');\n }", "public function myinfluencerspost(Request $request)\n {\n \n $listmember = new ListMember;\n $listmember->list_id = $request->input('listname');\n $listmember->user_id = $request->input('uid');\n\n $listmember->save();\n\n //return response()->json(['success'=>'Added new records.']);\n\n return redirect()->back()->with('message','The influencer has been added to your list.');\n }", "public function create() {\n return view('admin.implementers.create');\n }", "function add_user_list($post_data) {\n $this->db->insert('users_list', $post_data);\n }", "public function postListName(Request $request)\n {\n $this->validate($request, [\n 'list_name' => 'required',\n ]);\n\n return $this->boardList->createList($request, Auth::id());\n }" ]
[ "0.53836787", "0.48550898", "0.484991", "0.4753402", "0.47046003", "0.4678557", "0.4670416", "0.45998383", "0.44294542", "0.43846834", "0.4380716", "0.4380716", "0.43721735", "0.42812204", "0.4266196", "0.42530954", "0.4235527", "0.42318195", "0.42168278", "0.41706783", "0.41480717", "0.41442072", "0.41304797", "0.4092287", "0.40746465", "0.40594065", "0.40570354", "0.40563396", "0.40560392", "0.4048426" ]
0.7221874
0
Operation listsSupporterPut Update an existing Supporter.
public function listsSupporterput($supporter_id) { $input = Request::all(); $supporter = Supporter::findOrFail($supporter_id); $supporter->update(['name' => $input['name']]); if($supporter->save()){ return response()->json(['msg' => 'Update Supporter', 'data'=> $supporter]); }else{ return response('Oops, it seems like there was a problem updating the Supporter'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsSupporterpost()\r\n {\r\n $input = Request::all();\r\n $new_supporter = Supporter::create($input);\r\n if($new_supporter){\r\n return response()->json(['msg' => 'Added a new supporter', 'data' => $new_supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the supporter');\r\n }\r\n }", "public function listsSupporterByIdget($supporter_id)\r\n {\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n return response()->json($supporter,200);\r\n }", "public function listsSupporterdelete($supporter_id)\r\n {\r\n $deleted_supporter = Supporter::destroy($supporter_id);\r\n if($deleted_supporter){\r\n return response()->json(['msg' => 'Deleted supporter']);\r\n }\r\n }", "public function update(Request $request, Support $support)\n {\n //\n }", "public function listsSupporterget()\r\n {\r\n $response = Supporter::all();\r\n return response()->json($response,200);\r\n }", "public function update(Request $request, printers $printers)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required'\n ]);\n\n $printers = printers::find($request->id);\n $printers->update($request->only([\n 'name',\n 'description'\n ]));\n return back()->withSuccess('Printer Has been Updated');\n }", "public function update(AdvertiserPutRequest $request, Redirector $redirector) {\n $this->service->updateAdvertiser ($request);\n return $redirector->to('/admin/advertisers/'.$request->route()->parameter('id'))->with('message', 'Advertiser successfully updated');\n }", "public function UpdateTeachers($request)\n {\n\n\n try {\n $Teachers = Teacher::findOrFail($request->id);\n $Teachers->Specialization_id = $request->Specialization_id;\n $Teachers->Gender_id = $request->Gender_id;\n $Teachers->Joining_Date = $request->Joining_Date;\n $Teachers->Address = $request->Address;\n $Teachers->save();\n toastr()->success(trans('messages.Update'));\n return redirect()->route('Teachers.index');\n }\n catch (\\Exception $e) {\n return redirect()->back()->with(['error' => $e->getMessage()]);\n }\n }", "public function update(Request $request)\n\t{\n\t\t$suppliersRequest = json_decode($request->input('suppliers'));\n\n\t\tforeach ($suppliersRequest as $key => $supplierRequest) {\n\t\t\ttry {\n\n\t\t\t\t$supplierObject = Supplier::findOrFail($supplierRequest->id);\n\n\t\t\t\t$supplierObject->company_name \t\t= $supplierRequest->company_name;\n\t\t\t\t$supplierObject->contact_name \t\t= $supplierRequest->contact_name;\n\t\t\t\t$supplierObject->contact_title \t\t= $supplierRequest->contact_title;\n\t\t\t\t$supplierObject->gender \t\t\t\t= \t$supplierRequest->gender;\n\t\t\t\t$supplierObject->supplier_type_id\t\t= $supplierRequest->supplier_type_id;\n\t\t\t\t$supplierObject->phone \t\t= $supplierRequest->phone;\n\t\t\t\t$supplierObject->email \t\t= $supplierRequest->email;\n\t\t\t\t$supplierObject->country_id \t\t= $supplierRequest->country_id;\n\t\t\t\t$supplierObject->city_id \t\t= $supplierRequest->city_id;\n\t\t\t\t$supplierObject->region \t\t= $supplierRequest->region;\n\t\t\t\t$supplierObject->postal_code \t\t= $supplierRequest->postal_code;\n\t\t\t\t$supplierObject->address \t\t= $supplierRequest->address;\n\t\t\t\t$supplierObject->detail \t\t= $supplierRequest->detail;\n\t\t\t\t$supplierObject->branch_id \t\t= $supplierRequest->branch_id;\n\t\t\t\t$supplierObject->status \t\t= $supplierRequest->status;\n\t\t\t\t$supplierObject->updated_by \t\t= auth::id();\n\n\t\t\t\t$supplierObject->save();\n\n\t\t\t\t$suppliersResponse[] = $supplierObject;\n\t\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn Response()->Json($suppliersResponse);\n\t}", "public function update(Request $request, Seeker $seeker)\n {\n //\n }", "public function update(Request $request, seller $seller)\n {\n //\n }", "public function updated(SupportStaffAppraisal $supportStaffAppraisal)\n {\n //\n }", "public function update(Request $request, providers_availability $providers_availability)\n {\n //\n }", "public function update(Request $request, Ledgers $ledgers)\n {\n //\n }", "private function actionListPut() {\n $put_vars = $this->actionListPutConvert();\n $donneur = $this->loadModel($put_vars['id']);\n $donneur->first_name = $put_vars['first_name'];\n $donneur->last_name = $put_vars['last_name'];\n $donneur->age = $put_vars['age'];\n $donneur->gender = $put_vars['gender'];\n $donneur->address = $put_vars['address'];\n $donneur->phone = $put_vars['phone'];\n $donneur->groupe_sangun = $put_vars['groupe_sangun'];\n $donneur->vehicle = $put_vars['vehicle'];\n\n if ($donneur->save()) {\n header(\"HTTP/1.1 200 ok\");\n } else {\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo \"Update failed for EmployeeID: \";\n }\n }", "public function update(Request $request, Beer $beer)\n { \n $validatedData = $request->validate($this -> beerValidator);\n $data = $request->all();\n\n // dd($data);\n $data = $request->all();\n \n $beer->update($data);\n return redirect()->route('beers.index');\n }", "public static function updatecheers($challenge_id, $cheers)\n {\n $challenge = Challenge::find($challenge_id);\n $challenge_detail = ChallengeDetail::find($challenge->challenge_detail->id);\n\n // check if the source is from fb and the player type, if so update with the array - FHM\n\n if($cheers['likes']['challenger']['source'] == 'fb')\n {\n $challenge_detail->challenger_cheers = $cheers['likes']['challenger']['count'];\n }\n\n if($challenge_detail->challengetype_id == 2 && ($cheers['likes']['challengee']['source'] == 'fb'))\n {\n $challenge_detail->challengee_cheers = $cheers['likes']['challengee']['count'];\n }\n\n // save to db\n $challenge_detail->save();\n }", "public function change()\n {\n $sellersTable = TableRegistry::get('Sellers');\n $sellerDataTable = TableRegistry::get('ProductSellerData');\n $sellers = $sellersTable->find()->toArray();\n foreach($sellers as $seller){\n\n $sellerData = $sellerDataTable->find()->where(['seller_id'=>$seller['id']])->order(['updated_on'=>'DESC'])->first();\n\n $query = $sellersTable->query();\n $query->update()\n ->set(['rating' => $sellerData->rating,'rating_count' => $sellerData->rating_count])\n ->where(['id' => $seller['id']])\n ->execute();\n }\n\n }", "public function updated(Seller $seller)\n {\n\n }", "public function update(Request $request, Renters $renters)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $list = Supplier::findOrFail($id);\n\n $list->update([\n 'supplier_id' => $request->supplier_id,\n 'supplier_name' => $request->supplier_name,\n 'short_name' => $request->short_name,\n 'owner' => $request->owner,\n 'phone' => $request->phone,\n 'cell_phone' => $request->cell_phone,\n 'fax' => $request->fax,\n 'email' => $request->email,\n 'zip_code' => $request->zip_code,\n 'address' => $request->address,\n 'remark' => $request->remark,\n ]);\n return redirect('supplier/')->with('message', '更新成功 / Supplier updated!');\n }", "public function edit(Support $support)\n {\n //\n }", "public function update(Request $request, WishList $wishList)\n {\n //\n }", "public function update(KitRequest $request, Kit $kit)\n {\n $this->authorize('index', new Kit);\n $kit->update($request->all());\n $kit->products()->sync($request->products);\n return redirect()->route('admin.kits.index')->withMessage('Комплект обновлен');\n }", "public function update(Request $request, $teacherId, $classId) {\n\n try {\n\n DB::beginTransaction();\n\n $class = SchoolClass::find($classId);\n $class->fill($request->toArray());\n $class->update();\n\n $class->assignGradedItemsNonTrans($request->gradedItems);\n\n DB::commit();\n\n return $class;\n } catch (\\Exception $e) {\n DB::rollBack();\n return response($e->getMessage(), 500);\n }\n }", "public function update(Request $request, School $school)\n {\n //\n }", "public function supportItems()\n {\n return $this->belongsToMany(Support::class)->withTimestamps();\n }", "public function update(ProviderRequest $request, Provider $provider)\n {\n $provider->update($request->all());\n\n return redirect()\n ->route('providers.index')\n ->withStatus('Provider updated successfully.');\n }", "public function update(Request $request, Provider $provider)\n {\n //\n }", "public function update(DeskStoreRequest $request, Desk $desk)\n {\n\n\n $desk->update($request->validated());\n\n $d = new DeskResource($desk);\n return $d->toJson();\n }" ]
[ "0.5374281", "0.51388043", "0.51295596", "0.48627067", "0.46663937", "0.4529776", "0.4500932", "0.43636283", "0.43481687", "0.4302108", "0.42958367", "0.42943543", "0.42634833", "0.42445946", "0.42012668", "0.41681036", "0.41104227", "0.40878132", "0.40629935", "0.40431166", "0.40412083", "0.40311024", "0.39446616", "0.39437538", "0.39422473", "0.3934504", "0.39149067", "0.38977808", "0.38968775", "0.38867882" ]
0.7044467
0
Operation listsSupporterDelete Deletes a Supporter specified by SupporterId.
public function listsSupporterdelete($supporter_id) { $deleted_supporter = Supporter::destroy($supporter_id); if($deleted_supporter){ return response()->json(['msg' => 'Deleted supporter']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsSupporterByIdget($supporter_id)\r\n {\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n return response()->json($supporter,200);\r\n }", "public function listsSupporterput($supporter_id)\r\n {\r\n $input = Request::all();\r\n $supporter = Supporter::findOrFail($supporter_id);\r\n $supporter->update(['name' => $input['name']]);\r\n if($supporter->save()){\r\n return response()->json(['msg' => 'Update Supporter', 'data'=> $supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the Supporter');\r\n }\r\n }", "public function actionDelete_printers($id)\n {\n $this->findModel_printers($id)->delete();\n\n return $this->redirect(['/printers/index']);\n }", "public function actionDelete_printers($id)\n {\n $this->findModel_printers($id)->delete();\n\n return $this->redirect(['/printers/index']);\n }", "public function listsSupporterpost()\r\n {\r\n $input = Request::all();\r\n $new_supporter = Supporter::create($input);\r\n if($new_supporter){\r\n return response()->json(['msg' => 'Added a new supporter', 'data' => $new_supporter]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the supporter');\r\n }\r\n }", "public function actionDelete($id, $serviceCategoriesId, $hairdressersId)\n {\n $this->findModel($id, $serviceCategoriesId, $hairdressersId)->delete();\n\n return $this->redirect(['index']);\n }", "public function destroy($id, MailerRepo $mailerService)\n {\n if(!($list = $mailerService->destroy($id))){\n return response('Список не найден', 404);\n }\n }", "public function deleteById($beerId);", "public function destroy($id)\n {\n $supports = Support::find($id)->delete();\n return response()->json([], 200);\n }", "public function delete(Career $career, $id)\n {\n $career->find($id)->delete();\n return $this->success('Cadastro deleteado com sucesso !', route('careers'), [], false);\n }", "public function deleteAction(){\n $id = $this->filterInt($this->_params[0]);\n $supplier = SupplierModel::getByPK($id);\n \n if($supplier === FALSE){\n $this->redirect('/suppliers');\n }\n $this->language->load('suppliers.messages');\n if($supplier ->delete()){\n $this->messeger->add($this->language->get('message_delete_success'));\n $this->redirect('/suppliers');\n }else {\n $this->messeger->add($this->language->get('message_delete_failed'), Messenger::ERROR_MESSEEGE);\n $this->redirect('/suppliers');\n }\n }", "public function deleted(SupportStaffAppraisal $supportStaffAppraisal)\n {\n //\n }", "public function listsSupporterget()\r\n {\r\n $response = Supporter::all();\r\n return response()->json($response,200);\r\n }", "public function delete($vendedor_id)\n {\n\t\t// View customers/index send request to Router, it request CustomersContoller/delete, it request model Customer/delete,\n\t\t// it response to CustomersContoller/delete, it response/redirect to View customers/index finally\n\n // if we have an id of a customer that should be deleted\n if (isset($vendedor_id)) {\n // Instance new Model (Customers)\n $Vendedor = new VendedoresModel();\n // do delete() in model/model.php\n $Vendedor->delete($vendedor_id);\n }\n\n // where to go after customer has been deleted\n header('location: ' . URL . 'vendedores/index');\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "public function supplier_delete($id)\n {\n $purchase = $this->MPurchase_master->get_by_supplier_id($id);\n if (count($purchase) > 0)\n {\n $this->session->set_flashdata('error', 'Supplier can\\'t delete, S/He is in Purchase List.');\n }\n else\n {\n $this->MSuppliers->delete($id);\n }\n\n redirect('inventory/supplier-list', 'refresh');\n }", "public function destroy($id)\n {\n $deliverer = Deliverer::findOrFail($id);\n $deliverer->delete();\n return redirect()->route('deliverers.index')\n ->withSuccess('Deliverer eliminado correctamente!');\n }", "public function admin_delete($help_id) {\n\t\tif ($this->Auth->user('account_level') != 51)\n throw new ForbiddenException;\n\t\t$this->autoRender=false;\n\t\t\n\t\t$conditions = array(\n\t\t\t'Help.id' => $help_id,\n\t\t\t'Help.status'=> 0,\n\t\t);\n\t\t\n\t\tif ($this->Help->hasAny($conditions)){\n\t\t\t$this->Help->delete($help_id);\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Can not delete'), 'error_form', array(), 'error');\n\t\t}\t\t\n\t\t\t\n\t\tif(isset($this->params['url']['redirect_url'])){\t\t\t\n\t\t\treturn $this->redirect(urldecode($this->params['url']['redirect_url']));\n\t\t} else {\n\t\t\treturn $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true));\n\t\t}\n\t\t\n\t}", "public function index_delete($id)\n\n\t{\n\n\t\t$this->db->delete('providers', array('id'=>$id));\n\n\n\n\t\t$this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n\n\t}", "public function actionDelete($id, $wechat_id, $kf_id)\n {\n $this->findModel($id, $wechat_id, $kf_id)->delete();\n\n return $this->redirect(['index']);\n }", "public function destroy(Freelancer $freelancer) {\n\n // user where first return a USER object \n $user = User::where(\"user_id\", \"=\", $freelancer->freelancer_id)->First();\n $freelancer->delete();\n $user->delete();\n return redirect()->route('freelancer.index')->with('message', 'item has been deleted successfully');\n }", "public function actionDelete($id, $adviser_id)\n {\n $post = Yii::$app->request->queryParams;\n $this->findModel($id)->delete();\n\n return $this->redirect(['adviser/view', 'id' => $adviser_id]);\n }", "public function deletePassangers($id)\n {\n $rowUser = $this->find($id)->current();\n if($rowUser) {\n $rowUser->delete();\n }else{\n throw new Zend_Exception(\"Could not delete user. User not found!\");\n }\n }", "public function perma_del($id)\n {\n\n $Supervisor = User::onlyTrashed()->findOrFail($id);\n $Supervisor->forceDelete();\n\n return redirect()->route('admin.Supervisors.index')->withFlashSuccess(trans('alerts.backend.general.deleted'));\n }", "function deleteTransporter($userId, $transporterInfo)\n {\n $this->db->where('id', $userId);\n $this->db->update('tbl_document_manager', $transporterInfo);\n \n return $this->db->affected_rows();\n }", "public function deleteAction(Request $request, Beer $beer)\n {\n $form = $this->createDeleteForm($beer);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($beer);\n $em->flush();\n }\n\n return $this->redirectToRoute('beer_index');\n }", "public function DeleteTeachers($request)\n {\n Teacher::findOrFail($request->id)->delete();\n toastr()->error(trans('messages.Delete'));\n return redirect()->route('Teachers.index');\n\n }", "public function listsPepreasondelete($pepreason_id)\r\n {\r\n $deleted_pepreason = Pepreason::destroy($pepreason_id);\r\n if($deleted_pepreason){\r\n return response()->json(['msg' => 'Deleted pep reason']);\r\n }\r\n }", "public function delete($id)\n\t{\n\t\t//Soft delete the item\n\t\t$supplier = Supplier::find($id);\n\t\t$supplier->delete();\n\n\t\t// redirect\n\t\treturn Redirect::route('supplier.index')->with('message', trans('messages.supplier-succesfully-deleted'));\n\t}", "public function destroy($id, $teacherId)\n {\n $model = EscapeType::findOrFail($id);\n $model->teachers()->detach($teacherId);\n return $model->teachers;\n }" ]
[ "0.6076401", "0.5474559", "0.525238", "0.525238", "0.50550544", "0.5018305", "0.4880508", "0.47965208", "0.47243214", "0.4718918", "0.47147116", "0.47103992", "0.46961856", "0.4670297", "0.46136117", "0.45873737", "0.45835605", "0.4557761", "0.44911668", "0.44622964", "0.44591704", "0.4447726", "0.4432833", "0.44320527", "0.44188106", "0.4418134", "0.440265", "0.43932596", "0.4392607", "0.4357926" ]
0.7899512
0
////////////////////////////// classifications functions // //////////////////////////// Operation listsClassificationsGet Fetch classifications.
public function listsClassificationsget() { $response = Classification::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsClassificationsByIdget($classification_id)\r\n {\r\n $classification = Classification::findOrFail($classification_id);\r\n return response()->json($classification,200);\r\n }", "public function getClassifications()\n {\n $taxes = Tax::where('archived', '=', 0);\n\n return Datatables::of($taxes)\n ->editColumn('id', function ($tax) {\n return '<a href=\"' . url('admin/classification/' . $tax->id . '/edit') . '\">' . $tax->id . '</a>';\n })\n ->editColumn('duty', function ($tax) {\n return number_format($tax->duty, 2) . '%';\n })\n ->editColumn('enabled', function ($tax) {\n return $tax->enabled ? '<span style=\"color: green;\">Enabled</span>' : '<span class=\"txt-archived\">Disabled</span>';\n })\n ->make(true);\n }", "public static function getClassifications()\n {\n return [\n static::HOURLY,\n static::SALARIED,\n static::COMMISSIONED,\n ];\n }", "public function classification()\n {\n\t\t$output = '<option selected=\"true\" disabled=\"disabled\">Select Classification</option>';\n\t\tif($this->request->id!=''){\n\t\t\t$classification = DB::table('embaseindex_classifications')->where('section_id', $this->request->id)->get();\n\t\t\tforeach($classification as $classval){\n\t\t\t\t$output .=\t'<option value=\"'.$classval->id.'\">'.$classval->classvalue.'</option>';\n\t\t\t}\n\t\t}\n\t\t\n /*$indexing = $this->indexing->findOrFail($id);\n $comments = new CommentsResource($indexing->comments()->orderBy('id', 'desc')->paginate(50));\n return response($comments, Response::HTTP_OK);*/\n\t\treturn response($output, Response::HTTP_OK);\n }", "public function index()\n {\n $classifications = Classification::orderBy('id', 'desc')->paginate(6);\n\n return view(\n 'classifications.index',\n [\n 'classifications' => $classifications\n ]\n );\n \n \n }", "function getClassList(){\n\t\tif(!isset($this->connection)){\n\t\t\tdie('You must set a database connection before calling functions that use the database!');\n\t\t}\n\t\t//Prepare the query!\n\t\t$statement = $this->connection->prepare(\"SELECT * FROM login_class ORDER BY pkNumber ASC WHERE Semester = ?\" );\n\t\t//The $SEMESTER variable comes from config.php\n\t\t$statement->bindValue(1, $SEMESTER, PDO::PARAM_STR);\n\t\t//Actually query and return an array\n\t\t$statement->execute();\n\t\t$class_list = $statement->fetchAll();\n\t\t\n\t\t//Now create a list of strings to return that will be outputed\n\t\t$class_array = array();\n\t\tforeach ($class_list as $class) {\n\t\t\t$class_array[] = 'CS '.$class['pkNumber'] . ' ' . $class['ClassName'] . ' (' . $class['Instructor'] . ')';\n\t\t}\n\n\t\treturn $class_array;\n\n\t}", "public function getClassList()\n {\n $return = array();\n $classes = eZContentClass::fetchList();\n $classBlacklist = self::getClassBlacklist(); \n foreach( $classes as $class )\n {\n if ( !isset( $classBlacklist[$class->attribute('identifier')] ) )\n {\n $return[$class->attribute('identifier')] = $class;\n }\n }\n ksort( $return );\n return $return;\n }", "public function get_section_list_for_classs()\n\t{\n\t\t$cls_id = $this->input->post('classid');\n\t\t$result = $this->tmtl->get_sect_by_school_id($cls_id);\n\t\techo json_encode($result); \n\t}", "public function get_class_list($class_id)\n {\n $children = \\App\\Classes::find($class_id)->children;\n //print_r($class);\n $res = array();\n //array_push($res, count($children));\n foreach( $children as $child) {\n $tmp = array( 'id'=>$child['id'], 'fname'=>$child['fname'], 'lname'=>$child['lname']);\n array_push($res, $tmp);\n }\n\n return Response::json($res);\n }", "public function get_class_list()\n\t{\n\t\t$schl_id = $this->input->post('schl_id');\n\t\t//print_r($schl_id);\n\t\t$result['cls_info'] = $this->tmtl->get_class_by_school_id($schl_id);\n\t\techo json_encode($result); \n\t}", "public function retrieve_class_list()\n\t{\n\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('class_add');\n\t\t$this->db->where('status',1); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function retrieve_class_list()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('class_add');\n\t\t$this->db->where('status',1); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "function buildClassificationList($classifications){ \r\n $classificationList = '<select name=\"classificationId\" id=\"classificationList\">'; \r\n $classificationList .= \"<option>Choose a Classification</option>\"; \r\n foreach ($classifications as $classification) { \r\n $classificationList .= \"<option value='$classification[classificationId]'>$classification[classificationName]</option>\"; \r\n } \r\n $classificationList .= '</select>'; \r\n return $classificationList; \r\n }", "public function actionGetClassesProfessor(){\n $user = $this->get_current_user();\n if(!$user){\n $data = array('success'=>false, 'error_id'=>1);\n $this->renderJSON($data);\n return;\n }\n\n if($user->user_type != 'p'){\n $data = array('success'=>false, 'error_id'=>2, 'error_msg'=>'user is not a professor');\n $this->renderJSON($data);\n return;\n }\n\n\n $classes = ClassModel::model()->findAll('professor_id=:id', array(':id'=>$user->user_id));\n\n for($i = 0;$i < count($classes); $i++){\n $classes[$i] = $this->get_model_associations($classes[$i],array('pictureFile'=>array(), 'course'=>array('pictureFile'), 'department'=>array('pictureFile')));\n }\n\n $data = array('success'=>true,'classes'=>$classes);\n $this->renderJSON($data);\n return;\n\n\n }", "public function getClasses();", "public function getClasses();", "public function getClasses();", "public function fetchClassSubjects ()\r\n {\r\n $class_id = $this->getClass_id(true);\r\n $info = $this->getMapper()->fetchClassSubjects($class_id);\r\n if (empty($info)) {\r\n return false;\r\n } else {\r\n return $info;\r\n }\r\n }", "public function getSectionsByClass() {\n\t\t$sections_by_class = Section::GetInstance()->getSectionsByClass( $_POST['class_id'] );\n\n\t\treturn jsonResult( $sections_by_class );\n\n\t}", "function list(Request $request) {\n $data = Classes::all();\n\n $response = [\n \"success\" => true,\n \"data\" => $data\n ];\n\n return response()->json($response, 200);\n }", "public function listsClassificationsdelete($classification_id)\r\n {\r\n $deleted_classification = Classification::destroy($classification_id);\r\n if($deleted_classification){\r\n return response()->json(['msg' => 'Deleted classification']);\r\n }\r\n }", "public function clases_get()\n {\n $matriculaprofesor = $this->get( 'matriculaprofesor' );\n \n $numgrupo = $this->get( 'numgrupo' );\n\n $nummateria = $this->get( 'nummateria' );\n\n if ( $matriculaprofesor !== null && $numgrupo !== null && $nummateria !== null)\n {\n $clases = $this->ApiModel->obtenerClases($matriculaprofesor,$numgrupo,$nummateria);\n\n $this->response($clases, 200 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Clases no encontrados'\n ], 400 );\n }\n }", "public function get_classification_wise_course(){\n\t\t$this->db->select('classification_list.c_name,classification_list.c_id')->from('course_list');\n\t\t$this->db->join('classification_list ', 'classification_list.c_id = course_list.classification_id', 'left');\n\t\t$this->db->group_by('classification_list.c_id',1);\n\t\t$this->db->where('course_list.published_status',1);\n\t\t$this->db->where('course_list.published',1);\n\t\t$return=$this->db->get()->result_array();\n\t\tforeach($return as $lis){\n\t\t\t$course_list='';\n\t\t\t$course_list=$this->classification_wise_course_list($lis['c_id']);\n\t\t\tif(isset($course_list) && count($course_list)>0){\n\t\t\t\t$data[$lis['c_id']]=$lis;\n\t\t\t\t$data[$lis['c_id']]['course_list']=isset($course_list)?$course_list:'';\n\t\t\t}\n\t\t}\n\t\tif(!empty($data)){\n\t\t\treturn $data;\n\t\t}\n\t}", "function classificationAction() {\n\n $conn = $this->dbConnection();\n\n // Add data to the site ..\n $em = Zend_Registry::get('em');\n\n $query = $em->createQueryBuilder()\n ->select('COUNT(r.ResponseId) as totOpt,\n SUM(IF(r.Points = q.Points, 1, 0) ) correctOpt,\n SUM(IF(r.Points <> q.Points, 1, 0) ) wrongOpt,\n ')\n ->from('Testcreator_Model_Tests', 't')->setMaxResults(10)->getQuery();\n\n // Single text answers ..\n $sql = \" SELECT\n COUNT(R.ResponseId) as totOpt,\n SUM(IF(R.RES_Points = Q.QUE_Points, 1, 0) ) correctOpt,\n SUM(IF(R.RES_Points <> Q.QUE_Points, 1, 0) ) wrongOpt,\n C.ClassificationId,\n C.CLA_Name,\n RT.FK_UserId\n FROM\n t2_sa_results.T_Response R,\n t2_sa_results.T_ResponseTest RT,\n t2_sa_results.T_ResponseText RTE,\n t2_sa_repositories.T_Questions Q,\n t2_sa_repositories.QuestionClassifications QC,\n t2_sa_classifications .T_Classifications C\n WHERE\n RT.ResponseTestId = R.FK_ResponseTestId\n AND\n Q.QuestionId =R.FK_QuestionId\n AND\n R.ResponseId = RTE.FK_ResponseId\n AND\n Q.QuestionId = QC.FK_QuestionId\n AND\n C.ClassificationId = QC.FK_ClassificationId\n GROUP BY\n C.ClassificationId,RT.FK_UserId \";\n\n $result3 = $conn->query($sql) or die(mysqli_error($conn));\n\n if(isset($result3) && $result3->num_rows > 0) {\n\n while($clsObj = $result3->fetch_array(MYSQLI_ASSOC)) {\n // Get the Classification of User ..\n // $this->saveClassifications($clsObj,$conn);\n }\n }\n\n // Multi choice Answers\n $sql1 = \" SELECT COUNT(R.ResponseId) as totOpt,\n SUM(IF(R.RES_Points = Q.QUE_Points, 1, 0) ) correctOpt,\n SUM(IF(R.RES_Points <> Q.QUE_Points, 1, 0) ) wrongOpt,\n C.ClassificationId,\n C.CLA_Name,\n RT.FK_UserId\n FROM\n t2_sa_repositories.T_QuestionsChoiceOptions QC,\n t2_sa_repositories.T_Questions Q,\n t2_sa_results.T_ResponseChoice RC,\n t2_sa_results.T_Response R,\n t2_sa_results.T_ResponseTest RT,\n t2_sa_repositories.QuestionClassifications QCA,\n t2_sa_classifications .T_Classifications C\n\n WHERE\n Q.QuestionId = QC.FK_QuestionId\n AND\n QC.QuestionChoiceOptionId = RC.FK_QuestionChoiceOptionId\n AND\n R.ResponseId = RC.FK_ResponseId\n AND\n RT.ResponseTestId = R.FK_ResponseTestId\n AND\n Q.QuestionId = QCA.FK_QuestionId\n AND\n C.ClassificationId = QCA.FK_ClassificationId\n GROUP BY R.FK_QuestionId,RT.FK_TestId \";\n\n $result4 = $conn->query($sql1) or die(mysqli_error($conn));\n if(isset($result4) && $result4->num_rows > 0) {\n while($clsObj = $result4->fetch_array(MYSQLI_ASSOC)) {\n // Get the Classification of User ..\n $this->saveClassifications($clsObj,$conn);\n }\n }\n exit;\n }", "private function getClassesInformation(){\n // Classroom's data\n $classrooms = Classroom::all();\n // Array of string [[class room id, name,their teacher name, students name]]\n $data = array();\n\n foreach ($classrooms as $classroom) {\n // Get Teacher with the same teacher id\n $teacher = $classroom->teacher;\n // Get teacher name\n if($teacher == null) {\n $teacher_name = \"-\";\n } else {\n $teacher_name = $teacher->name;\n }\n\n // Get Student with the same class id\n $students = $classroom->students;\n // Set Students' name to string_students\n $string_students = \"\";\n foreach ($students as $student) {\n if($student != null) {\n if($string_students != \"\") $string_students .= \", \";\n $string_students .= $student->name;\n }\n }\n // If this class has no student, set $string_students to \"-\"\n if($string_students == \"\") $string_students = \"-\";\n\n // Push to array\n array_push($data, [$classroom->id,$classroom->name,$teacher_name,$string_students]);\n }\n\n return $data;\n }", "public function listsClassificationsput($classification_id)\r\n {\r\n $input = Request::all();\r\n $classification = Classification::findOrFail($classification_id);\r\n $classification->update(['name' => $input['name']]);\r\n if($classification->save()){\r\n return response()->json(['msg' => 'Updated classification', 'data' => $classification]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the classification');\r\n }\r\n }", "public function index(ClassType $classtype)\n {\n //\n// $marks = $classtype->students()->with('subjects')->get()->pluck('subjects')->collapse();\n// return response($marks);\n return response($classtype->students);\n }", "public function getClasses(): Collection\n {\n return $this->classes;\n }", "public function fetchClasses(Request $request)\n {\n $medium = ServiceMediumCategory::where('medium_name', $request->medium_name)->first();\n\n $class = ServiceClassCategory::where('medium_id', $medium->id)->get();\n\n return response()->json($class);\n }", "public function classesList(){\n\t\t$data['fl_classes']=array();\n\t\t// get the flight from db\n\t\t$tbl=$this->session->userdata('prefix').'flightclass';\n\t\t// get the db tables list\n\t\t$tableList=getTables(); // define in custom helper\n\t\t// check if the tbl exist in db \n\t\tif(in_array($tbl, $tableList)){\n\t\t\t$data['fl_classes']=$this->Common_model->select($tbl);\n\t\t} \n\t\t$this->show_front('flight/flight_class', $data);\n\t}" ]
[ "0.69239616", "0.6165042", "0.60568416", "0.5909142", "0.5796222", "0.5633155", "0.56172335", "0.5606316", "0.5589567", "0.5520904", "0.54839337", "0.5478857", "0.54543203", "0.53872347", "0.5358555", "0.5358555", "0.5358555", "0.5289705", "0.52861327", "0.5264364", "0.5262413", "0.5262371", "0.5226017", "0.52175653", "0.51979005", "0.51597655", "0.5145965", "0.5142416", "0.51232296", "0.5103975" ]
0.78488344
0
Operation listsClassificationsClassificationIdGet Fetch Classification specified by classificationId.
public function listsClassificationsByIdget($classification_id) { $classification = Classification::findOrFail($classification_id); return response()->json($classification,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creditorClassificationGETRequestClassificationsClassificationIDGet($accept, $classification_id, $jiwa_stateful = null)\n {\n list($response) = $this->creditorClassificationGETRequestClassificationsClassificationIDGetWithHttpInfo($accept, $classification_id, $jiwa_stateful);\n return $response;\n }", "public function listsClassificationsput($classification_id)\r\n {\r\n $input = Request::all();\r\n $classification = Classification::findOrFail($classification_id);\r\n $classification->update(['name' => $input['name']]);\r\n if($classification->save()){\r\n return response()->json(['msg' => 'Updated classification', 'data' => $classification]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the classification');\r\n }\r\n }", "public function listsClassificationsdelete($classification_id)\r\n {\r\n $deleted_classification = Classification::destroy($classification_id);\r\n if($deleted_classification){\r\n return response()->json(['msg' => 'Deleted classification']);\r\n }\r\n }", "public function listsClassificationsget()\r\n {\r\n $response = Classification::all();\r\n return response()->json($response,200);\r\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGetAsync($accept, $classification_id, $jiwa_stateful = null)\n {\n return $this->creditorClassificationGETRequestClassificationsClassificationIDGetAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function get_class_list($class_id)\n {\n $children = \\App\\Classes::find($class_id)->children;\n //print_r($class);\n $res = array();\n //array_push($res, count($children));\n foreach( $children as $child) {\n $tmp = array( 'id'=>$child['id'], 'fname'=>$child['fname'], 'lname'=>$child['lname']);\n array_push($res, $tmp);\n }\n\n return Response::json($res);\n }", "function category_id_class($classes) {\n\t\tglobal $post;\n\t\tforeach((get_the_category($post->ID)) as $category)\n\t\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\t\treturn $classes;\n\t}", "public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGetWithHttpInfo($accept, $classification_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorClassification';\n $request = $this->creditorClassificationGETRequestClassificationsClassificationIDGetRequest($accept, $classification_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\treturn $classes;\n}", "function buildClassificationList($classifications){ \r\n $classificationList = '<select name=\"classificationId\" id=\"classificationList\">'; \r\n $classificationList .= \"<option>Choose a Classification</option>\"; \r\n foreach ($classifications as $classification) { \r\n $classificationList .= \"<option value='$classification[classificationId]'>$classification[classificationName]</option>\"; \r\n } \r\n $classificationList .= '</select>'; \r\n return $classificationList; \r\n }", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes[] = 'cat-' . $category->cat_ID . '-id';\n\t\t$classes[] = $post->post_type . '-' . $post->post_name;\n\t\treturn $classes;\n}", "public function categories_get($category_id = \"\") {\n $categories = array();\n $categories = $this->api_model->categories_get($category_id);\n $this->set_response($categories, REST_Controller::HTTP_OK);\n }", "public function classification()\n {\n\t\t$output = '<option selected=\"true\" disabled=\"disabled\">Select Classification</option>';\n\t\tif($this->request->id!=''){\n\t\t\t$classification = DB::table('embaseindex_classifications')->where('section_id', $this->request->id)->get();\n\t\t\tforeach($classification as $classval){\n\t\t\t\t$output .=\t'<option value=\"'.$classval->id.'\">'.$classval->classvalue.'</option>';\n\t\t\t}\n\t\t}\n\t\t\n /*$indexing = $this->indexing->findOrFail($id);\n $comments = new CommentsResource($indexing->comments()->orderBy('id', 'desc')->paginate(50));\n return response($comments, Response::HTTP_OK);*/\n\t\treturn response($output, Response::HTTP_OK);\n }", "public function setClassificationName($classification_name)\n {\n $this->classification_name = $classification_name;\n\n return $this;\n }", "public function show(Classification $classification)\n {\n $classification = Classification::findOrFail($id);\n\n return view(\n 'classifications.show',[\n 'classification' => $classification\n\n ]\n );\n }", "public function getCategoryId($id_category)\n\t\t{\n\t\t\t$sql = \"SELECT tbl_category_products.name_cate, tbl_category_products.id_category FROM tbl_category_products \n\t\t\t\t\tWHERE id_category = :id_category\";\n\t\t\t$pre = $this->pdo->prepare($sql);\n\n\t\t\t$pre->bindParam(':id_category', $id_category);\n\t\t\t$pre->execute();\n\n\t\t\treturn $pre->fetchAll(PDO::FETCH_ASSOC);\n\t\t}", "public function getAllCategoriesForFood($food_id){\n\t\t$query = $this->db->query('\n\t\t\tselect c.id, c.name\n\t\t\tfrom\n\t\t\t\tfood_category c\n\t\t\tleft join\n\t\t\t\tfood_category_assoc a\n\t\t\ton\n\t\t\t\ta.food_category_id = c.id\n\t\t\twhere\n\t\t\t\ta.food_id = ?', array($food_id));\n\t\treturn $query->result();\n\t}", "public function getProductCategories($id){\n\t\t\t$sql = \"SELECT * FROM product_categories WHERE id = $id\";\n\t\t\t$result = mysqli_query($this->connect(),$sql);\n\t\t\treturn $result->fetch_assoc() ;\n\t\t}", "public function creditorClassificationGETRequestClassificationsClassificationIDGetAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorClassification';\n $request = $this->creditorClassificationGETRequestClassificationsClassificationIDGetRequest($accept, $classification_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getClassification()\n {\n return $this->classification;\n }", "public function getClassificationName()\n {\n return $this->classification_name;\n }", "public function getClass($feeClassId){\n \n \t$query = \"SELECT \n\t\t classId, studyPeriodId ,batchId, isActive,\n (SELECT studyPeriodId FROM class WHERE classId='$feeClassId') AS feeStudyPeriodId\n\t\t FROM \n\t\t\t class cc\n\t\t WHERE\n \t CONCAT_WS(',',cc.batchId,cc.degreeId,cc.branchId) \n\t\t\t IN \n\t\t\t (SELECT CONCAT_WS(',',c.batchId,c.degreeId,c.branchId) FROM class c WHERE c.classId = '$feeClassId')\n\t\t\t ORDER BY \n classId DESC\";\n\t\t\n\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "function get_classes($class_id)\n\t\t{\n\t\t\t$get_student_list = $this->db->get_where('student' , array('class_id' => $class_id))->result_array();\n\t\t\techo '<option value=\"\">Select student</option>';\n\t\t\tforeach ($get_student_list as $row_value){\n\t\t\t\techo '<option value=\"'.$row_value['student_id'].'\">'.$row_value['name'].'</option>';\n\t\t\t}\n\t\t}", "public static function getCategory($id)\n {\n return (array) BackendModel::getContainer()->get('database')->getRecord(\n 'SELECT i.*\n FROM slideshow_categories AS i\n WHERE i.id = ?',\n array((int) $id)\n );\n }", "public function get_product_categories_by_id($id){\n\t\t$query=\"SELECT * FROM categories LEFT JOIN\".\n\t\t\" Products_has_Categories ON Products_has_Categories.Category_id = categories.id\" .\n\t\t\" AND products_has_categories.Product_id = ?\";\n\t\t$value=array($id);\n\t\treturn $this->db->query($query,$value)->result_array();\n\t}", "public function getCategoryIds($questionId) {\n\t\t$where = array('questionid = ' . $questionId);\n\t\t$results = $this->fetchAll($where);\n\t\tif (!$results) {\n\t\t\tthrow new Model_Exception_QuestionNotFound('hascategory', $questionId);\n\t\t}\n\n\t\t$ret = array();\n\t\tforeach ($results->toArray() as $result) {\n\t\t\t$ret[] = $result['categoryid'];\n\t\t}\n\t\treturn $ret;\n\t}", "function bfa_category_id_class($classes) {\r\n\t global $post;\r\n\t if (is_single()) {\t\r\n\t \tforeach((get_the_category($post->ID)) as $category)\r\n\t \t$classes[] = 'category-'.$category->slug;\r\n\t\t}\r\n\t\treturn $classes;\r\n\t}", "public function getCategoryIds($category_id)\n\t{\n\t\t$tname=$this->tablename(\"catalog_category_entity\");\n\t\t$result=$this->selectAll(\n\t\t\"SELECT entity_id as pid,attribute_set_id as asid FROM $tname WHERE entity_id=?\", $category_id);\n\t\tif(count($result)>0)\n\t\t{\n\t\t\treturn $result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getAssignmentsForClass($class_id) {\n return $this->get('get_assignments_for_class', ['class_id' => $class_id]);\n }" ]
[ "0.6293834", "0.5992187", "0.5900723", "0.5888742", "0.58041877", "0.5363693", "0.50311625", "0.49974838", "0.49746752", "0.49667552", "0.49603206", "0.49021238", "0.49020028", "0.48675784", "0.4855284", "0.48398083", "0.47281185", "0.4720346", "0.4720225", "0.4707737", "0.46869442", "0.46828273", "0.46591967", "0.46422744", "0.46378663", "0.46331564", "0.45914882", "0.45702356", "0.4557838", "0.45559427" ]
0.77639675
0
Operation listsClassificationsPost create a Classification.
public function listsClassificationspost() { $input = Request::all(); $new_classification = Classification::create($input); if($new_classification){ return response()->json(['msg' => 'Added a new Classification', 'data'=> $new_classification]); }else{ return response('Oops, it seems like there was a problem adding the Classification'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('classifications.create');\n }", "public function listsCategoriesPost()\r\n {\r\n $input = Request::all();\r\n $new_catgory = Category::create($input);\r\n if($new_catgory){\r\n return response()->json(['msg' => 'Created Category'], 200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a category');\r\n }\r\n }", "public function addClass_post()\n {\n $postArray\t \t= $this->post();\n\t\t\n\t\t$dataArray = array(\n\t\t\t'instructor_id' \t\t\t\t=> $postArray['userId'],\n\t\t\t'class_name' \t\t\t\t\t=> $postArray['class_name'],\n\t\t\t'class_desc' \t\t\t\t\t=> $postArray['about_class'],\n\t\t\t'class_hours_length' \t\t\t=> $postArray['hours_length'],\n\t\t\t'class_min_length' \t\t\t\t=> $postArray['minutes_length'],\n\t\t\t'class_instruction' \t\t\t=> $postArray['special_instrauctions'],\n\t\t\t'complexity' \t\t\t\t\t=> $postArray['complexity'],\n\t\t\t'class_limit' \t\t\t\t\t=> 1,\n\t\t\t'class_date' \t\t\t\t\t=> $postArray['date_of_class'],\n\t\t\t'class_time' \t\t\t\t\t=> $postArray['time_hours'].\":\".$postArray['time_minutes'],\n\t\t\t'class_time_zone' \t\t\t\t=> $postArray['class_time_zone'],\n\t\t\t'class_cost' \t\t\t\t\t=> $postArray['cost'],\n\t\t\t'class_cancellation_policy' \t=> $postArray['cancellation_policy'],\n\t\t\t'class_cancellation_cost' \t\t=> $postArray['cancellation_cost'],\n\t\t\t'allow_message' \t\t\t\t=> $postArray['allow_msg'],\n\t\t\t'allow_bonus' \t\t\t\t\t=> $postArray['allow_bonus'],\n\t\t\t'status' \t\t\t\t\t\t=> 1,\n\t\t\t'date_added' \t\t\t\t\t=> date('Y-m-d H:i:s')\n\t\t\t);\n\t\t$this->Common_Model->insert('sj_class',$dataArray);\n\t\t$message = [\n 'message' => 'New class added successfully.'\n ];\n\t\t$this->set_response($message, REST_Controller::HTTP_OK); // UPDATED (200) being the HTTP response code\n }", "public function creditorClassificationPOSTRequestClassificationsPost($accept, $jiwa_stateful = null, $description = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n list($response) = $this->creditorClassificationPOSTRequestClassificationsPostWithHttpInfo($accept, $jiwa_stateful, $description, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body);\n return $response;\n }", "public function listsClassificationsget()\r\n {\r\n $response = Classification::all();\r\n return response()->json($response,200);\r\n }", "function classificationAction() {\n\n $conn = $this->dbConnection();\n\n // Add data to the site ..\n $em = Zend_Registry::get('em');\n\n $query = $em->createQueryBuilder()\n ->select('COUNT(r.ResponseId) as totOpt,\n SUM(IF(r.Points = q.Points, 1, 0) ) correctOpt,\n SUM(IF(r.Points <> q.Points, 1, 0) ) wrongOpt,\n ')\n ->from('Testcreator_Model_Tests', 't')->setMaxResults(10)->getQuery();\n\n // Single text answers ..\n $sql = \" SELECT\n COUNT(R.ResponseId) as totOpt,\n SUM(IF(R.RES_Points = Q.QUE_Points, 1, 0) ) correctOpt,\n SUM(IF(R.RES_Points <> Q.QUE_Points, 1, 0) ) wrongOpt,\n C.ClassificationId,\n C.CLA_Name,\n RT.FK_UserId\n FROM\n t2_sa_results.T_Response R,\n t2_sa_results.T_ResponseTest RT,\n t2_sa_results.T_ResponseText RTE,\n t2_sa_repositories.T_Questions Q,\n t2_sa_repositories.QuestionClassifications QC,\n t2_sa_classifications .T_Classifications C\n WHERE\n RT.ResponseTestId = R.FK_ResponseTestId\n AND\n Q.QuestionId =R.FK_QuestionId\n AND\n R.ResponseId = RTE.FK_ResponseId\n AND\n Q.QuestionId = QC.FK_QuestionId\n AND\n C.ClassificationId = QC.FK_ClassificationId\n GROUP BY\n C.ClassificationId,RT.FK_UserId \";\n\n $result3 = $conn->query($sql) or die(mysqli_error($conn));\n\n if(isset($result3) && $result3->num_rows > 0) {\n\n while($clsObj = $result3->fetch_array(MYSQLI_ASSOC)) {\n // Get the Classification of User ..\n // $this->saveClassifications($clsObj,$conn);\n }\n }\n\n // Multi choice Answers\n $sql1 = \" SELECT COUNT(R.ResponseId) as totOpt,\n SUM(IF(R.RES_Points = Q.QUE_Points, 1, 0) ) correctOpt,\n SUM(IF(R.RES_Points <> Q.QUE_Points, 1, 0) ) wrongOpt,\n C.ClassificationId,\n C.CLA_Name,\n RT.FK_UserId\n FROM\n t2_sa_repositories.T_QuestionsChoiceOptions QC,\n t2_sa_repositories.T_Questions Q,\n t2_sa_results.T_ResponseChoice RC,\n t2_sa_results.T_Response R,\n t2_sa_results.T_ResponseTest RT,\n t2_sa_repositories.QuestionClassifications QCA,\n t2_sa_classifications .T_Classifications C\n\n WHERE\n Q.QuestionId = QC.FK_QuestionId\n AND\n QC.QuestionChoiceOptionId = RC.FK_QuestionChoiceOptionId\n AND\n R.ResponseId = RC.FK_ResponseId\n AND\n RT.ResponseTestId = R.FK_ResponseTestId\n AND\n Q.QuestionId = QCA.FK_QuestionId\n AND\n C.ClassificationId = QCA.FK_ClassificationId\n GROUP BY R.FK_QuestionId,RT.FK_TestId \";\n\n $result4 = $conn->query($sql1) or die(mysqli_error($conn));\n if(isset($result4) && $result4->num_rows > 0) {\n while($clsObj = $result4->fetch_array(MYSQLI_ASSOC)) {\n // Get the Classification of User ..\n $this->saveClassifications($clsObj,$conn);\n }\n }\n exit;\n }", "public function creditorClassificationPOSTRequestClassificationsPostAsync($accept, $jiwa_stateful = null, $description = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n return $this->creditorClassificationPOSTRequestClassificationsPostAsyncWithHttpInfo($accept, $jiwa_stateful, $description, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function SaveClassifiedPost() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstClassifiedCategory) $this->objClassifiedPost->ClassifiedCategoryId = $this->lstClassifiedCategory->SelectedValue;\n\t\t\t\tif ($this->chkApprovalFlag) $this->objClassifiedPost->ApprovalFlag = $this->chkApprovalFlag->Checked;\n\t\t\t\tif ($this->txtTitle) $this->objClassifiedPost->Title = $this->txtTitle->Text;\n\t\t\t\tif ($this->txtContent) $this->objClassifiedPost->Content = $this->txtContent->Text;\n\t\t\t\tif ($this->calDatePosted) $this->objClassifiedPost->DatePosted = $this->calDatePosted->DateTime;\n\t\t\t\tif ($this->calDateExpired) $this->objClassifiedPost->DateExpired = $this->calDateExpired->DateTime;\n\t\t\t\tif ($this->txtName) $this->objClassifiedPost->Name = $this->txtName->Text;\n\t\t\t\tif ($this->txtPhone) $this->objClassifiedPost->Phone = $this->txtPhone->Text;\n\t\t\t\tif ($this->txtEmail) $this->objClassifiedPost->Email = $this->txtEmail->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the ClassifiedPost object\n\t\t\t\t$this->objClassifiedPost->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "public function listsClassificationsput($classification_id)\r\n {\r\n $input = Request::all();\r\n $classification = Classification::findOrFail($classification_id);\r\n $classification->update(['name' => $input['name']]);\r\n if($classification->save()){\r\n return response()->json(['msg' => 'Updated classification', 'data' => $classification]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the classification');\r\n }\r\n }", "public function create()\n {\n $categories = $this->categoryRepository->getAll();\n\n return view('post.create', compact('categories'));\n }", "function dft_classes_extras_body( $classes ) {\n global $post;\n $cats = get_the_category();\n\n foreach( $cats as $cat ):\n $classes[] = $cat->slug;\n endforeach;\n\n $classes[] = $post->post_name;\n\n return $classes;\n}", "public function create()\n {\n $categories = Category::all();\n return view(\"post/create\", compact(\"categories\"));\n }", "public function classification()\n {\n\t\t$output = '<option selected=\"true\" disabled=\"disabled\">Select Classification</option>';\n\t\tif($this->request->id!=''){\n\t\t\t$classification = DB::table('embaseindex_classifications')->where('section_id', $this->request->id)->get();\n\t\t\tforeach($classification as $classval){\n\t\t\t\t$output .=\t'<option value=\"'.$classval->id.'\">'.$classval->classvalue.'</option>';\n\t\t\t}\n\t\t}\n\t\t\n /*$indexing = $this->indexing->findOrFail($id);\n $comments = new CommentsResource($indexing->comments()->orderBy('id', 'desc')->paginate(50));\n return response($comments, Response::HTTP_OK);*/\n\t\treturn response($output, Response::HTTP_OK);\n }", "function create_classes_posttype() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Classes', 'Post Type General Name'),\n\t\t'singular_name' => _x( 'Class', 'Post Type Singular Name'),\n\t\t'menu_name' => __( 'Classes'),\n\t\t'parent_item_colon' => __( 'Parent Class'),\n\t\t'all_items' => __( 'All Classes'),\n\t\t'view_item' => __( 'View Class'),\n\t\t'add_new_item' => __( 'Add New Class'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Class'),\n\t\t'update_item' => __( 'Update Class'),\n\t\t'search_items' => __( 'Search Class'),\n\t\t'not_found' => __( 'Not Found'),\n\t\t'not_found_in_trash' => __( 'Not found in Trash'),\n);\n\n$args = array(\n\t'label' => __( 'Classes'),\n\t'description' => __( 'Classes offered by Swing Foundation'),\n\t'labels' => $labels,\n\t// Features this CPT supports in Post Editor\n\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes'),\n\t/* A hierarchical CPT is like Pages and can have\n\t* Parent and child items. A non-hierarchical CPT\n\t* is like Posts.\n\t*/ \n\t'hierarchical' => false,\n\t'public' => true,\n\t'show_ui' => true,\n\t'show_in_menu' => true,\n\t'show_in_nav_menus' => true,\n\t'show_in_admin_bar' => true,\n\t'menu_position' => 5,\n\t'can_export' => true,\n\t'has_archive' => true,\n\t'exclude_from_search' => false,\n\t'publicly_queryable' => true,\n\t'capability_type' => 'page',\n\t'menu_icon'\t\t\t\t\t\t=> 'dashicons-welcome-learn-more'\n);\n \n\tregister_post_type( 'classes', $args );\n}", "function wcs_add_category_slug_body_class( $classes ) {\r\n\t\tglobal $post;\r\n\t\tif ( is_single() ) {\r\n\t\t\tforeach ( get_the_category( $post->ID ) as $category ) {\r\n\t\t\t\t$classes[] = $category->category_nicename;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $classes;\r\n\t}", "public function create()\n {\n $data['kategori'] = Category_post::all();\n return view('back.post.create', $data);\n }", "public function creditorClassificationPOSTRequestClassificationsPostWithHttpInfo($accept, $jiwa_stateful = null, $description = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorClassification';\n $request = $this->creditorClassificationPOSTRequestClassificationsPostRequest($accept, $jiwa_stateful, $description, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function index()\n {\n $classifications = Classification::orderBy('id', 'desc')->paginate(6);\n\n return view(\n 'classifications.index',\n [\n 'classifications' => $classifications\n ]\n );\n \n \n }", "public function create()\n {\n $categoryService = new CategoryService();\n\n $categories = $categoryService::getAll();\n\n return view('pages.post_create')->with(compact('categories'));\n }", "public function create()\n {\n $categories = Category::all();\n return view('post.create', compact('categories'));\n }", "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('sort', 'title', 'img', 'status', 'hits'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Game_Service_Category::addCategory($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "function addClass(){\n $userId = Slim::getInstance()->request()->post('userId');\n $className = Slim::getInstance()->request()->post('className');\n $professor = Slim::getInstance()->request()->post('professor');\n $categories = json_decode(Slim::getInstance()->request()->post('categories'), true);\n try {\n $insertClass = \"INSERT INTO classes(userId, className, professor) VALUE(:userId, :className, :professor)\";\n $db = getConnection();\n $stmt = $db->prepare($insertClass);\n $stmt->bindParam(\"userId\", $userId);\n $stmt->bindParam(\"className\", $className);\n $stmt->bindParam(\"professor\", $professor);\n $stmt->execute();\n $classId = $db->lastInsertId();\n \n foreach($categories['category'] as $category) {\n $categoryName = $category['categoryName'];\n $percentage = $category['percentage'];\n $insertCategory = \"INSERT INTO category(classId, categoryName, percentage) VALUE(:classId, :categoryName, :percentage)\";\n $stmt = $db->prepare($insertCategory);\n $stmt->bindParam(\"classId\", $classId);\n $stmt->bindParam(\"categoryName\", $categoryName);\n $stmt->bindParam(\"percentage\", $percentage);\n $stmt->execute();\n }\n $db = null;\n\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n } \n}", "public function add_new_category_post(){\n $data = $this->security->xss_clean($_POST);\n $data = $this->DeviceCategory_model->add_new_category($data);\n if (isset($data['status']) == 'FALSE')\n {\n $this->response($data, REST_Controller::HTTP_SEE_OTHER);\n }\n $this->set_response($data, REST_Controller::HTTP_CREATED);\n }", "public function create()\n {\n return view('admin.post_categories.create');\n }", "public function create()\n {\n return view('admin.post_categories.create');\n }", "public function create()\n\t{\n\t\t$postcategories = Postcategory::lists('title', 'id');\n\t\treturn View::make('posts.create', compact('postcategories'));\n\t}", "public function create(){\n $listcat=Blog_categories::all();\n return view ('blog_posts.create',['categories'=>$listcat]);\n }", "public function create()\n {\n $rs_categories = DB::select('call ListAllCategoryProcedure()');\n $categories = json_decode(json_encode($rs_categories), true);\n return view('admin.posttype.create',compact('categories'));\n }", "public function create()\n {\n return view('post.create', [\n 'categories' => Category::all(['id', 'name'])\n ]);\n }", "public function listsClassificationsdelete($classification_id)\r\n {\r\n $deleted_classification = Classification::destroy($classification_id);\r\n if($deleted_classification){\r\n return response()->json(['msg' => 'Deleted classification']);\r\n }\r\n }" ]
[ "0.5306462", "0.53041416", "0.5280484", "0.5259272", "0.5117942", "0.50754195", "0.5015667", "0.49015337", "0.4889719", "0.48293138", "0.47523886", "0.47332925", "0.47332123", "0.47151572", "0.471295", "0.46959254", "0.46822497", "0.4606634", "0.45925114", "0.4590782", "0.45692316", "0.45655864", "0.45629063", "0.45531765", "0.45531765", "0.45274112", "0.45177066", "0.45167688", "0.45013168", "0.44929433" ]
0.6804672
0
Operation listsClassificationsClassificationIdPut Update an existing Classification.
public function listsClassificationsput($classification_id) { $input = Request::all(); $classification = Classification::findOrFail($classification_id); $classification->update(['name' => $input['name']]); if($classification->save()){ return response()->json(['msg' => 'Updated classification', 'data' => $classification]); }else{ return response('Oops, it seems like there was a problem updating the classification'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Classification $classification)\n {\n $rules = [\n 'descricao' => 'required|string|unique:classifications|min:5|max:30' \n ];\n\n $messages = [\n 'descricao.unique' => 'A classificação deve ser única em toda a tabela'\n ];\n\n $request->validate($rules, $messages);\n $classification = Classifications::findOrFail($id);\n $classification->descricao = $request->descricao;\n\n $classification->save();\n\n return redirect()\n ->route('classifications.index')\n ->with('status', 'Registro Atualizado com Sucesso');\n\n }", "public function listsClassificationsByIdget($classification_id)\r\n {\r\n $classification = Classification::findOrFail($classification_id);\r\n return response()->json($classification,200);\r\n }", "public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }", "public function creditorClassificationPATCHRequestClassificationsClassificationIDUpdate($accept, $classification_id, $jiwa_stateful = null, $description = null, $last_saved_date_time = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n list($response) = $this->creditorClassificationPATCHRequestClassificationsClassificationIDUpdateWithHttpInfo($accept, $classification_id, $jiwa_stateful, $description, $last_saved_date_time, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body);\n return $response;\n }", "public function creditorClassificationPATCHRequestClassificationsClassificationIDUpdateWithHttpInfo($accept, $classification_id, $jiwa_stateful = null, $description = null, $last_saved_date_time = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorClassification';\n $request = $this->creditorClassificationPATCHRequestClassificationsClassificationIDUpdateRequest($accept, $classification_id, $jiwa_stateful, $description, $last_saved_date_time, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\CreditorClassification',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function update($id, Request $request)\n {\n $rules = [\n 'name' => 'required|unique:classes,name,' . $id,\n 'size' => 'required'\n ];\n\n $this->validate($request, $rules);\n\n $class = CollegeClass::find($id);\n\n if (!$class) {\n return Response::json(['error' => 'Class not found'], 404);\n }\n\n $class = $this->service->update($id, $request->all());\n\n return Response::json(['message' => 'Class updated'], 200);\n }", "public function update(ClassesRequest $request, $id)\n {\n $class = ClassModel::find($id);\n $class->name = $request->name;\n $class->slug = $request->slug;\n $class->save();\n\n session()->flash('success', trans('main.updated'));\n return redirect()->route('classes.show', [$class->id]);\n }", "public function listsClassificationsdelete($classification_id)\r\n {\r\n $deleted_classification = Classification::destroy($classification_id);\r\n if($deleted_classification){\r\n return response()->json(['msg' => 'Deleted classification']);\r\n }\r\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGet($accept, $classification_id, $jiwa_stateful = null)\n {\n list($response) = $this->creditorClassificationGETRequestClassificationsClassificationIDGetWithHttpInfo($accept, $classification_id, $jiwa_stateful);\n return $response;\n }", "public function setClassification(?WindowsQualityUpdateClassification $value): void {\n $this->getBackingStore()->set('classification', $value);\n }", "public function update(ClassesRequest $request, $id)\n {\n\n $this->repository->update($request->all(), $id);\n $url = $request->get('redirect_to', route('admin.classes.index'));\n $request->session()->flash('message', 'Classe atualizada com sucesso.');\n\n return redirect()->to($url);\n }", "public function update(Request $request, Classes $class)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'classes' => ['max:10'],\n ]);\n $classupdate = ClassModel::find($id);\n $classupdate->classes = $request->classes;\n $classupdate->save();\n return redirect()->back()->with('SuccessMsg', 'Class successfully updated');\n\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGetAsync($accept, $classification_id, $jiwa_stateful = null)\n {\n return $this->creditorClassificationGETRequestClassificationsClassificationIDGetAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function update(Request $request, Classes $classes)\n {\n //\n }", "function addClass(){\n $userId = Slim::getInstance()->request()->post('userId');\n $className = Slim::getInstance()->request()->post('className');\n $professor = Slim::getInstance()->request()->post('professor');\n $categories = json_decode(Slim::getInstance()->request()->post('categories'), true);\n try {\n $insertClass = \"INSERT INTO classes(userId, className, professor) VALUE(:userId, :className, :professor)\";\n $db = getConnection();\n $stmt = $db->prepare($insertClass);\n $stmt->bindParam(\"userId\", $userId);\n $stmt->bindParam(\"className\", $className);\n $stmt->bindParam(\"professor\", $professor);\n $stmt->execute();\n $classId = $db->lastInsertId();\n \n foreach($categories['category'] as $category) {\n $categoryName = $category['categoryName'];\n $percentage = $category['percentage'];\n $insertCategory = \"INSERT INTO category(classId, categoryName, percentage) VALUE(:classId, :categoryName, :percentage)\";\n $stmt = $db->prepare($insertCategory);\n $stmt->bindParam(\"classId\", $classId);\n $stmt->bindParam(\"categoryName\", $categoryName);\n $stmt->bindParam(\"percentage\", $percentage);\n $stmt->execute();\n }\n $db = null;\n\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n } \n}", "public function creditorClassificationPATCHRequestClassificationsClassificationIDUpdateAsync($accept, $classification_id, $jiwa_stateful = null, $description = null, $last_saved_date_time = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n return $this->creditorClassificationPATCHRequestClassificationsClassificationIDUpdateAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful, $description, $last_saved_date_time, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function update($id, ItemclassRequest $request)\n {\n //\n $itemclass = Itemclass::findOrFail($id);\n $itemclass->update($request->all());\n return redirect('product/itemclasses');\n }", "public function creditorClassificationPATCHRequestClassificationsClassificationIDUpdateAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful = null, $description = null, $last_saved_date_time = null, $is_default = null, $terms_days = null, $terms_type = null, $po_workflows_rec_id = null, $po_workflows_name = null, $po_workflows_description = null, $creditor_ledgers = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorClassification';\n $request = $this->creditorClassificationPATCHRequestClassificationsClassificationIDUpdateRequest($accept, $classification_id, $jiwa_stateful, $description, $last_saved_date_time, $is_default, $terms_days, $terms_type, $po_workflows_rec_id, $po_workflows_name, $po_workflows_description, $creditor_ledgers, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function creditorClassificationSAVERequestClassificationsSaveGet($accept, $jiwa_stateful = null, $classification_id = null)\n {\n list($response) = $this->creditorClassificationSAVERequestClassificationsSaveGetWithHttpInfo($accept, $jiwa_stateful, $classification_id);\n return $response;\n }", "public function setClassification(?PermissionClassificationType $value): void {\n $this->getBackingStore()->set('classification', $value);\n }", "function category_id_class($classes) {\n\t\tglobal $post;\n\t\tforeach((get_the_category($post->ID)) as $category)\n\t\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\t\treturn $classes;\n\t}", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\treturn $classes;\n}", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'clasificacion' => 'required|max:255',\n ]);\n\n clasificacion::find($id)->update($request->all());\n\n return redirect('/asesorclasificacion')->with('success','Clasificacion actualizado correctamente');\n }", "public function update(CategoriesRequest $request, $id)\n {\n //\n }", "public function listsClassificationspost()\r\n {\r\n $input = Request::all();\r\n $new_classification = Classification::create($input);\r\n if($new_classification){\r\n return response()->json(['msg' => 'Added a new Classification', 'data'=> $new_classification]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the Classification');\r\n }\r\n }", "public function updateClass(Request $request,$id){\n $id = CustomHelper::getDecrypted($id);\n $rules = [\n 'class' => 'required|unique:class_sec,clas,'.$id.',id,section,'.$request->input('section'),\n //'section' => 'required|max:1',\n ];\n $messages = [\n 'class.required' => 'Please fill class field.',\n 'class.unique' => 'Class & Section already exists.',\n //'section.required' => 'Please fill section field.'\n ];\n $validator = Validator::make($request->all(), $rules,$messages);\n if ($validator->fails())\n {\n return back()->withErrors($validator)->withInput();\n }else{\n ClassSec::find($id)->update([\n 'clas' => $request->input('class'),\n 'section' => $request->input('section'),\n ]);\n $request->session()->flash('status', 'success');\n $request->session()->flash('msg', 'Class Updated successfully.');\n return redirect()->route(\"Class.index\");\n }\n }", "public function setClassificationName($classification_name)\n {\n $this->classification_name = $classification_name;\n\n return $this;\n }", "public function listsCategoriesPut($category_id)\r\n {\r\n $input = Request::all();\r\n $category = Category::findOrFail($category_id);\r\n $category->update(['name' => $input['name']]);\r\n if($category->save()){\r\n return response()->json(['msg' => 'Updated Category'], 200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to update a category');\r\n }\r\n }", "public function update(Request $request, $id)\n {\n //\n if($request->isMethod('put'))\n {\n $data = $request->all();\n\n //Validate input\n $this->validate($request, [\n 'name' => 'required|min:3'\n ]);\n\n $class = StudentClass::where(['id'=>$id])->update([\n 'name' => $data['name'],\n 'description' => $data['description']\n ]);\n\n if($class)\n {\n return redirect('admin/classes')->with('success', 'Class '.$data['name'].' Updated Successfully');\n }else {\n return redirect()->back()->with('error', 'Unable to edit class, possible internal error');\n }\n\n\n }\n }" ]
[ "0.5562119", "0.53778595", "0.49964878", "0.49753743", "0.4907772", "0.48818314", "0.48558432", "0.4847867", "0.48422855", "0.48273394", "0.47093368", "0.46842757", "0.46462286", "0.46439314", "0.46093795", "0.45088914", "0.44817668", "0.44410077", "0.44000134", "0.4378626", "0.4367288", "0.43423453", "0.43026358", "0.43005225", "0.42832515", "0.42786106", "0.4278038", "0.42642775", "0.42599294", "0.4257158" ]
0.59986264
0
Operation listsClassificationsClassificationIdDelete Deletes a Classification specified by classificationId.
public function listsClassificationsdelete($classification_id) { $deleted_classification = Classification::destroy($classification_id); if($deleted_classification){ return response()->json(['msg' => 'Deleted classification']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creditorClassificationDELETERequestClassificationsClassificationIDDelete($accept, $classification_id, $jiwa_stateful = null)\n {\n list($response) = $this->creditorClassificationDELETERequestClassificationsClassificationIDDeleteWithHttpInfo($accept, $classification_id, $jiwa_stateful);\n return $response;\n }", "public function listsClassificationsByIdget($classification_id)\r\n {\r\n $classification = Classification::findOrFail($classification_id);\r\n return response()->json($classification,200);\r\n }", "public function creditorClassificationDELETERequestClassificationsClassificationIDDeleteAsync($accept, $classification_id, $jiwa_stateful = null)\n {\n return $this->creditorClassificationDELETERequestClassificationsClassificationIDDeleteAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function destroy(Classification $classification)\n {\n $classification = Classification::findOrFail($id);\n $classification->delete();\n\n return redirect()\n ->route('classifications.index')\n ->with('status','Registro excluido com sucesso');\n }", "public function delete($class_id)\n {\n if($this->is_exist(\"class_id\", $class_id, T_CLASSES)){\n $this->db->where(\"class_id\", $class_id)\n ->delete(T_CLASSES);\n return 200;\n }\n return 400;\n }", "public function listsClassificationsput($classification_id)\r\n {\r\n $input = Request::all();\r\n $classification = Classification::findOrFail($classification_id);\r\n $classification->update(['name' => $input['name']]);\r\n if($classification->save()){\r\n return response()->json(['msg' => 'Updated classification', 'data' => $classification]);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the classification');\r\n }\r\n }", "public function creditorClassificationDELETERequestClassificationsClassificationIDDeleteWithHttpInfo($accept, $classification_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->creditorClassificationDELETERequestClassificationsClassificationIDDeleteRequest($accept, $classification_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGet($accept, $classification_id, $jiwa_stateful = null)\n {\n list($response) = $this->creditorClassificationGETRequestClassificationsClassificationIDGetWithHttpInfo($accept, $classification_id, $jiwa_stateful);\n return $response;\n }", "public function creditorClassificationABANDONRequestClassificationsAbandonDelete($accept, $jiwa_stateful = null, $classification_id = null)\n {\n list($response) = $this->creditorClassificationABANDONRequestClassificationsAbandonDeleteWithHttpInfo($accept, $jiwa_stateful, $classification_id);\n return $response;\n }", "public function creditorClassificationDELETERequestClassificationsClassificationIDDeleteAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->creditorClassificationDELETERequestClassificationsClassificationIDDeleteRequest($accept, $classification_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function deleteCategsProdsByCategId($id_categ) {\n try{\n $relationid = DB::table('categs_prods')->where('id_categ', '=', $id_categ)->delete();\n\n return response()->json(['status' => 1, 'deleted_relation' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0], 500);\n }\n }", "public function destroy($id)\n {\n //$subclas = Classification::find($id)->subclassifications; Funciona y se puede iterar foreach\n\n $subclas = DB::table('subclassifications')->where('classification_id', $id)->first();\n if($subclas != null){\n return redirect()->route('classifications.index')->with('info','Existen registros vinculados, no puede eliminarse (Subclasificaciones');\n }\n\n $pathologies = Pathology::where('classification_id', $id)->first();\n if($pathologies != null){\n return redirect()->route('classifications.index')->with('info','Existen registros vinculados, no puede eliminarse (Patologias)');\n }\n\n Classification::find($id)->delete();\n\n return redirect()->route('classifications.index')->with('info','Informacion eliminada...');\n }", "public function listsCategoriesDelete($category_id)\r\n {\r\n Category::destroy($category_id);\r\n return response()->json(['msg' => 'deleted Category'], 200);\r\n }", "public function deleteAction($id)\n {\n $service = $this->getModuleService('dictionaryService');\n\n // Batch removal\n if ($this->request->hasPost('batch')) {\n $ids = array_keys($this->request->getPost('batch'));\n\n $service->deleteByIds($ids);\n $this->flashBag->set('success', 'Selected elements have been removed successfully');\n\n } else {\n $this->flashBag->set('warning', 'You should select at least one element to remove');\n }\n\n // Single removal\n if (!empty($id)) {\n $service->deleteById($id);\n $this->flashBag->set('success', 'Selected element has been removed successfully');\n }\n\n return 1;\n }", "public function DeleteCategory($id) {\n $this->Db()->where('id', $id);\n if($this->Db()->delete('Categories')) {\n return 'Categorie verwijderd.';\n } else {\n throw new RestException(500, 'Niet gelukt om categorie met Id: \\'' . $id . '\\' te verwijderen');\n }\n }", "public function deleteCategory($id)\n {\n\n Category::findOrFail($id)->delete();\n $this->success_message = 'Category deleted successfully!';\n\n }", "public function creditorClassificationGETRequestClassificationsClassificationIDGetAsync($accept, $classification_id, $jiwa_stateful = null)\n {\n return $this->creditorClassificationGETRequestClassificationsClassificationIDGetAsyncWithHttpInfo($accept, $classification_id, $jiwa_stateful)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function delete_classes($id)\n {\n $table = $this->return_table();\n $this->db->where('id', $id);\n return $this->db->delete($table);\n }", "public function DeleteClassType($classtype_id)\n\t{\n\t\t//deletes the classtype\n\t\tClassType::destroy($classtype_id);\n\t\t\n\t\t//redirects to ViewClassType action\n\t\treturn Redirect::action('ViewClassTypesController@ViewClassTypes');\n\n\t}", "public function delete( int $id )\n {\n $result = $this->category_model->deleteCategory( $id );\n\n echo json_decode($result);\n }", "public function deleteCategsProdsIds($id_categ, $id_prod) {\n try{\n $relationid = DB::table('categs_prods')->where('id_categ', '=', $id_categ)->where('id_prod', '=', $id_prod)->delete();\n\n return response()->json(['status' => 1, 'deleted_relation' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0], 500);\n }\n }", "public function delete_category($id) {\n $this->category();\n\n $connection = new Database(\"sbrettsc_db\");\n $connection->do_sql(\"DELETE FROM category WHERE id = \" . $id);\n $this->index();\n\n }", "protected function creditorClassificationDELETERequestClassificationsClassificationIDDeleteRequest($accept, $classification_id, $jiwa_stateful = null)\n {\n // verify the required parameter 'accept' is set\n if ($accept === null || (is_array($accept) && count($accept) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accept when calling creditorClassificationDELETERequestClassificationsClassificationIDDelete'\n );\n }\n // verify the required parameter 'classification_id' is set\n if ($classification_id === null || (is_array($classification_id) && count($classification_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $classification_id when calling creditorClassificationDELETERequestClassificationsClassificationIDDelete'\n );\n }\n\n $resourcePath = '/Creditors/Classifications/{ClassificationID}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($accept !== null) {\n $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept);\n }\n // header params\n if ($jiwa_stateful !== null) {\n $headerParams['jiwa-stateful'] = ObjectSerializer::toHeaderValue($jiwa_stateful);\n }\n\n // path params\n if ($classification_id !== null) {\n $resourcePath = str_replace(\n '{' . 'ClassificationID' . '}',\n ObjectSerializer::toPathValue($classification_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/x-www-form-urlencoded', 'application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function deleteCategory($id)\n {\n //\n Category::where('id', $id)->delete();\n return response()->json('Category has been deleted successfully');\n }", "public function creditorClassificationABANDONRequestClassificationsAbandonDeleteWithHttpInfo($accept, $jiwa_stateful = null, $classification_id = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->creditorClassificationABANDONRequestClassificationsAbandonDeleteRequest($accept, $jiwa_stateful, $classification_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function delete($id)\n {\n return $this->categoryModel->where('id',$id)->delete();\n }", "public function delete_products_category($id)\n {\n $this->db->delete('productos_categorias', array('idOfertas'=>$id));\n }", "public function delete($id)\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.delete',\n array('id' => $id)\n );\n return $fullResult;\n }", "public static function deleteCategory($id)\n {\n \t$query = \"DELETE FROM categories WHERE id = :id\";\n \t$result = DB::delete($query, ['id' => $id]);\n\n \treturn $result;\n }", "public function deleteAllByCategoryId($id)\n {\n return $this->deleteByColumn('category_Id', $id);\n }" ]
[ "0.6451253", "0.59444475", "0.5681002", "0.55445135", "0.55428517", "0.52840716", "0.5155788", "0.5021118", "0.496316", "0.4931301", "0.4868825", "0.47762385", "0.47761837", "0.47688892", "0.47517502", "0.4701167", "0.46991172", "0.46771136", "0.4643835", "0.46268922", "0.4597633", "0.45731398", "0.4571609", "0.45526788", "0.4548833", "0.45293373", "0.45169544", "0.44817507", "0.44487655", "0.44412455" ]
0.7687282
0
/////////////////////// indications // ///////////////////// Operation listsIndicationsGet Fetch indications.
public function listsIndicationsget() { $response = Indication::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function listNotificationInterests( );", "function ppt_resources_get_indications($data)\n{\n return ppt_resources_get($data, 'field_indication');\n}", "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'listicdcodes',\n 'lookfor' => get_data('term'),\n )));\n\n $listicdcodes = !empty($listicdcodes) ? json_decode($listicdcodes) : array();\n\n /*Converting to autocomplete understandable format*/\n if (!empty($listicdcodes))\n {\n foreach ($listicdcodes as $val)\n {\n $listicdcodes_arr[] = array('id' => current($val)->ICDCode, 'value' => current($val)->ICDTitle);\n }\n }\n exit(json_encode($listicdcodes_arr));\n }", "public function getIndicatorsAction(){ \n $result = array();\n $indicator = Indicators :: find();\n $result['indicator'] = $indicator[0]->indicators;\n Library::output(true, '1', \"No Error\", $result);\n }", "public function listsIndicationsdelete($indication_id)\r\n {\r\n $deleted_indication = Indication::destroy($indication_id);\r\n if($deleted_indication){\r\n return response()->json(['msg' => 'Deleted indication']);\r\n }\r\n }", "public function getAllIndicators() {}", "public function ListCrossListed(){\n\t\treturn array(\"results\" => $this->Read('[CROSSLISTINGS TABLE]'));\n\t}", "public function actionIndex()\n {\n $searchModel = new IndicationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $counter = Counter::findOne(['id' => Yii::$app->request->get('id')]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'counter' => $counter,\n ]);\n }", "public function getIncidents()\n {\n if (array_key_exists(\"incidents\", $this->_propDict)) {\n return $this->_propDict[\"incidents\"];\n } else {\n return null;\n }\n }", "public function getInterventionList(Request $request)\r\n {\r\n $careplan_id = 0;\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n if($request->has('careplan_id')){\r\n $careplan_id = encrypt_decrypt('decrypt', $request->get('careplan_id'));\r\n }\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n\r\n $patient = $this->patient->patientDetail($request->get('patient_id'), false);\r\n $patient = $patient['patient_info'];\r\n $interventionList = $this->intervention->getLists($patient_id,$careplan_id);\r\n $html = view('patients.caseload.checkpoint.intervention.list',compact('interventionList', 'patient_id','patient','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "public function getEx1() {\n $incidents = \\DB::table('incidents')->get();\n\n // Output the results\n foreach ($incidents as $incident) {\n echo $incident->neighborhood;\n }\n }", "public function getICID_soaps($icIDs,$dbhandle = false){\r\r\n\t\t\tif($dbhandle == false){\r\r\n\t\t\t\t$dbhandle = $this->dbhandleSQLI();\r\r\n\t\t\t}\r\r\n\t\t\t$icid = false;\r\r\n\t\t\tif ($this->dbfound()){\r\r\n\t\t\t\t$tablename = \"icsoap\";\r\r\n\t\t\t\tif ($this->tableExists($tablename)){\r\r\n\t\t\t\t\t// Get ID numbers for Consults\r\r\n\t\t\t\t\tif(is_array($icIDs)){\r\r\n\t\t\t\t\t\t$str = implode(',',$icIDs);\r\r\n\t\t\t\t\t} else{\r\r\n\t\t\t\t\t\t$str = $icIDs; \r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$sql = \"SELECT `$tablename`.* FROM `$this->db`.`$tablename` WHERE `$tablename`.`icid` IN (\".$str.\")\";\r\r\n\t\t\t\t\t$result = mysqli_query($dbhandle, $sql);\r\r\n\t\t\t\t\tif ($result){\r\r\n\t\t\t\t\t\tif (mysqli_num_rows($result) > 0){\r\r\n\t\t\t\t\t\t\tfor ( $i = 0; $i < mysqli_num_rows($result); $i++ ){ \r\r\n\t\t\t\t\t\t\t\t$row = mysqli_fetch_assoc($result);\r\r\n\t\t\t\t\t\t\t\t$metrics[$i]=$row;\r\r\n\t\t\t\t\t\t\t\t//$id = $healthConsult[$i]['id'];\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\treturn $metrics;\r\r\n\t\t}", "public function getInkLists() {}", "public function listsInstructionget()\r\n {\r\n $response = Instruction::all();\r\n return response()->json($response,200);\r\n }", "public function getapidetailsAction() {\n\t\t$this->loadLayout();\n\t\t$this->getLayout()->getBlock('logicbrokernotification')->setConfigValue(array(\n\t\t\t\t\t\t'scope' => 'default',\n\t\t\t\t\t\t'scope_id' => '0',\n\t\t\t\t\t\t'path' => 'logicbroker_integration/integration/notificationstatus',\n\t\t\t\t\t\t'value' => '0',\n\t\t\t\t));\n\t\tMage::app()->getCacheInstance()->cleanType('config');\t\t\n\t\tMage::getSingleton('adminhtml/session')->setNotification(false);\n\t\t$this->_redirectReferer();\n\t}", "function ppt_resources_get_accounts_indications($data)\n{\n global $user;\n\n if (isset($data['countries'])) {\n $countries = $data['countries'];\n } else {\n $countries = get_user_countries($user);\n }\n\n // Check if user selected accounts.\n if (isset($data['accounts'])) {\n $accounts = $data['accounts'];\n } else {\n $accounts = ppt_resources_get_role_accounts($user, $countries);\n }\n\n $products = array();\n foreach ($accounts as $account) {\n // Load account entity to get the products.\n $account_entity = node_load($account);\n if ($account_entity) {\n if (isset($account_entity->field_products[LANGUAGE_NONE])) {\n foreach ($account_entity->field_products[LANGUAGE_NONE] as $item) {\n if (!in_array($item['target_id'], $products)) {\n $products[] = $item['target_id'];\n }\n }\n }\n }\n }\n\n $indications = array();\n // Loop over products to get the indications.\n foreach ($products as $product_id) {\n if ($product = taxonomy_term_load($product_id)) {\n if (isset($product->field_indications[LANGUAGE_NONE])) {\n foreach ($product->field_indications[LANGUAGE_NONE] as $item) {\n if (!isset($indications[$item['target_id']])) {\n if ($indication = taxonomy_term_load($item['target_id'])) {\n $indications[$item['target_id']] = array(\"id\" => $indication->tid, \"name\" => $indication->name);\n }\n }\n }\n }\n }\n }\n return $indications;\n}", "public function getList()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n $report_arr = $this->inspection->readAllReport();\n\n if (count($report_arr) > 0)\n {\n echo $this->encodeJson(\"Inspections found.\", 0x00, $report_arr);\n }\n else\n {\n echo $this->encodeJson(\"No inspections found.\", 0xD1ED, NULL);\n }\n }", "public function get_list_get()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"GET\"){\n \t// Get data\n\t\t\tif(isset($_GET)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_GET['token']) ?($_GET['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$language= isset($_GET['language']) ?($_GET['language']) : \"en\";\t\n\t\t\t\t\t$response=$this->advance_notification_model->get_in_app_data($language);\t\n\t\t\t\t\tif($response){\n\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\", \"data\"=> $response);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "public function viewAllReportedAccidents(Request $request)\n {\n //get all the emergency requests that are reported as accidents\n $accidents = Emergencies::where('type','=','accident')->latest()->paginate(10);\n if(!$accidents)\n {\n $request->session()->flash('error','No acciden data reported yet');\n return redirect()->back();\n }\n else\n {\n return view('nurses.emergencies.accidents.index', compact('accidents'));\n }\n }", "public function incidences() {\n return $this->hasMany(Incidence::class);\n }", "public function getEntriesList(){\n return $this->_get(2);\n }", "public function lista_indicadores_dec() {\n $this->db->flush_cache();\n $this->db->reset_query();\n $this->db->select(array('id_indicador', 'cve_presupuestal', 'numerador', 'denominador', 'trimestre', 'porcentaje_aprobados', 'anio', 'id_programa_proyecto', 'cve_unidad'));\n $indicadores_dec = $this->db->get('dec.h_indicadores')->result_array();\n return $indicadores_dec;\n }", "function get_list($instructions=array())\n\t{\n\t\t$searchString = \" V.status='published' \";\n\t\t$orderBy = \" V.date_added DESC \";\n\t\tif(!empty($instructions['action']) && $instructions['action']== 'publish')\n\t\t{\n\t\t\t$searchString = \" V.status IN ('saved','verified') \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'archive')\n\t\t{\n\t\t\t$searchString = \" V.status IN ('saved','archived') \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'verify')\n\t\t{\n\t\t\t$searchString = \" V.status='saved' \";\n\t\t}\n\t\telse if(!empty($instructions['action']) && $instructions['action']== 'public')\n\t\t{\n\t\t\t$searchString = \" V.status='published' AND (DATE(V.start_date) < NOW() AND DATE(V.end_date) > NOW()) \";\n\t\t\t$orderBy = \" V.end_date ASC \";\n\t\t}\n\t\t\n\t\t# If a search phrase is sent in the instructions\n\t\tif(!empty($instructions['searchstring']))\n\t\t{\n\t\t\t$searchString .= \" AND \".$instructions['searchstring'];\n\t\t}\n\t\t\n\t\t# Instructions\n\t\t$count = !empty($instructions['pagecount'])? $instructions['pagecount']: NUM_OF_ROWS_PER_PAGE;\n\t\t$start = !empty($instructions['page'])? ($instructions['page']-1)*$count: 0;\n\t\t\n\t\treturn $this->_query_reader->get_list('get_vacancy_list_data',array('search_query'=>$searchString, 'limit_text'=>$start.','.($count+1), 'order_by'=>$orderBy));\n\t}", "public function getIdList() {\n migrate_instrument_start(\"Retrieve $this->listUrl\");\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n migrate_instrument_stop(\"Retrieve $this->listUrl\");\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n return $this->getIDsFromJSON($data);\n }\n }\n Migration::displayMessage(t('Loading of !listurl failed:',\n array('!listurl' => $this->listUrl)));\n return NULL;\n }", "function InfGetInvoices($inf_contact_id, $pay_status = 0) {\n\t$object_type = \"Invoice\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'PayStatus' => $pay_status));\n\n $invoices_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, inf_invoice_id\n\t\t$array = $object->toArray();\n $invoices_array[$array['Id']] = $array;\n }\n\treturn $invoices_array; \n}", "protected function getInstrList()\n {\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$query = \"SELECT DISTINCT KINST, INST_NAME, PREFIX from tbl_instrument\" ;\n\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function getAllIncReslt() {\n $inc = IncidenceModel::where('id_estado', 6)->get();\n\n return $inc;\n }", "public function getAll()\n {\n return $this->indicacaoRepository->getAll();\n }" ]
[ "0.66786873", "0.60392535", "0.59259534", "0.5753351", "0.5726458", "0.5651889", "0.5619804", "0.5499893", "0.5454749", "0.53457075", "0.5256077", "0.52417415", "0.5216519", "0.52139926", "0.52131677", "0.52071166", "0.5183097", "0.51334625", "0.51176125", "0.51115406", "0.5096724", "0.5077135", "0.50759447", "0.50678205", "0.50452423", "0.5044215", "0.501941", "0.5012077", "0.50041735", "0.50023395" ]
0.71461755
0
Operation listsIndicationsIndicationIdGet Fetch Indication specified by indicationId.
public function listsIndicationsByIdget($indication_id) { $indication = Indication::findOrFail($indication_id); return response()->json($indication,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIndicationsput($indication_id)\r\n {\r\n $input = Request::all();\r\n $indication = Indication::findOrFail($indication_id);\r\n $indication->update(['name' => $input['name'], 'code' => $input['code']]);\r\n if($indication->save()){\r\n return response()->json(['msg' => 'Update indication']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the indication');\r\n }\r\n }", "public function listsIndicationsdelete($indication_id)\r\n {\r\n $deleted_indication = Indication::destroy($indication_id);\r\n if($deleted_indication){\r\n return response()->json(['msg' => 'Deleted indication']);\r\n }\r\n }", "public function listsIndicationsget()\r\n {\r\n $response = Indication::all();\r\n return response()->json($response,200);\r\n }", "function ppt_resources_get_indications($data)\n{\n return ppt_resources_get($data, 'field_indication');\n}", "public function getById($id)\n {\n return $this->indicacaoRepository->getById($id);\n }", "public function getMedicationList($patient_id)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $active = '';\r\n $previous_medications = $this->medication->medicationList($patient_id);\r\n $type = 'case_load';\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n $html = view('patients.medications.medication_listing',compact('active', 'previous_medications', 'patient_id','type','is_careplan'))->render();\r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function actionIndex()\n {\n $searchModel = new IndicationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $counter = Counter::findOne(['id' => Yii::$app->request->get('id')]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'counter' => $counter,\n ]);\n }", "public function get_outgoing_counter_referral($hospital_id){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM counter_referrals\n\t\t\t\tWHERE from_hospital_id=\\\"$hospital_id\\\"\n\t\t\t\tORDER BY counter_ref_id DESC\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\treturn $result;\n\t}", "public function getMedicationDetail($patient_id,Request $request)\r\n {\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt',$patient_id);\r\n $id = encrypt_decrypt('decrypt',$request->id);\r\n \r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n $medication = $this->medication->medicationDetail($id);\r\n\r\n $type = 'case_load';\r\n $html = view('patients.medications.medication_history',compact('active', 'medication'))->render();\r\n return $this->respond(['message' => '', 'html' => $html]);\r\n }", "public function getInd()\n {\n return $this->hasOne(Indicador::className(), ['ind_id' => 'ind_id']);\n }", "public function setInformacionAdicionalid($informacion_adicionalId)\n {\n $this->informacion_adicionalId = $informacion_adicionalId;\n\n return $this;\n }", "public function get_impediments_by_participant($participant_id)\n\t{\n\t\t$this->db->where('participant_id', $participant_id);\n\t\treturn $this->db->get('impediment')->result();\n\t}", "public function listNotificationInterests( );", "public function listsIllnessesByIdGet($illness_id)\r\n {\r\n $response = Illnesses::findOrFail($illness_id);\r\n return response()->json($response, 200);\r\n }", "public function listsInstructionByIdget($instruction_id)\r\n {\r\n $instruction = Instruction::findOrFail($instruction_id);\r\n return response()->json($instruction,200);\r\n }", "private function _getInterventionsOnPatient($patient_id) {\n $interventions_user = DB::table('interventions_user')\n ->leftJoin('interventions', 'interventions.id', '=', 'interventions_user.intervention_id')\n ->select('interventions_user.*', 'interventions.group_name',\n 'interventions.intervention_name',\n 'interventions.number',\n 'interventions.group_no',\n )\n ->where('user_id', $patient_id)->paginate(5);\n\n return $interventions_user;\n }", "public function incidenciaById_get($id_incidencia)\n {\n $this->output->set_header(\"Access-Control-Allow-Origin: *\");\n if ($this->auth_request()) {\n\n $jwt = $this->renewJWT();\n\n $incidencia = $this->api_model->get_incidenciaById($id_incidencia);\n\n if ($incidencia) {\n $message = [\n 'incidencia' => $incidencia,\n 'status' => RestController::HTTP_OK,\n 'token' => $jwt\n ];\n $this->response($message, RestController::HTTP_OK); // CREATED (201) being the HTTP response code\n } else {\n $this->response([\n 'status' => false,\n 'token' => $jwt,\n 'message' => 'No hay incidencias con este id'\n ], 404);\n }\n } else {\n $message = [\n 'status' => $this->auth_code,\n 'token' => $this->token,\n 'message' => 'Bad auth information. ' . $this->error_message\n ];\n $this->set_response($message, $this->auth_code); // 400 / 401 / 419 / 500\n }\n }", "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n 'action' => 'listicdcodes',\n 'lookfor' => get_data('term'),\n )));\n\n $listicdcodes = !empty($listicdcodes) ? json_decode($listicdcodes) : array();\n\n /*Converting to autocomplete understandable format*/\n if (!empty($listicdcodes))\n {\n foreach ($listicdcodes as $val)\n {\n $listicdcodes_arr[] = array('id' => current($val)->ICDCode, 'value' => current($val)->ICDTitle);\n }\n }\n exit(json_encode($listicdcodes_arr));\n }", "public function incidence (Request $request, $id) {\n /**\n *\n */\n if(is_null($request->session()->get('key-sesion'))) {\n return redirect('login');\n }\n /**\n *\n */\n $user = $request->session()->get('key-sesion')['data'];\n $contract = Contract::find($id);\n /**\n *\n */\n if (is_null($contract)) {\n return $this->doRedirect($request, '/admin/contracts')->with('errorMessage', trans('contract.notFound'));\n }\n /**\n *\n */\n $client = Client::find($contract->client);\n /**\n *\n */\n $incidences = Incidence::byContractNotResolveIncidence($contract->id)->get();\n $allIncidences = Incidence::byTypeContract(1, $contract->id)->get();\n /**\n *\n */\n if ($request->session()->get('key-sesion')['type'] == HUserType::WRITTER ) {\n return redirect('/');\n } elseif ($request->session()->get('key-sesion')['type'] == HUserType::SELLER ) {\n if ($user->id != $contract->admin) {\n return $this->doRedirect($request, '/admin/contracts')->with('errorMessage', trans('client.unauthorized'));\n }\n }\n /**\n *\n */\n if ($this->isGET($request)) {\n /**\n *\n */\n \\Log::info('incidencias de contratos vistar por: '.$user->email);\n /**\n *\n */\n return view('pages.admin.contract.incidences', compact('incidences', 'contract', 'client', 'allIncidences'));\n }\n }", "function listInterestGroups($id) {\n $params = array();\n $params[\"id\"] = $id;\n return $this->callServer(\"listInterestGroups\", $params);\n }", "public static function GetJournalCommunicationListEntryAssociationForId($intId) {\n\t\t\t$objDatabase = CommunicationList::GetDatabase()->JournalingDatabase;\n\n\t\t\treturn $objDatabase->Query('SELECT * FROM communicationlist_communicationlistentry_assn WHERE communication_list_id = ' .\n\t\t\t\t$objDatabase->SqlVariable($intId) . ' ORDER BY __sys_date');\n\t\t}", "function particularnativitylist($id)\n\t{\n\t\t$getparnativity=\"SELECT * from nativity where id = $id\";\n\t\t$nativity_data=$this->get_results( $getparnativity );\n\t\treturn $nativity_data;\n\t}", "public function getInterventionList(Request $request)\r\n {\r\n $careplan_id = 0;\r\n try{ \r\n $patient_id = encrypt_decrypt('decrypt', $request->get('patient_id'));\r\n if($request->has('careplan_id')){\r\n $careplan_id = encrypt_decrypt('decrypt', $request->get('careplan_id'));\r\n }\r\n } catch (\\Exception $e) {\r\n abort(404);\r\n exit;\r\n }\r\n if(request()->is_careplan)\r\n $is_careplan = 1;\r\n else\r\n $is_careplan = 0;\r\n\r\n $patient = $this->patient->patientDetail($request->get('patient_id'), false);\r\n $patient = $patient['patient_info'];\r\n $interventionList = $this->intervention->getLists($patient_id,$careplan_id);\r\n $html = view('patients.caseload.checkpoint.intervention.list',compact('interventionList', 'patient_id','patient','is_careplan'))->render(); \r\n return response()->json(['message' => trans('message.listing_found'), 'html' => $html], 200);\r\n }", "public function getDrug_TargsfromInd($indication)\n{\n\t$drugs = array();\n\t$drugs = $this->getDrugforInd($indication);\n\tforeach($drugs AS $i => $drug) {\n\t\t$d = '';\n\t\t$d['drug_uri'] = (string) $drugs[$i]->{'drug_uri'};\n\t\t$d['drug_name'] = (string) $drugs[$i]->{'drug_name'};\n\n\t\t$o['drugs'][] = $d;\n\t}\n\n\t// fetch the targets that indication\n\t$targets = array();\n\t$targets = $this->getTargetforInd($indication);\n\tforeach($targets AS $i => $target) {\n\t\t$e = '';\n\t\t$e['target_uri'] = (string) $targets[$i]->{'target_uri'};\n\t\t$e['target_name'] = (string) $targets[$i]->{'target_name'};\n\n\t\t$o['targets'][] = $e;\n\t}\n\t\n\n\treturn $o;\n}", "public function getIndicatorsAction(){ \n $result = array();\n $indicator = Indicators :: find();\n $result['indicator'] = $indicator[0]->indicators;\n Library::output(true, '1', \"No Error\", $result);\n }", "public function get_impediment_by_id($impediment_id)\n\t{\n\t\treturn $this->db->get_where('impediment', array('id' => $impediment_id))->row();\n\t}", "public function getCareplanDiagnosisList($careplanId)\r\n {\r\n $careplanId = encrypt_decrypt('decrypt',$careplanId);\r\n $diagnosisList = $this->careplan->getCareplanDiagnosis($careplanId);\r\n $is_careplan_detail = '';\r\n if(request()->is_careplan_detail)\r\n $is_careplan_detail = 1;\r\n $diagnosisHtml = view('patients.caseload.care_plan.careplan_diagnosis_list', compact('diagnosisList','is_careplan_detail'))->render();\r\n\r\n return $this->respond(['diagnosis_html' => $diagnosisHtml]);\r\n }", "public function getInformacionAdicionalid()\n {\n return $this->informacion_adicionalId;\n }", "public function show($medical_id)\n {\n return $this->medications->where($medical_id);\n\n }", "public function show($id)\n {\n $indicadoresDocumentales = IndicadorDocumental::where('FK_IDO_Caracteristica', $id)\n ->get()\n ->pluck('nombre_indicador', 'PK_IDO_Id');\n return json_encode($indicadoresDocumentales);\n }" ]
[ "0.6197852", "0.6160865", "0.5713515", "0.5145826", "0.49131644", "0.4758483", "0.4744463", "0.46952185", "0.46702042", "0.46484327", "0.4644966", "0.46065807", "0.45724648", "0.45496613", "0.4545034", "0.4471762", "0.44630992", "0.44566113", "0.44145006", "0.44120026", "0.440653", "0.43425965", "0.43025488", "0.42909932", "0.42903495", "0.42841932", "0.42476237", "0.4188788", "0.41864538", "0.41731244" ]
0.7751477
0
Operation listsIndicationsPost create an Indication.
public function listsIndicationspost() { $input = Request::all(); $new_indication = Indication::create($input); if($new_indication){ return response()->json(['msg' => 'Added a new indication', 'data' => $new_indication]); }else{ return response('Oops, it seems like there was a problem adding the indication'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postMedicationSave(PatientMedicationRequest $request)\r\n {\r\n $response = $this->medication->addMedication($request);\r\n\r\n if ($response) {\r\n $previous_medications = $this->medication->medicationList($request->patient_id);\r\n $type = 'case_load';\r\n $is_careplan = 0;\r\n $html = view('patients.medications.medication_listing',compact('active', 'previous_medications', 'patient_id','type','is_careplan'))->render();\r\n\r\n $message = trans('message.medication_created_successfully');\r\n if($request->action != 'add') {\r\n $message = trans('message.medication_updated_successfully');\r\n }\r\n\r\n $request->session()->flash('message.level','success');\r\n $request->session()->flash('message.content',$message);\r\n return $this->respond([\r\n 'message'=> $message,\r\n 'html' => $html\r\n ]);\r\n }\r\n\r\n $request->session()->flash('message.level','danger');\r\n $request->session()->flash('message.content',trans('message.error_medication_created'));\r\n return response()->json(['message'=>trans('message.error_medication_created')],200);\r\n }", "public function store(MedicationPost $request)\n {\n return $this->medications->save($request);\n \n }", "public function actionCreate($counter_id)\n {\n $model = new Indication();\n $model->counter_id = $counter_id;\n $model->date = time();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/indication/index', 'id' => $model->counter_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function listsInstructionpost()\r\n {\r\n $input = Request::all();\r\n $new_instruction = Instruction::create($input);\r\n if($new_instruction){\r\n return response()->json(['msg' => 'Wrote new instruction']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new instruction');\r\n }\r\n }", "public function actionCreate()\n\t{\n\t\t$model=new Indicadores;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Indicadores']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Indicadores'];\n\t\t\tif($model->save()){\n\t\t\t\tYii::app()->user->setFlash(\"success\",\"EL indicador de ha guardado de manera correcta\");\n\t\t\t\t// agregar valores segun los periodos existentes\n\t\t\t\t$this->nuevosValores($model->id);\n\n\t\t\t\t$this->redirect(array('index','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function listsIllnessesPost()\r\n {\r\n $input = Request::all();\r\n $new_illness = Illnesses::create($input);\r\n if($new_illness){\r\n return response()->json(['msg' => 'Created new illness'],200);\r\n }else{\r\n return response('Oops, it seems like something went wrong while trying to create a new illness');\r\n }\r\n }", "public function listsIndicationsput($indication_id)\r\n {\r\n $input = Request::all();\r\n $indication = Indication::findOrFail($indication_id);\r\n $indication->update(['name' => $input['name'], 'code' => $input['code']]);\r\n if($indication->save()){\r\n return response()->json(['msg' => 'Update indication']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the indication');\r\n }\r\n }", "public function listsIndicationsget()\r\n {\r\n $response = Indication::all();\r\n return response()->json($response,200);\r\n }", "function index_post() {\n $data = array(\n 'id_diagnosa' => $this->post('id_diagnosa'),\n 'judul' => $this->post('judul'),\n 'definisi' => $this->post('definisi'),\n 'diagnosa' => $this-put('diagnosa'));\n $insert = $this->db->insert('diagnosa', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "private function actionListPost() {\n $donneur = new Donneur;\n $donneur->first_name = $_POST['first_name'];\n $donneur->last_name = $_POST['last_name'];\n $donneur->age = $_POST['age'];\n $donneur->gender = $_POST['gender'];\n $donneur->address = $_POST['address'];\n $donneur->phone = $_POST['phone'];\n $donneur->groupe_sangun = $_POST['groupe_sangun'];\n $donneur->email = $_POST['email'];\n $donneur->vehicle = $_POST['vehicle'];\n \n $donneur->date_donation = ($_POST['date_donation']==='1970-01-01') ? null : $_POST['date_donation'];\n if ($donneur->save()) {\n echo CJSON::encode($donneur);\n } else {\n header(\"HTTP/1.1 501 Internal Server Error\");\n echo \"Update failed for Donneur: \";\n }\n }", "public function NewInquiry_post()\n\t{\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\t$response = new stdClass();\n\t\tif ($method == 'POST') {\n\n\t\t\t\t$json_data = $this->post('json_data');\n\n\t\t\t\t// Passing post array to the model.\n\t\t\t\t$this->minquiry->set_data($json_data);\n\n\t\t\t\t// create the doctor record as the given data is valid\n\t\t\t\t$complaint = $this->minquiry->create();\n\n\t\t\t\tif (!is_null($complaint)) {\n\n\t\t\t\t\t$response->status = REST_Controller::HTTP_OK;\n\t\t\t\t\t$response->status_code = APIResponseCode::SUCCESS;\n\t\t\t\t\t$response->msg = 'Inquiry Sent Successfully';\n\t\t\t\t\t$response->error_msg = NULL;\n\t\t\t\t\t$response->response = $complaint;\n\t\t\t\t\t$this->response($response, REST_Controller::HTTP_OK);\n\n\t\t\t\t} else {\n\t\t\t\t\t$response->status = REST_Controller::HTTP_INTERNAL_SERVER_ERROR;\n\t\t\t\t\t$response->status_code = APIResponseCode::INTERNAL_SERVER_ERROR;\n\t\t\t\t\t$response->msg = NULL;\n\t\t\t\t\t$response->error_msg[] = 'Internal Server Error';\n\t\t\t\t\t$response->response = NULL;\n\t\t\t\t\t$this->response($response, REST_Controller::HTTP_OK);\n\t\t\t\t}\n\n\n\t\t} else {\n\t\t\t$response->status = REST_Controller::HTTP_METHOD_NOT_ALLOWED;\n\t\t\t$response->msg = 'Method Not Allowed';\n\t\t\t$response->response = NULL;\n\t\t\t$response->error_msg = 'Invalid Request Method.';\n\t\t\t$this->response($response, REST_Controller::HTTP_OK);\n\t\t}\n\t}", "public function listsIndicationsdelete($indication_id)\r\n {\r\n $deleted_indication = Indication::destroy($indication_id);\r\n if($deleted_indication){\r\n return response()->json(['msg' => 'Deleted indication']);\r\n }\r\n }", "public function postDiagnosisList(Request $request)\r\n {\r\n $diagnosis = $this->diagnosisService->getDiagnosisListForDropDown($request);\r\n return response()->json(['html' => $diagnosis], 200);\r\n }", "public function store(CreateIpdDiagnosisRequest $request)\n {\n $input = $request->all();\n $this->ipdDiagnosisRepository->store($input);\n\n return $this->sendSuccess('IPD Diagnosis saved successfully.');\n }", "public function store(CreatePostskillRequest $request)\n\t{\n\t\tif(Auth::user()->identifier == 1)\n\t\t\t$request['individual_id'] = Auth::user()->induser_id;\n\t\telse\n\t\t\t$request['corporate_id'] = Auth::user()->corpuser_id;\n\t\t$request['post_type'] = 'skill';\n\t\t\n\t\t$skillIds = explode(',', $request['linked_skill_id']);\n\t\tunset ($skillIds[count($skillIds)-1]);\n\t\t$request['unique_id'] = \"S\".rand(111,999).rand(111,999);\n\n\t\t$post = Postjob::create($request->all());\n\n\t\t$post->skills()->attach($skillIds);\n\n\t\treturn redirect(\"/home\");\n\t}", "public function actionCreate()\n {\n $model = new Patient();\n $model->StatusId = DictionaryDetail::PATIENT_STATUS_NEW;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if (!empty($model->interestPoint)) {\n foreach ($model->interestPoint as $interestPoint) {\n $modelInterestPoint = new InterestPointXPatient();\n $modelInterestPoint->PatientId = $model->Id;\n $modelInterestPoint->InterestPointId = $interestPoint;\n $modelInterestPoint->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\treturn view('ccuestionarios.create')\n\t\t\t->with( 'list', Ccuestionario::getListFromAllRelationApps() );\n\t}", "public function listsNonaadherencereasonpost()\r\n {\r\n $input = Request::all();\r\n $new_reason = NonAdherenceReason::create($input);\r\n if($new_reason){\r\n return response()->json(['msg' => 'Created new NonAdherence Reason']);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new NonAdherence Reason');\r\n }\r\n }", "public function createNotes(BodyWrapper $request)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_POST); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_CREATE); \n\t\t$handlerInstance->setContentType('application/json'); \n\t\t$handlerInstance->setRequest($request); \n\t\t$handlerInstance->setMandatoryChecker(true); \n\t\treturn $handlerInstance->apiCall(ActionHandler::class, 'application/json'); \n\n\t}", "public function add(Request $request)\n {\n //validate incoming request \n // $this->validate($request, [\n // 'medical_record_id' => 'required',\n // 'pharmacy_item_id' => 'required',\n // 'quantity' => 'required', \n // ]);\n $this->validate($request, [\n // 'medical_record_id' => 'required',\n 'patient_id' => 'required',\n 'doctor_id' => 'required',\n ]);\n\n\n try {\n $prescription = $request->all();\n $predetail = $prescription['items'];\n unset($prescription['items']);\n $prescription['created_user_id'] = Auth::user()->id;\n $prescription['updated_user_id'] = 0;\n \n $PrescriptionID = Prescription::insertGetId($prescription);\n\n $prescriptiondetail = [];\n foreach ($predetail as $value) {\n $value['prescription_id'] = $PrescriptionID;\n $prescriptiondetail[] = $value;\n }\n PrescriptionItem::insert($prescriptiondetail);\n \n //return successful response\n return $this->respond('created', $prescription);\n } catch (\\Exception $e) {\n //return error message\n return $this->respond('not_valid', $e);\n }\n }", "public function index_post()\n {\n $input = $this->input->post();\n $this->write_db->insert($_table,$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "public function create($entidad) {\n\n if (parent::backendIsLogged()) {\n if (RoleService::getInstance()->hasRolePermission($_SESSION[\"roleID\"], __CLASS__ . \":\" . __FUNCTION__)) {\n\n try {\n $fecha = new DateTime();\n\n $entrega = new EntregaDirectaModel(null, $entidad[\"entidad\"], $fecha->format(\"Y/m/d\"));\n $id = EntregaDirectaRepository::getInstance()->add($entrega);\n foreach ($entidad[\"detalle_alimento_id\"] as $k => $v) {\n $alim = new AlimentoEntregaDirectaModel($id, $v, $entidad[\"cantidad\"][$k]);\n AlimentoEntregaDirectaRepository::getInstance()->add($alim);\n }\n $_SESSION[\"message\"] = new MessageService(\"createSuccess\", [\" envío inmediato \" . $data['razonSocial']]);\n } catch (Exception $e) {\n $_SESSION['message'] = $e->getMessage();\n }\n }\n }\n }", "public function save_appointment_notes ()\n {\n if (post_data('appointment_id') == NULL)\n {\n return;\n }\n $table_data = array();\n $presc_status = FALSE;\n $app_response = $app_return_response = $app_status = array();\n\n $table_data['id'] = post_data('id') != NULL ? post_data('id') : 0;\n $table_data['appointment_id'] = post_data('appointment_id');\n $table_data['history'] = post_data('history') != NULL ? post_data('history') : NULL;\n $table_data['examination'] = post_data('examination') != NULL ? post_data('examination') : NULL;\n $table_data['diagnosis'] = post_data('diagnosis') != NULL ? post_data('diagnosis') : NULL;\n $table_data['management'] = post_data('management') != NULL ? post_data('management') : NULL;\n $table_data['medicine_prescription'] = post_data('prescription') != NULL ? json_encode(post_data('prescription')) : NULL;\n $table_data['icd_description'] = post_data('icd_list') != NULL ? json_encode(post_data('icd_list')) : NULL;\n $table_data['repeat_prescription'] = post_data('repeat_prescription') != NULL ? post_data('repeat_prescription') : 0;\n\t\t\n /*--------------------Updating third party's API----------------------------------------*/\n if (post_data('create_prescription') == TRUE)\n {\n $prescription = make_prescription_format(post_data('prescription'));\n\n /*Creating Prescription at Third Party's database*/\n $app_response = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n \"action\" => \"postcreateprescription\",\n \"patientid\" => post_data('patient_id'),\n \"appointmentid\" => post_data('appointment_id'),\n \"doctorid\" => session_data('app_user_id'),\n \"endorsements\" => count(post_data('prescription')),\n \"patientname\" => post_data('PatientForename') . ' ' . post_data('PatientSurname'),\n \"deliveryaddress\" => post_data('PatientAddress1') . ' ' .\n post_data('PatientAddress2') . ' ' . post_data('PatientAddress3') . ' ' .\n post_data('PatientAddress3') . '' . post_data('PatientAddress4') . ' ' .\n post_data('PatientAddress5'),\n \"DOB\" => post_data('PatientDOB'),\n \"Age\" => post_data('PatientDOB') != NULL ? date('Y') - date('Y', uk_date_to_stamp(post_data('PatientDOB'))) : NULL,\n \"telephone\" => post_data('PatientMobile'),\n \"deliverynote\" => \"New Prescription\",\n \"repeatprescription\" => post_data('repeat_prescription'),\n \"endorsement\" => $prescription\n )));\n\n /* Updating Icd at Third Party's database */\n if (post_data('icd_list') != NULL)\n {\n $app_return_response['icd_response'] = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n \"action\" => \"postICDtopatient\",\n \"patientid\" => post_data('patient_id'),\n \"appointmentid\" => post_data('appointment_id'),\n \"icdcodeselected\" => post_data('icd_list')['key'],\n \"icdtitleselected\" => post_data('icd_list')['value'],\n )));\n }\n\n /*Creating patient notes at Third Party's database*/\n $app_return_response['patient_notes_response'] = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n \"action\" => \"postpatientnotes\",\n \"patientid\" => post_data('patient_id'),\n \"appointmentid\" => post_data('appointment_id'),\n \"doctorid\" => session_data('app_user_id'),\n \"history\" => post_data('history'),\n \"examination\" => post_data('examination'),\n \"diagnosis\" => post_data('diagnosis'),\n \"management\" => post_data('management'),\n )));\n \n if (!empty($app_response) && json_decode($app_response))\n {\n $presc_status = TRUE;\n $table_data['app_id'] = json_decode($app_response);\n\n /* Signing Prescription and updating Third Party's database*/\n $app_return_response['sign_response'] = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n \"action\" => \"prescriptionsign\",\n \"prescriptionid\" => $table_data['app_id'],\n \"doctorid\" => session_data('app_user_id')\n )));\n\n }\n\t\t\t/*-------------------------Updating third party's Database Ends-------------------------*/\n if (!empty($app_return_response))\n {\n\t\t\t\tforeach ($app_return_response as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($val) && json_decode($val) && !empty(json_decode($val)->Status) && json_decode($val)->Status == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$app_status[$key] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$app_status[$key] = FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \n }\n \n $presc_id = $this->appointment_model->save_prescription($table_data);\n \n exit(json_encode(array(\n 'presc_id' => $presc_id,\n 'presc_status' => $presc_status,\n 'app_status' => $app_status,\n )));\n }", "public function actionCreate()\n {\n $model = new InterviewDistrict();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $holiday = new Holidays();\n $holiday->date = $this->request->getPost(\"date\");\n $holiday->name = $this->request->getPost(\"name\");\n \n\n if (!$holiday->save()) {\n foreach ($holiday->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"Запись успешно добавлена\");\n\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n }", "public function createAnswers($data)\n\t{\n\t\t$this->db->insert('respostas', array(\n\t\t\t'id_pergunta' => $data['id_pergunta'],\n\t\t\t'texto' => $data['texto'],\n\t\t\t'resp_cert' => $data['resp_cert']\n\t\t));\n\t}", "public function create($n,$d){\n if(get_instance()->ecl('Instance')->mod('lists', 'save_list', [get_instance()->ecl('Instance')->user(),'email',$n,$d])) {\n display_mess(112);\n } else {\n display_mess(113);\n }\n }", "public function POSTindex()\n\t{\n\t\t/* Make sure there is a valid sender */\n\t\tif ( !isset( \\IPS\\Request::i()->from ) OR !\\IPS\\Member::load( (int) \\IPS\\Request::i()->from )->member_id )\n\t\t{\n\t\t\tthrow new \\IPS\\Api\\Exception( 'INVALID_SENDER', '1C374/2', 404 );\n\t\t}\n\n\t\t/* Verify there are recipients and all the recipients are valid */\n\t\tif( !isset( \\IPS\\Request::i()->to ) OR !\\is_array( \\IPS\\Request::i()->to ) OR !\\count( \\IPS\\Request::i()->to ) )\n\t\t{\n\t\t\tthrow new \\IPS\\Api\\Exception( 'INVALID_RECIPIENT', '1C374/3', 404 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach( \\IPS\\Request::i()->to as $to )\n\t\t\t{\n\t\t\t\tif( !\\IPS\\Member::load( (int) $to )->member_id )\n\t\t\t\t{\n\t\t\t\t\tthrow new \\IPS\\Api\\Exception( 'INVALID_RECIPIENT', '1C374/4', 404 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Make sure we have a title and body */\n\t\tif( !isset( \\IPS\\Request::i()->title ) OR !isset( \\IPS\\Request::i()->body ) )\n\t\t{\n\t\t\tthrow new \\IPS\\Api\\Exception( 'MISSING_TITLE_OR_BODY', '1C374/5', 404 );\n\t\t}\n\n\t\t/* Create the conversation */\n\t\t$item = \\IPS\\core\\Messenger\\Conversation::createItem( \\IPS\\Member::load( (int) \\IPS\\Request::i()->from ), \\IPS\\Request::i()->ipAddress(), \\IPS\\DateTime::create(), NULL );\n\t\t$item->title\t= \\IPS\\Request::i()->title;\n\t\t$item->to_count\t= \\count( \\IPS\\Request::i()->to );\n\t\t$item->save();\n\n\t\t/* Create the first message */\n\t\t$postContents = \\IPS\\Text\\Parser::parseStatic( \\IPS\\Request::i()->body, TRUE, NULL, \\IPS\\Member::load( (int) \\IPS\\Request::i()->from ), 'core_Messaging' );\n\n\t\t$commentClass = $item::$commentClass;\n\t\t$post = $commentClass::create( $item, $postContents, TRUE, NULL, NULL, \\IPS\\Member::load( (int) \\IPS\\Request::i()->from ), \\IPS\\DateTime::create() );\n\t\t\n\t\t$item->first_msg_id = $post->id;\n\t\t$item->save();\n\n\t\t/* Authorize sender and recipients */\n\t\t$item->authorize( array_map( function( $member ) { return (int) $member; }, array_merge( array( \\IPS\\Request::i()->from ), \\IPS\\Request::i()->to ) ) );\n\n\t\t/* Send notifications */\n\t\t$post->sendNotifications();\n\n\t\treturn new \\IPS\\Api\\Response( 201, $item->id );\n\t}", "public function actionCreate()\n {\n $model = new BJobAdvertisement();\n\t\t$model->status = 'new';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n\t\t\t\t'orientationList' => $this->getOrientationList(),\n ]);\n }\n }", "public function store(Request $request)\n {\n try {\n $data = $request->all();\n // dd($data);\n\n foreach ($data as $interessado ){\n Interessado::create($interessado);\n }\n\n return response()->json([\n 'erro' => false,\n 'data' => 'Interessados adicionados com sucesso!'\n ]);\n }catch(\\Exception $e){\n return response()->json([\n 'erro' => true,\n 'data' => 'Erro ao cadastrar Interessado: '.$e->getMessage()\n ], 500);\n }\n\n }" ]
[ "0.54162633", "0.5283121", "0.5271314", "0.51416826", "0.5086039", "0.4993564", "0.49394625", "0.49325326", "0.4920378", "0.48676267", "0.4844314", "0.4751739", "0.47490817", "0.47147495", "0.46698874", "0.4623559", "0.45775723", "0.45595968", "0.45404944", "0.4521704", "0.45210043", "0.45184085", "0.4515143", "0.45073012", "0.45027998", "0.44972894", "0.4496173", "0.44700536", "0.44656697", "0.44649836" ]
0.67863685
0
Operation listsIndicationsIndicationIdPut Update an existing Indication.
public function listsIndicationsput($indication_id) { $input = Request::all(); $indication = Indication::findOrFail($indication_id); $indication->update(['name' => $input['name'], 'code' => $input['code']]); if($indication->save()){ return response()->json(['msg' => 'Update indication']); }else{ return response('Oops, it seems like there was a problem updating the indication'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function listsIndicationsdelete($indication_id)\r\n {\r\n $deleted_indication = Indication::destroy($indication_id);\r\n if($deleted_indication){\r\n return response()->json(['msg' => 'Deleted indication']);\r\n }\r\n }", "public function update($id, UpdateIncidenceRequest $request)\n {\n $incidence = $this->incidenceRepository->find($id);\n\n if (empty($incidence)) {\n Flash::error('Incidence not found');\n\n return redirect(route('incidences.index'));\n }\n\n $incidence = $this->incidenceRepository->update($request->all(), $id);\n\n Flash::success('Incidence updated successfully.');\n\n return redirect(route('incidences.index'));\n }", "public function update(UpdateDiagnosticPut $request, $id)\n {\n try {\n $status = \"activo\";\n if($request->status != \"on\"){\n $status = \"inactivo\";\n }\n $validate = $request->validated();\n DB::beginTransaction();\n $diagnostic = Diagnostic::find($id);\n $diagnostic->code = $request->code;\n $diagnostic->name = $request->name;\n $diagnostic->description = $request->description;\n $diagnostic->status = $status;\n $diagnostic->save();\n DB::commit();\n return redirect()->route('get-diagnostics');\n } catch (Exception $e) {\n DB::rollBack();\n return response()->json(['errors' => $e], 422);\n }\n }", "public function update(IndicadoresDocumentalesRequest $request, $id)\n {\n $indicador = IndicadorDocumental::find($id);\n $indicador->fill($request->only(['IDO_Nombre', 'IDO_Descripcion', 'IDO_Identificador']));\n $indicador->FK_IDO_Caracteristica = $request->get('PK_CRT_Id');\n $indicador->FK_IDO_Estado = $request->get('PK_ESD_Id');\n\n\n $indicador->update();\n\n\n return response(['msg' => 'El Indicador documental ha sido modificado exitosamente.',\n 'title' => 'Indicador Modificado!'\n ], 200)// 200 Status Code: Standard response for successful HTTP request\n ->header('Content-Type', 'application/json');\n }", "public function agregarInmueble($idc, $idi) {\n $captacion = Captacion::whereId($idc)->update([\n 'id_inmueble' => $idi\n ]\n );\n $inmueble = Inmueble::whereId($idi)->update([\n 'estado' => 1\n ]\n );\n return redirect()->route('captacion.edit', [$idc, 2])->with('status', 'Inmueble agregado con éxito');\n }", "public function update(Request $request, $id)\n {\n try{\n $data = $request->all();\n $interessado = Interessado::findOrFail($id);\n $interessado->update($data);\n\n return response()->json([\n 'erro' => false,\n 'data' => $interessado\n ]);\n }catch(\\Exception $e){\n return response()->json([\n 'erro' => true,\n 'data' => 'Erro ao atualizar interessado: '.$e->getMessage()\n ], 500);\n }\n }", "public function listsIndicationspost()\r\n {\r\n $input = Request::all();\r\n $new_indication = Indication::create($input);\r\n if($new_indication){\r\n return response()->json(['msg' => 'Added a new indication', 'data' => $new_indication]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the indication');\r\n }\r\n }", "public function update(Request $request, $id)\n {\n $diagnosis = Diagnosis::findOrFail($id);\n $diagnosis->doctor_id = $request->input('doctor_id');\n $diagnosis->patient_id = $request->input('patient_id');\n $diagnosis->diagnose_result = $request->input('diagnose_result');\n $diagnosis->treatment = $request->input('treatment');\n $diagnosis->save();\n \n return response($diagnosis, 200);\n }", "public function update(CounterRequest $request, $id)\n {\n $counter = Counter::findOrFail($id);\n $counter->workExperience = $request->input('workExperience');\n $counter->satisfiedCustomers = $request->input('satisfiedCustomers');\n $counter->successfulProduct = $request->input('successfulProduct');\n $counter->hoursOfWork = $request->input('hoursOfWork');\n $counter->save();\n\n Session::flash('update_counter', 'شمارنده های جدید با موفقیت بروزرسانی شدند');\n return redirect('admin/counters');\n }", "public function update($id, UpdateInclusionRequest $request)\n {\n $inclusion = $this->inclusionRepository->findWithoutFail($id);\n\n if (empty($inclusion)) {\n Flash::error('Inclusion not found');\n\n return redirect(route('inclusions.index'));\n }\n\n $inclusion = $this->inclusionRepository->update($request->all(), $id);\n\n Flash::success('Inclusion updated successfully.');\n\n return redirect(route('inclusions.index'));\n }", "public function update(DividendRequest $request, $id)\n {\n try {\n $this->repository->update($request->all(), $id);\n } catch (Exception $e) {\n // flash(trans('messages.error.updated'))->error();\n return back()->withInput();\n }\n\n // flash(trans('messages.city.saved', ['cityId' => $id]))->success();\n\n return redirect('dividends');\n }", "public function update(Request $request, $id)\n {\n $input = $request->all();\n\n for($i=0; $i<= count($input['id'])-1; $i++) {\n\n Mesindicatortracingindicator::where('id', '=', $input['id'][$i])\n ->update([\n 'county_value' => $input['county_value'][$i],\n 'subcounty_value' => $input['subcounty_value'][$i],\n 'mesindicatortracking_id' => $id,\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n\n }\n\n\n\n return redirect()->route('mesindicatortrackings.index')\n ->with('success','Report updated successfully');\n\n }", "public function update(Request $request, $id)\n {\n request()->validate([\n 'type'=>'required',\n 'reason'=>'required',\n 'observation'=>'required',\n 'tutor_c_id'=>'required',\n ]);\n //Enterprise::find($id)->update($request->all());\n Tracing::where('id', $id)->update($request->except('_token','_method'));\n return redirect()->route('Tracing.index')->with('success','Registro creado correctamente.');\n }", "public function update($id, Request $request)\n {\n \n $requestData = $request->all();\n \n $intere = Intere::findOrFail($id);\n $intere->update($requestData);\n\n Session::flash('flash_message', 'Intere updated!');\n\n return redirect('interes/interes');\n }", "public function update(Request $request, $id)\n {\n $incidencia= Incidencia::find($id);\n $incidencia->id_empleado=$request->id_empleado;\n $incidencia->id_concepto=$request->id_concepto;\n $incidencia->cantidad=$request->cantidad;\n $incidencia->importe=$request->importe;\n $incidencia->monto=$request->monto;\n $incidencia->observaciones=$request->observaciones;\n $incidencia->soporte=$request->soporte;\n $incidencia->save();\n return redirect()->action('IncidenciaController@index');\n }", "public function update(IpdDiagnosis $ipdDiagnosis, UpdateIpdDiagnosisRequest $request)\n {\n $this->ipdDiagnosisRepository->updateIpdDiagnosis($request->all(), $ipdDiagnosis->id);\n\n return $this->sendSuccess('IPD Diagnosis updated successfully.');\n }", "public function putAction()\n {\n try\n {\n $trackingReq = $this->_helper->TrackingRequest($this->_request->getRawBody());\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'Malformed APP Envelope');\n }\n\n try\n {\n $this->trackingService->changeFulfillmentStatus($trackingReq);\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'No ID passed in content');\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'No Tracking Request Resource With This ID');\n }\n }", "public function update(Request $request, $id)\n {\n //\n $seatgroup=Seatgroup::find($id);\n\n $this->validate(request(),[\n 'corporations'=>'required'\n ]);\n\n $corporationarray = $request->get('corporations');\n foreach ($corporationarray as $corporation){\n $seatgroup->corporation()->attach($corporation);\n }\n\n return redirect()->back()->with('success', 'Updated');\n }", "public function update(Request $request, $id)\n {\n\n DB::table('incidente')\n ->where('id', $id)\n ->update(\n [\n 'aluguel_id' => $request->aluguel_id,\n 'data' => $request->data,\n 'descricao' => $request->descricao,\n 'multa' => $request->multa\n\n ]\n );\n\n return redirect()->route('incidentes.index');\n }", "public function statusAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n //$data = $request->request->all();\n\n\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find District entity.');\n }\n\n $status = $entity->getStatus();\n if($status == 1){\n $entity->setStatus(0);\n } else{\n $entity->setStatus(1);\n }\n $em->flush();\n $this->get('session')->getFlashBag()->add(\n 'error',\"Status has been changed successfully\"\n );\n return $this->redirect($this->generateUrl('education'));\n }", "public function update($id, Request $request)\n {\n \n $requestData = $request->all();\n \n $codelistcollection = CodelistCollection::findOrFail($id);\n \n $requestData[\"included\"] = implode(',', $requestData[\"included\"]);\n \n try{\n $requestData[\"excluded\"] = implode(',', $requestData[\"excluded\"]);\n } catch (\\Exception $ex) {\n\n }\n \n $codelistcollection->update($requestData);\n\n Session::flash('flash_message', 'CodelistCollection updated!');\n\n return redirect('admin/codelist-collections');\n }", "public function update(Request $request, $id)\n {\n //\n $inters =Interest::findOrFail($id);\n $inters->update($request->all());\n\n return redirect('admin/interests');\n }", "public function update(DiaryRequest $request, $id)\n {\n if(no_permission('editDiary')){\n return view(config('program.no_permission_to_view'));\n }\n $arr = [\n 'art'=>$request->editorValue,\n 'status' => $request->status\n ];\n if(Diary::where(\"id\",$id)->update($arr)){\n $message = [\n 'code' => 1,\n 'message' => '日记信息修改成功'\n ];\n }else{\n $message = [\n 'code' => 0,\n 'message' => '日记信息修改失败,请稍后重试'\n ];\n }\n return response()->json($message);\n }", "public function update(Request $request, $id)\n {\n $olk = $this->olks->findOrFail($id);\n $clinical = Clinical::where('id', $olk->clinical_id)->first();\n $olk->fill($request->all())->save();\n\n return redirect(route('backend.clinicals.edit', $clinical->id))->with('status', 'OLKS病患信息更新成功');\n }", "public function update(Request $request, $id)\n {\n /*update consultation module*/\n $consultationUpdate = Consultation::find($id);\n Consultation::find($id)->update(['consultation'=>$request->consultation]);\n\n /*---------- This code of line is for CIDS only ---------*/\n\n /*get all consultation icd for */\n $getConsultationICD = ConsultationsICD::where('consultations_id', '=', $id)->pluck('id');\n if ($request->has('icd')) { /*check if a name=\"cid\" is incoming*/\n $updateICD = array(); /*this is the array where we store cid to be updated*/\n $insertICD = array(); /*this id the array where we store new selected icds*/\n foreach($request->icd as $icdCode){\n $explodedICD = explode('_', $icdCode); /*explode icd along with (_) underscore*/\n if (isset($explodedICD[1])) {\n array_push($updateICD, $explodedICD[0]);\n }else{\n array_push($insertICD, $explodedICD[0]);\n }\n }\n if (count($updateICD) > 0) {\n foreach ($getConsultationICD as $upICD) {\n if (!in_array($upICD, $updateICD)) {\n ConsultationsICD::find($upICD)->delete(); /*delete all census icds that is not found on the request*/\n }\n }\n }else{\n if ($getConsultationICD) {\n foreach ($getConsultationICD as $cidID) {\n ConsultationsICD::destroy($cidID); /*destroy all icds if the user removes all icd that has to be updated*/\n }\n }\n }\n if (count($insertICD) > 0) { /*now insert all selected icds*/\n foreach ($insertICD as $storeICD) {\n $newICD = new ConsultationsICD();\n $newICD->patients_id = $consultationUpdate->patients_id;\n $newICD->users_id = $consultationUpdate->users_id;\n $newICD->consultations_id = $id;\n $newICD->icd = $storeICD;\n $newICD->save();\n }\n }\n }else{\n if ($getConsultationICD) {/* delete all icds*/\n foreach ($getConsultationICD as $cidID) {\n ConsultationsICD::destroy($cidID);\n }\n }\n }\n\n /*-------- end of cids code of line ------------*/\n\n\n\n\n /*----- start of img update code -----------*/\n $getAllFiles = FileManager::where('consultations_id', '=', $id)->pluck('filename');\n if ($request->has('img')) {\n $filesChecking = $getAllFiles->toArray();\n for ($i=0; $i < count($request->img); $i++) { \n if (in_array($request->input(\"img.$i\"), $filesChecking)) {\n $insertFile = FileManager::where('filename', '=', $request->input(\"img.$i\"))\n ->update([\n 'title' => $request->input(\"title.$i\"),\n 'description' => $request->input(\"description.$i\")\n ]);\n $keyOFarray = array_search($request->input(\"img.$i\"), $filesChecking);\n array_splice($filesChecking,$keyOFarray,1);\n }else{\n $insertNewFile = new FileManager();\n $insertNewFile->consultations_id = $id;\n $insertNewFile->patients_id = $consultationUpdate->patients_id;\n $insertNewFile->filename = strtolower($request->input(\"img.$i\"));\n $insertNewFile->title = $request->input(\"title.$i\");\n $insertNewFile->description = $request->input(\"description.$i\");\n $insertNewFile->save();\n }\n }\n if (count($filesChecking) > 0) {\n foreach ($filesChecking as $deleteFile) {\n FileManager::where('filename', '=', $deleteFile)->delete();\n }\n }\n }else{\n if ($getAllFiles) {\n foreach ($getAllFiles as $deleteFilename) {\n FileManager::where('filename', '=', $deleteFilename)->delete();\n }\n }\n }\n\n /*----- end of img update code -----------*/\n\n\n return redirect('consultation/'.$id.'/edit')->with('toaster', array('success', 'Consultation updated.'));\n\n }", "public function update(AttendancePolicyRequest $request)\n {\n $attendance_policy_head = $this->attendance_policy_head->update($request);\n if ($attendance_policy_head == 0){\n return redirect('attendance-policy/create')->with('flashMessageError','Unable to create attendance policy');\n }\n $agent = $this->attendance_policy->update($request,$attendance_policy_head);\n if ($agent) {\n return redirect('attendance-policy')->with('flashMessageSuccess','The attendance policy successfully updated.');\n }\n return redirect('attendance-policy')->with('flashMessageError','Unable to updated attendance policy');\n }", "public function update(InstitutionRequest $request, $id)\n {\n try\n {\n $institution = Institution::find($id);\n $institution->name = $request->name;\n $institution->cnpj = $request->cnpj;\n $institution->status = $request->status;\n $institution->save();\n\n \\Session::flash('message', 'Registro atualizado com sucesso.');\n\n return back();\n }\n catch(\\Exception $e)\n {\n \\Session::flash('error', $e->getMessage());\n\n return back();\n }\n }", "public function incidence (Request $request, $id) {\n /**\n *\n */\n if(is_null($request->session()->get('key-sesion'))) {\n return redirect('login');\n }\n /**\n *\n */\n $user = $request->session()->get('key-sesion')['data'];\n $contract = Contract::find($id);\n /**\n *\n */\n if (is_null($contract)) {\n return $this->doRedirect($request, '/admin/contracts')->with('errorMessage', trans('contract.notFound'));\n }\n /**\n *\n */\n $client = Client::find($contract->client);\n /**\n *\n */\n $incidences = Incidence::byContractNotResolveIncidence($contract->id)->get();\n $allIncidences = Incidence::byTypeContract(1, $contract->id)->get();\n /**\n *\n */\n if ($request->session()->get('key-sesion')['type'] == HUserType::WRITTER ) {\n return redirect('/');\n } elseif ($request->session()->get('key-sesion')['type'] == HUserType::SELLER ) {\n if ($user->id != $contract->admin) {\n return $this->doRedirect($request, '/admin/contracts')->with('errorMessage', trans('client.unauthorized'));\n }\n }\n /**\n *\n */\n if ($this->isGET($request)) {\n /**\n *\n */\n \\Log::info('incidencias de contratos vistar por: '.$user->email);\n /**\n *\n */\n return view('pages.admin.contract.incidences', compact('incidences', 'contract', 'client', 'allIncidences'));\n }\n }", "public function update(Request $request, $id)\n {\n $happening = $this->currentUser()->happenings()->find($id);\n\n if(!$happening)\n throw new NotFoundHttpException;\n\n $happening->fill($request->all());\n\n if($happening->save())\n return $this->response->noContent();\n else\n return $this->response->error('Could_not_update_happening', 500);\n }" ]
[ "0.4957151", "0.4626412", "0.4598928", "0.44101104", "0.4379997", "0.42338046", "0.42147464", "0.4179181", "0.41711298", "0.415714", "0.413629", "0.4118179", "0.4111271", "0.41102344", "0.41091526", "0.41019452", "0.4090765", "0.40898144", "0.40753794", "0.40700474", "0.4061873", "0.40522024", "0.40436438", "0.40411335", "0.4028762", "0.4028487", "0.4027922", "0.40212148", "0.4011141", "0.3997505" ]
0.5766782
0
Operation listsIndicationsIndicationIdDelete Deletes an Indication specified by indicationId.
public function listsIndicationsdelete($indication_id) { $deleted_indication = Indication::destroy($indication_id); if($deleted_indication){ return response()->json(['msg' => 'Deleted indication']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsIndicationsByIdget($indication_id)\r\n {\r\n $indication = Indication::findOrFail($indication_id);\r\n return response()->json($indication,200);\r\n }", "public function listsIndicationsput($indication_id)\r\n {\r\n $input = Request::all();\r\n $indication = Indication::findOrFail($indication_id);\r\n $indication->update(['name' => $input['name'], 'code' => $input['code']]);\r\n if($indication->save()){\r\n return response()->json(['msg' => 'Update indication']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the indication');\r\n }\r\n }", "public function delete($id_indicador) {\n $this->db->flush_cache();\n $this->db->reset_query();\n $this->db->where('id_indicador',$id_indicador);\n return $this->db->delete('dec.h_indicadores');\n\n }", "public function listsInstructiondelete($instruction_id)\r\n {\r\n $deleted_instruction = Instruction::destroy($instruction_id);\r\n if($deleted_instruction){\r\n return response()->json(['msg' => 'Deleted instruction']);\r\n }\r\n }", "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $tmp = $this->findModel($id);\n $tmp_id = $tmp->counter_id;\n $tmp->delete();\n return $this->redirect(['/indication/index', 'id' => $tmp_id]);\n }", "public function listsIllnessesDelete($illness_id)\r\n {\r\n Illnesses::destroy($illness_id);\r\n return response()->json(['msg' => 'Deleted illness']);\r\n }", "public function delete(Request $request, $patient_id)\n {\n\n return [\n 'text' => \"Successfully deleted patient ID {$patient_id}\"\n ];\n }", "public function destroy(Request $request, int $idIndicator)\n {\n $this->getUser()->hasPermission(['delete'], 'indicators');\n\n if ($idIndicator !== 0) {\n $indicator = new Indicator();\n $indicator->setConnection($this->getUser()->getRole->name);\n $indicator = $indicator->findOrFail($idIndicator);\n\n if ($indicator->delete()) {\n return redirect()->route('indicators.index')->with('success', 'Indicator successfully deleted');\n } else {\n return back()->with('errors', 'An error occurred while deleting the indicator');\n }\n } else {\n $indicatorsToDelete = $request->input('list');\n $result = true;\n\n foreach ($indicatorsToDelete as $key => $indicatorId) {\n $indicator = new Indicator();\n $indicator->setConnection($this->getUser()->getRole->name);\n $indicator = $indicator->findOrFail($indicatorId);\n\n if ($indicator->delete()) {\n continue;\n } else {\n $result = false;\n break;\n }\n }\n\n if ($result) {\n $request->session()->flash('success', 'The selected indicators were successfully deleted');\n } else {\n $request->session()->flash('errors', 'An error occurred while deleting the selected indicators');\n }\n\n return 'indicators';\n }\n }", "public function deleteNotification($id);", "public function deleteAction($id)\n {\n $service = $this->getModuleService('dictionaryService');\n\n // Batch removal\n if ($this->request->hasPost('batch')) {\n $ids = array_keys($this->request->getPost('batch'));\n\n $service->deleteByIds($ids);\n $this->flashBag->set('success', 'Selected elements have been removed successfully');\n\n } else {\n $this->flashBag->set('warning', 'You should select at least one element to remove');\n }\n\n // Single removal\n if (!empty($id)) {\n $service->deleteById($id);\n $this->flashBag->set('success', 'Selected element has been removed successfully');\n }\n\n return 1;\n }", "public function deleteNotificationById($id);", "public function delete($id)\n {\n Arrondissement::find($id)->delete();\n session()->flash('message', 'Arrondissement Deleted Successfully.');\n }", "public function deleteById($id)\n {\n DB::beginTransaction();\n\n try {\n $result = $this->indicacaoRepository->delete($id);\n\n } catch (Exception $e) {\n DB::rollBack();\n Log::info($e->getMessage());\n\n throw new InvalidArgumentException('Não foi possível deletar esta indicacao');\n }\n\n DB::commit();\n\n return $result;\n\n }", "public function deleteById($inquiryId);", "public function delete($id)\n {\n try{\n $record = Appointment::find($id);\n if(!is_null($record)){\n $record->delete();\n return $this->respondWithSuccess(ApiCode::NOTIFICATION_DELETE_SUCCESS);\n }\n else{\n return $this->respondNotFound(ApiCode::ERROR_GET_DATA);\n }\n }\n catch(Exception $ex){\n return $this->respondWithError(ApiCode::ERROR_REQUEST, 402);\n }\n }", "function deleteForPatient($patientId) {\n $this->deleteAll(array(\"PatientAssociate.patient_id = $patientId\"));\n }", "public function deleteTransferBeneficiary(int $beneficiaryId): array\n {\n return $this->httpClient()->delete(\n url: FlutterwaveConstant::BENEFICIARY_ENDPOINT.$beneficiaryId,\n );\n }", "public function delete($idconvenio);", "public function deleteAction(Request $request, Indicateur $indicateur) {\n $form = $this->createDeleteForm($indicateur);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($indicateur);\n $em->flush();\n }\n\n return $this->redirectToRoute('indicateur_index');\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect([\n 'counter-list', \n 'CounterDataSearch[flat_id]' => Yii::$app->request->get('CounterDataSearch')['flat_id'],\n 'CounterDataSearch[service_id]' => Yii::$app->request->get('CounterDataSearch')['service_id'],\n ]);\n }", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n\t\t$result = Gou_Service_Notice::deleteNotice($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function delete($id, $optParams = array())\n {\n $params = array('id' => $id);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params));\n }", "public function deleteById($ingredientId);", "public function index_delete($id)\n {\n $this->db->delete('tblattendance', array('id' => $id));\n\n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function delete($id){\r\n\t\t$sql = 'DELETE FROM notifications WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "public function delete_impediment($impediment_id)\n\t{\n\t\t$this->db->delete('impediment', array('id' => $impediment_id));\n\t}", "public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\t\tif (! \\Yii::$app->user->can('deleteClient', ['client' => $model])) {\n\t\t\tthrow new ForbiddenHttpException('Нет разрешения на удаление клиента\"'.$model->name.'\"');\n\t\t}\n\n\t\t$modelsClientJur = $model->clientJurs;\n\t\t$modelsClientPhone = $model->clientPhones;\n\t\t$modelsClientMail = $model->clientMails;\n\t\t$modelsClientContact = $model->clientContacts;\n\t\t$modelsClientAddres = $model->clientAddresses;\n\n\n\t\t$transaction = \\Yii::$app->db->beginTransaction();\n\t\tforeach ($modelsClientJur as $modelClientJur) {\n\t\t\t$modelClientJur->delete();\n\t\t}\n\t\tforeach ($modelsClientPhone as $modelClientPhone) {\n\t\t\t$modelClientPhone->delete();\n\t\t}\n\t\tforeach ($modelsClientMail as $modelClientMail) {\n\t\t\t$modelClientMail->delete();\n\t\t}\n\t\tforeach ($modelsClientContact as $modelClientContact) {\n\t\t\t$phones = $modelClientContact->clientContactPhones;\n\t\t\tforeach ($phones as $modelClientContactPhone) {\n\t\t\t\t$modelClientContactPhone->delete();\n\t\t\t}\n\n\t\t\t$mails = $modelClientContact->clientContactMails;\n\t\t\tforeach ($mails as $modelClientContactMail) {\n\t\t\t\t$modelClientContactMail->delete();\n\t\t\t}\n\n\t\t\t$modelClientContact->delete();\n\t\t}\n\t\tforeach ($modelsClientAddres as $modelClientAddres) {\n\t\t\t$modelClientAddres->delete();\n\t\t}\n\t\tif (! $flagModel = $model->delete()) {\n\t\t\tthrow new ForbiddenHttpException('Удаление клиента \"'.$model->name.'\" не удалось!');\n\t\t\t$transaction->rollBack();\n\t\t} else {\n\t\t\t$transaction->commit();\n\t\t\tYii::$app->session->setFlash('success', 'Record <strong>\"'.$model->name.'\" </strong> deleted successfully.');\n\t\t}\n\t\treturn $this->redirect(['index']);\n }", "public function delete($id, $optParams = [])\n {\n $params = ['id' => $id];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params]);\n }", "public function delete($id, $optParams = [])\n {\n $params = ['id' => $id];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params]);\n }", "public function actionDelete(int $id) : array\n {\n Yii::$app->response->format = 'json';\n\n $model = Absence::findOne([\n 'event_id' => $id,\n 'kid_id' => Yii::$app->request->post('kid_id')\n ]);\n\n if ($model && $model->delete()) {\n return ['success' => 1];\n } else {\n return ['success' => 0];\n }\n }" ]
[ "0.5868331", "0.5263845", "0.49907446", "0.47890836", "0.47004637", "0.46649653", "0.45362785", "0.45326543", "0.45013893", "0.4449105", "0.44288895", "0.441245", "0.4405357", "0.4344166", "0.43105978", "0.427355", "0.42568213", "0.42461148", "0.4213075", "0.42067033", "0.4190334", "0.41662887", "0.41592067", "0.4131541", "0.41297242", "0.41221893", "0.41142985", "0.41141817", "0.41141817", "0.40972972" ]
0.73665065
0
////////////////////////// access_level functions // //////////////////////// Operation listsaccessLevelGet Fetch accessLevel.
public function listsaccessLevelget() { $response = AccessLevel::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsaccessLevelByIdget($accessLevel_id)\r\n {\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n return response()->json($accessLevel,200);\r\n }", "function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}", "function get_all_access_level($not_include_admin = 0)\r\n{\r\n\tglobal $strings;\r\n $users[ACCESS_AD_CUSTOMER] = $strings['ACL_AD_CUSTOMER'];\r\n $users[ACCESS_BIG_CUSTOMER] = $strings['ACL_BIG_CUSTOMER'];\r\n $users[ACCESS_VIP_USER] = $strings['ACL_VIP_USER'];\r\n if(!$not_include_admin)$users[ACCESS_ADMIN] = $strings['ACL_ADMIN'];\r\n return $users;\r\n}", "public function listsaccessLevelpost()\r\n {\r\n $input = Request::all();\r\n $new_accessLevel = AccessLevel::create($input);\r\n if($new_accessLevel){\r\n return response()->json(['msg' => 'Added a new accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the accessLevel');\r\n }\r\n }", "static public function get_access($level = null)\n\t{\n\t\tif($level != null)\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t$level = 'banned';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$level = 'customer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$level = 'privilege';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$level = 'admin';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('banned', 'customer', 'privilege', 'admin');\n\t\t}\n\t}", "public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}", "public function getAccessList() {\n return $this->_get(16);\n }", "public function getLevelList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessionsList(){\n return $this->_get(2);\n }", "public function getAccessLevels() : array {\n return [\n 'B-SP' => \"Bronze - Service Provider\",\n 'B-EP' => \"Bronze - Education Provider\",\n 'S-SP' => \"Silver - Service Provider\",\n 'S-EP' => \"Silver - Education Provider\",\n 'S-SP-EB' => \"Silver - Service Provider Early Bird\",\n 'S-EP-EB' => \"Silver - Education Provider Early Bird\",\n 'G-SP-EB' => \"Gold - Service Provider Early Bird\",\n 'G-EP-EB' => \"Gold - Education Provider Early Bird\",\n 'G-SP' => \"Gold - Service Provider\",\n 'G-EP' => \"Gold - Education Provider\",\n ];\n }", "function listAccess($con, $def_access)\n\t{\n\t\t$sql_access = \"SELECT accessID, accessRole FROM access\";\n\t\t$result_access = $con->query($sql_access) or die(mysqli_error($con));\n\n\t\t$list_access = \"\";\n\t\twhile($row = mysqli_fetch_array($result_access))\n\t\t{\n\t\t\t$accessID = $row['accessID'];\n\t\t\t$accessRole = htmlspecialchars($row['accessRole']);\n\n\t\t\tif($accessID == $def_access) { $selected = \"selected='true'\"; } else { $selected = \"\"; }\n\n\t\t\t$list_access .= \"<option value='$accessID' $selected>$accessRole</option>\";\n\t\t}\n\t\t\n\t\treturn $list_access;\n\t}", "public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}", "public static function get_access_lists() { \n\n\t\t$sql = \"SELECT `id` FROM `access_list`\";\n\t\t$db_results = Dba::read($sql);\n\t\n\t\t$results = array(); \n\t\n\t\t// Man this is the wrong way to do it...\n\t\twhile ($row = Dba::fetch_assoc($db_results)) {\n\t\t\t$results[] = $row['id'];\n\t\t} // end while access list mojo\n\n\t\treturn $results;\n\n\t}", "function level_list(){\n\t $query=$this->db->get('savsoft_level');\n\t return $query->result_array();\n\t \n }", "public function getAdminLevelAccess ($userId)\n \t{\n \t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n \t\tif ( $this->resultNum($query) == 1 )\n \t\t{\n \t\t\t$row = $this->fetchOne($query);\n \t\t}\n \t\treturn $row['level_access'];\n \t}", "public function getMenusFromAccesslevel()\r\n {\r\n\r\n $id = $this->user()->acl;\r\n $menus = $this->model->table('menu_groups')->where('acl',$id)->get();\r\n\r\n $list = '';\r\n if(count($menus) > 1){\r\n foreach($menus as $menu){\r\n $list .= $menu->alias.',';\r\n }\r\n }\r\n elseif(count($menus) == 1){\r\n $list = $menus[0]->alias;\r\n }\r\n\r\n return $list;\r\n }", "public function listsaccessLeveldelete($accessLevel_id)\r\n {\r\n $deleted_accessLevel = AccessLevel::destroy($accessLevel_id);\r\n if($deleted_accessLevel){\r\n return response()->json(['msg' => 'Deleted accessLevel']);\r\n }\r\n }", "public function\tGetAccess(&$conn,$val_user,$val_parent,$val_type)\r\n\t{\r\n\t\ttry {\r\n\t\t\t$conn->StartTrans();\r\n\t\t\t$sel \t\t=\t\"SELECT MODULEID FROM \".WMS_LOOKUP.\".MODULES \";\r\n\t\t\t$sel \t\t.=\t\"WHERE MODULENAME = '{$val_type}' and MODULETYPE = '{$val_parent}' AND ACTIVE = 'Y' \";\r\n\t\t\t$rssel\t\t=\t$conn->Execute($sel);\r\n\t\t\tif ($rssel==false) \r\n\t\t\t{\r\n\t\t\t\tself::AdminErrorLogs($sel,$conn->ErrorMsg(),__FILE__,__LINE__);\r\n\t\t\t\tthrow new Exception($conn->ErrorMsg());\r\n\t\t\t}\r\n\t\t\t$id\t \t\t=\t$rssel->fields['MODULEID'];\r\n\t\t\t$access\t\t=\t\"SELECT COUNT(*) AS CNT FROM \".WMS_LOOKUP.\".ACCESSLEVEL WHERE MODULEID = '{$id}' AND USERID = '{$val_user}' \";\r\n\t\t\t$rsaccess\t=\t$conn->Execute($access);\r\n\t\t\tif ($rsaccess == false) \r\n\t\t\t{\r\n\t\t\t\tself::AdminErrorLogs($access,$conn->ErrorMsg(),__FILE__,__LINE__);\r\n\t\t\t\tthrow new Exception($conn->ErrorMsg());\r\n\t\t\t}\r\n\t\t\tif ($rsaccess->fields['CNT'] > 0) \r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$conn->CompleteTrans();\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo $e->__toString();\r\n\t\t\t$conn->CompleteTrans();\r\n\t\t}\r\n\t}", "public function getAdminLevels(): AdminLevelCollection;", "abstract public function getAccessRights(): array;", "function getAllAccess() {\n return ['download', 'remoteAccess', 'remoteService', 'enclave','notAvailable'];\n}", "function get_emp_access_roles(){\r\n\t\t$user_authdet = $this->session->userdata('user_authdet');\r\n\r\n\t\t$access_list_res = $this->db->query(\"SELECT role_id,role_name\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM m_employee_roles\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE role_id > 1 \");\r\n\t\t\t\t\r\n\t\t\t\r\n\t\tif($access_list_res->num_rows()){\r\n\t\t\treturn $access_list_res->result_array();\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private function getViewLevels()\r\n\t{\r\n\t\tif (isset($this->viewLevels))\r\n\t\t{\r\n\t\t\treturn $this->viewLevels;\r\n\t\t}\r\n\r\n\t\t$query = $this->db->getQuery(true);\r\n\t\t$query->select('*')->from('#__viewlevels');\r\n\t\t$this->viewLevels = $this->db->setQuery($query)->loadAssocList();\r\n\r\n\t\treturn $this->viewLevels;\r\n\t}", "public function getAccessMenu($id = 0) {\n \t\t$lang = $this->_ci->lang->language['lang'];\n \t\t$status = 1;\n\n \t\t$orderby = \"admin_menu_id\";\n \t\t$query = $this->_ci->db->select(\"*\")->from(\"_admin_access_menu\")->where(array(\"admin_type_id\" => $id))->order_by($orderby, 'ASC')->get();\n \t\t//Check if any results were returned\n \t\tif ($query->num_rows() > 0) {\n \t\t\t//Create an array to store users\n \t\t\t$users_access = array();\n \t\t\t//Loop through each row returned from the query\n \t\t\tforeach ($query->result() as $row) {\n \t\t\t\t//Pass the row data to our local function which creates a new user object with the data provided and add it to the users array\n \t\t\t\t$users_access[] = $row;\n \t\t\t}\n \t\t\t//Return the users array\n \t\t\treturn $users_access;\n \t\t}\n \t\treturn false; \t \n }", "protected function get_level()\n {\n return $this->m_voxy_connect->_get_list_voxy_level();\n }", "public function getOtherAccessList() {\n return $this->_get(17);\n }", "public function action_list()\n {\n $data = $this->data;\n $years = Model_Level::get_min_max_student_year();\n $data['years'] = $years[0];\n\n if($this->request->param('id'))\n $data['year'] = $this->request->param('id');\n else\n {\n if(Valid::not_empty($data['years']->min_year))\n $data['year'] = $data['years']->min_year;\n else\n $data['year'] = Model::factory('academicyear')->get_end_year();\n }\n $data['admin'] = true;\n $data['levels'] = Model::factory('level')->get_levels();\n Helper_Output::factory()\n ->link_js('js/level/index')\n ->link_js('js/class/templates') ;\n $this->setTitle('Grade Levels')\n ->view('levels/levels', $data)\n ->render();\n }", "public function getAccess() {\n\t\treturn $this->_access;\n\t}", "function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}" ]
[ "0.7417169", "0.69485396", "0.69474834", "0.68171096", "0.6615475", "0.65852886", "0.656186", "0.6513888", "0.6341035", "0.6341035", "0.6302928", "0.6261365", "0.6200282", "0.6153503", "0.5998968", "0.59699947", "0.59647435", "0.59347415", "0.58923656", "0.58882666", "0.5843815", "0.5838592", "0.5831158", "0.582686", "0.5823847", "0.5823155", "0.57593924", "0.57137865", "0.57090807", "0.568569" ]
0.78775346
0
Operation listsaccessLevelaccessLevelIdGet Fetch accessLevel specified by accessLevelId.
public function listsaccessLevelByIdget($accessLevel_id) { $accessLevel = AccessLevel::findOrFail($accessLevel_id); return response()->json($accessLevel,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsaccessLevelget()\r\n {\r\n $response = AccessLevel::all();\r\n return response()->json($response,200);\r\n }", "public function getAdminLevelAccess ($userId)\n \t{\n \t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n \t\tif ( $this->resultNum($query) == 1 )\n \t\t{\n \t\t\t$row = $this->fetchOne($query);\n \t\t}\n \t\treturn $row['level_access'];\n \t}", "public function getAccessMenu($id = 0) {\n \t\t$lang = $this->_ci->lang->language['lang'];\n \t\t$status = 1;\n\n \t\t$orderby = \"admin_menu_id\";\n \t\t$query = $this->_ci->db->select(\"*\")->from(\"_admin_access_menu\")->where(array(\"admin_type_id\" => $id))->order_by($orderby, 'ASC')->get();\n \t\t//Check if any results were returned\n \t\tif ($query->num_rows() > 0) {\n \t\t\t//Create an array to store users\n \t\t\t$users_access = array();\n \t\t\t//Loop through each row returned from the query\n \t\t\tforeach ($query->result() as $row) {\n \t\t\t\t//Pass the row data to our local function which creates a new user object with the data provided and add it to the users array\n \t\t\t\t$users_access[] = $row;\n \t\t\t}\n \t\t\t//Return the users array\n \t\t\treturn $users_access;\n \t\t}\n \t\treturn false; \t \n }", "static public function get_access($level = null)\n\t{\n\t\tif($level != null)\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t$level = 'banned';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$level = 'customer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$level = 'privilege';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$level = 'admin';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('banned', 'customer', 'privilege', 'admin');\n\t\t}\n\t}", "function get_user_access_menu($id)\n {\n return $this->db->get_where('user_access_menu', array('id' => $id))->row_array();\n }", "public function listsaccessLeveldelete($accessLevel_id)\r\n {\r\n $deleted_accessLevel = AccessLevel::destroy($accessLevel_id);\r\n if($deleted_accessLevel){\r\n return response()->json(['msg' => 'Deleted accessLevel']);\r\n }\r\n }", "function get_tbllevel($level_id)\n {\n return $this->db->get_where('tbllevel',array('level_id'=>$level_id))->row_array();\n }", "public function listsaccessLevelpost()\r\n {\r\n $input = Request::all();\r\n $new_accessLevel = AccessLevel::create($input);\r\n if($new_accessLevel){\r\n return response()->json(['msg' => 'Added a new accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the accessLevel');\r\n }\r\n }", "function checkUserAccess($level_id, $role_id) {\n $this->load->model('General_model');\n\n $checkUserAccess = $this->General_model->checkUserAccess($level_id, $role_id);\n return $checkUserAccess;\n }", "public function listsaccessLevelput($accessLevel_id)\r\n {\r\n $input = Request::all();\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n $accessLevel->update(['name' => $input['name']]);\r\n if($accessLevel->save()){\r\n return response()->json(['msg' => 'Update accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the accessLevel');\r\n }\r\n }", "public function getUserLevel($id_user)\n\t{\n\t\treturn $this->db->query(\"SELECT level FROM user WHERE id_user = \".$id_user)->row();\n\t}", "public function getMenusFromAccesslevel()\r\n {\r\n\r\n $id = $this->user()->acl;\r\n $menus = $this->model->table('menu_groups')->where('acl',$id)->get();\r\n\r\n $list = '';\r\n if(count($menus) > 1){\r\n foreach($menus as $menu){\r\n $list .= $menu->alias.',';\r\n }\r\n }\r\n elseif(count($menus) == 1){\r\n $list = $menus[0]->alias;\r\n }\r\n\r\n return $list;\r\n }", "public function getLevel($idEntry);", "function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}", "public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}", "function getAccessEntry($id);", "public function getLevelByID($id) {\n $level = Cache::remember($this->cacheKey, env(\"CACHE_TIME\", 5), function () use ($id) {\n return Level::find($id);\n });\n\n return LevelResource::collection([$level]);\n }", "public function getLoansByLoanId($id){\r\n $id = $this->db->escape($id);\r\n $sql = \"SELECT *,\r\n (SELECT x.description FROM l_funds x WHERE x.lid = a.fund_id) as loan_type,\r\n (SELECT x.description FROM l_interest_type x WHERE x.lid = a.interest_type) as interest_type,\r\n (SELECT x.description FROM l_interest_term x WHERE x.lid = a.interest_term) as interest_term,\r\n (0) as running_total, \r\n (0) as amount,\r\n (a.amount_payable / a.terms) as monthly,\r\n DATE_ADD(DATE(a.date_approved), INTERVAL a.terms MONTH) as maturity_date, \r\n (a.amount_payable) as balance \r\n FROM t_loans a \r\n INNER JOIN t_members b ON b.member_id = a.member_id \r\n WHERE a.loan_id = '{$id}'\";\r\n\r\n $result = $this->db->query($sql);\r\n if (isset($result[0])){\r\n return $result[0];\r\n }\r\n return false;\r\n }", "public function index($id = null) {\n $this->id = (int) $id;\n \n if(!empty($this->id)){\n $deleteAccessLevels = new \\App\\adms\\Models\\AdmsDeleteAccessLevels();\n $deleteAccessLevels->deleteAccessLevels($this->id);\n }else{\n $_SESSION['msg'] = \"Erro: Necessário selecionar um nível de acesso!\";\n }\n \n $urlDestino = URLADM . \"list-access-levels/index\";\n header(\"Location: $urlDestino\");\n }", "function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}", "public function getLevelId(){\n\t\treturn $this->level_id;\n\t}", "public function getMenuByUser($roleId)\n {\n return $this->db->select('user_menu.id, menu')->from('user_menu')->join('user_access_menu', 'user_menu.id = user_access_menu.menu_id')->where(\"user_access_menu.role_id= $roleId\")->order_by('user_access_menu.menu_id', 'ASC')->get()->result_array();\n }", "function get_all_user_access_menu($user_id)\n {\n $this->db->select('*,user_menu.id as \"menu_id\"');\n $this->db->join('user_menu', 'user_menu.id=user_access_menu.menu_id');\n return $this->db->get_where('user_access_menu', array('user_id' => $user_id))->result_array();\n }", "public function getLevelList(){\n return $this->_get(2);\n }", "public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}", "function get_all_access_level($not_include_admin = 0)\r\n{\r\n\tglobal $strings;\r\n $users[ACCESS_AD_CUSTOMER] = $strings['ACL_AD_CUSTOMER'];\r\n $users[ACCESS_BIG_CUSTOMER] = $strings['ACL_BIG_CUSTOMER'];\r\n $users[ACCESS_VIP_USER] = $strings['ACL_VIP_USER'];\r\n if(!$not_include_admin)$users[ACCESS_ADMIN] = $strings['ACL_ADMIN'];\r\n return $users;\r\n}", "function learn_press_pmpro_get_course_levels( $course_id ) {\n\t$course_levels = get_post_meta( $course_id, '_lp_pmpro_levels' );\n\tif(!$course_levels || empty($course_levels)){\n\t\treturn array();\n\t}\n\t$all_levels = pmpro_getAllLevels();\n\tif(!$all_levels || empty($all_levels)){\n\t\treturn array();\n\t}\n\t$all_levels_id = array_keys($all_levels);\n\t$course_levels = array_intersect($course_levels, $all_levels_id);\n\treturn $course_levels;\n}", "function level_list(){\n\t $query=$this->db->get('savsoft_level');\n\t return $query->result_array();\n\t \n }", "public function roles($level) {\n $stmt = $this->connection->prepare(\"SELECT idRol, name, default_role FROM users_roles WHERE name = ?\");\n $stmt->bind_param(\"s\", $this->level);\n $stmt->execute();\n $result = $stmt->get_result();\n return $result->fetch_assoc();\n }", "public function get_level(){\n\t\t//return $q;\n\t\t$result = $this->db->get(\"level_user\");\n\t\t$options = array();\n\t\tforeach ($result->result_array() as $row) {\n\t\t\t$options[$row[\"kode_level\"]] = $row[\"nama_level\"];\n\t\t\t# code...\n\t\t}\n\t\treturn $options;\n\t}" ]
[ "0.65007406", "0.62385535", "0.6071123", "0.58370364", "0.58301044", "0.5814258", "0.5805966", "0.578433", "0.56607044", "0.56496376", "0.56322205", "0.5615412", "0.5601178", "0.55588675", "0.542325", "0.542098", "0.5383041", "0.53171355", "0.5283252", "0.5254596", "0.5246908", "0.524079", "0.5222124", "0.52166784", "0.5202064", "0.5189193", "0.5156709", "0.5117874", "0.51141757", "0.5079713" ]
0.7725905
0
Operation listsaccessLevelPost create an accessLevel.
public function listsaccessLevelpost() { $input = Request::all(); $new_accessLevel = AccessLevel::create($input); if($new_accessLevel){ return response()->json(['msg' => 'Added a new accessLevel']); }else{ return response('Oops, it seems like there was a problem adding the accessLevel'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsaccessLevelput($accessLevel_id)\r\n {\r\n $input = Request::all();\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n $accessLevel->update(['name' => $input['name']]);\r\n if($accessLevel->save()){\r\n return response()->json(['msg' => 'Update accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the accessLevel');\r\n }\r\n }", "public function addAccessLevels($accessLevels)\n\t{\n\t\t$this->accessLevelsScope = array_merge(array('NULL', 0), $accessLevels);\n\t}", "protected function setRequiredAccessLevelsForPost() {\n $this->post_required_access_levels = array(\"owner\",\"admin\",\"collaborator\");\n }", "public function create(LevelRequest $request) {\n $level = Level::create([\n 'type' => $request->type,\n 'can_view' => implode(',', json_decode($request->can_view))\n ]);\n return $this->response($level, 'create');\n }", "public function setAccessLevel($level) {\n $this->access_level = $level;\n }", "public function listsaccessLeveldelete($accessLevel_id)\r\n {\r\n $deleted_accessLevel = AccessLevel::destroy($accessLevel_id);\r\n if($deleted_accessLevel){\r\n return response()->json(['msg' => 'Deleted accessLevel']);\r\n }\r\n }", "function pmprosl_pmpro_has_membership_access_filter( $hasaccess, $post, $user, $post_membership_levels ) {\n\tif ( isset( $_COOKIE['pmprosl_has_access'] ) && $_COOKIE['pmprosl_has_access'] )\n\t\t// Loop through post levels\n\t\tforeach ( $post_membership_levels as $level )\n\t\t\t// If the cookie matches one of the post levels, give them access\n\t\t\tif ( ( int ) $_COOKIE['pmprosl_has_access'] == $level->id ) {\n\t\t\t\t$hasaccess = true;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\treturn $hasaccess;\n}", "public function listsaccessLevelByIdget($accessLevel_id)\r\n {\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n return response()->json($accessLevel,200);\r\n }", "public function run()\n {\n $levels = [\n ['ds_access_level' => 'Master'],\n ['ds_access_level' => 'Admin'],\n ['ds_access_level' => 'user']\n ];\n\n foreach ($levels as $level) {\n AccessLevel::create($level);\n }\n }", "public function listsaccessLevelget()\r\n {\r\n $response = AccessLevel::all();\r\n return response()->json($response,200);\r\n }", "public function ofOneOfTheseAccessLevels($accessLevels)\n {\n $items = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n\n if ($page !== null && isset($page->header()->access)) {\n if (is_array($page->header()->access)) {\n //Multiple values for access\n $valid = false;\n\n foreach ($page->header()->access as $index => $accessLevel) {\n if (is_array($accessLevel)) {\n foreach ($accessLevel as $innerIndex => $innerAccessLevel) {\n if (in_array($innerAccessLevel, $accessLevels, false)) {\n $valid = true;\n }\n }\n } else {\n if (in_array($index, $accessLevels, false)) {\n $valid = true;\n }\n }\n }\n if ($valid) {\n $items[$path] = $slug;\n }\n } else {\n //Single value for access\n if (in_array($page->header()->access, $accessLevels, false)) {\n $items[$path] = $slug;\n }\n }\n }\n }\n\n $this->items = $items;\n\n return $this;\n }", "static public function get_access($level = null)\n\t{\n\t\tif($level != null)\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t$level = 'banned';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$level = 'customer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$level = 'privilege';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$level = 'admin';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('banned', 'customer', 'privilege', 'admin');\n\t\t}\n\t}", "public function create()\n {\n \n return view('admins.levels.create', compact('levels'));\n\n }", "public function action_create()\n {\n if (Valid::not_empty($_POST)) \n {\n if(Model::factory('level')->create_level($_POST))\n $this->request->redirect('sadmin/levels/list');\n }\n $data = $this->data;\n $data['sidebar']->set('sidebar_index', 'create_levels');\n $data['year'] = $this->request->param('id');\n Helper_Output::factory()\n ->link_js('js/level/index')\n ->link_js('js/class/templates') ;\n $this->setTitle('Create Level')\n ->view('levels/create', $data)\n ->render();\n }", "public function canAccess($access = 0) {\n\n return in_array($access, $this->_user->getAuthorisedViewLevels());\n\n }", "function addNewLevel($name, $level, $permissions)\n {\n\n // define all the global variables\n global $database, $message;\n\n // escape strings\n $name = $database->secureInput($name);\n $level = $database->secureInput($level);\n //$permissions = $database->secureInput($permissions);\n\n // check for any empty fields\n if ($name == \"\" || $level == \"\" || $permissions == \"\") {\n $message->setError(\"All fields are required to be filled\", Message::Error);\n return false;\n }\n\n // check if level name exists\n if ($this->isLevelNameAvailable($name)) {\n $message->setError(\"Level name already exists\", Message::Error);\n return false;\n }\n\n // check if level exists\n if ($this->isLevelAvailable($level)) {\n $message->setError(\"Level already exists\", Message::Error);\n return false;\n }\n\n // check if array of permissions has been supplied and its not an empty array\n if (!is_array($permissions)) {\n $message->setError(\"An array of strings must be supplied for the permissions\", Message::Error);\n return false;\n }\n\n if (empty($permissions)) {\n $message->setError(\"At least 1 permission is required\", Message::Error);\n return false;\n }\n\n // split the permissions array and store it in a string with a '|' separator\n $permissionsString = \"\";\n $i = 0;\n foreach ($permissions as $permission) {\n\n // escape the string for db protection\n $permission = $database->secureInput($permission);\n\n // check if permissions only has * inside, then refuse it and don't add it\n if ($permission == \"*\") {\n continue;\n }\n\n // check if string has no spaces in it then don't add it\n if (preg_match('/\\s/', $permission)) {\n continue;\n }\n\n // add the permission to the string array\n $permissionsString .= $permission;\n\n // check if not last, then add a separator\n if (($i + 1) < count($permissions)) {\n $permissionsString .= \"|\";\n }\n\n $i++;\n }\n\n // update the database with the new results\n $sql = \"INSERT INTO \" . TBL_LEVELS . \" (\" . TBL_LEVELS_LEVEL . \",\" . TBL_LEVELS_NAME . \",\" . TBL_LEVELS_PERMISSIONS . \") VALUES\n ('$level','$name','$permissionsString')\";\n\n // get the sql results\n if (!$result = $database->getQueryResults($sql)) {\n return false;\n }\n\n // if not errors then return a success message\n $message->setSuccess(\"Level \" . $name . \"(\" . $level . \"), has been successfully created\");\n return true;\n }", "public function addMember($project_id, $user_id, $access_level)\n {\n return $this->post($this->getProjectPath($project_id, 'members'), array(\n 'user_id' => $user_id,\n 'access_level' => $access_level\n ));\n }", "public function store(CreateAccessListRequest $CreateAccessListRequestObj)\n {\n $input = $CreateAccessListRequestObj->all();\n $AccessListDetailObj = $this->AccessListDetailRepositoryObj->create($input);\n\n return $this->sendResponse($AccessListDetailObj->toArray(), 'AccessListDetail saved successfully');\n }", "public function create()\n\t{\n\t\t$data['title'] = \"Level Admin\";\n\t\t// $data['level'] = $this->level->getAll();\n\t\t$data['action'] = \"level/insert\";\n\t\t$this->template->admthemes('level/formCreate',$data);\n\t}", "public static function addAccessCapability() {\n foreach (wp_roles()->role_objects as $name => $role) {\n if (in_array($name, static::getAccessibleRoles())) {\n $role->add_cap('admin_access');\n }\n }\n }", "public function addAccessGroups($accessGroups)\n\t{\n\t\t$this->accessGroupsScope = (array)$accessGroups;\n\t}", "function access_scheme_add_list() {\n drupal_set_title(t('Add an access scheme'), PASS_THROUGH);\n\n $content = array();\n foreach (access_scheme_info() as $type => $info) {\n $content[$type] = array(\n 'title' => $info['label'],\n 'description' => $info['description'],\n 'href' => 'admin/structure/access/add/' . str_replace('_', '-', $type),\n 'localized_options' => array(),\n );\n }\n return theme('admin_block_content', array('content' => $content));\n}", "public function createAction()\n {\n $entity = new Level();\n $request = $this->getRequest();\n $form = $this->createForm(new LevelType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('level_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n {\n $this->authorize('create', Roleplay::class);\n $levels = Level::pluck('level','id')->all();\n //$levels = Level::lists('title', 'id');\n //$levelsCollect = collect($levels);\n //dd($levels);\n return view('roleplays.create',compact('levels'));\n }", "public function create()\n {\n return view('admin.level.create');\n }", "private function insertAppRights($accessId)\n\t{\n\t\t// delete any existing rights\n\t\t$con = new Condition(array('accessId', '=', $accessId));\n\n\t\t$this->getSql()->delete($this->registry['table.oauth_access_right'], $con);\n\n\t\t// insert rigts\n\t\t$rights = array();\n\n\t\tforeach($this->userRights as $right)\n\t\t{\n\t\t\t$key = 'right-' . $right['rightId'];\n\t\t\t$set = isset($_POST[$key]) ? (boolean) $_POST[$key] : false;\n\n\t\t\tif($set)\n\t\t\t{\n\t\t\t\t$accessId = (integer) $accessId;\n\t\t\t\t$rightId = (integer) $right['rightId'];\n\n\t\t\t\tif($rightId > 0)\n\t\t\t\t{\n\t\t\t\t\t$rights[] = '(' . $accessId . ',' . $rightId . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($rights))\n\t\t{\n\t\t\t$sql = implode(',', $rights);\n\t\t\t$sql = <<<SQL\nINSERT INTO \n\t{$this->registry['table.oauth_access_right']} (accessId, rightId)\nVALUES\n\t{$sql}\nSQL;\n\n\t\t\t$this->getSql()->query($sql);\n\t\t}\n\t}", "public function run()\n {\n $accessLevels = [\n ['name' => 'Read', 'key' => 'read'],\n ['name' => 'Write', 'key' => 'write'],\n ];\n\n foreach ($accessLevels as $accessLevel) {\n $model = new AccessLevel($accessLevel);\n $model->save();\n }\n }", "public static function accessLevelName(string $accessPolicy, string $accessLevel): string\n {\n return self::getPathTemplate('accessLevel')->render([\n 'access_policy' => $accessPolicy,\n 'access_level' => $accessLevel,\n ]);\n }", "public function create()\n {\n //\n return view('admin.levels.create');\n }", "public function create()\n {\n //\n $title = \"Create New Level\";\n $return_route = 'level.index';\n\n return view('levels.create', compact(\n 'title', \n 'return_route'\n ));\n }" ]
[ "0.60263413", "0.5899173", "0.5847993", "0.54972965", "0.52417034", "0.5121448", "0.50789034", "0.50656796", "0.5063813", "0.49476647", "0.49315348", "0.48734844", "0.48388642", "0.48049966", "0.47811434", "0.47580487", "0.4742312", "0.47077626", "0.46987706", "0.46166673", "0.46000496", "0.45832455", "0.4578517", "0.45371357", "0.44905376", "0.44489196", "0.44375217", "0.4430629", "0.44212943", "0.4414638" ]
0.78150946
0
Operation listsaccessLevelaccessLevelIdPut Update an existing accessLevel.
public function listsaccessLevelput($accessLevel_id) { $input = Request::all(); $accessLevel = AccessLevel::findOrFail($accessLevel_id); $accessLevel->update(['name' => $input['name']]); if($accessLevel->save()){ return response()->json(['msg' => 'Update accessLevel']); }else{ return response('Oops, it seems like there was a problem updating the accessLevel'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsaccessLevelpost()\r\n {\r\n $input = Request::all();\r\n $new_accessLevel = AccessLevel::create($input);\r\n if($new_accessLevel){\r\n return response()->json(['msg' => 'Added a new accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the accessLevel');\r\n }\r\n }", "public function setAccessLevel($level) {\n $this->access_level = $level;\n }", "public function update(LevelRequest $request) {\n $level = Level::find($request->id)\n ->update([\n 'type' => $request->type,\n 'can_view' => implode(',', json_decode($request->can_view))\n ]);\n\n return $this->response($level, 'update');\n }", "public function listsaccessLevelByIdget($accessLevel_id)\r\n {\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n return response()->json($accessLevel,200);\r\n }", "public function edit_level($level_id = \"\")\n {\n $data['nm_level'] = html_escape($this->input->post('nm_level'));\n $data['cuser'] = $this->session->userdata('id_user');\n $this->db->where('id_level', $level_id);\n $this->db->update('ref_level', $data);\n $this->session->set_flashdata('flash_message', 'Berhasil Diubah');\n }", "public function update_user_access($id, $req_access) {\n\t\t$query1 = \"SELECT access_level, loss_date FROM users WHERE id='$id'\";\n\t\t$check_database1 = mysqli_query($this->con, $query1);\n\t\t$currentRow = mysqli_fetch_assoc($check_database1);\n\n\n\t\t//Check if Submitted Access level is not the same as the current level. If it is the same Return Null.\n\t\tif($req_access !== $currentRow['access_level']) {\n\t\t\t//Pull Employee ID of posted ID for dataase update\n\t\t\t$employee_id = $this->check_employee_id($id);\n\t\t\t$nameOfUser = $this->get_nameOfUser($_SESSION['username']);\n\t\t\t$curr_access = $currentRow['access_level'];\n\t\t\t//Pull Data from Database to update user_history\n\t\t\t\n\n\n\t\t\t//Check if the submitted access change is 0 (No Access)\n\t\t\tif($req_access == 0) {\n\t\t\t\t//Update user access to 0\n\t\t\t\t$date = date(\"Y-m-d\");\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access', loss_date='$date' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access has been removed from this user.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\n\t\t\t//If Submitted access level is above 0.\n\t\t\telse {\n\t\t\t\t//Update User Access on the table\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access Level has been changed.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\t\n\t\t}\n\t\t//Check if the Current Access Level is equal to 0\n\t\telse if($currentRow['access_level'] == 0) {\n\t\t\t$startDate = new DateTime($currentRow['loss_date']);\n\t\t\t$currentDate = date(\"Y/m/d\");\n\t\t\t$endDate = new DateTime($currentDate);\n\t\t\t$diff = $startDate->diff($endDate);\n\t\t\t//Deactivate User if they have had no access to the system for 180 days (6 Months)\n\t\t\tif($diff->d >= 180) {\n\t\t\t\t$this->deactivate_user($id);\n\t\t\t}\n\t\t}\n\t}", "public function updateLevel($level, $skillPointsGained) {\n\t\t$absParams = array();\n\t\t$absParams['level'] = $level;\n\t\t\n\t\t$relParams = array();\n\t\t$relParams['skill_points'] = $skillPointsGained;\n\t\t\n\t\t$conditions = array();\n\t\t$conditions['id'] = $this->id;\n\n $objItem = ConnectionFactory::SelectRowAsClass(\"SELECT required_experience_points FROM level_experience_points where level_id = :levelID\",\n array(\"levelID\" => ($level+1)), __CLASS__);\n\n $nextRequiredExp = $objItem->required_experience_points;\n\n $absParams['next_level_experince_points'] = $nextRequiredExp;\n\n $success = ConnectionFactory::updateTableRowGenericBasic(\"users\", $absParams, $relParams, $conditions);\n\t\t\n\t\tif ($success) {\n\t\t\t$this->level = $level;\n\t\t\t$this->skill_points += $skillPointsGained;\n\t\t}\n\t\t\n\t\treturn $success;\n\t}", "public function changeaccess()\n {\n $menu_id = $this->input->post('menuId');\n $role_id = $this->input->post('roleId');\n\n $data = [\n 'role_id' => $role_id,\n 'menu_id' => $menu_id\n ];\n\n // select * from user_access_menu where role_id = $role_id, menu_id = $menu_id \n $result = $this->db->get_where('user_access_menu', $data);\n\n if ($result->num_rows() < 1) {\n // jika tidak ada, insert\n $this->db->insert('user_access_menu', $data);\n } else {\n // jika ada, hapus\n $this->db->delete('user_access_menu', $data);\n }\n\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\" role=\"alert\">\n Access Changed.\n </div>');\n }", "public function addAccessLevels($accessLevels)\n\t{\n\t\t$this->accessLevelsScope = array_merge(array('NULL', 0), $accessLevels);\n\t}", "public function update(LevelRequest $request, $id)\n {\n //\n $level=Level::find($id);\n\n $level->fill($request->all());\n\n $level->save();\n\n flash('El nivel ha sido editado correctamente')->success();\n\n return redirect()->route('levels.index');\n\n }", "public function update(Request $request, UserLevel $userLevel)\n {\n $request->validate([\n 'level_name' => \"required|unique:user_level,nama,$userLevel->id\",\n 'status' => [\n 'required',\n Rule::in(['aktif', 'tidak aktif']),\n ],\n ]);\n\n $levelData = $request->only('status');\n $levelData['nama'] = $request->level_name;\n\n if ($userLevel->update($levelData)) {\n return redirect(route('user_level.index'))->with('success', 'Data telah diubah.');\n } else {\n return back()->withInput()->with('failed', 'Data gagal diubah.');\n }\n }", "public function listsaccessLeveldelete($accessLevel_id)\r\n {\r\n $deleted_accessLevel = AccessLevel::destroy($accessLevel_id);\r\n if($deleted_accessLevel){\r\n return response()->json(['msg' => 'Deleted accessLevel']);\r\n }\r\n }", "public function update(Request $request, $id)\n {\n //\n $update = Level::find($id);\n $update->name = $request->name;\n $update->save();\n $request->session()->flash('success', 'success');\n\n return redirect('/admin/levels');\n }", "public function update(Request $request, $id)\n {\n $this->middleware('role:superAdmin');\n\n Level::findOrFail($id)->update(['name' => $request->name, 'stage_id' => $request->stage_id]);\n return redirect()->route('levels.index')->with('status', 'Updated !!');\n\n }", "public function update()\n {\n\t$id = $this->input->post('id');\n\n $input = array(\n\t\t\t'name' => $nama = $this->input->post('level')\n\t\t);\n\n if ($this->level->where('idlevel', $id)->update($input)) {\n $this->session->set_flashdata('success', '<strong>Success</strong>, Data siswa berhasil diupdate.');\n } else {\n $this->session->set_flashdata('error', '<strong>Failed</strong>, Data siswa gagal diupdate.');\n }\n redirect('level');\n }", "public static function accessLevelName(string $accessPolicy, string $accessLevel): string\n {\n return self::getPathTemplate('accessLevel')->render([\n 'access_policy' => $accessPolicy,\n 'access_level' => $accessLevel,\n ]);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'level' => \"required|unique:sm_question_levels,level,\".$request->id\n ]);\n\n $level = SmQuestionLevel::find($request->id);\n $level->level = $request->level;\n $result = $level->save();\n if($result){\n return redirect()->back()->with('message-success', 'Level has been updated successfully');\n }else{\n return redirect()->back()->with('message-danger', 'Something went wrong, please try again');\n }\n }", "private function insertAppRights($accessId)\n\t{\n\t\t// delete any existing rights\n\t\t$con = new Condition(array('accessId', '=', $accessId));\n\n\t\t$this->getSql()->delete($this->registry['table.oauth_access_right'], $con);\n\n\t\t// insert rigts\n\t\t$rights = array();\n\n\t\tforeach($this->userRights as $right)\n\t\t{\n\t\t\t$key = 'right-' . $right['rightId'];\n\t\t\t$set = isset($_POST[$key]) ? (boolean) $_POST[$key] : false;\n\n\t\t\tif($set)\n\t\t\t{\n\t\t\t\t$accessId = (integer) $accessId;\n\t\t\t\t$rightId = (integer) $right['rightId'];\n\n\t\t\t\tif($rightId > 0)\n\t\t\t\t{\n\t\t\t\t\t$rights[] = '(' . $accessId . ',' . $rightId . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($rights))\n\t\t{\n\t\t\t$sql = implode(',', $rights);\n\t\t\t$sql = <<<SQL\nINSERT INTO \n\t{$this->registry['table.oauth_access_right']} (accessId, rightId)\nVALUES\n\t{$sql}\nSQL;\n\n\t\t\t$this->getSql()->query($sql);\n\t\t}\n\t}", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function setLevel($value)\n {\n return $this->set(self::_LEVEL, $value);\n }", "public function update(Request $request, Level $level)\n {\n //\n $level->update($request->all());\n\n return redirect()->route('level.index')->with('success', 'Level <b>'.$level->level_name.'</b> has been updated successfully');\n }", "public function update(Request $request, $id)\n {\n $this->authorize('update', Auth::guard('admin')->user());\n\n // Kiem tra mat khau dung khong\n $password = $request->password;\n $level = $request->level;\n $admin_auth = Auth::guard('admin')->user();\n $ids = $request->id;\n $ids_length = $request->ids_length;\n\n if (Hash::check($password, $admin_auth->password)) {\n Admin::findOrFail($id)->update(['level' => $level]);\n\n // Thêm quyền vào bảng admin_role\n $admin = Admin::findOrFail($id);\n if ($ids_length == 0) {\n $admin->roles()->detach();\n } else {\n $admin->roles()->sync($ids);\n }\n\n $admins = Admin::all();\n $roles = Role::all();\n return view('admin.admins.list-user', compact('admins', 'roles'));\n } else {\n return 0;\n }\n \n }", "public function setLevel($level);", "public function setLevel($value)\n {\n return $this->set(self::LEVEL, $value);\n }", "function update_user_access_menu($id, $params)\n {\n $this->db->where('id', $id);\n return $this->db->update('user_access_menu', $params);\n }", "function setLevel($level);" ]
[ "0.5501806", "0.49578464", "0.48908615", "0.48692834", "0.4764799", "0.474212", "0.47157416", "0.46712825", "0.46615058", "0.4540297", "0.437891", "0.43628088", "0.42735544", "0.4272916", "0.4251682", "0.4232473", "0.4179855", "0.41586736", "0.4157094", "0.4157094", "0.4157094", "0.4157094", "0.4157094", "0.4157094", "0.41229376", "0.41127226", "0.4088606", "0.4087506", "0.40840486", "0.40646595" ]
0.6734804
0
Operation listsaccessLevelaccessLevelIdDelete Deletes an accessLevel specified by accessLevelId.
public function listsaccessLeveldelete($accessLevel_id) { $deleted_accessLevel = AccessLevel::destroy($accessLevel_id); if($deleted_accessLevel){ return response()->json(['msg' => 'Deleted accessLevel']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsaccessLevelByIdget($accessLevel_id)\r\n {\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n return response()->json($accessLevel,200);\r\n }", "public static function delete($access_id) { \n\n\t\t$sql = \"DELETE FROM `access_list` WHERE `id`='\" . Dba::escape($access_id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t}", "public function index($id = null) {\n $this->id = (int) $id;\n \n if(!empty($this->id)){\n $deleteAccessLevels = new \\App\\adms\\Models\\AdmsDeleteAccessLevels();\n $deleteAccessLevels->deleteAccessLevels($this->id);\n }else{\n $_SESSION['msg'] = \"Erro: Necessário selecionar um nível de acesso!\";\n }\n \n $urlDestino = URLADM . \"list-access-levels/index\";\n header(\"Location: $urlDestino\");\n }", "function delete_user_access_menu($id)\n {\n return $this->db->delete('user_access_menu', array('id' => $id));\n }", "public function deleteRoleAccess()\n\t{\n\t\t$RoleAccessID = $this->input->post('RoleAccessID');\n\t\t$RoleAccessData = $this->system_structure_m->deleteRoleAccess($RoleAccessID);\n\t\techo $RoleAccessData;\n\t}", "function delete_tbllevel($level_id)\n {\n return $this->db->delete('tbllevel',array('level_id'=>$level_id));\n }", "public function listsaccessLevelput($accessLevel_id)\r\n {\r\n $input = Request::all();\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n $accessLevel->update(['name' => $input['name']]);\r\n if($accessLevel->save()){\r\n return response()->json(['msg' => 'Update accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the accessLevel');\r\n }\r\n }", "public function listsaccessLevelpost()\r\n {\r\n $input = Request::all();\r\n $new_accessLevel = AccessLevel::create($input);\r\n if($new_accessLevel){\r\n return response()->json(['msg' => 'Added a new accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the accessLevel');\r\n }\r\n }", "public function delete($id)\n {\n if (is_reference_in_table('levelid', 'tblstafflevels', $id)) {\n return [\n 'referenced' => true,\n ];\n }\n $affectedRows = 0;\n $this->db->where('id', $id);\n $this->db->delete('tbllevels');\n if ($this->db->affected_rows() > 0) {\n $affectedRows++;\n }\n $this->db->where('levelid', $id);\n $this->db->delete('tblstafflevels');\n if ($this->db->affected_rows() > 0) {\n $affectedRows++;\n }\n if ($affectedRows > 0) {\n logActivity('Level Deleted [ID: ' . $id);\n\n return true;\n }\n\n return false;\n }", "public function delete($id)\n {\n $query=\"DELETE FROM permission WHERE permissionId=\".$id;\n\n $this->executeQuery($query);\n }", "public function delete($id = null)\n\t{\n\t\t$level = $this->level->where('idlevel', $id)->get();\n if (!$level) {\n $this->session->set_flashdata('warning', 'Data level tidak ada.');\n redirect('level');\n }\n\n if ($this->level->where('idlevel', $id)->delete()) {\n\t\t\t$this->session->set_flashdata('success', '<strong>Success</strong>, Data level berhasil dihapus.');\n\t\t} else {\n $this->session->set_flashdata('error', '<strong>Error</strong>, Data level gagal dihapus.');\n }\n\n\t\tredirect('level');\n\t}", "public function getAccessMenu($id = 0) {\n \t\t$lang = $this->_ci->lang->language['lang'];\n \t\t$status = 1;\n\n \t\t$orderby = \"admin_menu_id\";\n \t\t$query = $this->_ci->db->select(\"*\")->from(\"_admin_access_menu\")->where(array(\"admin_type_id\" => $id))->order_by($orderby, 'ASC')->get();\n \t\t//Check if any results were returned\n \t\tif ($query->num_rows() > 0) {\n \t\t\t//Create an array to store users\n \t\t\t$users_access = array();\n \t\t\t//Loop through each row returned from the query\n \t\t\tforeach ($query->result() as $row) {\n \t\t\t\t//Pass the row data to our local function which creates a new user object with the data provided and add it to the users array\n \t\t\t\t$users_access[] = $row;\n \t\t\t}\n \t\t\t//Return the users array\n \t\t\treturn $users_access;\n \t\t}\n \t\treturn false; \t \n }", "public function actionDelete($id)\n {\n if($this->findModel($id)->delete())\n {\n $user_roles = UserRole::find()->select('id')->where(['role_id' => $id])->all();\n \n foreach($user_roles as $u_r)\n {\n UserRole::findOne($u_r)->delete();\n }\n\n $role_accesses = RoleAccess::find()->select('id')->where(['role_id' => $id])->all();\n \n foreach ($role_accesses as $r_a)\n {\n RoleAccess::findOne($r_a)->delete();\n \n }\n }\n return $this->redirect(['index']);\n }", "public function deleteLoan($id) {\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('loan/all')->with([\n 'message' => '当前是试用模式,这个功能不可用。',\n 'message_important' => true\n ]);\n }\n\n $self = 'loan';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $loan = Loan::find($id);\n\n if ($loan) {\n $loan->delete();\n\n return redirect('loan/all')->with([\n 'message' => '借款信息删除成功'\n ]);\n } else {\n return redirect('loan/all')->with([\n 'message' => '没有找到借款信息',\n 'message_important' => true\n ]);\n }\n\n }", "public function deleteAcceso($id_acceso){\n\t\t\t$sql = \"DELETE FROM rolepermiso WHERE CodRolePermiso='$id_acceso'\";\n\t\t\treturn ejecutarConsulta($sql);\n\t\t}", "public function delete($id)\n\t{\n\t\t$class = Level::find($id);\n\t\t$class->delete();\n\t\treturn Redirect::to('/level/list')->with(\"success\",\"Level Deleted Succesfully.\");\n\t}", "public function deletePermissionRoleByRoleID($id);", "function deleteMenu($id){\n $this->db->where('id', id_clean($id));\n $this->db->delete('adminmenu');\n }", "public function actionDelete($id)\n\t{\n\t\t$model = $this->findModel($id);\n\t\t$model->delete();\n\n\t\tYii::$app->session->setFlash('success', Yii::t('app', 'User level success deleted.'));\n\t\treturn $this->redirect(['index']);\n\t}", "public function deleteMenu($id)\n {\n return $this->db->delete('user_menu', ['id' => $id]);\n }", "function deleteExperience($id){\n $resultDelete = $this->db->delete($this->tb, array($this->f[0] => $id));\n return $resultDelete;\n }", "public function deleteMenu($menuId = 0, $language = 1);", "function record_del($id)\r\n {\r\n $this->db->select('id');\r\n $this->db->from(db_prefix.'Admin_logs log');\r\n $this->db->where('id',$id);\r\n $query = $this->db->get();\r\n $levels_list=$query->result_array();\r\n if(count($levels_list)>0)\r\n {\r\n if($this->db->delete(db_prefix.'Admin_logs', array('id' => $id)) && $this->db->affected_rows()>0)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return \"<{admin_msg_er_0017}>\"; // not deleted\r\n }\r\n }\r\n return '<{admin_msg_er_0018}>'; //not_found\r\n }", "public function deleteLoanChargeWithHttpInfo($loanId, $chargeId)\n {\n $returnType = '\\Frengky\\Fineract\\Model\\DeleteLoansLoanIdChargesChargeIdResponse';\n $request = $this->deleteLoanChargeRequest($loanId, $chargeId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Frengky\\Fineract\\Model\\DeleteLoansLoanIdChargesChargeIdResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function deletePermissions($id, array $permissions){\n\n $user = $this->model->find($id);\n\n return $user->revokePermissionTo($permissions);\n }", "public function getAdminLevelAccess ($userId)\n \t{\n \t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n \t\tif ( $this->resultNum($query) == 1 )\n \t\t{\n \t\t\t$row = $this->fetchOne($query);\n \t\t}\n \t\treturn $row['level_access'];\n \t}", "static public function get_access($level = null)\n\t{\n\t\tif($level != null)\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t$level = 'banned';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$level = 'customer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$level = 'privilege';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$level = 'admin';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('banned', 'customer', 'privilege', 'admin');\n\t\t}\n\t}", "public static function delete($id) {\n global $lC_Database;\n\n $lC_Database->startTransaction();\n\n $Qdel = $lC_Database->query('delete from :table_administrators_access where administrators_id = :administrators_id');\n $Qdel->bindTable(':table_administrators_access', TABLE_ADMINISTRATORS_ACCESS);\n $Qdel->bindInt(':administrators_id', $id);\n $Qdel->setLogging($_SESSION['module'], $id);\n $Qdel->execute();\n\n if ( !$lC_Database->isError() ) {\n $Qdel = $lC_Database->query('delete from :table_administrators where id = :id');\n $Qdel->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qdel->bindInt(':id', $id);\n $Qdel->setLogging($_SESSION['module'], $id);\n $Qdel->execute();\n\n if ( !$lC_Database->isError() ) {\n $lC_Database->commitTransaction();\n\n return true;\n }\n }\n\n $lC_Database->rollbackTransaction();\n\n return false;\n }", "public function index_delete($id)\n {\n $this->db->delete('tblattendance', array('id' => $id));\n\n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "function checkUserAccess($level_id, $role_id) {\n $this->load->model('General_model');\n\n $checkUserAccess = $this->General_model->checkUserAccess($level_id, $role_id);\n return $checkUserAccess;\n }" ]
[ "0.5685881", "0.56768394", "0.55509937", "0.5533769", "0.53518987", "0.5074936", "0.5043087", "0.4971861", "0.48347092", "0.47509968", "0.4721097", "0.46748647", "0.46685666", "0.46527508", "0.46246108", "0.4619128", "0.46102482", "0.45637557", "0.45371246", "0.45242652", "0.45183346", "0.45057586", "0.45013553", "0.44647262", "0.44379845", "0.442318", "0.4419633", "0.4414618", "0.44035918", "0.4397345" ]
0.7115272
0
/////////////////////////// facility type functions // ///////////////////////// Operation listsfacilityTypeGet Fetch facilityType.
public function listsfacilityTypeget() { $response = FacilityTypes::all(); return response()->json($response,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsfacilityTypeByIdget($facilityType_id)\r\n {\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n return response()->json($facilityType,200);\r\n }", "public function getFacility();", "public function get_type();", "public function listsfacilityTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = FacilityTypes::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the facilityType');\r\n }\r\n }", "function getfeaturetype()\n {\n $featuretypes = \"SELECT * from featuretypes\";\n $featuretypesresult = $this->ds->select($featuretypes); \n //print_r($featuretypesresult);\n return $featuretypesresult;\n }", "public function getTypeList__600(){\n $query = new Query ( \"SELECT\" );\n\n $type = TypeBean::select ( $query );\n if (! $type) {\n return false;\n }\n return $type;\n }", "public function getType(): string {\n return $this->fqType;\n }", "public function getFeatureClinicType($featureId='') {\n //Tables to be used. feature_category,features,assignment_clinic,clinic_type\n //$this->clinicTypeId; \n \n if($featureId!='')\n $conditionQuery=\" AND features.features_id='{$featureId}' \";\n \n // Query To Find If the Feature is to allowed OR NOT Based on Clinic Type\n $SQLquery=\"select features_title as FEATURE_NAME,feature_status from feature_category,features,assignment_clinic,clinic_type where feature_category.feature_cat_id=features.feature_cat_id AND features.features_id=assignment_clinic.features_id AND assignment_clinic.clinic_type_id=clinic_type.clinic_type_id and clinic_type.clinic_type_id = '{$this->clinicTypeId}' AND feature_category.feature_cat_id='2' $conditionQuery \";\n $resultQuery=$this->execute_query($SQLquery);\n $returnValueArray=array(); \n while($result=$this->fetch_array($resultQuery)){\n if($result['feature_status']=='1'){\n // Feature Supported\n $FeatureName=$result['FEATURE_NAME'];\n $returnValueArray[$FeatureName]=$result['feature_status'];\n }else {\n // Feature Not Supported\n $returnValueArray[$FeatureName]='0';\n }\n }\n \n \n return $returnValueArray; \n }", "public function get_type(): string;", "public function get_equipment_type();", "private function get_type() {\n\n\t}", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function getTypeList()\n {\n $this->db->select(\"tt_code, tt_code ||' - '|| tt_desc as tt_code_desc\");\n $this->db->from(\"ims_hris.training_type\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "function getType() ;", "function getType() ;", "function getType() ;", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function getTypesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_type '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function get_types()\n {\n }", "public function ajaxGetTypeFlight()\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$data = $jinput->get('jform', array(), 'ARRAY');\n\n\t\tif (!isset($data['tickettype_id']) || !isset($data['departure_city_id']) || !isset($data['departure_date']))\n\t\t{\n\t\t\texit();\n\t\t}\n\n\t\t$priceTicket = PapiersdefamillesHelper::getTicketFlight($data['tickettype_id'], $data['departure_city_id'], $data['departure_date']);\n\n\t\t/*if ($priceTicket)\n\t\t{\n\t\t\t$priceTicket = Jtext::_(PapiersdefamillesHelperEnum::_('type_flight')[$priceTicket]['text']);\n\t\t}*/\n\n\t\techo json_encode($priceTicket);\n\n\t\texit();\n\t}", "protected abstract function get_rest_field_type();", "public static function getTypes();", "public function getTypeFacture_id()\n {\n return $this->typeFacture_id;\n }" ]
[ "0.7108525", "0.62773615", "0.6070152", "0.6038117", "0.5935191", "0.59125483", "0.5903166", "0.58065164", "0.5784651", "0.5777263", "0.5770342", "0.57558686", "0.57558423", "0.57558423", "0.5755686", "0.5754596", "0.5750141", "0.57115996", "0.571072", "0.57098746", "0.56949687", "0.56949687", "0.56949687", "0.56949687", "0.56702274", "0.5667858", "0.5655458", "0.5622577", "0.5621804", "0.56133515" ]
0.6957047
1
Operation listsfacilityTypefacilityTypeIdGet Fetch facilityType specified by facilityTypeId.
public function listsfacilityTypeByIdget($facilityType_id) { $facilityType = FacilityTypes::findOrFail($facilityType_id); return response()->json($facilityType,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsfacilityTypedelete($facilityType_id)\r\n {\r\n $deleted_facilityType = FacilityTypes::destroy($facilityType_id);\r\n if($deleted_facilityType){\r\n return response()->json(['msg' => 'Deleted facilityType']);\r\n }\r\n }", "public function listsfacilityTypeput($facilityType_id)\r\n {\r\n $input = Request::all();\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n $facilityType->update(['name' => $input['name']]);\r\n if($facilityType->save()){\r\n return response()->json(['msg' => 'Update facilityType','data' =>$facilityType] );\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the facilityType');\r\n }\r\n }", "public static function deleteFacilityType($id) {\r\n self::deleteParendsChilesTypeTree($id);\r\n // must delete all items under the type....... \r\n // more delete..\r\n return array(\"success\" => true);\r\n }", "public static function get_facility_name($facility_code){\n\t$query=Doctrine_Query::create()->select('*')->from('facilities')->where(\"facility_code='$facility_code'\");\n\t$result=$query->execute();\n\treturn $result;\n\t}", "public function listsfacilityTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = FacilityTypes::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the facilityType');\r\n }\r\n }", "public function listsfacilityTypeget()\r\n {\r\n $response = FacilityTypes::all();\r\n return response()->json($response,200);\r\n }", "public function getFacility()\n {\n return $this->facility;\n }", "public function getFacility()\n {\n return $this->facility;\n }", "public function index($facility_id)\n {\n\t \n\t if($facility_id){\n\t\t $classrooms = Classroom::where('facility_id', $facility_id)->orderBy('name', 'asc')->paginate(10);\n\t } else {\n\t\t $classrooms = Classroom::orderBy('facility_id')->paginate(10);\n\t }\n \t\t\t\t\n\t\t$classrooms->load('facility');\n return ClassroomResource::collection($classrooms);\n \n \n /*\n\t //how to eager load related models via map\n $classrooms->map(function ($c) {\t\t\t \n\t\t return $c->facility;\n\t\t});\n \n //how to eager load related model with ORM load method. Then organize classrooms while grouped by facility\n $facility=Facility::findOrFail($facility_id)->load(['classrooms'=>function($query){$query->orderBy('name','desc');}]);\n //return new FacilityResource($facility);\n return ClassroomResource::collection($facility->classrooms);\n */\n }", "public static function getTicketFlight($ticketTypeId, $departureCityId, $departureDate)\n {\n $modelTicketTypeId = CkJModel::getInstance('Tickettype', 'PapiersdefamillesModel');\n $ticketType = $modelTicketTypeId->getItem($ticketTypeId);\n\n $config = JFactory::getConfig();\n $fromname = $config->get('offset');\n $timezone = new DateTimeZone($fromname);\n\n $date = new JDate(strtotime($departureDate));\n $date->setTimezone($timezone);\n\n //$dayOfWeek = $date->format('l');\n $day = intval($date->format('d'));\n //$monthYear = $date->format('F');\n $month = intval($date->format('m'));\n $year = intval($date->format('Y'));\n\n $pricelist = json_decode($ticketType->pricelist);\n\n $priceFilterArr = array_filter(\n $pricelist,\n function ($e) use ($departureCityId, $month, $year) {\n return ($e->departure_city_id == $departureCityId && $e->month_id == $month && $e->year == $year && $e->type_flight);\n }\n );\n\n if ( ! empty($priceFilterArr)) {\n $tmp = array();\n foreach ($priceFilterArr as $item) {\n $tmp[] = (int)$item->type_flight;\n }\n\n return $tmp;\n }\n\n return 0;\n }", "public function getFacility();", "public static function getWorkforce ( $facility_id = 0 )\n {\n return DB::table(self::$table_name)\n ->where('facility_id', $facility_id)\n ->orderBy('created_at', 'DESC')\n ->first();\n }", "public function get_facility_category_items($category_id) {\r\n //SELECT * FROM tbl_facility_items WHERE facility_item_is_deleted = 0\r\n $this->db->select('*');\r\n $this->db->where('facility_item_is_deleted = 0 AND facility_category_id = ' . $category_id);\r\n $result = $this->db->get('tbl_facility_items')->result_array();\r\n return $result;\r\n }", "public function getTypeDefinition($typeId, $options = array ()) { // Nice to have\n\t\t$varmap = $options;\n\t\t$varmap[\"id\"] = $typeId;\n\t\t$myURL = $this->processTemplate($this->workspace->uritemplates['typebyid'], $varmap);\n\t\t$ret = $this->doGet($myURL);\n\t\t$obj = $this->extractTypeDef($ret->body);\n\t\t$this->cacheTypeInfo($obj);\n\t\treturn $obj;\n\t}", "public function facilityPatient($id)\n\t{\n $patients = Patient::where(\"facility_id\",$id)->get();\n\t\treturn View::make('patient.list_by_facility',compact('patients','id'));\n\t}", "public function fetchFieldTypeFromID($id){\n\t\t\treturn Symphony::Database()->fetchVar('type', 0, \"SELECT `type` FROM `tbl_fields` WHERE `id` = '$id' LIMIT 1\");\n\t\t}", "public static function fetchFieldTypeFromID($id)\n {\n return Symphony::Database()->fetchVar('type', 0, sprintf(\"\n SELECT `type` FROM `tbl_fields` WHERE `id` = %d LIMIT 1\",\n $id\n ));\n }", "public function index()\n {\n $facilities=Facility::all();\t\t\n\t\t$data=Category::all(); \n \n\t\t\n\t\t$cat=[];\n foreach ($data as $key => $value) {\n $cat[$value->id]=$value->name;\n }\n\t\t\n\n // return $facility;\n return view('pages.admin.facility.facilitylist',compact('facilities','cat'));\n //\n }", "function &getRegistrationType($typeId, $code = null) {\n\t\t$params = array($typeId);\n\t\tif ($code !== null) $params[] = $code;\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT * FROM registration_types WHERE type_id = ?' .\n\t\t\t($code !== null ? ' AND code = ?':''),\n\t\t\t$params\n\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_returnRegistrationTypeFromRow($result->GetRowAssoc(false));\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function ajaxGetTypeFlight()\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$data = $jinput->get('jform', array(), 'ARRAY');\n\n\t\tif (!isset($data['tickettype_id']) || !isset($data['departure_city_id']) || !isset($data['departure_date']))\n\t\t{\n\t\t\texit();\n\t\t}\n\n\t\t$priceTicket = PapiersdefamillesHelper::getTicketFlight($data['tickettype_id'], $data['departure_city_id'], $data['departure_date']);\n\n\t\t/*if ($priceTicket)\n\t\t{\n\t\t\t$priceTicket = Jtext::_(PapiersdefamillesHelperEnum::_('type_flight')[$priceTicket]['text']);\n\t\t}*/\n\n\t\techo json_encode($priceTicket);\n\n\t\texit();\n\t}", "public function getTypeId()\n {\n return $this->typeId;\n }", "public function recurrenceTypeId(): RecurrenceTypeId;", "function getRegistrationTypeMembership($typeId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT membership FROM registration_types WHERE type_id = ?', $typeId\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) ? $result->fields[0] : 0;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "public function get_faculty_list() {\n\t\t\t// check of active needs to be applied\n\t\t\t$dept_id = $this->input->post('dept_id');\n\t\t\t$role = array(3, 4); // selecting HOD(considering HOD for testing, else display all faculties of dept. except current HOD), other faculties of the dept.\n\n\t\t\t$this->db->select('Faculty_ID, Name');\n\t\t\t$this->db->where(\"Dept_ID\", $dept_id);\n\t\t\t//$this->db->where_in(\"Role\", $role);\n\t\t\treturn $this->db->get('Faculty')->result_array();\n\t\t}", "public function getTypeId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typeid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typeid'];\n\t\t}\n\t}", "public function getTypeFacture_id()\n {\n return $this->typeFacture_id;\n }", "public function type($id)\n {\n return $this->where('user_type_id', $id);\n }", "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "protected function get_type_from_id($id)\n\t{\n\t\treturn $this->types->get($id);\n\t}" ]
[ "0.5947796", "0.5599246", "0.5062067", "0.49913558", "0.48227897", "0.48031387", "0.4744175", "0.4744175", "0.46848333", "0.46102577", "0.4578799", "0.45755056", "0.45401174", "0.45226067", "0.45080066", "0.44826633", "0.44823143", "0.4481298", "0.44796062", "0.44487283", "0.44471833", "0.4432287", "0.44300342", "0.44264367", "0.44147134", "0.4411687", "0.44057837", "0.4391576", "0.43879998", "0.43761674" ]
0.7070827
0
Operation listsfacilityTypePost create an facilityType.
public function listsfacilityTypepost() { $input = Request::all(); $new_facilityType = FacilityTypes::create($input); if($new_facilityType){ return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]); }else{ return response('Oops, it seems like there was a problem adding the facilityType'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsfacilityTypeput($facilityType_id)\r\n {\r\n $input = Request::all();\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n $facilityType->update(['name' => $input['name']]);\r\n if($facilityType->save()){\r\n return response()->json(['msg' => 'Update facilityType','data' =>$facilityType] );\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the facilityType');\r\n }\r\n }", "public function create_post_types() {\n }", "function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}", "public function listsfacilityTypeByIdget($facilityType_id)\r\n {\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n return response()->json($facilityType,200);\r\n }", "public function type()\n {\n if (!get_permission('fees_type', 'is_view')) {\n access_denied();\n }\n if ($_POST) {\n if (!get_permission('fees_type', 'is_add')) {\n ajax_access_denied();\n }\n $this->type_validation();\n if ($this->form_validation->run() !== false) {\n $post = $this->input->post();\n $this->fees_model->typeSave($post);\n set_alert('success', translate('information_has_been_saved_successfully'));\n $array = array('status' => 'success');\n } else {\n $error = $this->form_validation->error_array();\n $array = array('status' => 'fail', 'error' => $error);\n }\n echo json_encode($array);\n exit();\n }\n $this->data['categorylist'] = $this->app_lib->getTable('fees_type');\n $this->data['title'] = translate('fees_type');\n $this->data['sub_page'] = 'fees/type';\n $this->data['main_menu'] = 'fees';\n $this->load->view('layout/index', $this->data);\n }", "public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('sort','name'));\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier) $this->output(-1, '操作失败,该分类已存在');\n\t\t$info = $this->_cookData($info);\n\t\t$result = Fanli_Service_Ptype::addType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function listsfacilityTypedelete($facilityType_id)\r\n {\r\n $deleted_facilityType = FacilityTypes::destroy($facilityType_id);\r\n if($deleted_facilityType){\r\n return response()->json(['msg' => 'Deleted facilityType']);\r\n }\r\n }", "public function transactionTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = TransactionType::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg'=> 'added transaction', 'response'=> $new_facilityType], 201);\r\n }else{\r\n return response()->json(['msg'=> 'Could not add transaction'], 400);\r\n }\r\n }", "protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }", "function austeve_create_creations_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Creations', 'Post Type General Name', 'austeve-canvas' ),\n\t\t'singular_name' => _x( 'Creation', 'Post Type Singular Name', 'austeve-canvas' ),\n\t\t'menu_name' => __( 'Creations', 'austeve-canvas' ),\n\t\t'name_admin_bar' => __( 'Creation', 'austeve-canvas' ),\n\t\t'archives' => __( 'Creation Archives', 'austeve-canvas' ),\n\t\t'attributes' => __( 'Creation Attributes', 'austeve-canvas' ),\n\t\t'parent_item_colon' => __( 'Parent Creation:', 'austeve-canvas' ),\n\t\t'all_items' => __( 'All Creations', 'austeve-canvas' ),\n\t\t'add_new_item' => __( 'Add New Creation', 'austeve-canvas' ),\n\t\t'add_new' => __( 'Add Creation', 'austeve-canvas' ),\n\t\t'new_item' => __( 'New Creation', 'austeve-canvas' ),\n\t\t'edit_item' => __( 'Edit Creation', 'austeve-canvas' ),\n\t\t'update_item' => __( 'Update Creation', 'austeve-canvas' ),\n\t\t'view_item' => __( 'View Creation', 'austeve-canvas' ),\n\t\t'view_items' => __( 'View Creations', 'austeve-canvas' ),\n\t\t'search_items' => __( 'Search Creation', 'austeve-canvas' ),\n\t\t'not_found' => __( 'Not found', 'austeve-canvas' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'austeve-canvas' ),\n\t\t'featured_image' => __( 'Featured Image', 'austeve-canvas' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'austeve-canvas' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'austeve-canvas' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'austeve-canvas' ),\n\t\t'insert_into_item' => __( 'Insert into Creation', 'austeve-canvas' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'austeve-canvas' ),\n\t\t'items_list' => __( 'Creations list', 'austeve-canvas' ),\n\t\t'items_list_navigation' => __( 'Creations list navigation', 'austeve-canvas' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'austeve-canvas' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Creation', 'austeve-canvas' ),\n\t\t'description' => __( 'Creations for '.get_bloginfo( 'name' ).' events', 'austeve-canvas' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'author', 'thumbnail', 'revisions', ),\n\t\t'taxonomies' => array( 'creation_tags' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 10,\n\t\t'menu_icon' => 'dashicons-admin-customizer',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => 'creations',\n\t\t'rewrite' \t=> array( 'slug' => 'creations' ),\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => array( 'creation' , 'creations' ),\n 'map_meta_cap' => true,\n\t);\n\tregister_post_type( 'austeve-creations', $args );\n\n\t// Add new taxonomy, make it hierarchical (like categories)\n\t$categoryLabels = array(\n\t\t'name' => _x( 'Categories', 'taxonomy general name', 'austeve-canvas' ),\n\t\t'singular_name' => _x( 'Category', 'taxonomy singular name', 'austeve-canvas' ),\n\t\t'search_items' => __( 'Search Categories', 'austeve-canvas' ),\n\t\t'all_items' => __( 'All Categories', 'austeve-canvas' ),\n\t\t'parent_item' => __( 'Parent Category', 'austeve-canvas' ),\n\t\t'parent_item_colon' => __( 'Parent Category:', 'austeve-canvas' ),\n\t\t'edit_item' => __( 'Edit Category', 'austeve-canvas' ),\n\t\t'update_item' => __( 'Update Category', 'austeve-canvas' ),\n\t\t'add_new_item' => __( 'Add New Category', 'austeve-canvas' ),\n\t\t'new_item_name' => __( 'New Category Name', 'austeve-canvas' ),\n\t\t'menu_name' => __( 'Categories', 'austeve-canvas' ),\n\t);\n\n\t$categoryArgs = array(\n\t\t'hierarchical' => true,\n\t\t'label' => __( 'austeve_creation_categories', 'austeve-canvas' ),\n\t\t'labels' => $categoryLabels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'creation-categories' ),\n\t\t'capabilities'\t\t=> array(\n\t\t\t\t\t\t\t 'manage_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'edit_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'delete_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'assign_terms' => 'edit_creations'\n\t\t\t\t\t\t\t )\n\t);\n\n\tregister_taxonomy( 'austeve_creation_categories', array( 'austeve-creations' ), $categoryArgs );\n\n\t$taxonomyLabels = array(\n\t\t'name' => _x( 'Tags', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Tag', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Search Tags' ),\n\t\t'all_items' => __( 'All Tags' ),\n\t\t'parent_item' => __( 'Parent Tag' ),\n\t\t'parent_item_colon' => __( 'Parent Tag:' ),\n\t\t'edit_item' => __( 'Edit Tag' ),\n\t\t'update_item' => __( 'Update Tag' ),\n\t\t'add_new_item' => __( 'Add New Tag' ),\n\t\t'new_item_name' => __( 'New Tag Name' ),\n\t\t'menu_name' => __( 'Tags' ),\n\t);\n\n\t$taxonomyArgs = array(\n\n\t\t'label' => __( 'austeve_creation_tags', 'austeve-canvas' ),\n\t\t'labels' => $taxonomyLabels,\n\t\t'show_admin_column'\t=> false,\n\t\t'hierarchical' \t\t=> false,\n\t\t'show_ui'\t\t\t=> true,\n\t\t'rewrite' => array( 'slug' => 'creation-tags' ),\n\t\t'capabilities'\t\t=> array(\n\t\t\t\t\t\t\t 'manage_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'edit_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'delete_terms' => 'edit_users',\n\t\t\t\t\t\t\t 'assign_terms' => 'edit_creations'\n\t\t\t\t\t\t\t )\n\t\t);\n\n\tregister_taxonomy( 'austeve_creation_tags', 'austeve-creations', $taxonomyArgs );\n\n}", "function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}", "public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}", "function create_post_type() {\r\n\r\n\t\t$args = apply_filters( 'agentpress_listings_post_type_args',\r\n\t\t\tarray(\r\n\t\t\t\t'labels' => array(\r\n\t\t\t\t\t'name'\t\t\t\t\t=> __( 'Listings', 'apl' ),\r\n\t\t\t\t\t'singular_name'\t\t\t=> __( 'Listing', 'apl' ),\r\n\t\t\t\t\t'add_new'\t\t\t\t=> __( 'Add New', 'apl' ),\r\n\t\t\t\t\t'add_new_item'\t\t\t=> __( 'Add New Listing', 'apl' ),\r\n\t\t\t\t\t'edit'\t\t\t\t\t=> __( 'Edit', 'apl' ),\r\n\t\t\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Listing', 'apl' ),\r\n\t\t\t\t\t'new_item'\t\t\t\t=> __( 'New Listing', 'apl' ),\r\n\t\t\t\t\t'view'\t\t\t\t\t=> __( 'View Listing', 'apl' ),\r\n\t\t\t\t\t'view_item'\t\t\t\t=> __( 'View Listing', 'apl' ),\r\n\t\t\t\t\t'search_items'\t\t\t=> __( 'Search Listings', 'apl' ),\r\n\t\t\t\t\t'not_found'\t\t\t\t=> __( 'No listings found', 'apl' ),\r\n\t\t\t\t\t'not_found_in_trash'\t=> __( 'No listings found in Trash', 'apl' )\r\n\t\t\t\t),\r\n\t\t\t\t'public'\t\t=> true,\r\n\t\t\t\t'query_var'\t\t=> true,\r\n\t\t\t\t'menu_position'\t=> 6,\r\n\t\t\t\t'menu_icon'\t\t=> APL_URL . 'images/apl-icon-16x16.png',\r\n\t\t\t\t'has_archive'\t=> true,\r\n\t\t\t\t'supports'\t\t=> array( 'title', 'editor', 'comments', 'thumbnail', 'genesis-seo', 'genesis-layouts', 'genesis-simple-sidebars' ),\r\n\t\t\t\t'rewrite'\t\t=> array( 'slug' => 'listings' ),\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tregister_post_type( 'listing', $args );\r\n\r\n\t}", "public function create()\n\t{\n\t\t//\tGet all facility types\n\t\t$facilityTypes = FacilityType::lists('name', 'id');\n\t\t//\tGet all facility owners\n\t\t$facilityOwners = FacilityOwner::lists('name', 'id');\n\n\t\t$subCounties = SubCounty::lists('name', 'id');\n\t\treturn view('mfl.facility.create', compact('facilityTypes', 'facilityOwners', 'subCounties'));\n\n\t}", "public function addFraisForfaitTypeAction(Request $request)\n {\n $em = $this -> getDoctrine()->getManager();\n $fraisType = $em->getRepository(\"FrontBundle:FraisForfaitType\")->findAll();\n\n $fraisforfaittype = new fraisForfaitType();\n $formfft = $this->createForm('FrontBundle\\Form\\FraisForfaitTypeType', $fraisforfaittype);\n $formfft ->add(\"Ajouter\", SubmitType::class, array(\n 'attr' => array('class' => 'btn','center-align')));\n $formfft->handleRequest($request);\n\n if ($formfft->isSubmitted() && $formfft->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($fraisforfaittype);\n $em->flush();\n $this->addFlash('success','Frais ajouté');\n\n return $this->redirectToRoute('addfraistype');\n\n }\n return $this->render('@Front/Admin/addfraistype.html.twig',\n array('formfft' => $formfft->createView(),\n \"fraisType\" => $fraisType\n\n ));\n\n }", "public function createPostTypes()\n {\n }", "public function create()\n {\n $types = SiteType::whereNotIn('id', [5])->get();\n return view('dashboard.facilities-create', compact('types'));\n }", "function aitFreebiePostType()\r\n {\r\n\tregister_post_type('ait-freebie',\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __('Freebies', 'ait'),\r\n\t\t\t\t'singular_name' => __('Freebie', 'ait'),\r\n\t\t\t\t'add_new' => __('Add new', 'ait'),\r\n\t\t\t\t'add_new_item' => __('Add new freebie', 'ait'),\r\n\t\t\t\t'edit_item' => __('Edit freebie', 'ait'),\r\n\t\t\t\t'new_item' => __('New freebie', 'ait'),\r\n\t\t\t\t'view_item' => __('View freebie', 'ait'),\r\n\t\t\t\t'search_items' => __('Search freebies', 'ait'),\r\n\t\t\t\t'not_found' => __('No freebies found', 'ait'),\r\n\t\t\t\t'not_found_in_trash' => __('No freebies found in Trash', 'ait'),\r\n\t\t),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'query_var' => true,\r\n\t\t'has_archive' => true,\r\n\t\t'hierarchical' => false,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'rewrite' => array('slug' => 'freebies'),\r\n\t\t'supports' => array('title', 'thumbnail', 'page-attributes', 'editor'),\r\n\t\t'menu_icon' => AIT_FRAMEWORK_URL . '/CustomTypes/freebie/freebie.png',\r\n\t\t'menu_position' => $GLOBALS['aitThemeCustomTypes']['freebie'],\r\n\t\t)\r\n\t);\r\n\r\n\taitFreebieTaxonomies();\r\n\r\n\tflush_rewrite_rules(false);\r\n}", "function create_zubi_consultancy() {\n\t$title = $_POST['title'];\n\t$category = array($_POST['category']);\n\t$name = sanitize_title($title);\n\t$post = array (\n\t\t'post_title' => $title,\n\t\t'post_name' => $name,\n\t\t'post_author' => 1,\n\t\t'post_type' => 'sfwd-courses',\n\t\t'comment_status' => 'closed',\n\t\t'post_category' => $category\n\t);\n\t$post_id = wp_insert_post($post);\n\tupdate_post_meta( $post_id, 'fachada_servicio', 'fachada_CONSULTORIA' );\n\n\tif (is_wp_error($post_id)) {\n\t\treturn new WP_Error('cant_insert_post', 'Consultancy could not be created', array ('status' => 500 ));\n\t} else {\n\t\t$new_post = get_post($post_id);\n\t\treturn $new_post;\n\t};\n\n}", "public function add_post_type( $name ) {\n\t\t$this->post_types[] = $name;\n\t}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function create() {\r\n\r\n\r\n //if POST data to facility/create\r\n if (isset($_POST) AND ! empty($_POST)) {\r\n\r\n $facility_model = $this->loadModel('facility');\r\n $facility_model->create($_POST);\r\n header('location: ' . URL . 'facility/updateindex');\r\n }\r\n $this->view->render('facility/create');\r\n }", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}", "function omfg_mobile_pro_create_site_posttypes() {\n\tdo_action('omfg_mobile_pro_create_site_posttypes');\n}", "function create_post_type()\n{\n//post type\n $post_type_labels = array(\n 'name' => __('Услуги', 'themename'),\n 'singular_name' => __('Услуга', 'themename'),\n 'add_new' => __('Добавить', 'themename'),\n 'add_new_item' => __('Добавить', 'themename'),\n 'edit_item' => __('Редактировать', 'themename'),\n 'new_item' => __('Добавить', 'themename'),\n 'view_item' => __('Смотреть', 'themename'),\n 'search_items' => __('Искать', 'themename'),\n 'not_found' => __('Не найдено', 'themename'),\n 'parent_item_colon' => '',\n );\n $description = get_option('Перечень услуг');\n $post_type_args = array(\n 'labels' => apply_filters('inspiry_property_post_type_labels', $post_type_labels),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'has_archive' => true,\n 'capability_type' => 'post',\n 'hierarchical' => true,\n 'menu_icon' => 'dashicons-portfolio',\n 'menu_position' => 15,\n 'description' => $description,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'rewrite' => array(\n 'slug' => apply_filters('inspiry_property_slug', 'uslugi'),\n ),\n );\n register_post_type('service', $post_type_args);\n\n // taxonomy\n register_taxonomy('service_cats', array('service'), array(\n 'label' => 'Категории', // определяется параметром $labels->name\n 'labels' => array(\n 'name' => 'Категории услуг',\n 'singular_name' => 'Категория',\n 'search_items' => 'Искать',\n 'all_items' => 'Все категории',\n 'parent_item' => 'Родительская категория',\n 'parent_item_colon' => 'Родительская категория:',\n 'edit_item' => 'Редактировать',\n 'update_item' => 'Обновить',\n 'add_new_item' => 'Добавить',\n 'new_item_name' => 'Новая категория',\n 'menu_name' => 'Категории услуг',\n ),\n 'description' => 'Категории услуг', // описание таксономии\n 'public' => true,\n 'show_in_nav_menus' => false, // равен аргументу public\n 'show_ui' => true, // равен аргументу public\n 'show_tagcloud' => false, // равен аргументу show_ui\n 'hierarchical' => true,\n 'rewrite' => array('slug' => 'services-categoies', 'hierarchical' => false, 'with_front' => false, 'feed' => false),\n 'show_admin_column' => true, // Позволить или нет авто-создание колонки таксономии в таблице ассоциированного типа записи. (с версии 3.5)\n ));\n\n $post_type_labels = array(\n 'name' => __('FAQ', 'themename'),\n 'singular_name' => __('FAQ', 'themename'),\n 'add_new' => __('Добавить вопрос', 'themename'),\n 'add_new_item' => __('Добавить вопрос', 'themename'),\n 'edit_item' => __('Редактировать вопрос', 'themename'),\n 'new_item' => __('Добавить вопрос', 'themename'),\n 'view_item' => __('Смотреть вопрос', 'themename'),\n 'search_items' => __('Искать вопрос', 'themename'),\n 'not_found' => __('Не найдено', 'themename'),\n 'parent_item_colon' => '',\n );\n $description = get_option('Часто задаваеміе вопросы');\n $post_type_args = array(\n 'labels' => apply_filters('inspiry_property_post_type_labels', $post_type_labels),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'has_archive' => true,\n 'capability_type' => 'post',\n 'hierarchical' => true,\n 'menu_icon' => 'dashicons-format-status',\n 'menu_position' => 16,\n 'description' => $description,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'rewrite' => array(\n 'slug' => apply_filters('inspiry_property_slug', 'qustions'),\n ),\n );\n register_post_type('qustions', $post_type_args);\n\n $post_type_labels = array(\n 'name' => __('Отзывы', 'themename'),\n 'singular_name' => __('Отзыв', 'themename'),\n 'add_new' => __('Добавить отзыв', 'themename'),\n 'add_new_item' => __('Добавить отзыв', 'themename'),\n 'edit_item' => __('Редактировать отзыв', 'themename'),\n 'new_item' => __('Добавить отзыв', 'themename'),\n 'view_item' => __('Смотреть отзыв', 'themename'),\n 'search_items' => __('Искать отзыв', 'themename'),\n 'not_found' => __('Не найдено', 'themename'),\n 'parent_item_colon' => '',\n );\n $description = get_option('Отзывы');\n $post_type_args = array(\n 'labels' => apply_filters('inspiry_property_post_type_labels', $post_type_labels),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'has_archive' => true,\n 'capability_type' => 'post',\n 'hierarchical' => true,\n 'menu_icon' => 'dashicons-star-filled',\n 'menu_position' => 17,\n 'description' => $description,\n 'supports' => array('title', 'editor', 'thumbnail'),\n 'rewrite' => array(\n 'slug' => apply_filters('review', 'service'),\n ),\n );\n register_post_type('reviews', $post_type_args);\n\n}", "public function faculty_course_custom_posttypes() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Courses', 'Courses post type', 'academic' ),\n\t\t\t'singular_name' => _x( 'Course', 'Course', 'academic' ),\n\t\t\t'menu_name' => _x( 'Courses', 'admin menu', 'academic' ),\n\t\t\t'name_admin_bar' => _x( 'Course', 'add new on admin bar', 'academic' ),\n\t\t\t'add_new' => _x( 'Add New', 'Course', 'academic' ),\n\t\t\t'add_new_item' => __( 'Add New Course', 'academic' ),\n\t\t\t'new_item' => __( 'New Course', 'academic' ),\n\t\t\t'edit_item' => __( 'Edit Course', 'academic' ),\n\t\t\t'view_item' => __( 'View Course', 'academic' ),\n\t\t\t'all_items' => __( 'All Courses', 'academic' ),\n\t\t\t'search_items' => __( 'Search Course', 'academic' ),\n\t\t\t'parent_item_colon' => __( 'Parent Course:', 'academic' ),\n\t\t\t'not_found' => __( 'No Courses found.', 'academic' ),\n\t\t\t'not_found_in_trash' => __( 'No Courses found in Trash.', 'academic' )\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'description' => __( 'Adds Course post type.', 'academic' ),\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => _x( 'faculty_courses', 'courses', 'academic' ) ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => true,\n\t\t\t'hierarchical' => true,\n\t\t\t'menu_position' => 6,\n\t\t\t'menu_icon' \t => 'dashicons-welcome-learn-more',\n\t\t\t'supports' => array( 'title', 'thumbnail', 'revisions')\n\t\t);\n\n\t\tregister_post_type( 'course', $args );\n\t}", "public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }" ]
[ "0.55515635", "0.52852184", "0.51936173", "0.51398426", "0.51349396", "0.5109687", "0.51062477", "0.50013334", "0.49772218", "0.49681115", "0.49624613", "0.49577808", "0.49343377", "0.4921135", "0.4920485", "0.49121588", "0.4908648", "0.48423368", "0.48352098", "0.48279646", "0.4778858", "0.4763828", "0.47620714", "0.47560015", "0.47323412", "0.47309688", "0.4716496", "0.47119814", "0.47117862", "0.468361" ]
0.6994146
0
Operation listsfacilityTypefacilityTypeIdPut Update an existing facilityType.
public function listsfacilityTypeput($facilityType_id) { $input = Request::all(); $facilityType = FacilityTypes::findOrFail($facilityType_id); $facilityType->update(['name' => $input['name']]); if($facilityType->save()){ return response()->json(['msg' => 'Update facilityType','data' =>$facilityType] ); }else{ return response('Oops, it seems like there was a problem updating the facilityType'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listsfacilityTypedelete($facilityType_id)\r\n {\r\n $deleted_facilityType = FacilityTypes::destroy($facilityType_id);\r\n if($deleted_facilityType){\r\n return response()->json(['msg' => 'Deleted facilityType']);\r\n }\r\n }", "public function listsfacilityTypeByIdget($facilityType_id)\r\n {\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n return response()->json($facilityType,200);\r\n }", "public function update(FacilityRequest $request, $id)\n {\n $facility = Facility::findOrFail($id);\n $facility->update($request->only(['fac_code','fac_name','fac_add','fac_postcode','fac_city','fac_district','fac_state','fac_telno','fac_faxNo','fac_hcategory','fac_ministry','fac_category' ]));\n return $facility;\n }", "public function update(FacilityRequest $request, $id)\n\t{\n\t\t$town = Facility::findOrFail($id);\n $town->code = $request->code;\n $town->name = $request->name;\n $town->facility_type_id = $request->facility_type;\n $town->facility_owner_id = $request->facility_owner;\n $town->reporting_site = $request->reporting_site;\n $town->sub_county_id = $request->sub_county;\n $town->nearest_town = $request->nearest_town;\n $town->landline = $request->landline;\n $town->mobile = $request->mobile;\n $town->email = $request->email;\n $town->address = $request->address;\n $town->in_charge = $request->in_charge;\n $town->operational_status = $request->operational_status;\n $town->latitude = $request->latitude;\n $town->longitude = $request->longitude;\n $town->user_id = Auth::user()->id;\n $town->save();\n\n return redirect('facility')->with('message', 'Facility updated successfully.');\n\t}", "public function listsfacilityTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = FacilityTypes::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the facilityType');\r\n }\r\n }", "public static function deleteFacilityType($id) {\r\n self::deleteParendsChilesTypeTree($id);\r\n // must delete all items under the type....... \r\n // more delete..\r\n return array(\"success\" => true);\r\n }", "public function update(Request $request, $id)\n {\n \n \n $facility = facility::find($id);\n $facility -> booking_type = $request -> booking_type;\n $facility -> facility_name = $request -> facility_name;\n $facility -> amount = $request -> amount;\n $facility -> description = 'none';\n $facility -> capacity = '0';\n $facility -> save();\n return redirect('/facility_list')->withStatus(__('Facility successfully updated.'));\n }", "public static function updateFacilityWorkforceById( $id = 0 ) {\n\n $facility = self::find($id);\n\n $posted = $_POST;\n unset($posted['_token']);\n $workforce_count = json_encode($posted);\n\n $workforce = new self();\n $workforce->facility_id = $id;\n $workforce->facilityworkforce_id = IdGenerator::generateId();\n $workforce->workforce = $workforce_count;\n $workforce->save();\n\n return $facility;\n }", "public function edit_directions($id, $facility);", "public function update(Requests\\EquipmentTypeRequest $request, $id)\n {\n $equipmentType = EquipmentType::find($id);\n $equipmentType->name = Input::get('name');\n $equipmentType->save();\n return response('Equipment type saved!');\n }", "public function add_directions($facility);", "public function updateIssueTypeById($issueTypeId, array $issueType)\n { \n $this->setOptions(array(\"json\" => $issueType));\n $this->uri = \"/rest/api/\".$this->getApiVersion().\"/issuetype/\".$issueTypeId;\n $this->method = \"PUT\";\n }", "public function update(Request $request, $id)\n {\n $v = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n 'category_id' => 'required',\n 'facilities' => 'required'\n ]);\n\n if ($v->fails())\n {\n return redirect()->back()->withInput($request->input())->withErrors($v->errors());\n }\n $subcategory = Subcategory::findOrFail($id);\n $inputs = $request->all();\n $subcategory->update($inputs);\n if(isset($inputs['facilities']) && count($inputs['facilities'])){\n $db_facilities = $subcategory->facilities->lists('id')->toArray();\n\n foreach ($inputs['facilities'] as $facility) {\n if(in_array($facility, $db_facilities))\n unset($db_facilities[array_search($facility, $db_facilities)]);\n else\n $subcategory->facilities()->attach($facility);\n }\n\n if(!empty($db_facilities))\n $subcategory->facilities()->detach($db_facilities);\n }\n session()->flash('flash_message', 'Subcategory updated!');\n return redirect('subcategories');\n }", "function update_id_type($id_type_id = '')\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['timestamp']\t\t\t\t= \ttime();\n\t\t$data['updated_by']\t\t\t\t= \t$this->session->userdata('user_id');\n\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->update('id_type', $data);\n\n\t\t$this->session->set_flashdata('success', 'ID type has been updated successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "public function updateFacility(Faclities $dto): bool\n {\n }", "private function process_sitelist_addfacility(&$site_ids, $facility_id)\n {\n $model = new Site();\n $sites = $model->get(array(\"facility_id\"=>$facility_id));\n foreach($sites as $site) {\n if(!in_array($site->id, $site_ids)) {\n $site_ids[] = $site->id;\n }\n }\n }", "public function update(EditFacilityPlanRequest $request, $id)\n {\n \t$facilityKeys= ArrayCheckHelper::ignoreRepeated($request->all(), \"facility\");\n \t\n \t/*foreach($request->all() as $key => $val){\n \t\tif($key !== \"_token\" && $key !==\"name\")\n \t\t\t$facilityKeys[]= $val;\n \t}*/\n \t\n \t\n \t$facility_plan= FacilityPlan::find($id);\n \t$facility_plan->fill($request->all());\n \t$facility_plan->save();\n \t \n \t$facility_plan->facilities()->sync($facilityKeys);\n \n $message= $facility_plan->name . ' updated succesfully';\n if($request->ajax()){\n \treturn $message;\n }\n Session::flash('message',$message);\n return redirect()->route('admin.facility_plans.index');\n }", "public function setTypeID($value) {\n\t\t$this->_type_id = $value;\n\t}", "public function update(RoomTypeRequest $request, $id)\n {\n $data = $request->only('name');\n $check = $this->roomType->editRoomType(['id' => $id], $data);\n if ($check) {\n return $this->redirectSuccess('room-types.index', __('admin/layout.message.mes_edit_success'));\n }\n return $this->redirectError('room-types.index', __('admin/layout.message.mes_fail'));\n }", "public function update($id, Request $req){\n $this->validate($req, [\n 'code' => 'required',\n 'latitude' => 'required',\n 'longitude' => 'required',\n 'volume' => 'required|integer',\n 'condition_id' => 'required|integer',\n 'facility_type_id' => 'required|integer',\n 'contract_id' => 'required|integer',\n 'traffic_sign_id' => 'integer'\n ]);\n\n \t$facility = Facility::find($id)->update($req->all());\n\n \treturn response()->json([\n \t\t'updated' => true,\n \t\t'msg' => 'Faskes berhasil di-update',\n \t]);\n }", "public function update(Request $request, TypeTrucks $typeTrucksб, $id)\n {\n\n $type = TypeTrucks::find((int)$id);\n $type->val = $request->val;\n $type->update();\n return redirect()->route('types.index');\n }", "public function update(Request $request, $id)\n {\n Validator::make($request->all(), [\n 'type' => 'required',\n\n ])->validate();\n\n $unit_type = UnitType::find($id);\n $unit_type->type = $request->type;\n\n $unit_type->save();\n\n return redirect()->route('unit_type.index')->with('success', 'Unit Type updated!');\n }", "public function destroy(Facility $facility)\n {\n //\n }", "public function update(SporttypeRequest $request, $id)\n {\n $sportstype = Sporttype::find($id);\n $sportstype->name = $request->get('name');\n $sportstype->description = $request->get('description');\n $sportstype->save();\n return redirect('sporttypes')->with('message', 'Successfully updated !');\n }", "protected function add_facilities($data){\n\t\t$fct = 0;\n\t\tif($links = @json_decode($data,true)){\n\t\t\tforeach($links as $fac){\n\t\t\t\t$fct++;\n\t\t\t\t$docs[] = array(\n\t\t\t\t\t'id' => md5(json_encode($fac)), // has entire thing.. simplest to do for now.\n\t\t\t\t\t'home_url' => array('set' => $fac['site']),\n\t\t\t\t\t'engine_url' => array('set' => $fac['href']),\n\t\t\t\t\t'desc_short' => array('set' => $fac['contents']),\n\t\t\t\t\t'location_str' => array('set' => $this->location),\n\t\t\t\t\t'engine_origin' => 'google',\n\t\t\t\t\t$this->dockey => array('set' => $this->terms),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif(count($docs)>0){\n\t\t\t\t$this->solr_result = $this->SOLR->add_docs($docs);\n\t\t\t}\n\t\t}\n\t\treturn $fct;\n\t}", "public function update(UpdateRequest $request, $id)\n {\n $data = $request->except('attachment');\n $facility = $this->facility->find($id);\n\n $imageFile = $request->attachment;\n if ($imageFile) {\n if (file_exists($this->destinationpath . $facility->attachment) && $facility->attachment != '') {\n unlink($this->destinationpath . $facility->attachment);\n }\n $extension = strrchr($imageFile->getClientOriginalName(), '.');\n $new_file_name = \"facility_\" . time();\n $attachment = $imageFile->move($this->destinationpath, $new_file_name.$extension);\n $data['attachment'] = isset($attachment) ? $new_file_name . $extension : null;\n }\n \n $facility = $this->facility->update($id, $data);\n if($facility){\n return redirect()->route('admin.content-management.facilities.index')\n ->withSuccessMessage('Facility is updated successfully');\n }\n\n return redirect()->back()\n ->withInput()\n ->withWarningMessage('Facility can not be updated.');\n }", "public function update(PerformanceLeaveTypeRequest $request, $id)\n {\n $this->middleware('permission:leave-super-admin|leave-admin');\n\n $leave_type = LeaveType::findOrFail(hashDecode($id));\n $this->leaveTypeRepository->store($leave_type, $request);\n\n logUser(LogType::Update, $this->logDetail, $leave_type->id);\n\n return redirect('performance/leave/type')->with('theme-success', 'Leave type updated');\n }", "public function update(Request $request, $id)\n {\n $roomType = RoomTypes::find($id);\n $roomType->fill($request->all())->save();\n return redirect()->route('room-types.show', $roomType->id)\n ->with('success', '¡Categoría editada exitosamente!');\n }", "public function setSyslogFacility($syslogFacility) {\n\t\t$this->getLocker()->setSyslogFacility($syslogFacility);\n\t}", "public function update(Request $request, $id)\n {\n $typeField = TypeField::find($id);\n \n $typeField ->fill($request->all());\n $typeField->save(); \n\n \n return redirect()->route('Admin.TypeField.index');\n }" ]
[ "0.52203244", "0.5166029", "0.46224758", "0.4565448", "0.4509642", "0.4430788", "0.43647954", "0.4321387", "0.42682132", "0.42629194", "0.42505652", "0.42503142", "0.41906935", "0.40845108", "0.40703252", "0.4008214", "0.40073758", "0.39836225", "0.3982289", "0.39376184", "0.39318794", "0.3916066", "0.39103866", "0.38966924", "0.38811305", "0.3862511", "0.38485482", "0.3846226", "0.38348535", "0.38338366" ]
0.65721613
0
Operation listsfacilityTypefacilityTypeIdDelete Deletes an facilityType specified by facilityTypeId.
public function listsfacilityTypedelete($facilityType_id) { $deleted_facilityType = FacilityTypes::destroy($facilityType_id); if($deleted_facilityType){ return response()->json(['msg' => 'Deleted facilityType']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteFacilityType($id) {\r\n self::deleteParendsChilesTypeTree($id);\r\n // must delete all items under the type....... \r\n // more delete..\r\n return array(\"success\" => true);\r\n }", "public function listsfacilityTypeByIdget($facilityType_id)\r\n {\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n return response()->json($facilityType,200);\r\n }", "public function listsfacilityTypeput($facilityType_id)\r\n {\r\n $input = Request::all();\r\n $facilityType = FacilityTypes::findOrFail($facilityType_id);\r\n $facilityType->update(['name' => $input['name']]);\r\n if($facilityType->save()){\r\n return response()->json(['msg' => 'Update facilityType','data' =>$facilityType] );\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the facilityType');\r\n }\r\n }", "function remove_id_type($id_type_id = '')\n\t{\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->delete('id_type');\n\n\t\t$this->session->set_flashdata('success', 'ID type has been deleted successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "public function destroy(Facility $facility)\n {\n //\n }", "public function delete($id)\n\t{\n\t\t$facility= Facility::find($id);\n\t\t$facility->delete();\n\t\treturn redirect('facility')->with('message', 'Facility deleted successfully.');\n\t}", "public function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\t\t\n\t}", "public function deleteByIdType($id, $type);", "public function deleteIssueTypeById($issueTypeId, $alternativeIssueTypeId = null)\n { \n $parameters[\"alternativeIssueTypeId\"] = !empty($alternativeIssueTypeId) ? array($alternativeIssueTypeId) : array();\n $expandQuery = $this->getQueryUri($parameters);\n \n $this->uri = \"/rest/api/\".$this->getApiVersion().\"/issuetype/\".$issueTypeId.$expandQuery; \n $this->method = \"DELETE\";\n }", "public function deleteFacility($facID): bool\n {\n }", "public function removeFraisTypeAction($id)\n {\n $listeforfaittype = $this->getDoctrine()->getRepository('FrontBundle:FraisForfaitType')->find($id);\n\n if ($listeforfaittype != null) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($listeforfaittype);\n $em->flush();\n $this->addFlash(\"success\", \"Frais type supprimer\");\n }\n return $this->redirectToRoute('addfraistype',array());\n }", "public function delete(User $user, Facility $facility)\n {\n return \\Auth::guard('admin')->check();\n }", "function deleteRegistrationTypeById($typeId) {\n\t\t// Delete registration type\n\t\t$this->update(\n\t\t\t'DELETE FROM registration_types WHERE type_id = ?',\n\t\t\tarray((int) $typeId)\n\t\t);\n\n\t\t// Delete all localization settings and registrations associated with this registration type\n\t\t$this->deleteRegistrationOptionCosts($typeId);\n\t\t$this->update('DELETE FROM registration_type_settings WHERE type_id = ?', $typeId);\n\n\t\t$registrationDao =& DAORegistry::getDAO('RegistrationDAO');\n\t\treturn $registrationDao->deleteRegistrationByTypeId($typeId);\n\t}", "public function remove($typeId);", "public function deleteCiType($typeId)\r\n {\r\n $ciTypeDaoIml = new Dao_CiType();\r\n $ciList = $ciTypeDaoIml->getCiByCiTypeId($typeId);\r\n $ciChildsfound = $ciTypeDaoIml->retrieveCiTypeChildElementsforDelete($typeId);\r\n\r\n $status = 0;\r\n $notification = array();\r\n if (!empty($ciList) || !empty($ciChildsfound)) {\r\n //deactivate\r\n $ciTypeDaoIml->deactivateCiType($typeId);\r\n $status = 2;\r\n } else {\r\n // delete\r\n $ciTypeDaoIml->deleteCiType($typeId);\r\n $status = 1;\r\n }\r\n return $status;\r\n }", "function deleteRegistrationType(&$registrationType) {\n\t\treturn $this->deleteRegistrationTypeById($registrationType->getTypeId());\n\t}", "public static function deleteByTypeId($typeId)\n {\n $criteriaWhere = new Criteria();\n $criteriaWhere->add(self::TYPE_ID, $typeId);\n\n $criteriaSet = new Criteria();\n $criteriaSet->add(self::IS_DELETED, 1);\n\n BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection(self::DATABASE_NAME));\n }", "function delete_faculty_admin_by_faculty_id($id)\n {\n\t\t$this->db->where('faculty_id', $id);\n\t\t$this->db->delete('faculty_admins');\n }", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fanli_Service_Ptype::getType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Fanli_Service_Ptype::deleteType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function delete($id)\n {\n \n $facility = facility::find($id);\n $facility -> delete();\n return redirect()->back()->withStatus(__('facility successfully deleted.'));\n }", "public function destroy($id, Request $request)\n {\n $facility= FacilityPlan::findOrFail($id);\n $message=\"\";\n \n try{\n \t$facility->delete();\n \t\n \t\\DB::table(\"facilities_facilities_plan\")\n \t\t\t->where(\"id_facilities_plan\", $id)\n \t\t\t->delete();\n \t\n \t$message= trans('appstrings.item_removed', ['item' => $facility->name]);\n \tSession::flash('message_type', 'success');\n }\n catch(\\PDOException $e){\n \t$message= trans('sqlmessages.' . $e->getCode());\n \tif($message == 'sqlmessages.' . $e->getCode()){\n \t\t$message= trans('sqlmessages.undefined');\n \t}\n \t\n \tif($request->ajax()){\n \t\treturn ['code'=>'error', 'message' => $message];\n \t}\n \tSession::flash('message_type', 'error');\n }\n \n if($request->ajax()){\n \treturn ['code'=>'ok', 'message' => $message];\n }\n Session::flash('message',$message);\n return redirect()->route('admin.facility_plans.index');\n }", "public function deleteUserType($UserTypeID, $Input=array()) {\r\n\t\t/*delete group */\r\n\t\t$this->db->where(\"UserTypeID\",$UserTypeID);\r\n\t\t$this->db->delete('tbl_users_type');\r\n\t\treturn true;\r\n\t}", "public function delete_type_record($id){\n\t\t$this->db->where('training_type_id', $id);\n\t\t$this->db->delete('training_types');\n\t\t\n\t}", "public function deleteNotifType(Request $request, $id) {\n $notif_type= NotifType::find($id);\n if (is_null($notif_type)) {\n return response()->json([\n 'success' => false,\n 'statusCode' => 404,\n 'message' => 'Notification Type not found']);\n }\n $notif_type->delete();\n return response()->json([\n 'success' => true,\n 'statusCode' => 204,\n 'message' => 'Successfully deleted notification type',\n 'data' => null]);\n }", "public function listsfacilityTypepost()\r\n {\r\n $input = Request::all();\r\n $new_facilityType = FacilityTypes::create($input);\r\n if($new_facilityType){\r\n return response()->json(['msg' => 'Added a new facilityType','data' => $new_facilityType]);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the facilityType');\r\n }\r\n }", "public function destroy(Request $request)\n {\n $facility = Facility::find($request->id);\n $facility->delete();\n return 'success';\n }", "public function DeleteClassType($classtype_id)\n\t{\n\t\t//deletes the classtype\n\t\tClassType::destroy($classtype_id);\n\t\t\n\t\t//redirects to ViewClassType action\n\t\treturn Redirect::action('ViewClassTypesController@ViewClassTypes');\n\n\t}", "public function listsClassificationsdelete($classification_id)\r\n {\r\n $deleted_classification = Classification::destroy($classification_id);\r\n if($deleted_classification){\r\n return response()->json(['msg' => 'Deleted classification']);\r\n }\r\n }", "public static function removeByRestaurantAndServicetypeId($restaurantId, $servicetypeId)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('restaurant_servicetype', 'restaurantId = ' . $restaurantId . ' AND ' . ' servicetypeId=' . $servicetypeId);\n }", "public function destroy($facultyid)\n {\n //\n Faculty::destroy($facultyid);\n return redirect('faculty')->with('messagedel','Successfully Deleted !');\n }" ]
[ "0.5989065", "0.5596545", "0.52975523", "0.5018879", "0.4938716", "0.49275503", "0.48497927", "0.48334467", "0.4819652", "0.48134977", "0.47990307", "0.47918937", "0.47653303", "0.4731141", "0.46846473", "0.4673038", "0.46505976", "0.45953745", "0.45683032", "0.45656037", "0.4539784", "0.45180464", "0.44973406", "0.44740552", "0.4471411", "0.44569322", "0.43602362", "0.4304221", "0.4297969", "0.42810884" ]
0.7247363
0
Operation listsstatusIdGet Fetch status specified by statusId.
public function listsstatusByIdget($status_id) { $status = Status::findOrFail($status_id); return response()->json($status,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_status($idstatus)\n {\n return $this->db->get_where('cat_status', array('idstatus' => $idstatus))->row_array();\n }", "public function getStatus(Status $id){\n \n return $id ;\n }", "public function retrieveStatus($status_id) {\n\n foreach ($this->status as $key => $value) {\n if ($value['id'] == $status_id) {\n return $this->status[$key];\n }\n }\n\n return $false;\n }", "public function allInStatusId(int $status_id)\n {\n return $this->query(\"SELECT * FROM {$this->table} WHERE status_id = {$status_id}\");\n }", "public function status($id);", "public function getStatus($id)\n {\n return $this->getItemStatusesForBib($id);\n }", "public static function getUserStatus($status_id)\n\t{\n\t\treturn DB::table('user_status')->where('id', '=', $status_id)->pluck('status');\n\t}", "public function getOrderStatus( $statusId )\n\t{\n\t\t$status = Yii::app()->db->createCommand()\n\t ->select('s.sysname')\n\t ->from('kalitniki_order_status AS s')\n\t ->where('s.id = ' . $statusId);\n\t\n\t $status = $status->queryAll();\n\t $res = $status[0]['sysname'];\n\n\t return $res;\n\t}", "public function listsstatusput($status_id)\r\n {\r\n $input = Request::all();\r\n $status = Status::findOrFail($status_id);\r\n $status->update(['name' => $input['name']]);\r\n if($status->save()){\r\n return response()->json(['msg' => 'Update status']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the status');\r\n }\r\n }", "public function listsstatusget()\r\n {\r\n $response = Status::all();\r\n return response()->json($response,200);\r\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public static function get($id) {\n\t\t$sth = database::$dbh -> prepare(\"SELECT `key_status`.`id`, `key_status`.`name` FROM key_status WHERE `key_status`.`id` = :id;\");\n\t\t$sth -> execute(array('id' => $id));\n\t\t$row = $sth -> fetch(PDO::FETCH_NUM);\n\t\tif($row === false){\n\t\t\treturn false;\n\t\t}\n\t\t$assoc = self::row_to_assoc($row);\n\t\treturn new key_status_model($assoc);\n\t}", "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function list_by_status($status=null, $return_by_id=false) {\n\t\t$res = array();\n\n\t\t$this->db->from(self::T_NAME);\n\t\t$this->db->where('shop_id',$this->shop_id);\n\t\tif (!empty($status)){\n\t\t\t$this->db->where_in('status',$status);\n\n\t\t}\n\t\t$this->db->order_by('mtime','desc');\n\t\t$query = $this->db->get();\n\t\tif($query && $query->num_rows() > 0){ \n\t\t\t$res = $query->result_object();\n\t\t} \n\n\t\tif ($return_by_id) {\n\t\t\t$res_new = array();\n\t\t\tforeach ($res as $obj) {\n\t\t\t\t$res_new[$obj->id] = $obj;\n\t\t\t}\n\t\t\treturn $res_new;\n\t\t}\n\t\treturn $res;\n\t}", "public function requestStatus($id)\n {\n $status = CustomInfo::where([\n 'ref_table'=>'request',\n 'ref_table_id'=>$id,\n 'info_type'=>'request_status'\n ])->orderBy('id','ASC')->get();\n return $status;\n }", "public function setStatusId($statusId);", "public function getStatusRequest($id)\n {\n\n return \\DB::table('request_status')\n ->join('status', 'request_status.status_id', '=', 'status.id')\n ->select('status.name', 'status.description', 'request_status.observation', 'request_status.created_at')\n ->where('request_id', $id)\n ->orderBy('created_at', 'desc')\n ->get();\n }", "public function status($id)\n {\n if (Auth::user()->type == 'chefservice') {\n $status = DB::table('envois')\n ->join('courriers', 'courriers.id', '=', 'envois.courrier_id')\n ->select('envois.status')\n ->where([['courriers.id', '=', $id], ['envois.service_id', '=', Auth::user()->service_id]])\n ->get();\n return $status;\n }\n }", "public function show($id)\n {\n //return view('statuses.index', compact('status'));\n }", "public function getStatus($id = null)\n {\n return $this->statusAction->readBySiteId($id);\n }", "public function get($statusId)\n {\n if (isset($this->statuses[$statusId])) {\n return $this->statuses[$statusId];\n }\n\n return $this->statuses[self::PENDING];\n }", "public function show($id)\n {\n $statusObj = QueryStatus::where('userID', $id)->get();\n return $statusObj;\n }", "public function listsstatusdelete($status_id)\r\n {\r\n $deleted_status = Status::destroy($status_id);\r\n if($deleted_status){\r\n return response()->json(['msg' => 'Deleted status']);\r\n }\r\n }", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "function listStatus($con, $def_status)\n\t{\n\t\tswitch ($def_status) \n\t\t{\n\t\t\tcase 0:\n\t\t\t\t$statusText = \"Inactive/Archived\";\n\t\t\t\tbreak;\n\t\t\tcase 1: \n\t\t\t\t$statusText = \"Active\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$statusText = \"Pending\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$statusText = \"Undetermined\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $statusText;\n\t}", "function getStatusList() {\n $statusList = array();\n foreach (Constants::$statusNames as $id => $name) {\n $statusList[$id] = \"$id - $name\";\n }\n return $statusList;\n}", "function getStatuses($model,$client_id=null){\n\t\t$order = array('order'=>'asc');\n\t\tif(empty($client_id)){\n\t\t\t$client_id = $_SESSION['Auth']['User']['client_id'];\n\t\t}\n\t\t//TODO Add caching\n\t\t$statuses = $this->find('list',array('conditions'=>array('Status.model'=>$model,'Status.client_id'=>$client_id),'order'=>$order));\n\t\tif(empty($statuses)){\n\t\t\t$statuses = $this->find('list',array('conditions'=>array('Status.model'=>$model,'Status.client_id'=>0),'order'=>$order));\n\t\t}\n\t\treturn $statuses;\n\t}", "public function getStatuses()\n {\n $endpoint = $this->endpoints['getStatuses'];\n return $this->sendRequest($endpoint['method'], $endpoint['uri']);\n }", "abstract public static function getStatuses();", "public function listMembersWithStatus($statusId) {\n\t\t// Use the list members view\n\t\t$this->view = 'list_members';\n\n\t\t// If statusId is not set, list all the members\n\t\tif (!isset($statusId)) {\n\t\t\treturn $this->redirect( array('controller' => 'members', 'action' => 'listMembers') );\n\t\t}\n\n\t\t$this->__paginateMemberList($this->Member->getMemberSummaryForStatus(true, $statusId));\n\t\t$this->set('statusInfo', $this->Member->Status->getStatusSummaryForId($statusId));\n\t}" ]
[ "0.68627506", "0.66586256", "0.6516504", "0.6484797", "0.6418132", "0.6290869", "0.6174963", "0.61536336", "0.61462885", "0.6049664", "0.60466987", "0.59973097", "0.59970284", "0.597328", "0.59176743", "0.59104514", "0.58769584", "0.58698815", "0.5853264", "0.584867", "0.58373195", "0.5836207", "0.5829479", "0.5782386", "0.57664204", "0.5759294", "0.57581055", "0.5700339", "0.56767905", "0.5667184" ]
0.7898015
0
Operation listsstatusIdDelete Deletes an status specified by statusId.
public function listsstatusdelete($status_id) { $deleted_status = Status::destroy($status_id); if($deleted_status){ return response()->json(['msg' => 'Deleted status']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_status($idstatus)\n {\n return $this->db->delete('cat_status', array('idstatus' => $idstatus));\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['status']);\n }", "public function destroy($id)\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('label_status_remove',Auth::user()->user_type_code)){\n \n $labelStatus = $this->labelStatusRepository->findWithoutFail($id);\n\n if (empty($labelStatus)) {\n Flash::error(Lang::get('validation.not_found'));\n\n return redirect(route('labelStatus.index'));\n }\n\n $this->labelStatusRepository->delete($id);\n\n //Grava log\n $descricao = 'Excluiu LabelStatus ID: '.$id;\n $log = App\\Models\\Log::wlog('label_status_remove', $descricao);\n\n\n Flash::success(Lang::get('validation.delete_success'));\n return array(0,Lang::get('validation.delete_success'));\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return array(1,Lang::get('validation.permission'));\n } \n }", "public function destroy($id)\n {\n Status::find($id)->delete();\n }", "public function destroy($id)\n {\n $result = TaskStatus::findOrFail($id);\n $result->delete();\n return redirect()->route('taskstatus.index')->with('success', __('Delete successfully'));\n //\n }", "public function destroy($id) {\n Status::findOrFail($id)->delete();\n return response()->json(\"Status deleted succefully\");\n }", "public function deleteStatusAction()\n {\n $id = (int) $this->request->getParam('id');\n $brandId = (int) $this->request->getParam('brandId');\n\n $rel = new \\Brands\\Model\\Table\\BrandsStatusesRel();\n $row = $rel->find($id)->current();\n\n if ($row !== null) {\n $row->delete();\n $this->getModel()->fixLastStatus($brandId);\n }\n\n $redirect = new RedirectResponse(route(null, array('action' => 'edit', 'id' => $brandId, 'brandId' => null)));\n $redirect->withFlash(sprintf('Запис %s беше изтрит', $id));\n\n return $redirect;\n }", "public function delete($id)\n\t\t{\t\t\t\n\t\t\t# code...\n\t\t\t$this->_data['s_info'] = $s_info = $this->session->userdata('userInfo');\n\t\t\t$myCompanyStatus = '';\n\t\t\t$this->_data['title'] = \"Delete\";\n\t\t\tif(is_numeric($id)){\n\t\t\t\t$myCompanyStatus = $this->mcompany_status->getData('',array(\"id\"=>$id));\n\t\t\t\tif(isset($myCompanyStatus['id'])<=0){\n\t\t\t\t\theader(\"location:\".my_lib::cms_site().'error/notfound');\n\t\t\t\t\texit();\n\t\t\t\t}else{\t\t\t\t\t\n\t\t\t\t\t$this->mcompany_status->delete($id);\n\t\t\t\t\t/**begin chuyen trang*/\n\t\t\t\t\tif(isset($_REQUEST['redirect']) && $_REQUEST['redirect']){\n\t\t\t\t\t\theader(\"location:\".base64_decode($_REQUEST['redirect']));\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader(\"location:\".my_lib::cms_site().\"company_status/\");\n\t\t\t\t\t}\n\t\t\t\t\t/**end chuyen trang*/\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\theader(\"location:\".my_lib::cms_site().'error/notfound');\n\t\t\t\texit();\n\t\t\t}\t\t\n\t\t\t$this->my_layout->view(\"cms/company_status/delete\",$this->_data);\n\t\t}", "public function destroy($id)\n\t{\n\t\t$getCount = ManageTaskStatus::where('id', '=', $id)->get()->count();\n if ($getCount < 1) {\n $result = ['success' => false, 'errormsg' => 'Status does not exists'];\n return json_encode($result);\n } else {\n $loggedInUserId = Auth::guard('admin')->user()->id;\n $delete = CommonFunctions::deleteMainTableRecords($loggedInUserId);\n $input['statusData'] = $delete;\n\n $result = ManageTaskStatus::where('id', $id)->update($input['statusData']); \n \n $tskstatus = ManageTaskStatus::where(['deleted_status' => 0])->get();\n $result = ['success' => true, 'records' => $tskstatus, 'totalCount' => count($tskstatus)];\n return json_encode($result);\n }\n\t}", "public function delete($id,$status)\n {\n\n $pelanggan = Data_pelanggan::where('id_pelanggan', '=', $id);\n $pelanggan->delete();\n\n if ($status == 'berbayar'){\n return redirect('pelanggan_berbayar');\n } elseif ($status == 'free'){\n return redirect('pelanggan_free');\n } else {\n return redirect('pelanggan_all');\n }\n\n }", "public function destroy($id)\n {\n $status= Status::findOrFail($id);\n try {\n $status->delete();\n Session::flash('success', 'Berhasil menghapus');\n }catch(\\Illuminate\\Database\\QueryException $e) {\n \n Session::flash('error', 'Gagal menghapus, karena jenis ini direferensikan oleh beberapa judul sumber');\n }\n\n return redirect('statuses');\n }", "public function destroy($id)\n {\n $task_status = TaskStatus::findOrFail($id);\n $task_status->delete();\n\n return redirect()->route('admin.task_statuses.index');\n }", "public function destroy(Request $request, $id)\n {\n $status = Status::findOrFail($id);\n $name = $status->name;\n\n if ($request->input('tickets_new_status_id') != '') {\n $this->validate($request, [\n 'tickets_new_status_id' => 'required|exists:panichd_statuses,id',\n ]);\n $status->delete($request->tickets_new_status_id);\n } else {\n if ($status->tickets()->count() > 0) {\n return back()->with('warning', trans('panichd::admin.status-delete-error-no-status', ['name' => $name]));\n }\n\n $status->delete();\n }\n\n Session::flash('status', trans('panichd::lang.status-name-has-been-deleted', ['name' => $name]));\n\n return redirect()->action('\\PanicHD\\PanicHD\\Controllers\\StatusesController@index');\n }", "public function index_delete($id)\n {\n $this->db->delete('tblattendance', array('id' => $id));\n\n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function destroy(Request $request, $id)\r\n {\r\n try{\r\n $this->ticket_repository->deleteStatuses($id, $request->all());\r\n flash()->success(\"Ticket status deleted successfully! \");\r\n }catch(\\Exception $e){ \r\n flash()->error(\"Error while deleting ticket status! \");\r\n }\r\n return redirect()->route('statuses.index');\r\n }", "public function destroy($id)\n {\n\t\t$apstatus = ApplicationStatus::find($id);\n\t\t\n $apstatus->delete();\n Session::flash('message','Estado Eliminado Correctamente');\n return Redirect::to('/admin/application-status'); \n }", "public function destroy($id)\n {\n $status = Status::find($id);\n $status->delete();\n\n return redirect('home');\n\n }", "public function deleteStatus(Request $request){\n $id = $request->id;\n $status = Status::where( 'id' , $id )->first(); \n if (!isset($status)) {\n return response()->json(['data' => '' , 'message' => 'Status Not Found'], 400);\n } \n $status->delete();\n return response()->json(['data' => '' , 'message' => 'Status Deleted Successfully'], 200); \n }", "public function actionDelete($id)\n {\n\n $obj = $this->findModel($id);\n $obj->status = 0;\n $obj->save();\n return $this->redirect(['index']);\n \n }", "public function listsstatusByIdget($status_id)\r\n {\r\n $status = Status::findOrFail($status_id);\r\n return response()->json($status,200);\r\n }", "public function listsstatusput($status_id)\r\n {\r\n $input = Request::all();\r\n $status = Status::findOrFail($status_id);\r\n $status->update(['name' => $input['name']]);\r\n if($status->save()){\r\n return response()->json(['msg' => 'Update status']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the status');\r\n }\r\n }", "public function delete($id){\n\t\t$url = WEBSERVICE. \"status_robot/deleteById/\" . $id;\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"DELETE\");\n\t\t$response = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $response;\n\t}", "function DeleteProjectStatus($projectStatusId)\n\t{\n\t\t$result = $this->sendRequest(\"DeleteProjectStatus\", array(\"ProjectStatusId\"=>$projectStatusId));\t\n\t\treturn $this->getResultFromResponse($result, true);\n\t}", "public function actionDelete($id)\n {\n return $this->showFlash('删除成功','success',['index']);\n if($this->findModel($id)->delete()){\n return $this->showFlash('删除成功','success',['index']);\n }\n return $this->showFlash('删除失败','danger',Yii::$app->getUser()->getReturnUrl());\n }", "public function destroy(AccStatusRequest $request, $id)\n {\n $game = AccStatus::findOrFail($id);\n if($game->delete()) return response(null, 204);\n }", "public function listsInstructiondelete($instruction_id)\r\n {\r\n $deleted_instruction = Instruction::destroy($instruction_id);\r\n if($deleted_instruction){\r\n return response()->json(['msg' => 'Deleted instruction']);\r\n }\r\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model){\n if ($model->status){\n $model->status = 0;\n $msg = 'Data Sasaran Eselon IV Berhasil Dinonaktifkan';\n }else{\n $model->status = 1;\n $msg = 'Data Sasaran Eselon IV Berhasil Diaktifkan';\n }\n if ($model->save()){\n flash('success',$msg);\n return $this->redirect(['index']);\n }\n flash('error','Data Sasaran Eselon IV Gagal Dinonaktifkan');\n }else{\n flash('error','Data Sasaran Eselon IV Tidak Ditemukan');\n }\n\n return $this->redirect(['index']);\n }", "public function delete($id)\n {\n\n $this->relasi_model->delete_by_id($id);\n echo json_encode(array(\"status\" => TRUE));\n }", "public function delete($id = null)\n {\n $res = $this->Status_model->deleteById($id);\n\n if ($res) {\n $this->session->set_flashdata('succus', 'Votre suppression est validé');\n redirect('Status');\n } else {\n $this->session->set_flashdata('error', 'suppression ne marche pas ');\n redirect('Status');\n }\n\n }", "public function setStatusId($statusId);" ]
[ "0.68676853", "0.60758096", "0.60175085", "0.59718174", "0.5963017", "0.5912831", "0.5912356", "0.5903458", "0.5833659", "0.5807538", "0.58065367", "0.5789047", "0.5785938", "0.57657313", "0.5751931", "0.57404304", "0.5732095", "0.57287437", "0.5713506", "0.5699121", "0.5678101", "0.56753963", "0.5654408", "0.5651966", "0.56193423", "0.55913305", "0.55829424", "0.55775476", "0.55495304", "0.5541967" ]
0.7678423
0
/////////////////////// Temp functions // ///////////////////// Operation transactionTypeGET Fetch a transaction's transaction.
public function transactionTypeget() { $response = TransactionType::get(); if(!$response){ return response()->json(['msg' => 'could not find transaction'], 204); }else{ return response()->json($response, 200); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_transaction_type()\n\t{\n\t\t $userId=$this->checklogin();\n\t\t $query['Income']=$this->ApiModel->get_income_type($userId);\n\t\t $query['Expence']=$this->ApiModel->get_Expence_type($userId);\n\t\t $query['Vender'] = $this->ApiModel->get_vanders($userId);\n\t\t $query['property'] = $this->ApiModel->get_properties($userId);\n\t\t echo json_encode($query);\n\t}", "function get_transaction_type()\n {\n return $this->platnosci_post_vars['txn_type']; \n }", "public function getTypeTransaction()\n {\n return $this->typeTransaction;\n }", "public function getTransactionType()\n {\n return $this->transactionType;\n }", "protected function _getTransactionType() \n {\n return self::VOID;\n }", "function transactions_by_type($type){\n\t\t$query = $this->db->query(\"SELECT * FROM transactions WHERE Trans = '$type';\");\n\t\treturn $query->result_array();\n\t}", "public function transactionTypeByIdget($transaction_type_id)\r\n {\r\n $response = TransactionType::findOrFail($transaction_type_id);\r\n if(!$response){ \r\n return response()->json(['msg' => 'could not find facility type'], 204);\r\n }else{\r\n return response()->json($response, 200);\r\n }\r\n }", "function get_customer_trans_order($type, $type_no)\n{\n $sql = \"SELECT order_ FROM \" . TB_PREF . \"debtor_trans WHERE type=\" . db_escape($type) . \" AND trans_no=\" . db_escape($type_no);\n\n $result = db_query($sql, \"The debtor transaction could not be queried\");\n\n $row = db_fetch_row($result);\n\n return $row[0];\n}", "public function getTxType()\n {\n return $this->tx_type;\n }", "public function getTransaction();", "public function getTransType()\n {\n return $this->TransType;\n }", "public function getApiTransactionType($transactionType)\n {\n $mapping = array(\n Mage_Paygate_Model_Authorizenet::REQUEST_TYPE_AUTH_CAPTURE => 'authCaptureTransaction',\n Mage_Paygate_Model_Authorizenet::REQUEST_TYPE_AUTH_ONLY => 'authOnlyTransaction',\n Mage_Paygate_Model_Authorizenet::REQUEST_TYPE_CAPTURE_ONLY => 'captureOnlyTransaction',\n );\n\n return array_key_exists($transactionType, $mapping) ? $mapping[$transactionType] : $transactionType;\n }", "public function getInventoryTransactionsId($key, $type) {\r\n\t\tif ($type == 'single') {\r\n\t\t\treturn $this->inventoryTransactionsId;\r\n\t\t} else if ($type == 'array') {\r\n\t\t\treturn $this->inventoryTransactionsId [$key];\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"success\" => false, \"message\" => \"Cannot Identifiy Type String Or Array:getInventoryTransactionsId ?\"));\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public function getTransactionType()\n {\n if (isset($this->data['vnp_TransactionType'])) {\n return $this->data['vnp_TransactionType'];\n }\n\n return null;\n }", "public function getPayTypeTrans()\n {\n return $this->payTypeTrans;\n }", "protected function getTransactionType()\n {\n return Types::PARTIAL_REVERSAL;\n }", "public function getType()\n {\n return $this->depositType;\n }", "public function get_userTransaction_get(){\n\t\textract($_GET);\n\t\t$result = $this->dashboard_model->get_userTransaction($user_id);\n\t\treturn $this->response($result);\t\t\t\n\t}", "public function getTransactionTypes()\n\t{\n\t\t$processed_list = array();\n\t\t$alias_map = array();\n\n\t\t$selected_types = $this->orderCardTransactionTypes(\n\t\t\t$this->config->get('emerchantpay_checkout_transaction_type')\n\t\t);\n\t\t$methods = \\Genesis\\API\\Constants\\Payment\\Methods::getMethods();\n\n\t\tforeach ($methods as $method) {\n\t\t\t$alias_map[$method . self::PPRO_TRANSACTION_SUFFIX] = \\Genesis\\API\\Constants\\Transaction\\Types::PPRO;\n\t\t}\n\n\t\t$alias_map = array_merge($alias_map, [\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_EXPRESS =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t]);\n\n\t\tforeach ($selected_types as $selected_type) {\n\t\t\tif (array_key_exists($selected_type, $alias_map)) {\n\t\t\t\t$transaction_type = $alias_map[$selected_type];\n\n\t\t\t\t$processed_list[$transaction_type]['name'] = $transaction_type;\n\n\t\t\t\t// WPF Custom Attribute\n\t\t\t\t$key = $this->getCustomParameterKey($transaction_type);\n\n\t\t\t\t$processed_list[$transaction_type]['parameters'][] = array(\n\t\t\t\t\t$key => str_replace(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tself::PPRO_TRANSACTION_SUFFIX,\n\t\t\t\t\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::PAYPAL_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t$selected_type\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$processed_list[] = $selected_type;\n\t\t\t}\n\t\t}\n\n\t\treturn $processed_list;\n\t}", "public function get_transaction( $space_id, $transaction_id ) {\n\t\treturn $this->get_transaction_service()->read( $space_id, $transaction_id );\n\t}", "public function gettransaction($transaction){\n return $this->bitcoin->gettransaction($transaction);\n }", "abstract protected function getTradeType();", "abstract public function getTransactionStatus();", "protected function getTransactionType()\n {\n return \\Genesis\\API\\Constants\\Transaction\\Types::ONLINE_BANKING_PAYIN;\n }", "function lookupTaxTransType($taxTransTypeKey){\r\n\t\t$resource = \"tax/transtypes\";\r\n\t\t$taxTransTypeArray = $this->getResource($resource);\r\n\t\tif($taxTransTypeArray){\r\n\t\t\tforeach ($taxTransTypeArray as $taxTransType) {\r\n\t\t\t\tif($taxTransType->m_Item1 == $taxTransTypeKey){\r\n\t\t\t\t\treturn $taxTransType->m_Item2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn false;\r\n\t}", "public function getDataWithTypeGetindpenv() {}", "function getLibelOperationTransaction($type_op) { //Renvoie le libellé dun operation\n global $dbHandler,$global_id_agence;\n $db = $dbHandler->openConnection();\n\n $sql=\"SELECT traduction from ad_cpt_ope a, ad_traductions b where a.libel_ope = b.id_str and type_operation = $type_op ;\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n $dbHandler->closeConnection(true);\n $retour = $result->fetchrow();\n return $retour[0];\n}", "public function get_type(): string;", "public function get_transaction_data( $deal_id = \"\",$type=\"\")\n\t{\n\t\t$conditions = array(\"transaction.deal_id\" => $deal_id,\"type!=\" => 5);\n\t\tif($type){\n\t\t\t\t$conditions = array(\"transaction.deal_id\" => $deal_id,\"type\" => 5);\n\t\t}\n $result = $this->db->from(\"deals\")\n\t ->where($conditions)\n\t \t->join(\"transaction\",\"transaction.deal_id\",\"deals.deal_id\")\n\t \t->orderby(\"transaction.id\",\"DESC\")\n\t ->get();\n return $result;\n\t}", "public function get_transactions(){\n $this->load->database();\n\n $query = $this->db->select('type,is_of,date,amount,payment_mode,id')\n ->get('tbl_transactions');\n return $query->result_array();\n }" ]
[ "0.7159436", "0.70524615", "0.6944746", "0.68518704", "0.6782033", "0.67468464", "0.66371006", "0.6482726", "0.6467966", "0.62920606", "0.6289119", "0.62505215", "0.6093805", "0.5992759", "0.59867036", "0.59761006", "0.59213966", "0.5900301", "0.5892718", "0.58630544", "0.5858281", "0.5841303", "0.58273375", "0.5792422", "0.57616526", "0.5721571", "0.568041", "0.56608075", "0.5651625", "0.56206954" ]
0.73643243
0
Operation updatetransactionTypes Update an existing transactionTypes .
public function transactionTypeput($transaction_type_id) { $input = Request::all(); $transaction_type = TransactionType::findOrFail($transaction_type_id) ->update([ "name" => $input['name'], "effect" => $input['effect'] ]); if($transaction_type){ return response()->json(['msg' => 'Updated transaction type'], 201); }else{ return response()->json(['msg' => 'Could not update record'], 405); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hook_commerce_adyen_transaction_types_alter(array &$transaction_types) {\n // Change implementing class for refund transaction.\n $transaction_types['refund'] = \\Commerce\\Adyen\\Payment\\Transaction\\Refund::class;\n}", "public function update(Request $request, TypesConges $typesConges)\n {\n //\n }", "public function update(TypeStoreRequest $request, types $type)\n {\n $type->update([\n 'type_id' => $request->type_id,\n 'type_name' => $request->type_name,\n // 'password' => Hash::make($request->password),\n ]);\n return redirect()->route('types.index')->with('message','Type updated Successfully');\n }", "protected function updateNotificationTypes() {\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_user_notification_event_notification_type\n\t\t\tWHERE\t\teventID = ?\n\t\t\t\t\tAND userID = ?\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\tWCF::getDB()->beginTransaction();\n\t\t$notificationTypes = array();\n\t\tforeach ($this->settings as $eventID => $settings) {\n\t\t\t$statement->execute(array(\n\t\t\t\t$eventID,\n\t\t\t\tWCF::getUser()->userID\n\t\t\t));\n\t\t\t\n\t\t\tif ($settings['type']) {\n\t\t\t\t$notificationTypes[$eventID] = $settings['type'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!empty($notificationTypes)) {\n\t\t\t$sql = \"INSERT INTO\twcf\".WCF_N.\"_user_notification_event_notification_type\n\t\t\t\t\t\t(userID, eventID, notificationTypeID)\n\t\t\t\tVALUES\t\t(?, ?, ?)\";\n\t\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t\tforeach ($notificationTypes as $eventID => $type) {\n\t\t\t\t$statement->execute(array(\n\t\t\t\t\tWCF::getUser()->userID,\n\t\t\t\t\t$eventID,\n\t\t\t\t\t$type\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tWCF::getDB()->commitTransaction();\n\t}", "private function updateTypeChangeStorage( $params = array() ){\r\n\t\t$new_changes = array();\r\n\t\t\r\n\t\t// determine what configuration value key we're working with..\r\n\t\t$cfg_key = ($params['type'] === 'International'\r\n\t\t\t\t?\r\n\t\t\t'MODULE_SHIPPING_USPS_INTL_TYPE_CHANGE_DETECTED'\r\n\t\t\t\t:\r\n\t\t\t'MODULE_SHIPPING_USPS_DMSTC_TYPE_CHANGE_DETECTED'\r\n\t\t);\r\n\t\t\r\n\t\t// query existing changes..\r\n\t\t$q = tep_db_query(\"\r\n\t\t\tSELECT\t\r\n\t\t\t\tconfiguration_value\r\n\t\t\tFROM\r\n\t\t\tIXcore.\" . TABLE_CONFIGURATION . \"\t\r\n\t\t\tWHERE\r\n\t\t\t\tconfiguration_key = '\" . $cfg_key . \"'\r\n\t\t\");\r\n\t\t\r\n\t\t// fetch result; older PHP version compatible, so ugly..\r\n\t\t$r = tep_db_fetch_array($q);\r\n\t\t$existing_changes = json_decode($r['configuration_value'], true);\r\n\t\t\t\t\r\n\t\t// remove any change that have been added..\r\n\t\t$changes_added = false;\r\n\t\tforeach( $existing_changes as $k => $change ){\r\n\t\t\tif( in_array($change, ($params['type'] === 'International'\r\n\t\t\t\t\t?\r\n\t\t\t\t$this->intl_types\r\n\t\t\t\t\t:\r\n\t\t\t\t$this->types\r\n\t\t\t)) ){\r\n\t\t\t\tunset($existing_changes[$k]);\r\n\t\t\t\t$changes_added = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check for new changes..\r\n\t\tforeach( $params['changes'] as $change ){\r\n\t\t\tif( ! in_array($change, $existing_changes) ){\r\n\t\t\t\t$new_changes[] = $change;\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\t// if changes have been added or we've got new changes, update the db..\r\n\t\tif( $changes_added || $new_changes ){\r\n\t\t\ttep_db_query(\"\r\n\t\t\t\tUPDATE\t\r\n\t\t\t\tIXcore.\" . TABLE_CONFIGURATION . \"\t\r\n\t\t\t\tSET\r\n\t\t\t\t\tconfiguration_value = '\" . tep_db_input(\r\n\t\t\t\t\t\tjson_encode(array_merge(\r\n\t\t\t\t\t\t\t$existing_changes,\r\n\t\t\t\t\t\t\t$new_changes\r\n\t\t\t\t\t\t))\r\n\t\t\t\t\t) . \"'\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tconfiguration_key = '\" . $cfg_key . \"'\r\n\t\t\t\");\r\n\t\t}\r\n\t\t\r\n\t\treturn $new_changes;\r\n\t}", "public function getTransactionTypes()\n\t{\n\t\t$processed_list = array();\n\t\t$alias_map = array();\n\n\t\t$selected_types = $this->orderCardTransactionTypes(\n\t\t\t$this->config->get('emerchantpay_checkout_transaction_type')\n\t\t);\n\t\t$methods = \\Genesis\\API\\Constants\\Payment\\Methods::getMethods();\n\n\t\tforeach ($methods as $method) {\n\t\t\t$alias_map[$method . self::PPRO_TRANSACTION_SUFFIX] = \\Genesis\\API\\Constants\\Transaction\\Types::PPRO;\n\t\t}\n\n\t\t$alias_map = array_merge($alias_map, [\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX . self::GOOGLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::GOOGLE_PAY,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::PAYPAL_TRANSACTION_PREFIX . self::PAYPAL_PAYMENT_TYPE_EXPRESS =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::PAY_PAL,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_AUTHORIZE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX . self::APPLE_PAY_PAYMENT_TYPE_SALE =>\n\t\t\t\t\\Genesis\\API\\Constants\\Transaction\\Types::APPLE_PAY,\n\t\t]);\n\n\t\tforeach ($selected_types as $selected_type) {\n\t\t\tif (array_key_exists($selected_type, $alias_map)) {\n\t\t\t\t$transaction_type = $alias_map[$selected_type];\n\n\t\t\t\t$processed_list[$transaction_type]['name'] = $transaction_type;\n\n\t\t\t\t// WPF Custom Attribute\n\t\t\t\t$key = $this->getCustomParameterKey($transaction_type);\n\n\t\t\t\t$processed_list[$transaction_type]['parameters'][] = array(\n\t\t\t\t\t$key => str_replace(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tself::PPRO_TRANSACTION_SUFFIX,\n\t\t\t\t\t\t\tself::GOOGLE_PAY_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::PAYPAL_TRANSACTION_PREFIX,\n\t\t\t\t\t\t\tself::APPLE_PAY_TRANSACTION_PREFIX\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t$selected_type\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$processed_list[] = $selected_type;\n\t\t\t}\n\t\t}\n\n\t\treturn $processed_list;\n\t}", "public function setTestTypes($testTypes){\n\n\t\t$testTypesAdded = array();\n\n\t\tif(is_array($testTypes)){\n\t\t\tforeach ($testTypes as $name) {\n\t\t\t\ttry {\n\t\t\t\t\t$testTypesAdded[] = TestType::where('name', '=', $name)->first()->id;\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\tLog::error($e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(count($testTypesAdded) > 0){\n\t\t\t// Delete existing instrument test_type mappings\n\t\t\t$this->testTypes()->detach();\n\t\t\t// Add the new mapping\n\t\t\t$this->testTypes()->attach($testTypesAdded);\n\t\t}\n\t}", "public function setTypes( array $types )\n {\n $this->types = $types;\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "public function uploadTypes(array $types): void;", "public function update(Request $request, DeviceTypes $deviceTypes)\n {\n //\n }", "public function setInventoryTransactionsId($value, $key, $type) {\r\n\t\tif ($type == 'single') {\r\n\t\t\t$this->inventoryTransactionsId = $value;\r\n\t\t} else if ($type == 'array') {\r\n\t\t\t$this->inventoryTransactionsId [$key] = $value;\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"success\" => false, \"message\" => \"Cannot Identifiy Type String Or Array:setInventoryTransactionsId ?\"));\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public function setTypes($types){\n\t\tif(!is_array($types)) return;\n\t\t\n\t\tforeach($types as $field_name => $type){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->type = $type;\n\t\t\t}\n\t\t}\n\t}", "public function update(Request $request, transactions $transactions)\n {\n //\n }", "private function upd(array $config) {\r\n switch ($config['type']) {\r\n case 'cart':\r\n case 'address':\r\n case 'cartConfig':\r\n case 'pwd':\r\n case 'config':\r\n case 'status_order':\r\n parent::update(\r\n ['type' => $config['type']],\r\n $config['data']\r\n );\r\n break;\r\n }\r\n }", "function setTypes($types){\n\t\t$this->types=explode(\",\",$types);\n\t}", "public function setTransactionType($value)\n {\n return $this->setParameter('type', $value);\n }", "public function update(Request $request, Transaction $transaction)\n {\n $this->transaction_validate($request);\n if($this->transaction_insert_or_update($request, $transaction)){\n $type = Type::find($transaction->type_id);\n $request->session()->flash('status', 'Transaction saved successfully!');\n return redirect()->route('transaction.index', ['slug' => $type->slug]);\n }\n }", "public function update(FeedTypes $feedtypes, FeedTypesRequest $request)\n {\n\t\t Cache::forget('feed_types');\n $feedtypes->update($request->all());\n\n if($request->total_days == 0){\n $days = $this->daysDefault();\n DB::table('feeds_feed_type_budgeted_amount_per_day')->where('feed_type_id',$request->type_id)->update($days);\n }\n\n\t\t return redirect('feedtype');\n }", "public function setTypes(array $types)\n {\n $this->types = array();\n \n foreach($types as $type)\n $this->addType($type);\n }", "public function update(UpdateOperationTypesRequest $request, $id)\n {\n if (! Gate::allows('operation_type_edit')) {\n return abort(401);\n }\n $operation_type = OperationType::findOrFail($id);\n $operation_type->update($request->all());\n\n\n\n return redirect()->route('admin.operation_types.index');\n }", "public function setMapPaymentTypes(array $data)\n {\n $data = array_filter($data);\n\n $this->map_payment_types = $data;\n $this->setSettingValue('retailcrm_map_payment_types', $data, true);\n }", "public function setEntityTypes($types) {\n $this->entity_types = $types;\n }", "public function updateTourType(array $data) : void\n {\n if($data['number_of_tours'] == 0){\n $this->deleteTourType($data);\n return;\n }\n\n // Build query\n $sql = \"UPDATE Tour_Types \n SET amount_of_tours=?\n WHERE tour_types_id=?\";\n\n // preapre statement\n if($query = $this->conn->prepare($sql)) {\n // Create bind params to prevent sql injection\n $query->bind_param(\n \"ii\",\n $data['number_of_tours'],\n $data['tourTypeId']\n );\n \n // Execute query\n $query->execute();\n } else {\n // If connection cannot be established, throw an error\n throw new Exception(\"Cannot add a new tour. please try again.\");\n }\n }", "function update_taxonomy( $tree_array = array(), $type = '', $data = '' )\n\t {\n\n\t\t$tree['last_updated'] = time();\n\n\t\tif($tree_array)\n\t\t\t$tree['taxonomy'] = $tree_array;\n\t\t\n\t\tee()->db->where('id', $this->tree_id);\n\t\tee()->db->update( 'taxonomy_trees', $tree );\n\n\t\t// -------------------------------\n\t\t// 'taxonomy_updated' extension hook\n\t\t// called when:\n\t\t//\t\tupdate_node\n\t\t// \t\treorder_nodes\n\t\t// \t\tdelete_node\n\t\t//\t\tpost_save on fieldtype\n\t\t// -------------------------------\n\t\tif (ee()->extensions->active_hook('taxonomy_updated'))\n\t\t{\n\t\t\tee()->extensions->call('taxonomy_updated', $this->tree_id, $type, $data);\n\t\t}\n\t\t\n\t }", "public function updateSystemType()\r\n{\r\n $query_string = \"UPDATE system_type \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"systemtypename = :systemtypename, \";\r\n\t$query_string .= \"systemtypedesc = :systemtypedesc \";\r\n\t$query_string .= \"WHERE systemtypeid = :systemtypeid\";\r\n\r\n return $query_string;\r\n}", "public function update_transaction($values){\n $this->load->database();\n\n return $query = $this->db->where(array('id' => $values['id']))\n ->update('tbl_transactions',$values);\n }", "public function update(array $fields)\n {\n $type = Table\\ContentTypes::findById($fields['id']);\n if (isset($type->id)) {\n $contentType = (!empty($fields['content_type_other']) && ($fields['content_type'] == 'other')) ?\n $fields['content_type_other'] : $fields['content_type'];\n\n $type->name = $fields['name'];\n $type->content_type = $contentType;\n $type->strict_publishing = (int)$fields['strict_publishing'];\n $type->open_authoring = (int)$fields['open_authoring'];\n $type->in_date = (int)$fields['in_date'];\n $type->force_ssl = (int)$fields['force_ssl'];\n $type->order = (int)$fields['order'];\n $type->save();\n\n $this->data = array_merge($this->data, $type->getColumns());\n }\n }", "public function setTransactionType($transactionType = 'AUTH_CAPTURE') {\n $type = array(\n 'x_type'=>strtoupper($transactionType),\n );\n $this->NVP = array_merge($this->NVP, $type); \n }", "public function save_transaction_type()\n\t{\n\t\t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t $data['landlord_id']=$this->checklogin();\n\t \t $query=$this->ApiModel->insertData('transactions_type',$data);\n\t \t $logData=array('audit_date'=>Date('Y-m-d'),'audit_statement'=>'Insert','role'=>'Landlord','actions'=>'Landlord Added Transaction Type ','userID'=>$data['landlord_id'],'progress_id'=> $data['landlord_id']);\n\t\t $this->ApiModel->insert_Data('audit_log',$logData);\n\t \t echo json_encode($query);\n\t}" ]
[ "0.5938457", "0.5626907", "0.5561924", "0.5517833", "0.53670275", "0.531731", "0.5308811", "0.5301672", "0.52844256", "0.52140975", "0.51913005", "0.5147524", "0.514485", "0.50827074", "0.5073062", "0.50543576", "0.5025518", "0.50133306", "0.494591", "0.49317485", "0.49207014", "0.49151388", "0.49128672", "0.4910703", "0.48935685", "0.48642752", "0.4860054", "0.48283082", "0.48129785", "0.48112977" ]
0.5825896
1
Operation deletetransactionType Remove a visit transactionType.
public function transactionTypedelete($transaction_type_id) { $deleted_transaction_type = TransactionType::destroy($transaction_type_id); if($deleted_transaction_type){ return response()->json(['msg' => 'Saftly deleted the transaction type'],200); }else{ return response()->json(['msg' => 'Could not delete record'], 400); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteType($type){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"])||$user[\"status\"]!=DBConfig::$userStatus[\"admin\"]){\n\t\t\treturn false;\n\t\t}\n\t\t$type = $this->getType($type);\n\t\tif(!isset($type[\"id\"]))return false;\n\t\t$query = Queries::deletetype($type[\"id\"]);\n\t\t$result = $this->query($query);\n\t\tif(!$result)return false;\n\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes type $type\");\n\t\t$query = Queries::removetypefromentries($type[\"id\"]);\n\t\treturn $this->query($query);\n\t}", "function deleteRegistrationType(&$registrationType) {\n\t\treturn $this->deleteRegistrationTypeById($registrationType->getTypeId());\n\t}", "function timetracking_type_delete(timetrackingType $type) {\n $type->delete();\n}", "public function deleteByIdType($id, $type);", "public function deleteWithType(string $aggregateType): void;", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fanli_Service_Ptype::getType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Fanli_Service_Ptype::deleteType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function delete($name, $type)\n {\n return apc_delete($type . $name);\n }", "public function delete($name, $type)\n {\n $this->memcached->delete($this->generateKey($name, $type));\n }", "public function destroy(Type $type)\n {\n $type->employees()->delete();\n $type->delete();\n\n return $this->showMessage('type eliminado correctamente');\n }", "public function delete(Request $request, Transaction $transaction)\n {\n $type = Type::find($transaction->type_id);\n if($transaction->delete()){\n $request->session()->flash('status', 'Transaction has been deleted!');\n return redirect()->route('transaction.index', ['slug' => $type->slug]);\n }\n }", "public function destroy(Type $type)\n {\n //\n }", "public function destroy(Type $type)\n {\n //\n }", "public function remove($typeId);", "public function deleting($educationType)\n {\n\t\tparent::deleting($educationType);\n\n }", "public function destroy(ActivityType $activityType)\n {\n if ($activityType->timeEntries()->count() > 0) {\n return $this->sendError('This activity has more than one time entry, so it can\\'t be deleted.');\n }\n\n $activityType->update(['deleted_by' => getLoggedInUserId()]);\n $activityType->delete();\n\n return $this->sendSuccess('Activity Type deleted successfully.');\n }", "public function destroy(Companytype $companytype)\n {\n //\n }", "public function destroy(Type $type)\n {\n //\n $type->delete();\n return redirect()->route('type')\n ->with('success','ลบหมวดหมู่สินค้าสำเร็จ');\n }", "public function delete($address, $list, $type)\n {\n $this->getQuery()\n ->where('type', '=', $type)\n ->where('list', '=', $list)\n ->where('label', '=', $address)\n ->delete();\n }", "public function destroy(UserType $userType)\n {\n //\n }", "public function destroy(types $type)\n {\n $type->delete();\n\n return redirect()->route('types.index')->with('message','Type Deleted Successfully');\n }", "public function deleteIndex(string $documentType);", "public function destroy(ItemType $type)\n {\n //\n }", "public function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\t\t\n\t}", "public function delete_by_content_type($content_type)\n\t{\n\t\treturn $this->db->where('content_type', $content_type)->delete($this->table);\n\t}", "function delete_type($id)\n\t\t{\n\t\t\n\t\t$this->db->where('revenue_id',$id);\n\t\t\n\t\t$this->db->delete($this->table_name);\n\t\t\n\t\t}", "public function delete($placeType){\n }", "public function removeWalletWebhook(\n string $url,\n string $type\n )\n {\n return $this->execute($this->getCoin() . '/wallet/' . $this->walletId . '/webhooks', 'DELETE', [\n 'url' => $url,\n 'type' => $type\n ]);\n }", "function delete_user_type($user_type_id)\n\t\t{\n\t\t\t$eventlogbol = new eventlogbol();\n\t\t\t$old_values='';\n\t\t\t$new_values_arr = array();\n\t\t\t$new_values_arr['user_type_id'] = $user_type_id;\n\t\t\t$event_result = $eventlogbol->save_eventlog('Delete','tbl_user_type',$new_values_arr,$old_values);\n\t\t\tif($event_result)\n\t\t\t{\n\t\t\t\t$query=\"DELETE FROM tbl_user_type WHERE user_type_id=:user_type_id \";\t\t\n\t\t\t\t$result = execute_non_query($query, array(':user_type_id' => $user_type_id));\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}", "public function deleted(ClaseType $clases_type)\n {\n // $clases_type->blocks()->delete();\n }", "public function delete($id) {\n // Delete the type\n $this->getDb()->delete('eventtype', array('num_ET' => $id));\n }" ]
[ "0.6258647", "0.6095247", "0.60692894", "0.59281003", "0.58904743", "0.5756883", "0.5683862", "0.5664299", "0.5648233", "0.5647898", "0.5639528", "0.5639528", "0.5636225", "0.5616281", "0.5606533", "0.5511554", "0.54937583", "0.5458608", "0.54558104", "0.5451611", "0.54267704", "0.539932", "0.5397743", "0.53320247", "0.5321843", "0.5317061", "0.5293148", "0.528124", "0.5273616", "0.5271544" ]
0.70688444
0
/////////////////////// Dose functions // ///////////////////// Operation doseGET Fetch a Dose.
public function doseget() { $response = Dose::get(); if(!$response){ return response()->json(['msg' => 'could not find dose'], 204); }else{ return response()->json($response, 200); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doseByIdget($dose_id)\r\n {\r\n $response = Dose::findOrFail($dose_id);\r\n if(!$response){ \r\n return response()->json(['msg' => 'could not find dose'], 204);\r\n }else{\r\n return response()->json($response, 200);\r\n }\r\n }", "public function getDod();", "public function Get_depo($id)\n\t{\n\t\t\t// $url = 'http://localhost:9132/oeosft/api/rest/depodadoidesta';\n\t\t\t$url = AJST.'/services/asp/ALMDataService/establecimiento/'.$id.'/deposito/list';\n $array = $this->rest->callAPI(\"GET\",$url);\n $resp = json_decode($array['data']);\n return $resp->depositos->deposito;\n\t}", "public function obtienedatosexpdteAction()\n {\n $this->disableAutoRender();\n\n /* Recibo parámetros */\n $expdte_id = $this->_getParam('expdte_id');\n\n /* Obtengo el primer documento del expdte */\n $objDocumento = $this->_modelo->getDocumentoInicialDeExpdte($expdte_id);\n\n /*\n $documento = $objDocumento->documento;\n $fechaRegistro = new Zend_Date($objDocumento->fecha_registro, Zend_Date:: ISO_8601);\n $fechaHora = $fechaRegistro->toString('dd/MM/yyyy h:m:s');\n $origen = $objDocumento->dependencia_origen;\n*/\n\n if($objDocumento){\n echo Zend_Json::encode($objDocumento); \n } else {\n echo Zend_Json::encode('Error:No existe el expediente');\n }\n\n \n }", "public function getArticleByDeevonaute()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t\t\t->from('tdArticle td_a')\n\t\t\t\t->where('td_a.author_id = ?', $this->getId());\n\t\t\t\t\n\t\treturn Doctrine_Core::getTable('tdArticle')->retrieveArticle($q);\n\t}", "public function getDob();", "public function getOneByUser(){\n $sql = \"SELECT p.id, p.coste FROM pedidos p \"\n //. \"INNER JOIN lineas_pedidos lp ON p.id = lp.pedido_id \"\n . \"WHERE p.usuario_id = {$this->getUsuario_id()} ORDER BY id DESC LIMIT 1\";\n\n $pedido = $this->db->query($sql);\n\n \n //echo $this->db->error;\n \n return $pedido->fetch_object();\n \n }", "public static function getRecordInDB($id_sede){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_sede = DB_Functions::esc($id_sede);\r\n $query = \"SELECT *\r\n FROM \t SEDE\r\n\t WHERE\t ID_SEDE = $id_sede;\";\r\n $resQuery = $db->executeQuery($query);\r\n //Se ho un recordset\r\n if (count($resQuery[\"response\"][]) == 1) {\r\n $sede = new Luogo($resQuery[\"response\"][0][0],$resQuery[\"response\"][0][1],$resQuery[\"response\"][0][2]);\r\n return $sede;\r\n }\r\n else\r\n return null;\r\n }", "public function get($id){\n\t\t$q = $this->pdo->prepare('SELECT * FROM demande WHERE id=:id');\n\t\t$q->bindValue(':id', $id, PDO::PARAM_INT);\n\t\t$q->execute();\n\t\t$donnees = $q->fetch(PDO::FETCH_ASSOC);\n\t\treturn new Demande($donnees);\n\t}", "public function test_getSingleDisease() {\n\t\t$this->testAction('/disease/index/620', array('method'=>'get'));\n\t\t$returnedDisease = $this->vars['diseases']['Disease'];\n\t\t$this->assertEquals(620, $returnedDisease['id']);\n\t\t$this->assertEquals(1, count($this->vars['diseases']));\n\t}", "public function getD() {}", "public function obtienedatosdestinoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo parámetros */\n $dependencia_iddestino = $this->_getParam('dependencia_iddestino');\n\n $modelDependencia = new Gidoc_Model_DependenciaMapper(); \n \n $objDependencia = $modelDependencia->getById($dependencia_iddestino);\n \n echo $objDependencia->nombre.'|'.$objDependencia->cargo;\n \n }", "public function PedidosDelDia2()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function obtainDocente($data)\r\n {\r\n return $this->performRequest('POST', '/docentes',$data);\r\n }", "public function dosedelete($dose_id)\r\n {\r\n $dose = Dose::destroy($dose_id);\r\n if($dose){\r\n return response()->json(['msg' => 'Saftly deleted the dose'],200);\r\n }else{\r\n return response()->json(['msg' => 'Could not delete record'], 400);\r\n }\r\n }", "public function dosepost()\r\n {\r\n $input = Request::all();\r\n $new_dose = Dose::create($input);\r\n if($new_dose){\r\n return response()->json(['msg'=> 'added dose', 'response'=> $new_dose], 201);\r\n }else{\r\n return response()->json(['msg'=> 'Could not add dose'], 400);\r\n }\r\n }", "public function get_disco()\r\n {\r\n // loads the associated object\r\n if (empty($this->disco))\r\n $this->disco = new Disco($this->disco_id);\r\n \r\n // returns the associated object\r\n return $this->disco;\r\n }", "public function getOne(){\n\n $pedido = $this->db->query(\"SELECT * FROM pedidos WHERE id = {$this->getId()}\");\n\n \n return $pedido->fetch_object();\n }", "public function getDocente($id){\n\t\t$sql = \" SELECT * FROM empleados WHERE id = '$id' LIMIT 1 \";\n\t\t$resultado = $this->db->query($sql);//ejecutando la consulta con la conexión establecida\n\n\t\t$row = $resultado->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\n\t\treturn $row;\n\n\t}", "public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM pedidos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function ReadbyID($de_cod_denuncia){\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\n\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT * FROM denuncia WHERE de_cod_denuncia=?\";\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($de_cod_denuncia));\n\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\n\t\t$resultado = $query->fetch(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\n\t\tfloopets_BD::Disconnect();\n\t}", "function obtenerDatos() {\n include('../demo_formulario/include/funciones/db.php');\n\n return $conn->query(\"SELECT nombre, apellido, dni, edad, fecha_nacimiento, genero, pais, provincia, localidad, calle, numero FROM personas WHERE (edad > 24 && edad < 35)\");\n }", "public function readPedidos(){\n $sql='SELECT IdEncabezado, u.Nombre, u.Apellido, Fecha, TipoEstado \n FROM encabezadopedidos en INNER JOIN usuarios u USING (IdUsuario) \n INNER JOIN estadopedidos es USING(IdEstadoPedido) ORDER by IdEncabezado ASC ';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function PedidosDelDia()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_estado='PENDIENTE' AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "function getDossierById($pdo,$id)\n {\n $req = $pdo->prepare(\"SELECT * FROM DOSSIER WHERE NO_DOSSIER=?\");\n $req->bindValue(1,$id);\n $req->execute();\n $row=$req->fetch();\n $candidatSql=new CandidatSql();\n $gestionnaireSql=new GestionnaireSql();\n $dossier= new Dossier($row[\"NO_DOSSIER\"], $candidatSql->getCandidatByNomUser($pdo, $row[\"NOM_CANDIDAT\"]), $gestionnaireSql->getGestionnaireByNomUser($pdo, $row[\"NOM_GESTIONNAIRE\"]), $row[\"VERIFCATION\"]);\n return $dossier;\n }", "public function f_get_sdoTableDtls()\n {\n\n $sql = $this->db->query(\" SELECT * FROM md_dm_sdo ORDER BY dist_cd \");\n return $sql->result();\n\n }", "public function GetSociete() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT * FROM societe WHERE idSociete = :idSociete LIMIT 1\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = $sql->fetch();\n\n // If success everythig is good send header as \"OK\" and user details\n $this->response($this->json($result), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n\n // If invalid inputs \"Bad Request\" status message and reason\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid param\");\n $this->response($this->json($error), 400);\n }", "public function listarDeportestodo(){\n $sql = \"SELECT `Sport`.`id` as iddeporte, `Sport`.`nombre` FROM `sporte`.`coaches` AS `Coach` LEFT JOIN `sporte`.`users` AS `User` ON (`Coach`.`user_id` = `User`.`id`) LEFT JOIN `sporte`.`ligas` AS `Liga` ON (`Coach`.`liga_id` = `Liga`.`id`) LEFT JOIN `sporte`.`sports` AS `Sport` ON (`Liga`.`sport_id` = `Sport`.`id`) WHERE 1=1\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute(); \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}" ]
[ "0.73683", "0.6499195", "0.6014575", "0.5999655", "0.58395475", "0.57270086", "0.5670605", "0.5655229", "0.5603628", "0.56026703", "0.55482674", "0.5535774", "0.55328584", "0.55224335", "0.5500512", "0.5499983", "0.54898983", "0.5482297", "0.54608494", "0.54431355", "0.5430024", "0.5420114", "0.5399977", "0.53951955", "0.53747714", "0.5366064", "0.535226", "0.534965", "0.5348558", "0.53398067" ]
0.7451495
0
Operation deletedose Remove a dose.
public function dosedelete($dose_id) { $dose = Dose::destroy($dose_id); if($dose){ return response()->json(['msg' => 'Saftly deleted the dose'],200); }else{ return response()->json(['msg' => 'Could not delete record'], 400); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(Seguimiento $Seguimiento){\n \n }", "function eliminar_reservas($id_sede) {\n $this->db->where('id_sede =', $id_sede);\n $this->db->delete('edicion');\n }", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function deleting(UnionDesglose $unionDesglose)\n {\n \n $auditoria = new Auditoria();\n $auditoria->auditoria_script = request()->route()->uri(); \n $auditoria->auditoria_host = Controller::GetIPRemote();\n $auditoria->aud_tip_id = 4;\n $auditoria->usuario_id = Auth::user()->usuario_id;\n $auditoria->auditoria_fecha = date(\"Y-m-d H:i:s\");\n $auditoria->auditoria_tabla = 'uniones_desgloses';\n $auditoria->auditoria_registro_id = $unionDesglose->union_desglose_id;\n if($unionDesglose->tipo_union_desglose_id == 1){\n $auditoria->auditoria_descripcion = 'Eliminación de relación de Unión';\n }else{\n $auditoria->auditoria_descripcion = 'Eliminación de relación de Destino';\n }\n $auditoria->auditoria_detalle_old = json_encode($unionDesglose->getOriginal());\n $auditoria->auditoria_detalle_new = null;\n $auditoria->save();\n }", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public function del()\n {\n }", "public function remove() {}", "public function remove() {}", "function delete()\n {\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "public function delete()\n {\n DB::transaction(function () {\n $this->devedores()->delete();\n parent::delete();\n });\n }", "public function remove() {\n }", "public function delete()\n {\n // If deposit is existing, will get database ID removed.\n $this->dbID = $this->db->deleteDeposit($this);\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function delete()\r\n\t{\r\n\t}", "function Delete($de_cod_denuncia){\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\n\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"DELETE FROM denuncia WHERE de_cod_denuncia =?\" ;\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($de_cod_denuncia));\n\n\t\tfloopets_BD::Disconnect();\n\t}", "public function delete()\n {\n \n }", "public function delete() {\r\n }", "public final function delete() {\n }" ]
[ "0.6899336", "0.6653246", "0.66205096", "0.6443271", "0.6419706", "0.6409321", "0.6358176", "0.63576174", "0.6307096", "0.62305087", "0.62305087", "0.6230452", "0.6229778", "0.62270504", "0.62155", "0.62154865", "0.6210985", "0.6208259", "0.6208259", "0.6208259", "0.6208259", "0.62028444", "0.6196355", "0.6195628", "0.6188116", "0.61573184", "0.6147762", "0.6147543", "0.61353225", "0.6111487" ]
0.6791943
1
/////////////////////// Unit functions // ///////////////////// Operation unitGET Fetch a unit.
public function unitget() { $response = Unit::get(); if(!$response){ return response()->json(['msg' => 'could not find unit'], 204); }else{ return response()->json($response, 200); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unitByIdget($unit_id)\r\n {\r\n $response = Unit::findOrFail($unit_id);\r\n if(!$response){ \r\n return response()->json(['msg' => 'could not find unit'], 204);\r\n }else{\r\n return response()->json($response, 200);\r\n }\r\n }", "function get_unit()\r\n{\r\n\t$ci = & get_instance();\r\n\t$ci->load->database();\r\n\t\r\n\treturn $unit = $ci->db->get('t_unit')->result();\r\n}", "public function getUnit();", "function getUnits(){\n $sql = \"SELECT * FROM units\";\n return runQuery($sql);\n}", "public function unit(){\n\n $unit = MedicalSupply::where('medSupName', '=', Input::get('mName'))\n ->where('brand', '=', Input::get('mBrand'))\n ->where('supType', '=', 'm')\n ->get();\n\n return Response::json($unit);\n }", "public function getunit()\n\t{\n\t\t$result = $this->admin_model->selectunittype();\n\t\treturn $result;\n\t}", "public function getUnits(){\n\n\t\t $this->db->where('delete_status',0);\n\t $query=$this->db->get('unit'); \n\t return $query->result();\n\n\t}", "public function get_oneUnit_data()\n\t {\n\t \t$unit_id=file_get_contents(\"php://input\");\n\t \t$query['unit_data']=$this->ApiModel->get_oneUnit_data($unit_id);\n\t \t$query['lease_data']=$this->ApiModel->get_lease_data_unit($unit_id);\n\t \tif(count($query['lease_data'])==1)\n\t \t{\n\t \t\t$query['unit_data'][0]['rentAmount']=$query['lease_data'][0]['rentAmount'];\n\t \t}\n\t \t\n\t \techo json_encode($query);\n\t }", "public function get_unit()\n {\n $deptID = $this->uri->segment(4);\n \n $this->db->select('unitID, NamaUnit')\n ->from('tbl_unit')\n ->where('deptID', $deptID);\n $db = $this->db->get();\n \n $array = array();\n foreach($db->result() as $row):\n $array[] = array(\"value\" => $row->unitID, \"property\" => $row->NamaUnit);\n endforeach;\n \n echo json_encode($array);\n exit;\n }", "protected function fetchUnit($unit) {\n\n\t\t\tforeach ($this->_units as $key => $value) {\n\t\t\t\tif ($unit === $key || $this->isAlias($unit, $key)) {\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new \\Exception(\"{$unit} is not a supported unit\", 1);\n\t\t}", "function get_all_units_for_course($courseID){\n $courseID = (int)$courseID;\n $query = \"SELECT unitID, unitTitle FROM units WHERE courseID_Ref = '$courseID'\";\n $result = mysqli_query($GLOBALS['connect'], $query);\n $answer = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $answer;\n}", "function Getunitdetails($filter=false)\n\t{\n\t\t$query=$this->db->query(\"select * from rp_properties where projectID='$filter' and type='Unit'\");\n\t\treturn $query->result();\n\t}", "public function getUnit()\n {\n return $this->hasOne(Unit::className(), ['unit_id' => 'unit_id']);\n }", "public static function retrieveAllUnits() {\n return R::getAll('SELECT * FROM unit');\n }", "public function get_units()\n\t{\n\t\t$ol = new object_list(array(\n\t\t\t\"class_id\" => CL_UNIT,\n\t\t\t\"status\" => object::STAT_ACTIVE,\n\t\t));\n\t\treturn $ol;\n\t}", "function get_specific_unit_details($unitID){\n $courseID = (int)$_SESSION['currentCourse']; //the SESSION ought to have been set when this function gets called\n $query = \"SELECT unitTitle, objective, review, quiz FROM units WHERE courseID_Ref = '$courseID' AND unitID = '$unitID'\";\n $result = mysqli_query($GLOBALS['connect'], $query);\n\n $answer = mysqli_fetch_assoc($result);\n\n return $answer;\n}", "public static function retrieveUnit($unitID) {\n $unit = R::load('unit', $unitID);\n\n if (empty($unit)) {\n throw new Exception(\"Unit $unitID does not exist.\");\n }\n\n return $unit;\n }", "function get_unit_json() {\n header('Content-Type: application/json');\n echo $this->unit_model->get_unit_all();\n }", "public function getUnit()\n\t{\n\t\treturn null;\n\t}", "function getNamaUnit($conn,$r_kodeunit){\n\t\t$sql = \"select namaunit from \" . static::table('ms_unit') . \" where kodeunit = '$r_kodeunit'\";\n\t\t\n\t\treturn $conn->GetOne($sql);\n\t}", "public function getBusinessUnit();", "public function getUnitId()\n {\n return $this->unit_id;\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function actionGetunitprice($no)\n {\n \n \n $unitprice = Item::find()->select(['[Unit Cost]'])->where(['No_' => $no])->asArray()->one();\n return $unitprice['Unit Cost'];\n }", "public function unit()\n {\n $data = ['aktif' => 'unit',\n 'data_unit' => $this->M_prospektus->get_unit_menu()->result_array(),\n 'data_blok' => $this->M_prospektus->get_blok_kws()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_unit', $data);\n }", "public function getUnitName()\n {\n return $this->unit_name;\n }", "public function getRemoteUnit()\n {\n return $this->remote_unit;\n }" ]
[ "0.7243641", "0.7206254", "0.7174951", "0.6544066", "0.6419899", "0.641673", "0.6376271", "0.6365104", "0.6340431", "0.6337861", "0.62869257", "0.6251533", "0.624058", "0.6228491", "0.6218056", "0.6169704", "0.6165605", "0.6159091", "0.61510974", "0.6136802", "0.611969", "0.611493", "0.60105366", "0.60105366", "0.60105366", "0.60105366", "0.6005841", "0.5981872", "0.5923916", "0.5922594" ]
0.7821317
0
Operation deleteunit Remove a unit.
public function unitdelete($unit_id) { $unit = Unit::destroy($unit_id); if($unit){ return response()->json(['msg' => 'Saftly deleted the unit'],200); }else{ return response()->json(['msg' => 'Could not delete record'], 400); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteUnit($unitid) {\n $unit = R::load('unit', $unitid);\n\n if(empty($unit)) {\n throw new Exception (\"Unit ID $unitid does not exist!\");\n }\n else {\n R::trash($unit);\n }\n }", "public function destroy(Unit $unit)\n {\n $this->authorize('delete', Unit::class);\n return ['success' => $unit->delete()];\n }", "public function destroy(Unit $unit)\n {\n //\n }", "public function destroy(Unit $unit)\n {\n //\n }", "public function removeAction() {\n\t\t$unitModelId = $this->getRequest()->getParam('unitModelId');\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$result = $model->delete( $unitModelId );\t\t\t\t\n\n $this->setFlashMessage('recordDeleted'); \n $this->_helper->redirector('viewallunitmodels', 'unitmodel', 'unit');\t\t\n\t}", "public static function delete($id) {\n DB::query('DELETE FROM Unit WHERE id = :id', array('id' => $id));\n }", "public function delete_method_unit($method_unit){\r\t\t\t$query=\"delete from `\".$this->table_name_smu.\"` where `id`=$method_unit\";\r\t\t\tmysqli_query($this->conn,$query);\r\t\t}", "public function destroy(Unit $unit, $id)\n {\n $datas = $unit->find($id);\n $unit->destroy($id);\n return response()->json($datas, Response::HTTP_OK);\n }", "public function hapus_unit($where)\n\t{\n\t\t$this->db->where($where);\n\t\t$this->db->delete('unit');\n\t}", "public function destroy($id)\n {\n $unit = Unit::find($id);\n $unit->delete();\n\n return redirect('/units')->with('success', 'Unit removed');\n\n }", "public function delete_units($units_id)\n\t{\n\t\tif($this->db->delete('units', array('units_id' => $units_id)))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function destroy($id)\n\t{\n\t\t$unit = Unit::find($id);\n\n\t\tif( is_null($unit) )\n\t\t{\n\t\t\treturn Redirect::to( 'unit' );\n\t\t}\n\n\t\t$unit->delete();\n\n\t\treturn Redirect::to( 'unit' );\n\t}", "public function destroy($id)\n {\n $unit = Unit::find($id);\n $unit->delete();\n\n flash(\"Se ha eliminado la unidad \". $unit->number . \" de forma exitosa!\" )->error();\n return redirect()->route('units.index'); \n }", "public function delete(User $user, SystemUnit $systemUnit)\n {\n //\n }", "public function delete_rental_unit($rental_unit_id)\r\n\t{\r\n\t\tif($this->db->delete('rental_unit', array('rental_unit_id' => $rental_unit_id)))\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "public function destroy(Model $unit)\n {\n if ($unit->delete()) {\n return response()->json(null, 204);\n }\n\n return response()->json(null, 404);\n }", "public function destroy($id)\n {\n $unit = Unit::find($id);\n \n $unit->delete();\n Flashy::error('unité de facturation supprimée :)');\n return redirect()->back();\n }", "public function deleteByUuid($uuid);", "public function removeOption($id, $unit = 1) \n\t{\n\t\t$index = $this->indexOf($id);\n\n\t\tif ($index != -1)\n\t\t{\n\t\t\t$res = $this->options[$index]->remove($unit);\n\t\t\t\n\t\t\tif ($this->isEmpty())\n\t\t\t{\n\t\t\t\t$this->emptyOptions();\n\t\t\t}\n\n\t\t\treturn $res;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function destroy($id)\n {\n try{ \n $unit = Unit::findOrFail($id);\n }catch(\\Exception $e) { return response()->json(['error' => 'Resource not found','error code' => '404'], 404); } \n try{ \n $unit->delete();\n } catch (\\Exception $e) { return response()->json(['error' => 'Something went wrong. Could not delete unit','error code' => '500'], 500); } \n event(new UnitDestroyed($unit));\n return response()->json( [$unit, \"success\"=>\"unit deleted successfully\"]);\n }", "public function delete_storage_unit($path)\n {\n $storage_unit_name = self::parse_xml_file($path);\n \n $this->add_message(\n self::TYPE_NORMAL, \n Translation::getInstance()->getTranslation('StorageUnitRemoval', null, 'Chamilo\\Core\\Install') . ': <em>' .\n $storage_unit_name . '</em>');\n \n $data_manager = static::context() . '\\DataManager';\n \n if (! $data_manager::drop_storage_unit($storage_unit_name))\n {\n return $this->failed(\n Translation::getInstance()->getTranslation('StorageUnitRemovalFailed', null, 'Chamilo\\Core\\Install') .\n ': <em>' . $storage_unit_name . '</em>');\n }\n else\n {\n return true;\n }\n }", "public function destroy($id)\n {\n //\n $unit_delete = UnitsModel::find($id);\n $unit_delete->delete();\n return redirect()->back()->with('flash_message','Unit Deleted');\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->genDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $unit = $em->getRepository('MorusFasBundle:Unit')->find($id);\n\n if (!$unit) {\n throw $this->createNotFoundException('Unable to find Entity unit.');\n }\n\n $em->remove($unit);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('morus_fas_contacts'));\n }", "public function deleteUtente($idu, $password, $idadmin=''){\r\n if($idu != $idadmin && ($this->esisteUtenteConPassword($idu, $password)||$this->esisteAdmin($idadmin, $password))){\r\n $dir = $this->userFolder($idu);\r\n $files = $this->filepersonaliUtente($idu,$password, $idadmin);\r\n $query = ' DELETE FROM '.$this->tables['utentetable'] .\" WHERE nickname ='$idu'\"; \r\n if(self::$conn->query($query)){ \r\n foreach($files as $file){\r\n if($file !== ''){\r\n if(is_file($file))\r\n unlink($file);\r\n }\r\n }\r\n return rmdir($dir);\r\n }\r\n \r\n }\r\n return false;\r\n }", "public function delete($uuid, $webspaceKey);", "public function destroy($id)\n {\n $modeUnit = ModelUnit::find($id);\n $modeUnit->delete();\n return response()->json(['success' => true,'message' => 'Model Unit successfully deleted']);\n }", "public function deleteLocation (UnitTester $I){\n\n\t\t$I->wantTo('Delete a location');\n\n\t\t$em = $this->factory->getEntityManager();\n\n\t\t$provider = $this->factory->getProvider();\n\n\t\t$location = new GQL001_Location();\n\t\t$location->lat \t= 25;\n\t\t$location->long = 35;\n\t\t$location->name = 'here';\n\t\t$em->persist($location);\n\t\t$em->flush();\n\n\t\t$schema = $this->factory->getGraphQLSchema($provider);\n\n\t\t$locations = [[\n\t\t\t\"lat\" => 25,\n\t\t\t\"long\" => 35,\n\t\t]];\n\n\t\t$result = \\GraphQL\\GraphQL::execute(\n\t\t\t$schema,\n\t\t\t'mutation DeleteLocation($items: [Location__Input]){\n\t\t\t delete_Location(items: $items)\n\t\t\t}',\n\t\t\tnull,\n\t\t\tnew GraphContext(),\n\t\t\t['items' => $locations]\n\t\t);\n\n\t\t$provider->clearBuffers();\n\n\t\t$I->assertEquals(1, count($result));\n\n\t\t$I->assertEquals(true, $result[\"data\"][\"delete_Location\"]);\n\n\t}", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('IsssrCoreBundle:MeasureUnit')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find MeasureUnit entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('measureunit'));\n }", "function deleteFile($uuid) {\r\n $sql = '\r\n DELETE FROM\r\n files\r\n WHERE\r\n uuid = ?\r\n ';\r\n\r\n return $this->query_exec($sql, array($uuid));\r\n }", "public function delete($uID)\n {\n return $this->deleteAPI($uID);\n }" ]
[ "0.7085938", "0.6896868", "0.649073", "0.649073", "0.62929076", "0.628955", "0.6093409", "0.58637655", "0.5708013", "0.5668897", "0.5623707", "0.55843943", "0.5528981", "0.55042326", "0.5454892", "0.5412797", "0.540843", "0.5408144", "0.53901505", "0.5329272", "0.5252329", "0.52477646", "0.5247642", "0.5242026", "0.519341", "0.5184174", "0.5163047", "0.515136", "0.5095965", "0.50680655" ]
0.73394734
0
Creates a new LogPkl model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new LogPkl(); $userid = Yii::$app->user->identity->id; $mahasiswa = VwmahasiswaProdi::find() ->where(['user_id' => $userid]) ->one(); $pengajuanPkl = PengajuanPkl::find() ->where(['mhs_id' => $mahasiswa->mhsid, 'status_kegiatan' => 5]) ->one(); if ($model->load(Yii::$app->request->post())) { $model->pkl_id = $pengajuanPkl->id; $model->dosen_id = $pengajuanPkl->dosen_id; $model->tanggal = date('d-M-Y'); $model->created_at = date('d-M-Y'); $model->updated_at = date('d-M-Y'); if($model->ket == 0){ $model->kegiatan = ""; } if ($model->save()) { return $this->redirect(['/pkl/log-pkl']); } } return $this->renderAjax('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function create()\n {\n $dataLogs = new ModelLog();\n $dataLogs->created_by = Auth::user()->name;\n $dataLogs->user_level = Auth::user()->level;\n $dataLogs->user_ip = \\Request::ip();;\n $dataLogs->action = \"Mengakses halaman create pengguna milik tata usaha.\";\n $dataLogs->save();\n\n return view('users.create');\n }", "public function create()\n {\n //\n return view('logs.new');\n }", "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}", "public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }", "public function actionCreate()\n {\n $model = new User(['scenario' => User::SCENARIO_SAVE_USER]);\n $model->loadDefaultValues();\n $model->verified = true;\n $positions = new LogPosition();\n\n $roleForm = new RoleForm();\n $permission = Yii::$app->authManager->getPermissions();\n $permissions = $roleForm->getPermissions($permission);\n $rolePermissions = [];\n $registration = new LogRegistration();\n\n $salary = new LogSalary();\n\n $randomKey = \"ok\";\n $post = Yii::$app->request->post('User');\n $model->saveLog(Json::decode($post['log']));\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $newPermissions = Yii::$app->request->post('Permission');\n $roleForm->removePermission($permission, new AccessUserApplicant($model->id));\n $roleForm->savePermission($newPermissions, new AccessUserApplicant($model->id));\n $positions->saveLogPosition(Json::decode($post['log']), $model->id);\n $registration->saveLogRegistration(Json::decode($post['log']), $model->id);\n $salary->saveLogSalary(Json::decode($post['log']), $model->id);\n\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'randomKey' => $randomKey,\n 'model' => $model,\n 'permissions' => $permissions,\n 'rolePermissions' => $rolePermissions,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new DetailPkl();\n\n $userid = Yii::$app->user->identity->id;\n $mahasiswa = VwmahasiswaProdi::find()\n ->where(['user_id' => $userid])\n ->one();\n\n $listPkl = PengajuanPkl::find()\n ->where(['mhs_id' => $mahasiswa->mhsid])\n ->orderBy(['id' => SORT_DESC])\n ->one();\n\n $mitra = MitraPkl::find()\n ->where(['id' => $listPkl->mitra_id])\n ->one();\n\n if ($model->load(Yii::$app->request->post())) {\n $laporan = UploadedFile::getInstance($model, 'laporan');\n if (!is_null($laporan)) {\n $model->laporan = $laporan->name;\n // $ext = end((explode(\".\", $laporan->name)));\n // generate a unique file name to prevent duplicate filenames\n // $model->image_web_filename = Yii::$app->security->generateRandomString() . \".{$ext}\";\n // the path to save file, you can set an uploadPath\n // in Yii::$app->params (as used in example below) \n Yii::$app->params['uploadPath'] = Yii::$app->basePath . '/web/uploads/file-laporan/';\n $path = Yii::$app->params['uploadPath'] . $model->laporan;\n $laporan->saveAs($path);\n }\n $model->pkl_id = $listPkl->id;\n $model->dosen_id = $listPkl->dosen_id;\n $model->created_at = date('d-M-Y');\n $model->updated_at = date('d-M-Y');\n if ($model->save()) {\n return $this->redirect(['/pkl/detail-pkl']);\n } else {\n var_dump($model->getErrors());\n die();\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'userid' => $userid,\n 'mahasiswa' => $mahasiswa,\n 'listPkl' => $listPkl,\n 'mitra' => $mitra,\n ]);\n }", "public function create()\n {\n return view('complaint_logs.create');\n }", "public function actionCreate() {\n $model = new learnerscoring();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new ReportTrackingHistory();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->tbs_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Dict;\n\t\t$model->parent_id=0;\n if ($model->load(Yii::$app->request->post())) {\n \t$model->save(false);\n \tLuLu::info($model);\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n \t$locals=[];\n \t$locals['model']=$model;\n return $this->render('create', $locals);\n }\n }", "public function actionCreate()\n {\n if (!Yii::$app->user->can(\"lentEdc\"))\n throw new ForbiddenHttpException(\"ไม่มีสิทธิ์เข้าถึงข้อมูล\");\n\n $model = new LentSave();\n\n if ($model->load(Yii::$app->request->post())) {\n\n if ($model->save())\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new HasilKonsultasi();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_hasil_konsultasi]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Monitoring();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\r\n {\r\n $model = new Pelanggaran();\r\n $trans = Yii::$app->db->beginTransaction();\r\n\r\n if ($model->loadAll(Yii::$app->request->post()) && $model->save()) {\r\n $check = $this->checkDetailPoint($model, 'create');\r\n \r\n if( isset($check['failed']) ){\r\n $trans->rollBack();\r\n Yii::$app->session->setFlash('error', $check['failed'] );\r\n return $this->redirect(['index']);\r\n }\r\n\r\n $trans->commit();\r\n Yii::$app->session->setFlash('success','Pelanggaran berhasil ditambahkan.');\r\n return $this->redirect(['index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n $this->checkPrivilege();\n $model = new LabKit();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->save();\n $model->kalibrasi_selanjutnya = $this->setSchedule($model->id);\n $model->save();\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Menu();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->validate()){\n $model->save(false);\n return $this->redirect(['index']);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Keep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Loan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_CREATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=new RKInfoPasienLamaV;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['RKInfoPasienLamaV']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RKInfoPasienLamaV'];\n\t\t\tif($model->save()){\n Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('view','id'=>$model->pendaftaran_id));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function store(Request $request)\n\t{ \n\t\t$newlog = new NewLog;\n\t\t$newlog->incident_no = $request->incident_no;\n\t\t$newlog->start_date = $request->start_date;\n\t\t$newlog->customer_id = $request->customer_id;\n\t\t$newlog->caller_person = $request->caller_person;\n\t\t$newlog->hp_no = $request->hp_no;\n\t\t$newlog->office_no = $request->office_no;\n\t\t$newlog->extension_no = $request->extension_no;\n\t\t$newlog->email = $request->email;\n\t\t$newlog->total_downtime = $request->total_downtime;\n\t\t$newlog->status = $request->status;\n\t\t$newlog->save();\n\n\t\t\n\t\t// $newlog->description = $request->description;\n\t\t// $newlog->remarks = $request->remarks;\n\t\t// $newlog->file = $request->file;\n\t\t\n\n\t\t// $newlog->received_via = $request->received_via;\n\t\t// $newlog->customer_report_no = $request->customer_report_no;\n\t\t// $newlog->category_id = $request->category_id;\n\t\t// $newlog->problem_type = $request->problem_type;\n\t\t// $newlog->sla_code = $request->sla_code;\n\t\t// $newlog->severity = $request->severity;\n\t\t// $newlog->asset_sn = $request->asset_sn;\n\t\t// $newlog->vendor = $request->vendor;\n\t\t// $newlog->coordinator_name = $request->coordinator_name;\n\t\t// $newlog->coordinator_hp_no = $request->coordinator_hp_no;\n\t\t// $newlog->coordinator_team = $request->coordinator_team;\n\t\t\n\n\t\t// dd($newlog);\n\t\treturn redirect()->route('newlog.index')->withStatus('New Log has been created.');\n\n\t}", "public function create()\n\t{\n\t\t$customers = Customer::all();\n\t\t$categorys = Category::all();\n\t\treturn view('newlog.create', compact('customers', 'categorys'));\n\t}", "public function create()\n {\n $data = array();\n $data['title'] = $_POST['title'];\n $data['content'] = $_POST['content'];\n $data['time'] = $_POST['time'];\n \n $this->model->create($data);\n header('location:'. URL .'index');\n }", "public function actionCreate()\n {\n $model = new Motor();\n $user = Yii::$app->user->identity->username;\n\n\n if ($model->load(Yii::$app->request->post())) {\n try{\n if($model->save()){\n\n $id_motor = $model->id;\n $no_totok = $model->no_totok;\n $no_mesin = $model->no_mesin;\n $no_rangka= $model->no_rangka;\n\n Yii::$app->db->createCommand('insert into logs (date, logs) VALUES (now(),\"Insert data motor id : '.$id_motor.' - No Mesin : '.$no_mesin.' - No Rangka : '.$no_rangka.' - No Totok : '.$no_totok.'// oleh user : '.$user.'\")')\n ->execute();\n\n Yii::$app->getSession()->setFlash(\n 'success','Data Motor Tersimpan!'\n );\n return $this->redirect(['index']);\n }\n }catch(Exception $e){\n Yii::$app->getSession()->setFlash(\n 'error',\"{$e->getMessage()}\"\n );\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Lahan();\n\n if($model->load(Yii::$app->request->post())){\n $request = Yii::$app->request;\n if(empty($request->post('Lahan')['keldes'])) {\n if(empty($request->post('Lahan')['kec'])) {\n if(empty($request->post('Lahan')['kotakab'])) {\n $model->lokasi_kode = $request->post('Lahan')['provinsi'];\n } else {\n $model->lokasi_kode = $request->post('Lahan')['kotakab'];\n }\n } else {\n $model->lokasi_kode = $request->post('Lahan')['kec'];\n }\n if($model->save(false)){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n $model->lokasi_kode = $request->post('Lahan')['keldes'];\n if($model->save(false)){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // } else {\n // return $this->render('create', [\n // 'model' => $model,\n // ]);\n // }\n }", "public function create()\n {\n $logbook = \\App\\Logbook::all();\n return view('logbook.create', ['logbook' => $logbook]);\n }", "public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new TabelleRelease();\n\n if ($model->loadAll(Yii::$app->request->post())) {\n if ($model->saveAll()) {\n\n return $this->redirect(['update', 'id' => $model->id, 'mySuccess' => 2]);\n } else {\n $this->success = -1; // -1->insert Fehler\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Takwim();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n \n return view('admin.order_logs.create' );\n \n }" ]
[ "0.6857263", "0.6841778", "0.6650982", "0.66447765", "0.66156346", "0.6602533", "0.6598433", "0.65253925", "0.6505117", "0.6487889", "0.6486056", "0.647765", "0.64693284", "0.6427178", "0.6424983", "0.64090306", "0.6407488", "0.640692", "0.640664", "0.64041513", "0.6381112", "0.63599044", "0.635562", "0.6347199", "0.6341705", "0.6328846", "0.6327044", "0.63252515", "0.6322507", "0.6319801" ]
0.79588866
0
Deletes an existing LogPkl model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['/pkl/log-pkl']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete()\n{\n\t$model = $this->getModel('logs');\n\t$read = $model->delete();\n\t$this->view_logs();\n}", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n DmquerylogController::actionCreateLog('DELETE',get_class($model),$model->oldAttributes,null);\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "public function delete() {\r\n\t\tSmsirLogs::where('id',Route::current()->parameters['log'])->delete();\r\n\t\t// return the user back to sms-admin after delete the log\r\n\t\treturn back();\r\n\t}", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }", "public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}", "public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }", "public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }", "function submitDeleteLogistik()\n\t{\n\t\t$execQueryDelete = $this->Kesehatan_M->delete('logistik',array('id'=>$this->input->post('id')));\n\t\tif ($execQueryDelete) {\n\t\t\talert('alert','success','Berhasil','Data berhasil dihapus');\n\t\t\tredirect(\"Dokter/logistik\");\n\t\t}else{\n\t\t\tvar_dump($execQueryDelete);\n\t\t}\n\t}", "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "public function actionDelete($id)\n\t{\n\t\ttry{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t$this->loadModel($id)->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\t\telse{\n $model = $this->loadModel($id);\n \n $project = $model->pbacklogs[0]->project;\n \n $model->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(array('project/productbacklog/'.$project->id));\t\t\n\t\t}\n\t\t}catch(Exception $e){\n throw new CHttpException(\"de sistema \", $e -> getMessage());\n\t\t\t\n\t\t}\n\t}", "public function delete()\n {\n auth_admin();\n $this->load->model(getAdminFolder() . '/module_model', 'Module_model');\n if ($this->input->post('id') != \"\" && ctype_digit($this->input->post('id')) && $this->input->post('id') > 0) {\n if (auth_access_validation(adm_sess_usergroupid(), $this->ctrl)) {\n\n $this->Module_model->DeleteModule($this->input->post('id'));\n\n #insert to log\n $log_last_user_id = $this->input->post('id');\n $log_id_user = adm_sess_userid();\n $log_id_group = adm_sess_usergroupid();\n $log_action = 'Delete ' . $this->title . ' ID : ' . $log_last_user_id;\n $log_desc = 'Delete ' . $this->title . ' ID : ' . $log_last_user_id . ';';\n $data_log = array(\n 'id_user' => $log_id_user,\n 'id_group' => $log_id_group,\n 'action' => $log_action,\n 'desc' => $log_desc,\n 'create_date' => date('Y-m-d H:i:s'),\n );\n insert_to_log($data_log);\n $this->session->set_flashdata('success_msg', $this->title . ' (s) has been deleted.');\n } else {\n $this->session->set_flashdata('error_msg', 'You can\\'t manage this content.<br/>');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'Delete failed. Please try again.');\n }\n }", "public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }", "public function delete_record()\n {\n $id = $this->input->get('tpid');\n\n $result = $this->PumpModel->delete_data(array('tpid'=>$id));\n // print_r($result);die;\n redirect(base_url(). 'Pump');\n }", "public function clearlogAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n $bizlogModel = new Core_Model_Bizlog;\n $bizlogModel->deleteAllEntries();\n $this->_helper->FlashMessenger('Cleared log');\n $this->_helper->redirector('viewlog', 'status', 'admin');\n }", "public function actionDelete($id)\n { \n $connection = \\Yii::$app->db;\n $transaction = $connection->beginTransaction();\n \n try {\n $model = $this->findModel($id);\n \n $this->deshacer_renglones($model);\n\n $model->delete();\n \n $transaction->commit();\n \n return $this->redirect(['index']);\n\n }\n catch (\\Exception $e) {\n $transaction->rollBack();\n throw $e;\n }\n\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n //$id = $model->id;\n $user = Yii::$app->user->identity->username;\n\n Yii::$app->db->createCommand('insert into logs (date, logs) VALUES (now(),\"Delete data Motor id : '.$id.' // oleh user : '.$user.'\")')\n ->execute();\n\n Yii::$app->session->setFlash('success',Yii::t('app', 'Data Motor Dihapus!'));\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}", "public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\tif ($model) {\n\t\t\t$model->delete();\n\t\t}\n\n // if AJAX request (triggered by deletion via list grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}", "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\tif (!($model = $this->loadModel()))\n\t\t\t\treturn;\n\t\t\t$model->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function delete()\n {\n if(!$GLOBALS['discountlevel_permission']['delete'] || !$this->input->post('id')){\n access_denied('discountlevel');\n }\n\n $response = $this->Discountlevel_model->delete($this->input->post('id'));\n if ($response==1) {\n\n $this->db->where('discountnr', $this->input->post('id'));\n $this->db->delete('tblfields');\n\n //History\n $Action_data = array('actionname'=>'discountlevel', 'actionid'=>$this->input->post('id'), 'actiontitle'=>'discountlevel_deleted');\n do_action_history($Action_data);\n\n set_alert('success', sprintf(lang('deleted_successfully'),lang('page_discountlevel')));\n }else{\n set_alert('danger', $response);\n }\n redirect(site_url('admin/discountlevels/'));\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['/pkl/detail-pkl']);\n }", "public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $model=$this->findModel($id);\n\t\t$id_operacion=$model->id_operacion;\n\t\t$model->delete();\n\t\t\n\t\treturn $this->redirect(['index', 'id_operacion' => $id_operacion]);\n //return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n\t\tif(Yii::app()->request->isPostRequest) {\n\t\t\t// we only allow deletion via POST request\n\t\t\t$model = $this->loadModel($id);\n\t\t\t$parent = $model->logSessionId;\n\t\t\t$model->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('logSession/admin', 'id'=>$parent));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}" ]
[ "0.76851547", "0.67495227", "0.674824", "0.67458814", "0.6696161", "0.66630435", "0.6627048", "0.6551267", "0.65030164", "0.65015775", "0.6497893", "0.6497665", "0.6473072", "0.64655614", "0.64562935", "0.6437963", "0.64284647", "0.6423541", "0.6398923", "0.639781", "0.6393746", "0.63904524", "0.63857555", "0.6379392", "0.6375563", "0.6370505", "0.6364042", "0.63151467", "0.63014704", "0.62952334" ]
0.6999137
1
Finds the LogPkl model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = LogPkl::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findModel($clz, $key);", "public abstract function find($primary_key, $model);", "protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }", "protected function findModel($id)\r\n {\r\n if (($model = Log::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "public function loadModel($id)\n\t{\n\t\t$model=CActiveRecord::model($this->logModelClass)->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($masterlist_id)\n\t{\n\t\tif (($model = WiMasterlist::findOne($masterlist_id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id)\n\t{\n\t\t$model=Log::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n if (($model = learnerscoring::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = WheelLog::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = DetailPkl::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "protected function findModel($id)\n\t{\n if (($model = UserLevel::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}", "protected function findModel($id) {\n\t\tif (($model = Menu::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t}\n\t\t\n\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t}", "protected function findModel($id)\n {\n if (($model = FwActionLogFilter::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('common','data_not_exist'));\n }\n }", "protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }", "protected function findModel($id)\n {\n if (($model = LabKit::findOne($id)) != null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = StoreKasir::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Cluster::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=eBayTargetAndTrack::model()->findByPk($id, \"company_id=:company_id\" ,array(':company_id' => Yii::app()->session['user']->company_id));\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Offer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }", "public function loadModel($id)\r\n\t{\r\n\t\t$model=Klient::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}", "public function loadModel($id)\r\n\t{\r\n\t\t$model=StudentDocument::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,Yii::t('app','The requested page does not exist.'));\r\n\t\treturn $model;\r\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=RequestFuel::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('rdt','The requested page does not exist.'));\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Picture::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, \\Yii::t('The requested object does not exist or has been already deleted.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = Klien::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n$model = Reports::findOne($id);\n\t\tif ((isset(Yii::$app->params['ADMIN_CLIENT_ID']) and Yii::$app->user->identity->clientID == Yii::$app->params['ADMIN_CLIENT_ID']))\n\t\t{\n return $model;\n }\n\t\telse\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t\n }", "public function loadModel($id)\r\n\t{\r\n\t\t$model=ApplyLeaves::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,Yii::t('app','The requested page does not exist.'));\r\n\t\treturn $model;\r\n\t}", "protected function findModel($id)\n {\n\t\t$p = $this->primaryModel;\n if (($model = $p::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }" ]
[ "0.6454546", "0.64218587", "0.63987625", "0.63968134", "0.63840854", "0.63473517", "0.6216995", "0.6200103", "0.61439395", "0.6121743", "0.6101379", "0.608748", "0.6060022", "0.59746665", "0.59419644", "0.59044814", "0.5895726", "0.5892916", "0.58905226", "0.58893365", "0.5880283", "0.5865076", "0.5862116", "0.58583", "0.58565927", "0.58546567", "0.58466214", "0.58455926", "0.58437634", "0.58424824" ]
0.6956515
0
Given an array containing integer and string representations of multiple grades with domains, this generates an array of Grade entities
public function bulkCreate(array $gradesWithDomains) { //use the domain order to create an array of Grade entities $grades = []; foreach ($gradesWithDomains as $gradeDomains) { $level = array_shift($gradeDomains); $gradeLevel = $this->gradeLevelFactory->create($level); $domains = $this->domainFactory->bulkCreate($gradeDomains); $grades[] = $this->create($gradeLevel, $domains); } return $grades; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseWebserviceGrades(array $grades)\n {\n $data = [];\n foreach ($grades as $nodes) {\n foreach ($nodes as $node) {\n foreach ($node as $grade) {\n $data[] = [\n 'grade_id' => $grade['gradeId'],\n 'grade_code' => $grade['gradeCode'],\n 'grade_name' => $grade['grade'],\n ];\n }\n }\n }\n return $data;\n }", "function addGrades($grades) {\n $columns = implode(\", \", array_keys($grades[0]));\n\n foreach ($grades as $row) {\n $voter_id = $row[\"voter_id\"];\n $user_id = $row[\"user_id\"];\n $competence_id = $row[\"competence_id\"];\n $grade = $row[\"grade\"];\n $valuesArr[] = \"('$voter_id', '$user_id', '$competence_id', '$grade')\";\n }\n\n $values = implode(\", \", $valuesArr);\n $sql = \"INSERT INTO `grades`($columns) VALUES $values\";\n\n $this->executeQuery($sql);\n }", "public static function gradingStudents ($grades) {\n\n\t\t/**\n * @var int[] $newGrade array temporary hold the new grade\n * @var int[] $roundedGrades array have the new grade\n */\n\n\t $roundedGrades = [];\n\n \tfor ($i = 0; $i < count($grades); $i++) {\n\n \tif ($grades[$i] % 5 > 2 && $grades[$i] > 37 && $grades[$i] <= 100) {\n\n \t$newGrade = $grades[$i] + (5 - ($grades[$i] % 5));\n \t} \t\n\n \telse {\n\n \t$newGrade = $grades[$i]; \n \t}\n\n \t//Push the element of $newGrade to $roundedGrades\n \tarray_push($roundedGrades, $newGrade);\n \t}\n\n \treturn $roundedGrades;\n }", "function scorm_get_grade_method_array(){\n return array (GRADESCOES => get_string('gradescoes', 'scorm'),\n GRADEHIGHEST => get_string('gradehighest', 'scorm'),\n GRADEAVERAGE => get_string('gradeaverage', 'scorm'),\n GRADESUM => get_string('gradesum', 'scorm'));\n}", "function addGrade($grades) {\n\n $columns = implode(\", \", array_keys($grades));\n $escaped_values = array_map($this->db->prepare, array_values($grades));\n $values = implode(\", \", $escaped_values);\n $sql = \"INSERT INTO `grades`($columns) VALUES ($values)\";\n\n $this->executeQuery($sql);\n }", "public function setGrade($arr)\n\t{\n\t}", "function gradingStudents($grades)\n{\n $revisedScores = [];\n for ($i = 0; $i < count($grades); $i++) {\n $remainder = $grades[$i] % 5;\n if ($grades[$i] < 38 || $remainder <= 2) {\n $revisedScores[$i] = $grades[$i];\n } else {\n $revisedScores[$i] = $grades[$i] + (5 - $remainder);\n }\n }\n return $revisedScores;\n\n}", "function scorm_get_what_grade_array(){\n return array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'),\n AVERAGEATTEMPT => get_string('averageattempt', 'scorm'),\n FIRSTATTEMPT => get_string('firstattempt', 'scorm'),\n LASTATTEMPT => get_string('lastattempt', 'scorm'));\n}", "function __construct($pString, $pMinGrade, $pMaxGrade) {\n $this->grdgp_minGrade = $pMinGrade;\n $this->grdgp_maxGrade = $pMaxGrade;\n $this->grdgp_grade_descShort = array ('0','1','2','3','4','5','6','7','8','9','10','11','12','A');\n $this->grdgp_grade_descLong = array ('0K','1st','2nd','3rd','4th','5th','6th','7th','8th','9th','10th','11th','12th','Adult');\n $this->grdgp_grade_count = count($this->grdgp_grade_descLong);\n $this->grdgp_grade_isGroupEnd = array(14);\n $this->grdgp_convertFromString($pString, $pMinGrade, $pMaxGrade);\n}", "protected /*array<int, int>*/ function getGrades(/*int*/ $aid)\n\t{\n\t\t$query = $this->db->prepare(\"\n\t\t\tSELECT * FROM `grades` WHERE `assignmentid` = :aid;\n\t\t\")->execute(array(\n\t\t\t':aid' => $aid\n\t\t));\n\n\t\t$grades = array();\n\n\t\tforeach($query as $row)\n\t\t\t$grades[$row['studentid']] = $row['grade'];\n\n\t\treturn $grades;\n\t}", "public function toEntity($array);", "public function toEntity($array);", "public function getAllGpa() {\n $academicYears = StudentRegisterCourse::query()\n ->where('student_id', $this->id)\n ->select('academic_year_id')\n ->distinct('academic_year_id')\n ->pluck('academic_year_id')\n ->toArray();\n foreach ($academicYears as $item) {\n $terms = StudentRegisterCourse::query()\n ->where('student_id', $this->id)\n ->where('academic_year_id', $item)\n ->select('term_id')\n ->distinct('term_id')\n ->pluck('term_id')\n ->toArray();\n foreach ($terms as $term) {\n $gpaCalculator = new GpaCalculator($this, $item, $term);\n $gpa = $gpaCalculator->getGPA();\n $this->storeGpa($this->id, $item, $term, $gpa);\n }\n }\n }", "public static function getGradesEN($withKeys=false)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\t\t\t$statement = $connection->prepare(\"SELECT id,name_en as name,age FROM scholar_level\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->execute();\n\n\t\t\t$content = [];\n\n\t\t\twhile ($row = $statement->fetch()) {\n\t\t\t\tif($withKeys)\n\t\t\t\t{\n\t\t\t\t\t$content[$row[\"id\"]] = $row;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content[] = $row;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "public function getArrPessoaJuridica($entity, $arrEntities)\n {\n $arrData = array();\n $arrData['pessoa'] = array(\n 'sqPessoa' => $entity->getSqPessoa() ? : null,\n 'sqPessoaSgdoce' => $arrEntities[1]->getSqPessoaSgdoce(),\n 'nuCnpj' => \\Zend_Filter::filterStatic($arrEntities[1]->getNuCnpj(), 'Digits'),\n 'sqNaturezaJuridica' => $arrEntities[1]->getSqNaturezaJuridica(),\n 'noPessoa' => $arrEntities[1]->getNoPessoa(),\n 'noFantasia' => $arrEntities[1]->getNoFantasia(),\n 'sqTipoPessoa' => $arrEntities[1]->getSqTipoPessoa(),\n 'stRegistroAtivo' => true\n );\n\n $arrData['documento'] = array(\n 'sqDocumento' => $arrEntities[1]->getSqDocumento(),\n 'sqAtributoTipoDocumento' => $arrEntities[1]->getSqAtributoTipoDocumento(),\n 'txValor' => $arrEntities[1]->getTxValor(),\n );\n\n foreach($arrData as $key => $value) {\n $arrData[$key] = array_filter($value);\n }\n\n if(isset($arrData['pessoa']['sqPessoaSgdoce']) && $arrData['pessoa']['sqPessoaSgdoce']) {\n $this->sqPessoaSgdoce = $arrData['pessoa']['sqPessoaSgdoce'];\n }\n\n return $arrData;\n }", "protected /*array<int, int>*/ function getAllGrades($studentid) {\n\t\t$query = $this->db->prepare(\"SELECT * FROM `grades` WHERE `studentid` = ?;\")->execute([$studentid]);\n\t\t$grades = array();\n\n\t\tforeach ($query as $row) {\n\t\t\t$grades[(int) $row['assignmentid']] = (int) $row['grade'];\n\t\t}\n\n\t\treturn $grades;\n\t}", "public function getGradeAttribute()\n {\n if (is_null($this->scores)) {\n return;\n } \n\n return [];\n }", "public function toArray()\n {\n $parentArr = parent::toArray();\n $parentArr['gradesList'] = SchoolGrade::getGradesList($parentArr['id']);\n return $parentArr;\n }", "function ychange_get_class_grade_options($flip = false)\n{\n $options = [];\n\n foreach ( range(1, 12) as $grade )\n {\n $options[$grade] = $grade;\n }\n\n $options['other'] = elgg_echo('ychange:class_grade:other');\n\n return $flip ? array_flip($options) : $options;\n}", "function grdgp_convertFromString($pString, $pMinGrade, $pMaxGrade) {\n if ($pString=='') {\n $this->grdgp_setDefaults();\n }\n else {\n for ($i = 0; $i < $this->grdgp_grade_count; $i++)\n $this->grdgp_grade_isGroupEnd [$i] = FALSE;\n $ar = explode('~',$pString);\n for ($i = 0; $i < count($ar); $i++) {\n $j = $ar[$i];\n if ( ($j >= 0) and ($j < $this->grdgp_grade_count) )\n $this->grdgp_grade_isGroupEnd [$j] = TRUE;\n }\n }\n $this->grdgp_refresh();\n}", "public function encode (array $arr);", "public function dataProviderForRange(): array\n {\n return [\n [ [ 1, 1, 1 ], 0 ],\n [ [ 1, 1, 2 ], 1 ],\n [ [ 1, 2, 1 ], 1 ],\n [ [ 8, 4, 3 ], 5 ],\n [ [ 9, 7, 8 ], 2 ],\n [ [ 13, 18, 13, 14, 13, 16, 14, 21, 13 ], 8 ],\n [ [ 1, 2, 4, 7 ], 6 ],\n [ [ 8, 9, 10, 10, 10, 11, 11, 11, 12, 13 ], 5 ],\n [ [ 6, 7, 8, 10, 12, 14, 14, 15, 16, 20 ], 14 ],\n [ [ 9, 10, 11, 13, 15, 17, 17, 18, 19, 23 ], 14 ],\n [ [ 12, 14, 16, 20, 24, 28, 28, 30, 32, 40 ], 28 ],\n ];\n }", "public function getGrads()\n {\n return $this->hasMany(Grade::className(), ['gradId' => 'GradId'])->viaTable('mitgliedergrade', ['MitgliedId' => 'MitgliederId']);\n }", "public function create(GradeLevel $gradeLevel, array $domains) {\n return new Grade($gradeLevel, $domains);\n }", "public function generateData($chromosome, $scheme)\n {\n $data = [];\n $schemeIndex = 0;\n $chromosomeIndex = 0;\n $groupId = null;\n\n while ($chromosomeIndex < count($chromosome)) {\n while ($scheme[$schemeIndex][0] == 'G') {\n $groupId = substr($scheme[$schemeIndex], 1);\n $schemeIndex += 1;\n }\n\n $courseId = $scheme[$schemeIndex];\n\n $class = CollegeClassModel::find($groupId);\n $course = CourseModel::find($courseId);\n\n $timeslotGene = $chromosome[$chromosomeIndex];\n $roomGene = $chromosome[$chromosomeIndex + 1];\n $professorGene = $chromosome[$chromosomeIndex + 2];\n\n $matches = [];\n preg_match('/D(\\d*)T(\\d*)/', $timeslotGene, $matches);\n\n $dayId = $matches[1];\n $timeslotId = $matches[2];\n\n $day = DayModel::find($dayId);\n $timeslot = TimeslotModel::find($timeslotId);\n $professor = ProfessorModel::find($professorGene);\n $room = RoomModel::find($roomGene);\n\n if (!isset($data[$groupId])) {\n $data[$groupId] = [];\n }\n\n if (!isset($data[$groupId][$day->name])) {\n $data[$groupId][$day->name] = [];\n }\n\n if (!isset($data[$groupId][$day->name][$timeslot->time])) {\n $data[$groupId][$day->name][$timeslot->time] = [];\n }\n\n $data[$groupId][$day->name][$timeslot->time]['course_code'] = $course->course_code;\n $data[$groupId][$day->name][$timeslot->time]['course_name'] = $course->name;\n $data[$groupId][$day->name][$timeslot->time]['room'] = $room->name;\n $data[$groupId][$day->name][$timeslot->time]['professor'] = $professor->name;\n\n $schemeIndex++;\n $chromosomeIndex += 3;\n }\n\n return $data;\n }", "public static function encode($array);", "function getIngredientes($arr){\n\treturn array_map(function($val){return getIngrediente($val);}, $arr);\n}", "public function generateInList(array $array);", "function convert_array($in_array, $start_pos)\n{\n\t$string1 = \"\";\n\t$string2 = \"\";\n\t$total = count($in_array);\n\twhile ($start_pos < $total)\n\t{\n\t\t$string1 = $string1 . \"`\" . $in_array[$start_pos] . \"`\";\n\t\t$start_pos++;\n\t\t$string2 = $string2 . \"\\\"\" . $in_array[$start_pos] . \"\\\"\";\n\t\t$start_pos++;\n\t\tif ($start_pos < $total)\n\t\t{\n\t\t\t$string1 = $string1 . \", \";\n\t\t\t$string2 = $string2 . \", \";\n\t\t}\n\t}\n\tif ($start_pos == 2)\n\t{\t$return_string = \"(clanid, \" . $string1 . \") values (0, \" . $string2 . \")\";\t}\n\telse\n\t{\t$return_string = \"(\" . $string1 . \") values (\" . $string2 . \")\";\t}\n\treturn $return_string;\n}", "public function getDaysFromRanges($arr){\n \t$days = array();\n \t$days[] = $arr[0];\n \t$days[] = $arr[count($arr) - 1];\n \t\n \treturn $days;\n }" ]
[ "0.54252994", "0.5403875", "0.5341515", "0.5303806", "0.5074065", "0.5047093", "0.50220466", "0.4949574", "0.48470283", "0.48435137", "0.48395643", "0.48395643", "0.47658765", "0.47445765", "0.4744361", "0.47361454", "0.46929732", "0.46854874", "0.46631753", "0.46454844", "0.46231923", "0.46039623", "0.46027547", "0.45855644", "0.45794386", "0.45293933", "0.45214668", "0.45058396", "0.44625187", "0.44587305" ]
0.64144474
0
Sets the HTTP authentication $credential, in the form of username:password.
public function setAuthentication($credential);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCredential($credential);", "public function setCredential($credential)\n {\n $this->_credential = $credential;\n return $this;\n }", "public function setCredential($credential)\n {\n $this->_credential = $credential;\n return $this;\n }", "public function setCredential($credential)\n {\n $this->_credential = $credential;\n return $this;\n }", "public function setAuth($username, $password);", "public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }", "public function setCredentials($username, $password) {\n assert('is_string($username) && is_string($password); // username & password need to be strings');\n $this->credentials = \"{$username}:{$password}\";\n }", "function setCredentials( $username, $password )\r\n\t{\r\n\t\t$hdrvalue = base64_encode( \"$username:$password\" );\r\n\t\t$this->addHeader( \"Authorization\", \"Basic $hdrvalue\" );\r\n\t}", "function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "public function setAuth($username, $password = null)\n {\n if ($username) {\n $this->optionManager->set(['HTTPAUTH' => CURLAUTH_BASIC, 'USERPWD', (string) $username . ':' . (string) $password]); \n }\n \n return $this;\n }", "public function setHttpAuth(string $userName, string $password)\n {\n $this->httpAuth = array(\n 'username' => $userName,\n 'password' => $password,\n );\n }", "public function setCredentials($v)\n { return $this->set('credentials', $v); }", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "public function setAuth($username, $password)\n {\n $this->username = $username;\n $this->auth = 'Basic '.base64_encode($username.':'.$password);\n }", "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "public function setCredentialsObject ($credentials) {\n $this->credentials = $credentials;\n }", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "function setHttpAuth($user_name, $password) {\n $this->setHttpAuthUserName($user_name);\n $this->setHttpAuthPassword($password);\n return $this;\n }", "function setHttpAuth($user_name, $password) {\n $this->setHttpAuthUserName($user_name);\n $this->setHttpAuthPassword($password);\n return $this;\n }", "function set_auth_basic($username, $password)\n {\n \\Mutex::lock($this->mutex);\n $this->auth_basic_user = $username;\n $this->auth_basic_pass = $password;\n \\Mutex::unlock($this->mutex);\n }", "public function setCredentials(array $credentials);", "public function setUserCredentials(UserCredential $userCredentials)\n {\n $this->userCredentials = $userCredentials;\n }", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n $this->token = '';\n $this->accessToken = '';\n return $this;\n }", "public function setAuthenticationDetails($username, $password, $hostname = null)\n {\n $this->username = $username;\n $this->password = $password;\n\n if (!empty($hostname)) {\n $this->hostName = $hostname;\n }\n\n return $this;\n }", "public static function setAuth(&$ch, $auth)\n {\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\n }", "public function authenticate(ICredential $credential);", "function set_object_credentials($credentials) {\n\t\t$this->host = \t$credentials['host'];\n\t\t$this->port = \t$credentials['port'];\n\t\t$this->dbName = $credentials['dbname'];\n\t\t$this->user = \t$credentials['user'];\n\t\t$this->passwd = $credentials['password'];\n\t}", "public function setAuthentication ($username, $password)\n {\n if (StringUtilities::isNullOrEmpty($username) || StringUtilities::isNullOrEmpty($password))\n {\n throw new \\InvalidArgumentException(\"Both the username and password must be non-empty strings.\");\n }\n\n curl_setopt_array($this->cURL, [\n CURLOPT_HTTPAUTH => CURLAUTH_BASIC,\n CURLOPT_USERPWD => $username . \":\" . $password\n ]);\n }", "public function setPasswordCredentials($val)\n {\n $this->_propDict[\"passwordCredentials\"] = $val;\n return $this;\n }" ]
[ "0.7973011", "0.72355384", "0.72355384", "0.72355384", "0.6506898", "0.64561266", "0.64108855", "0.63516146", "0.6322104", "0.621005", "0.61934984", "0.617948", "0.61693", "0.6156568", "0.60313624", "0.6028672", "0.60140187", "0.5978539", "0.5934487", "0.5934487", "0.5910918", "0.5908026", "0.58718234", "0.58689684", "0.5860629", "0.58494675", "0.58367205", "0.5833722", "0.57782835", "0.57482374" ]
0.83329886
0
Executes a generic HTTP request with the given protocol $method at the specified $location.
public function execute($method, $location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function request($method, $uri, $options);", "abstract protected function request($method, $server, $path, $query = NULL, array $headers = array());", "public function request(\r\n $method,\r\n $uri,\r\n array $headers = [],\r\n $body = null,\r\n $protocolVersion = '1.1'\r\n );", "function http_request_method_register($method) {}", "public function request($method, $endpoint = '', $query=[], $body='');", "public function requestMethod($method = 'POST', $redirect = ROOT)\n {\n if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') !== $method) {\n $this->redirect($redirect);\n }\n }", "public function request($method, $uri, array $options = []);", "public function request($method, $url, array $body = [], array $headers = [], $version = '1.1');", "abstract protected function httpQuery(\n RequestMethodEnum $_method,\n string $_url,\n array $_params = [],\n array $_extra_options = []\n ): HttpResponse;", "public static function http_request($method, $route, $post_data = array())\n {\n $request = \\Router::route($method, $route);\n \n $post_data[\\Session::csrf_token] = \\Session::token();\n\n \\Request::setMethod($method);\n \n \\Request::foundation()->request->add($post_data);\n\n if(!empty($request))\n {\n return $request->call();\n }\n }", "public function sendRequest($method, $params = '');", "function http_request($method, $url = null, $body = null, ?array $options = null, ?array &$info = null) {}", "private function doRequestCurl($request, $location, $action, $version) {\n\t\t$curl = curl_init($location);\n\t\tif ($curl === false) {\n\t\t\tthrow new ServerException(ServerException::CURL_CONNECTION_FAILED);\n\t\t}\n\t\t$headers = array(\n\t\t\t'Content-Type: text/xml; charset=utf-8',\n\t\t\t'SOAPAction: \"' . $action . '\"',\n\t\t\t'Content-Length: ' . strlen($request),\n\t\t);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, false);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, $headers);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->curlVerifySslPeer);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $this->curlVerifySslPeer ? 2 : 0);\n\t\tcurl_setopt($curl, CURLINFO_HEADER_OUT, true);\n\t\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->connectionTimeout);\n\t\tcurl_setopt($curl, CURLOPT_TIMEOUT, $this->responseTimeout);\n\t\tcurl_setopt(\n\t\t\t$curl, CURLOPT_HTTPHEADER, array(\n\t\t\t\tsprintf('Content-Type: %s', $version == 2 ? 'application/soap+xml' : 'text/xml'),\n\t\t\t\tsprintf('SOAPAction: %s', $action)\n\t\t\t)\n\t\t);\n\n\t\t$response = curl_exec($curl);\n\t\t$this->lastRequestHeaders = curl_getinfo($curl, CURLINFO_HEADER_OUT);\n\n\t\tif (curl_errno($curl)) {\n\t\t\t$errorMessage = curl_error($curl);\n\t\t\t$errorNumber = curl_errno($curl);\n\t\t\tcurl_close($curl);\n\t\t\tthrow new ServerException(ServerException::CURL_EXCEPTION, $errorNumber . ':' . $errorMessage);\n\t\t}\n\n\t\t$headerLength = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$body = trim(substr($response, $headerLength));\n\t\t$this->lastResponseHeaders = substr($response, 0, $headerLength);\n\t\tcurl_close($curl);\n\t\treturn $body;\n\t}", "function request($httpMethod, $service, $apiMethod, array $parameters = array(), array $options = array());", "public function route(string $requestUri, string $requestMethod);", "function execute_request($http_request_method, $url, $data = null, $number_redirects = 0)\n\t{\n\t\t$this->oauth_nonce = md5(str_shuffle($this->auth_secret) . time() . rand());\n\t\t$this->oauth_timestamp = time();\n\t\t$this->oauth_signature = null;\n\n\t\t$this->__url_encoded_data = null;\n\t\t$this->__request_http_method = strtoupper($http_request_method);\n\n\t\tif ($this->auth_http_method == SPOAuthClient::HTTP_AUTH_POST)\n\t\t{\n\t\t\t//! if the auth http method has been set to POST convert a GET request to a POST request\n\t\t\tif ($http_request_method == SPConstants::HTTP_METHOD_GET)\n\t\t\t{\n\t\t\t\t$http_request_method = SPConstants::HTTP_METHOD_POST;\n\t\t\t}\n\t\t\telse if ($http_request_method == SPConstants::HTTP_METHOD_POST && $data)\n\t\t\t{\n\t\t\t\t//! if request is post and auth method is post assume data is provided for url encoded form content type\n\t\t\t\t$this->__url_encoded_data = is_string($data) ? SPUtils::parse_query($data) : $data;\n\t\t\t\t//! convert data to url encoded string before passing it to the base execute_request\n\t\t\t\t$data = SPUtils::join_key_values_assoc(\"=\", \"&\", SPUtils::array_map_assoc($this->__encoding_callback, $data));\n\t\t\t}\n\t\t}\n\n\t\treturn parent::execute_request($http_request_method, $url, $data, $number_redirects);\n\t}", "public static function request(string $method, string $url, array $headers = [], string $body = null): RequestInterface;", "private function doRequest($method, $url, $data = array()){\n\t\n\t\t// send request to this URL\n\t\tcurl_setopt($this->ch, CURLOPT_URL, $url);\n\t\t\n\t\t// are we coming off of previous page?\n\t\tif(!empty($this->lastUrl)) curl_setopt($this->ch, CURLOPT_REFERER, $this->lastUrl);\n\t\t\n\t\t// is this a POST request?\n\t\tif($method == 'POST'){\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);\n\t\t} else {\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, false);\n\t\t\t\n\t\t\t// append get fields as query string\n\t\t\tif($data){\n\t\t\t\n\t\t\t\t$query = http_build_query($data, '', '&');\n\t\t\t\t$parts = parse_url($url);\n\t\t\t\t\n\t\t\t\t// construct new URL...\n\t\t\t\tif(!isset($parts['path'])){\n\t\t\t\t\t$url = $url.'/?'.$query;\n\t\t\t\t} else if(isset($parts['query'])){\n\t\t\t\t\t$url = $url.'&'.$query;\n\t\t\t\t} else {\n\t\t\t\t\t$url = $url.'?'.$query;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// append query string\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_URL, $url);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// what if request fails?\n\t\t$this->last_url = $url;\n\t\t\n\t\t// will return false on host not found or timeout\n\t\t$response = curl_exec($this->ch);\n\t\t\n\t\tif($response){\n\t\t\t\n\t\t\t// use effective URL instead in case of redirect\n\t\t\t$url = curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t\t\t\n\t\t\t// split headers and body\n\t\t\t$header_size = curl_getinfo($this->ch, CURLINFO_HEADER_SIZE);\n\t\t\t$headers = substr($response, 0, $header_size);\n\t\t\t$body = substr($response, $header_size);\n\t\t\t\n\t\t\t// in case of redirect, we only care about the latest headers from the last page\n\t\t\t$temp = explode(\"\\r\\n\\r\\n\", $headers);\n\t\t\t$latest_headers = $temp[count($temp)-2];\n\t\t\t\n\t\t\t// dom parsing is probably more expensive... just do regex on a plain text to find possible meta redirect\n\t\t\tif($this->follow_meta_refresh){\n\t\t\t\n\t\t\t\tif(preg_match('/<meta[^>]*http-equiv=[\"|\\']refresh[\"|\\'][^>]*/i', $body, $matches) && preg_match('/url=([^ |\"|\\']+)/i', $matches[0], $matches2)){\n\t\t\t\t\t$refresh_url = $matches2[1];\n\t\t\t\t\t\n\t\t\t\t\t// call the same method asking to do all the same but to this URL\n\t\t\t\t\treturn $this->doRequest($method, $refresh_url, $data, $headers);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// actual response that it send to the page is [headers, body]\n\t\t\treturn new PGPage($url, array('headers' => $latest_headers, 'body' => $this->clean($body)), $this);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$this->last_error = curl_error($this->ch);\n\t\t\n\t\treturn false;\n\t}", "public function request($url, $params = false, $method = false, $options = false, $timeout = false, $raw = false)\n\t\t{\n\t\t\tif ($method === false) {\n\t\t\t\t$method = self::GET;\n\t\t\t}\n\n\t\t\tif ($timeout === false) {\n\t\t\t\t$timeout = self::DEFAULT_TIMEOUT;\n\t\t\t}\n\n\t\t\tif ($url[0] == '/') {\n\t\t\t\t$url = substr($url, 1);\n\t\t\t}\n\t\t\t$url = $this->base_url.$url;\n\n\t\t\tif ($method == self::GET && is_array($params) && count($params) > 0) {\n\t\t\t\t\t$url = $url.(strpos($url, '?') !== false ? '&' : '?').http_build_query($params);\n\t\t\t}\n\n\t\t\t$ch = curl_init($url);\n\t\t\tif (isset($GLOBALS['config']['curl']['options'])) {\n\t\t\t\tcurl_setopt_array($ch, $GLOBALS['config']['curl']['options']);\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t\tif (is_array($options) && count($options) > 0) {\n\t\t\t\tcurl_setopt_array($ch, $options);\n\t\t\t}\n\n\t\t\tswitch ($method) {\n\t\t\t\tcase self::GET:\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::POST:\n\t\t\t\tcase self::PUT:\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n\t\t\t\t\tif ($method == self::POST) {\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::POST_JSON:\n\t\t\t\tcase self::PUT_JSON:\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method == self::PUT_JSON ? 'PUT' : 'POST');\n\t\t\t\t\t$json_data = json_encode($params);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t\t\t'Content-Type: application/json',\n\t\t\t\t\t\t'Content-Length: '.strlen($json_data),\n\t\t\t\t\t));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::DELETE_JSON:\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\t\t$json_data = json_encode($params);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t\t\t'Content-Type: application/json',\n\t\t\t\t\t\t'Content-Length: '.strlen($json_data),\n\t\t\t\t\t));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::DELETE:\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new HTTPClientException('Unknown method: '.$method, -1);\n\t\t\t}\n\n\t\t\t$response = curl_exec($ch);\n\t\t\t$info = curl_getinfo($ch);\n\n\t\t\tcurl_close($ch);\n\n\t\t\tif ($info['http_code'] < 200 || $info['http_code'] > 299) {\n\t\t\t\tthrow new HTTPClientException(__METHOD__.': Failed: ['.$info['http_code'].'] '.substr($response, 0, 150), $info['http_code'], $response);\n\t\t\t}\n\n\t\t\t// If we've not been told to return the raw response, and the response\n\t\t\t// was not a 204 which has no content, decode the response if we\n\t\t\t// understand the format.\n\t\t\tif (!$raw && $info['http_code'] != 204) {\n\t\t\t\tswitch ($info['content_type']) {\n\t\t\t\t\tcase 'application/json':\n\t\t\t\t\t\t// Decode the JSON response.\n\t\t\t\t\t\t$decoded = json_decode($response, true);\n\t\t\t\t\t\tif (!is_array($decoded)) {\n\t\t\t\t\t\t\tthrow new HTTPClientException('Failed to decode response: '.$response, $info['http_code'], $response);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$response = $decoded;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $response;\n\t\t}", "abstract protected function requestApi($action = '', $params = array(), $method = 'POST');", "public function makeRequest( $url, $method = 'GET', $headers = null );", "protected function http_request($method = null, $url = null, $params = null)\n\t{\n\t\tif (empty($method) || empty($url))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($params['oauth_signature']))\n\t\t{\n\t\t\t$params = $this->prep_params($method, $url, $params);\n\t\t}\n\n\t\t$this->connection = new \\Evernote_Connection();\n\n\t\ttry\n\t\t{\n\t\t\tswitch ($method)\n\t\t\t{\n\t\t\t\tcase 'GET':\n\t\t\t\t\treturn $this->connection->get($url, $params);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'POST':\n\t\t\t\t\treturn $this->connection->post($url, $params);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'PUT':\n\t\t\t\t\treturn null;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'DELETE':\n\t\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcatch (\\EvernoteException $e)\n\t\t{\n\t\t\t$this->errors[] = $e;\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n\t}", "public static function execute(string $endpoint, string $method): void\n\t{\n\n\t\t$pathExists = false;\n\n\t\tforeach (self::$routes as $route) {\n\n\t\t\t$variables = array();\n\n\t\t\tif ($route->matchEndpoint($endpoint, $variables)) {\n\n\t\t\t\tif ($method == $route->getMethod()) {\n\n\t\t\t\t\t$route->execute($variables);\n\t\t\t\t\treturn;\n\n\t\t\t\t} else $pathExists = true;\n\t\t\t}\n\n\t\t}\n\n\t\t// If path was found, but there was no match for the given method\n\t\tif ($pathExists) header(\"HTTP/1.0 405 Method Not Allowed\");\n\n\t\t// If path cannot be found in the available routes\n\t\telse header(\"HTTP/1.0 404 Not Found\");\n\n\t}", "function _request_url($method, $params = null, $format = 'xml') {\n\t\treturn 'http://ws.audioscrobbler.com/1.0/'.$this->_type.'/'.$this->_encode($this->name).'/'.$method.'.'.$format;\n\n\t}", "public function setRequestMethod($method) {}", "public function execute($httpMethod, $url, array $parameters = []);", "public function request($method, $url, $body = null, array $headers = array())\n {\n $nonce = mt_rand(0, mt_getrandmax());\n $hash = hash_hmac('sha256', $nonce . ':' . $body, $this->sharedSecret);\n $headers[] = 'X-Makaira-Nonce: ' . $nonce;\n $headers[] = 'X-Makaira-Hash: ' . $hash;\n\n return $this->aggregate->request($method, $url, $body, $headers);\n }", "public function doRequest($follow_location = true)\n {\n $request_headers = array('Connection: close');\n\n if ($this->etag) $request_headers[] = 'If-None-Match: '.$this->etag;\n if ($this->last_modified) $request_headers[] = 'If-Modified-Since: '.$this->last_modified;\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout);\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, ini_get('open_basedir') === '');\n curl_setopt($ch, CURLOPT_MAXREDIRS, $this->max_redirects);\n curl_setopt($ch, CURLOPT_ENCODING, '');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // For auto-signed certificates...\n curl_setopt($ch, CURLOPT_WRITEFUNCTION, array($this, 'readBody'));\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, 'readHeaders'));\n curl_setopt($ch, CURLOPT_COOKIEJAR, 'php://memory');\n curl_setopt($ch, CURLOPT_COOKIEFILE, 'php://memory');\n\n if ($this->proxy_hostname) {\n curl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy_port);\n curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');\n curl_setopt($ch, CURLOPT_PROXY, $this->proxy_hostname);\n\n if ($this->proxy_username) {\n curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->proxy_username.':'.$this->proxy_password);\n }\n }\n\n curl_exec($ch);\n\n Logging::setMessage(get_called_class().' cURL total time: '.curl_getinfo($ch, CURLINFO_TOTAL_TIME));\n Logging::setMessage(get_called_class().' cURL dns lookup time: '.curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME));\n Logging::setMessage(get_called_class().' cURL connect time: '.curl_getinfo($ch, CURLINFO_CONNECT_TIME));\n Logging::setMessage(get_called_class().' cURL speed download: '.curl_getinfo($ch, CURLINFO_SPEED_DOWNLOAD));\n Logging::setMessage(get_called_class().' cURL effective url: '.curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n\n if (curl_errno($ch)) {\n\n Logging::setMessage(get_called_class().' cURL error: '.curl_error($ch));\n\n curl_close($ch);\n return false;\n }\n\n curl_close($ch);\n\n list($status, $headers) = $this->parseHeaders(explode(\"\\r\\n\", $this->headers[$this->headers_counter - 1]));\n\n if ($follow_location && ini_get('open_basedir') !== '' && ($status == 301 || $status == 302)) {\n\n $nb_redirects = 0;\n $this->url = $headers['Location'];\n $this->body = '';\n $this->body_length = 0;\n $this->headers = array();\n $this->headers_counter = 0;\n\n while (true) {\n\n $nb_redirects++;\n if ($nb_redirects >= $this->max_redirects) return false;\n\n $result = $this->doRequest(false);\n\n if ($result['status'] == 301 || $result['status'] == 302) {\n $this->url = $result['headers']['Location'];\n $this->body = '';\n $this->body_length = 0;\n $this->headers = array();\n $this->headers_counter = 0;\n }\n else {\n return $result;\n }\n }\n }\n\n return array(\n 'status' => $status,\n 'body' => $this->body,\n 'headers' => $headers\n );\n }", "public function __doRequest($request, $location, $action, $version, $one_way = 0)\n {\n if ($this->_debug) {\n $this->_logger->debug($request);\n }\n $response = parent::__doRequest($request, $location, $action, $version, $one_way);\n if ($this->_debug) {\n $this->_logger->debug($response);\n }\n return $response;\n }", "public function iSendARequestToWithPlaceholder($method, $url)\n {\n return $this->restContext->iSendARequestTo($method, $this->replacePlaceholder($url));\n }" ]
[ "0.6184081", "0.5938833", "0.58736026", "0.57667774", "0.5739034", "0.57184964", "0.5712666", "0.570017", "0.56968385", "0.5660538", "0.5617837", "0.55432534", "0.5538734", "0.54561526", "0.54368114", "0.53915685", "0.5345875", "0.53257567", "0.53175366", "0.52635735", "0.5250784", "0.5241299", "0.5240035", "0.52186525", "0.5216676", "0.51998305", "0.51842517", "0.51825553", "0.517035", "0.51484805" ]
0.74692494
0
Performs a GET request on the specified $location.
public function get($location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($uri);", "public function doGet($path = '', array $query = array());", "public function get($url, $query = array(), $headers = array());", "public function request_get($uri, array $options = array()) {\n $options['method'] = 'GET';\n return $this->request($uri, $options);\n }", "public function get($location, $fields = NULL, $introspection = FALSE){\n $params = array();\n if(!empty($this->access_token)){\n $params[\"access_token\"] = $this->access_token;\n }\n if(!empty($fields)){\n $params[\"fields\"] = $fields;\n }\n if($introspection){\n $params[\"metadata\"] = 1;\n }\n $url = self::GraphUrl.OAuthUtil::urlencode_rfc3986($location).\"?\".OAuthUtil::build_http_query($params);\n $response = $this->http($url, self::$METHOD_GET);\n return $this->decode_JSON ? json_decode($response) : $response;\n }", "public function get($url, $params);", "public function get($url);", "protected function requestGet($route) {\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n return $this->client->getResponse();\n }", "public function get(string $uri, array $params = [], array $headers = [], $sink = null): ResponseInterface;", "function fn_get_contents($location, $base_dir = '', $timeout = null)\n{\n $result = '';\n $path = $base_dir . $location;\n\n if (!empty($base_dir) && !fn_check_path($path)) {\n return $result;\n }\n\n // Location is regular file\n if (is_file($path)) {\n $result = @file_get_contents($path);\n\n // Location is url\n } elseif (strpos($path, '://') !== false) {\n // Prepare url\n $url = new Url($path);\n $path = $url\n ->punyEncode()\n ->build($url->getIsEncoded());\n\n $logging = Http::$logging;\n Http::$logging = false;\n\n $extra = [];\n\n if ($timeout) {\n $extra['execution_timeout'] = $timeout;\n }\n\n $result = Http::get($path, [], $extra);\n\n $status = Http::getStatus();\n Http::$logging = $logging;\n\n if ($status >= 300 || $status < 200) {\n return false;\n }\n }\n\n return $result;\n}", "public function _get($url = null, $parameters = []);", "public static function get($uri,$params=[],$options=[]) {\n return self::request('GET',$uri,$params,$options);\n }", "public function get(Request $request, Location $location): JsonResponse\n {\n if ($location->sensitive) {\n if (!$request->user()->tokenCan(ApiAbilities::READ_SENSITIVE)) {\n abort(404, ErrorMessages::MSG_NOT_FOUND);\n }\n }\n\n $this->validatePermission($request, ApiAbilities::READ_PUBLIC);\n\n $builder = app()->make(ApiResponseBuilder::class);\n $builder->setStatusCode(200);\n $builder->setData($location->toResponseArray());\n\n return response()->json($builder->getResponseData(), $builder->getStatusCode());\n }", "abstract public function get(Request $request);", "public function get()\r\n {\r\n return $this->location->with('services')->get();\r\n }", "private function GET($url,$params=false){\n return $this->Request($url,$params,HTTP_GET);\n }", "public function get($uri, array $headers = []): ResponseInterface;", "public function get(array $queryParams, $endpoint);", "public function get($endpoint = '', $query=[], $body='');", "public function get($uri, $queryParams = ''){\n// $headers = [\n// 'Authorization' => 'Bearer '.$this->token\n// ];\n//\n// return $client->request(\n// 'GET',\n// $this->getUrl($uri),\n// array('headers'=>$headers,'query' =>$queryParams)\n// );\n//\n $client = new Client();\n return $client->request('GET', $this->getUrl($uri), ['query' => $queryParams]);\n }", "public function index_get() {\n $action = $this->get('action');\n switch ($action) {\n case \"retrieve_get\":\n $this->retrieve_get();\n break;\n default:\n $this->not_found();\n break;\n }\n }", "function getRequestURL(string $location, array $param = []){\n $base_url = getBaseURL();\n $path = !empty($param) || $location !== \"index\" ? \"{$location}.php\" : \"\";\n if(!empty($param)){\n $query_params = http_build_query($parameters);\n $path .= \"?{$query_params}\";\n }\n return \"{$base_url}/app/request/{$path}\";\n}", "public function get($params = []);", "public function get()\n\t\t{\n\t\t\t$aArgument = func_get_args();\n\t\t\t$sURL = array_shift( $aArgument );\n\t\t\t$aData = (bool) count( $aArgument ) ? array_shift( $aArgument ) : Array();\n\t\t\t$mReferer = (bool) count( $aArgument ) ? array_shift( $aArgument ) : false;\n\n\t\t\treturn $this->request( \"get\", $sURL, $aData, $mReferer );\n\t\t}", "public function get ($url, $headers = null, $options = null);", "public static function Get($url)\r\n {\r\n return self::doRequest('GET', $url);\r\n }", "public function get($uri, $controller) {\n\t\t$this -> setController($controller);\n\n\t\t$this -> setUri($uri);\n\t\t$this -> setMethod('GET');\n\t}", "function get(Request &$request, Response &$response);", "public function get($path);", "public function get($path);" ]
[ "0.6270743", "0.5920579", "0.58799905", "0.58686906", "0.5862152", "0.5813544", "0.57464576", "0.5660093", "0.56313616", "0.562461", "0.55603504", "0.5521631", "0.54931927", "0.54526204", "0.5439917", "0.5419359", "0.5406528", "0.53708524", "0.5361653", "0.5349621", "0.5337434", "0.53255314", "0.52993375", "0.52944976", "0.5242209", "0.52309626", "0.52183473", "0.52012074", "0.5197118", "0.5197118" ]
0.78086084
0
Performs a POST request on the specified $location, with the given $body.
public function post($location, $body);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post($location, $postfields = array()){\n $url = self::GraphUrl.OAuthUtil::urlencode_rfc3986($location);\n if(!empty($this->access_token)){\n $postfields[\"access_token\"] = $this->access_token;\n }\n $response = $this->http($url, self::$METHOD_POST, $postfields);\n return $this->decode_JSON ? json_decode($response) : $response;\n }", "public function put($location, $body);", "protected function postSiteRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postSite'\n );\n }\n\n $resourcePath = '/sites';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Auth-Client');\n if ($apiKey !== null) {\n $headers['X-Auth-Client'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Auth-Token');\n if ($apiKey !== null) {\n $headers['X-Auth-Token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function doPost(array $parsed_body);", "public function post($requestUrl, $requestBody, array $requestHeaders = []);", "public function post($uri, $body = null, array $headers = []): ResponseInterface;", "public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }", "public function post($url, $body = array(), $query = array(), $headers = array());", "private function performRequest($body) {\n\n\t\t$ch = curl_init($this->service . '/' . $this->action);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"VnnSpringnet/0.1\" );\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $body);\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t'User-Agent: VnnSpringnet/0.1'));\n\t\t$json = curl_exec($ch);\n\n\t\tif($json === false) {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn json_decode($json, true);\n\t\t} catch(\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function executeRequest(string $uri, string $body): string;", "public function post(string $uri, array $params = [], $body = null, array $headers = []): ResponseInterface;", "public function createLocation(CreateLocationRequest $body): ApiResponse\n {\n $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/locations')\n ->auth('global')\n ->parameters(HeaderParam::init('Content-Type', 'application/json'), BodyParam::init($body));\n\n $_resHandler = $this->responseHandler()->type(CreateLocationResponse::class)->returnApiResponse();\n\n return $this->execute($_reqBuilder, $_resHandler);\n }", "abstract public function update(Request $request, Location $location): JsonResponse;", "public function postGuzzleRequest($headers, $url, $body)\n {\n $client = new \\GuzzleHttp\\Client(['headers' => $headers]);\n $response = $client->post($url, array('form_params'=>$body));\n\n $response = json_decode($response->getBody());\n\n\n return $response;\n }", "public function post($path, $parameters = null, $body = null);", "public function post($uri = null, $headers = null, $postBody = null)\n {\n return $this->createRequest('POST', $uri, $headers, $postBody);\n }", "static function post($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\PostRequest($url, $body, $headers);\n return $request->send();\n }", "public function postBody($url, $body)\n {\n return $this->client->post(\n $this->baseUrl . $this->userId . '/' . $url,\n [\n 'json' => $body,\n ]\n )->getBody()->getContents();\n }", "public function update(Request $request, Location $location)\n {\n //\n }", "protected function httpPostRaw(string $path, $body, array $requestHeaders = []): ResponseInterface\n {\n return $this->httpClient->request('POST', $path, [\n 'body' => $body,\n 'headers' => $requestHeaders,\n ]);\n }", "public function update(Request $request, location $location)\n {\n //\n }", "public function post($destination, $post_data, $parameters = array())\n\t{\n\t\tRequest::foundation()->request->add($post_data);\n\t\treturn $this->call($destination, $parameters, 'POST');\n\t}", "public function httpPost($redirectTo = null) : string;", "public function post($request);", "public function postReview(Request $request)\n {\n $this->validate($request, [\n 'locatie' => 'required',\n 'review' => 'required',\n ]);\n\n $client = new \\GuzzleHttp\\Client([\"base_uri\" => \"http://127.0.0.1:5000/\"]);\n $options = [\n 'json' => [\n \"Schrijver\" => auth()->user()->name,\n \"Locatie\" => $request->input('locatie'),\n \"Review\" => $request->input('review')\n ]\n ]; \n $response = $client->post(\"/postReview\", $options)->getBody();\n return redirect('/reviews')->with('success', 'Review toegevoegd');\n }", "public function requestPost(string $path, string $body): bool\n {\n return $this->request('post', $path, $body);\n }", "public function post($url, $body)\n {\n $result = $this->curlService->post(\n $this->getUrl() . $url,\n $this->getToken(),\n $body\n );\n\n return $this->parse($result);\n }", "public function pearRequest($url, $headers, $body)\n\t{\n\t\tif (!class_exists('HTTP_Request2')) require_once('HTTP/Request2.php');\n\t\tif (!class_exists('HTTP_Request2_Adapter_Socket')) require_once 'HTTP/Request2/Adapter/Socket.php';\n\n\t\t$adapter = new HTTP_Request2_Adapter_Socket;\n\t\t$req = new HTTP_Request2($url, HTTP_Request2::METHOD_POST);\n\t\t$req->setAdapter($adapter);\n\t\t$req->setHeader($headers);\n\t\t$req->setBody($body);\n\t\treturn $req->send()->getStatus();\n\t}", "public function publish( Location $location );", "protected function postUserCollectionRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postUserCollection'\n );\n }\n\n $resourcePath = '/api/users';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/ld+json', 'application/json', 'text/html']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/ld+json', 'application/json', 'text/html'],\n ['application/ld+json', 'application/json', 'text/html']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }" ]
[ "0.6705672", "0.66088355", "0.62155783", "0.6163039", "0.6090044", "0.604052", "0.5967207", "0.5902541", "0.5875008", "0.57819116", "0.5781494", "0.5539779", "0.55170316", "0.54601246", "0.54398847", "0.5439719", "0.53795046", "0.53721243", "0.53639704", "0.5354013", "0.53520983", "0.5318568", "0.529677", "0.52738494", "0.5268596", "0.5262947", "0.5260471", "0.5260402", "0.5258571", "0.5256431" ]
0.87802345
0
Performs a DELETE request on the specified $location.
public function delete($location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(location $location)\n {\n //\n }", "public function delete($location, $postfields = array()){\n $url = self::GraphUrl.OAuthUtil::urlencode_rfc3986($location);\n $postfields = array();\n if(!empty($this->access_token)){\n $postfields[\"access_token\"] = $this->access_token;\n }\n $response = $this->http($url, self::$METHOD_DELETE, $postfields);\n return $this->decode_JSON ? json_decode($response) : $response;\n }", "public function destroy(Request $request, Location $location): JsonResponse\n {\n $user = $request->user();\n /* We check that the user can update an item in the team */\n if (!$user->hasTeamPermission($location->team, 'location:write') ||\n !$user->tokenCan('location:write')\n ) {\n throw new AuthorizationException();\n }\n $location->delete();\n return response()->json(['success' => 'success']);\n }", "public function delete(Location $location)\r\n {\r\n return $location->delete();\r\n }", "public function deleteLocation(Request $request){\n $location = location::where('id', '=', $request->get('id'))->first();\n\n if (!$location) {\n dump('Did not delete- location not found.');\n } else {\n $location->delete();\n return view('data_view')->with($this->getLocations());\n }\n }", "public function destroy(Location $location)\n {\n $location->delete();\n return response()->json([\n 'message'=>'Location Deleted Successfully!!'\n ]);\n }", "public function destroy(Request $request,$id){\n \n $location=Location::find($id);\n\n $location->delete();\n \n return redirect('locations');\n}", "public function destroy(Location $location)\n {\n //\n }", "public function delete(Request $request,Location $id){\n $id->delete();\n// hna bach y3ti l 9ima nhad ligen anaha memsou7a\n return response()->json(['response' => 'deleted']);\n\n }", "public function destroy(Location $location)\n {\n $location->delete();\n return redirect()->back()->with('message', 'Hai eliminato la prenotazione');\n }", "public function delete(string $uri, array $params = [], array $headers = []): ResponseInterface;", "public function destroy(Location $location)\n {\n $location->delete();\n return redirect()->route('locations.index');\n }", "public function destroy(Request $request)\n {\n $location= Location::find($request->id);\n\n if($location->restaurants()->count()>0)\n {\n return redirect()->route('backend.dashboard')->with('message','Unable to delete the Location, Please\n move any restaurants that belongs to this Location before delete');\n }\n else{\n $location->delete($request->all());\n return redirect()->route('backend.dashboard')->with('message','Delete Success!');\n }\n }", "public function delete($requestUrl, $requestBody, array $requestHeaders = []);", "public function delete($url, $query = array(), $headers = array());", "public function delete($uri, $body = null, array $headers = []): ResponseInterface;", "public function destroy(Location $location,$id)\n {\n $location = Ho_details::find($id);\n if ($location->delete()) {\n return Redirect::back()->with('success', 'Deleted successfully');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }", "public function delete() {\n\t\t\tif ( isset( $_GET['location_id'] ) ) {\n\t\t\t\t$id = intval( wp_unslash( $_GET['location_id'] ) );\n\t\t\t\t$connection = WPGMP_Database::connect();\n\t\t\t\t$this->query = $connection->prepare( \"DELETE FROM $this->table WHERE $this->unique='%d'\", $id );\n\t\t\t\treturn WPGMP_Database::non_query( $this->query, $connection );\n\t\t\t}\n\t\t}", "public function destroy(Location $location)\n {\n $this->authorize('locations.destroy', $location);\n\n $location->delete();\n\n return response('', 204);\n }", "public function remove(string $location): void;", "public function destroy(Location $location)\n {\n if($this->useCheck($location) && $location->delete()){\n return redirect()->route('admin.location.index')->with('status', 'Location deleted successfully');\n }\n return back()->with('error', 'Error');\n }", "abstract public function delete(Request $request);", "public function deleted(Location $location)\n {\n event(new LocationsChanged($location));\n }", "function delete(Request &$request, Response &$response);", "public function destroy(Request $request)\n {\n $id = $request->idD;\n $nateI = NoteInformation::where(\"idNoteI\", $id);\n $nateI->delete();\n return Redirect::route('noteInformation')->with('success',\"Personnel mis à jour !\");\n\n }", "public function deleteLocation(Request $request)\n {\n try{\n $locationId = $request->location_id;\n DB::beginTransaction();\n $location = Salescenterslocations::find($locationId);\n\n if (!empty($location)) {\n $agentIds = Salesagentdetail::where('location_id',$locationId)->pluck('user_id')->toArray();\n\n // Will be deleted with related data\n $telesales = Telesales::whereIn('user_id',$agentIds)->get();\n foreach ($telesales as $key => $telesale) {\n $telesale->delete();\n }\n $userIds = User::whereHas('locations', function ($query) use($locationId) {\n $query->where('location_id',$locationId);\n })\n ->orWhere('location_id',$locationId)\n ->pluck('id')->toArray();\n\n // multiple location assigned users\n $qaIds = User::whereIn('id',$userIds)\n ->has('locations','>',1)\n ->pluck('id')->toArray();\n\n $diffuserIds = array_diff($userIds,$qaIds);\n $allUserIds = array_unique(array_merge($agentIds,$diffuserIds));\n\n Log::info('all user ids: '.print_r($allUserIds,true));\n\n // Will be deleted with related data\n User::destroy($allUserIds);\n $location->delete();\n DB::commit();\n return response()->json([ 'status' => 'success', 'message' => \"Sales center location successfully deleted.\"]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=>'Something went wrong, please try again.' ]);\n }\n } catch(\\Exception $e) {\n DB::rollback();\n Log::error(\"Error while deleting sales center location: \".$e);\n return response()->json([ 'status' => 'error', 'message'=> $e->getMessage()]);\n }\n }", "public function deleteAction(Request $request)\n {\n\t\t\t$id = $request->query->get(\"id\");\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$anotacion = $em->getRepository(\"App:Anotacion\")->find($id);\n $em->remove($anotacion);\n $em->flush();\n \n\n return $this->redirectToRoute('anotacion_index');\n }", "public function destroy($id, Request $request)\n {\n Location::find($id)->delete();\n Forecast::where('location_id', '=', $id)->delete();\n\n return redirect()->action('HomeController@index');\n }", "public function delete($request, $response)\n {\n }", "public function destroy(Location $location)\n {\n $location->delete();\n\n return back();\n }" ]
[ "0.736236", "0.7324658", "0.70466334", "0.69840086", "0.6892293", "0.68770456", "0.6863711", "0.68561983", "0.67480433", "0.6707536", "0.6687853", "0.66183203", "0.6615646", "0.6603866", "0.64968884", "0.64308435", "0.6418657", "0.6415608", "0.6374554", "0.6323212", "0.63193315", "0.6293197", "0.62250876", "0.6219348", "0.617741", "0.61683285", "0.61662346", "0.6104423", "0.61032367", "0.6076737" ]
0.8354207
0