query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set jQuery params: showWeek, firstDay
public function showWeek($showWeek, $firstDay = 0) { if($showWeek) { $this->_config_mapper(Array('showWeek' => 'true')); } else { $this->_config_mapper(Array('showWeek' => 'false')); } $this->_config_mapper(Array('firstDay' => $firstDay)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFirstWeekDay($daynum){\n\tif ($daynum==0) $this->startOnSun=true;\n\telse $this->startOnSun=false;\n}", "public function setShowWeekDayNum($sw=false)\n\t{\n\t\t$this->addWeekDay = $sw;\n\t}", "public function setWeekDate($a = null, $b = null, $c = null)\n {\n throw new NotImplementedExcep...
[ "0.65920395", "0.5864524", "0.5842388", "0.5789946", "0.57759345", "0.5764967", "0.5752445", "0.57277286", "0.5643445", "0.5637567", "0.5604179", "0.5601334", "0.5568413", "0.5541798", "0.54923224", "0.54643625", "0.5445229", "0.54316026", "0.54229194", "0.5409349", "0.536643...
0.74004716
0
Set jQuery params: showOtherMonths, selectOtherMonths
public function showOtherMonths($showOtherMonths, $selectOtherMonths) { if($showOtherMonths) { $this->_config_mapper(Array('showOtherMonths' => 'true')); } else { $this->_config_mapper(Array('showOtherMonths' => 'false')); } if($selectOtherMonths) { $this->_config_mapper(Array('selectOtherMonths' => 'true')); } else { $this->_config_mapper(Array('selectOtherMonths' => 'false')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('一月','二月','三月','四月','五月','六月',\n\t\t\t\t\t'七月','八月','九月','十月','十一月','十二月');\n\t$monthListShort=array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');\n\t$weekdaysList=array('Mon','Tue','Wed',...
[ "0.6071768", "0.6050157", "0.5989714", "0.56009805", "0.55293626", "0.5480524", "0.5461474", "0.54268616", "0.539783", "0.52830404", "0.52671427", "0.5263418", "0.5260819", "0.5235332", "0.5233443", "0.5216457", "0.5213674", "0.52051973", "0.5199233", "0.5180589", "0.51646286...
0.69276524
0
Set jQuery param: showButtonPanel
public function showButtonPanel($showButtonPanel){ if($showButtonPanel){ $this->_config_mapper(Array('showButtonPanel' => 'true')); } else { $this->_config_mapper(Array('showButtonPanel' => 'false')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_in_panel() {\n\t\treturn false;\n\t}", "public function openAddPanel()\n {\n sleep(1);\n // TODO: Add ID to \"Add\" button\n $this->_webui->clickButton('.btn.btn-primary.btn-xs.pull-right.mb20');\n }", "public function showNewClientButton()\n {\n $this-...
[ "0.661741", "0.6019365", "0.5686028", "0.5668716", "0.56454724", "0.56302196", "0.56301653", "0.5454913", "0.5452624", "0.5446394", "0.5438562", "0.5431659", "0.5400272", "0.5399156", "0.5379872", "0.53700435", "0.53681576", "0.53379023", "0.53378904", "0.5333831", "0.5303617...
0.7856778
0
Set jQuery params: changeMonth, changeYear
public function showYearAndMonthDD($showMonth, $showYear){ if($showMonth) { $this->_config_mapper(Array('changeMonth' => 'true')); } else { $this->_config_mapper(Array('changeMonth' => 'false')); } if($showYear) { $this->_config_mapper(Array('changeYear' => 'true')); } else { $this->_config_mapper(Array('changeYear' => 'false')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numer...
[ "0.6935733", "0.5978208", "0.5957758", "0.59046465", "0.5674826", "0.56090325", "0.54768103", "0.54622406", "0.5378145", "0.53487134", "0.5323723", "0.53182054", "0.53119844", "0.5285839", "0.5272749", "0.5249261", "0.5241157", "0.5215242", "0.52021146", "0.5197929", "0.51756...
0.5122296
23
Set jQuery params: numberOfMonths, showButtonPanel
public function setCalendarNumber($numberOfMonths, $showButtonPanel){ $this->_config_mapper(Array('numberOfMonths' => (int)$numberOfMonths)); if($showButtonPanel) { $this->_config_mapper(Array('showButtonPanel' => 'true')); } else { $this->_config_mapper(Array('showButtonPanel' => 'false')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('一月','二月','三月','四月','五月','六月',\n\t\t\t\t\t'七月','八月','九月','十月','十一月','十二月');\n\t$monthListShort=array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');\n\t$weekdaysList=array('Mon','Tue','Wed',...
[ "0.57487535", "0.5748314", "0.5517207", "0.54982084", "0.5494076", "0.5456071", "0.5357836", "0.533942", "0.52991515", "0.528616", "0.52715534", "0.5241927", "0.52283514", "0.5196813", "0.51745176", "0.5151567", "0.5142982", "0.51267374", "0.5067817", "0.5064153", "0.5058148"...
0.7088348
0
Skip the heading row
public function startRow(): int { return 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function headingRow(): int\n {\n return 1;\n }", "public function incrementRowsSkipped(): void\n {\n $this->rowsSkipped++;\n }", "public function skipLeadingLines(): void\n {\n if (false === $this->linesSkipped) {\n $this->rewind();\n $skip = $th...
[ "0.6508611", "0.6169229", "0.6087846", "0.5962082", "0.59176624", "0.5866638", "0.5847273", "0.5777075", "0.5758503", "0.57349515", "0.57340395", "0.5723952", "0.5715449", "0.56830925", "0.5676413", "0.5675749", "0.56754506", "0.56741446", "0.560417", "0.55976826", "0.5590842...
0.0
-1
This function used to logged out user from system
public function logout() { $this->session->sess_destroy (); redirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_logging_out($user_id) {\n \n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "function user_logging_out($user_id)\n\t{\n\t}", "public function Logoff();", "public function logoff();", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "...
[ "0.8527446", "0.83973503", "0.82949203", "0.8225331", "0.82002306", "0.8198945", "0.8184052", "0.81288373", "0.80704206", "0.8026519", "0.80216527", "0.80146116", "0.80095243", "0.80093676", "0.8008791", "0.80053294", "0.79766375", "0.7967993", "0.7928369", "0.79267836", "0.7...
0.0
-1
Create a new controller instance.
public function __construct(Request $request) { $this->request = $request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Authenticate a user and return the token if the provided credentials are correct.
public function authenticate(User $user, JwtToken $jwt) { $this->validate($this->request, [ 'email' => 'required|email', 'password' => 'required' ]); // Find the user by email $user = User::where('email', $this->request->input('email'))->first(); if (!$user) { return response()->json([ 'error' => __('Email does not exist.') ], 400); } // Verify the password and generate the token if (Hash::check($this->request->input('password'), $user->password)) { return response()->json([ 'token' => $jwt->setSecret(env('JWT_SECRET'))->createToken($user) ], 200); } // Bad Request response return response()->json([ 'error' => __('Email or password is wrong.') ], 400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authenticate()\n {\n $query = $this->newQuery()->select('*')->where([\n 'username' => $this->username,\n 'disabled' => 0\n ]);\n\n $userRow = $query->execute()->fetch('assoc');\n\n if (empty($userRow)) {\n return new AuthenticationResu...
[ "0.76275", "0.70167094", "0.70061606", "0.7001417", "0.6995842", "0.6973896", "0.6963656", "0.6817796", "0.68041384", "0.6780114", "0.67785513", "0.6766678", "0.67448574", "0.67399484", "0.6618704", "0.6590981", "0.65572995", "0.6555442", "0.6526771", "0.6498492", "0.6483072"...
0.0
-1
Authorize a token and response refreshed token
public function checkToken(JwtToken $jwt) { $token = $this->jwtToken(); if ($token->validate()) { $payload = $token->payload(); if(isset($payload['context']['permission']) && $payload['context']['permission'] === 'admin') { $payload['exp'] = time() + 7200; return response()->json([ 'token' => $jwt->setSecret(env('JWT_SECRET'))->createToken($payload) ], 200); } } return response()->json([ 'error' => 'Unauthorized.' ], 401); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refreshToken()\n\t{\n\t\tAuth::user()->generateToken()->didUpdate()->save();\n\n\t\t// Return token\n\t\treturn response()->json([\n\t\t\t'status' => 'Token updated',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "public function refresh()\n {\n try {\n if ($tok...
[ "0.7386306", "0.7333593", "0.73247874", "0.7312155", "0.7208885", "0.7205019", "0.7131106", "0.7078491", "0.6927259", "0.68901885", "0.6815964", "0.67731863", "0.67542696", "0.6734677", "0.6711536", "0.6708086", "0.66582614", "0.658975", "0.6564058", "0.6554144", "0.6540653",...
0.0
-1
Get dashboard total info
public function getDashboard() { $members = \App\Member::all(); $lastIncomes = \App\Income::with('member')->orderBy('created_at', 'desc')->limit(10)->get(); $requestedWithdrawals = \App\Withdrawal::with('member') ->where('status', '=', \App\Status::WITHDRAWAL_REQUESTED)->get(); $totalSales = \App\Sale::count(); return response()->json([ 'totalMembers' => $members->count(), 'totalIncomes' => $members->sum('balance'), 'totalPoints' => $members->sum('point'), 'totalSales' => $totalSales, 'lastIncomes' => $lastIncomes, 'requestedWithdrawals' => $requestedWithdrawals ], 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveTotalReport()\n {\n return $this->start()->uri(\"/api/report/totals\")\n ->get()\n ->go();\n }", "public function getTotal();", "public function getTotal();", "public function renderAdminDashboard() {\n $em = $this->getDoctrine()->getEntityManager();\n ...
[ "0.6705757", "0.66391486", "0.66391486", "0.6632646", "0.6602018", "0.65750456", "0.64284974", "0.6401638", "0.63701266", "0.6274383", "0.6250674", "0.6235129", "0.6233017", "0.6221796", "0.61861324", "0.61797184", "0.6167777", "0.6152469", "0.61482227", "0.61388505", "0.6131...
0.6559324
6
Class properties go here. public, private, protected, static and const.
public function generate_admin_sidebar(array $par = []){ return( view('admin/partials/sidebar.php')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function properties();", "function properties()\n {\n }", "public function setProperties() {\n\t\t$this->public_prop = 'public';\n\t\t$this->protected_prop = 100;\n\t\t$this->private_prop = true;\n\n\t\t// Set a non-predefined property.\n\t\t$this->dynamic = new self();\n\...
[ "0.63590175", "0.6329992", "0.6218409", "0.6212685", "0.6151923", "0.5891306", "0.568696", "0.5527459", "0.5524607", "0.5510506", "0.5486399", "0.5479217", "0.5479217", "0.5479217", "0.5479162", "0.5471809", "0.54702544", "0.5467972", "0.5466892", "0.5466892", "0.54479146", ...
0.0
-1
/ insert noti email
public function insertNotiEmail(NotiEmailForm $insertForm){ $objDao = new NotiEmailDAO(); $objDao->type = $insertForm->getType(); $objDao->content = $insertForm->getContent(); $objDao->status = $insertForm->getStatus(); $objDao->merchantId = $insertForm->getMerchantId(); return $this->notiEmailDao->saveResultId($objDao); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Insert_Email()\n\t{\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t$configValidation = array(\n array(\n 'field' => 'email', \n 'label' => parent::_getFieldTitle('email'), \n 'rules' => 'trim|required|max_leng...
[ "0.63930076", "0.6347084", "0.63055176", "0.6299098", "0.6295544", "0.6289162", "0.62055624", "0.61756", "0.61583185", "0.61517644", "0.6140949", "0.6129569", "0.6124238", "0.6103383", "0.60838264", "0.6054301", "0.6049232", "0.6047167", "0.5998229", "0.59924984", "0.59919477...
0.6456642
0
Gets the number of rounds.
public function getRounds() : int { return $this->rounds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoundsCount()\n {\n return $this->rounds()->count();\n }", "public function getNumberOfRuns() {\n return (float) $this->profile->userTotals->totalRuns;\n }", "public function getRoundNum() {\n\t\treturn $this->roundNum;\n\t}", "public function count()\n {\n ...
[ "0.8325318", "0.7074183", "0.67591107", "0.6620794", "0.66092235", "0.65581274", "0.65006757", "0.6394199", "0.6391075", "0.63897616", "0.63416266", "0.62902933", "0.6289839", "0.6261498", "0.62479323", "0.62313557", "0.62259954", "0.6215902", "0.62153083", "0.6163273", "0.61...
0.8386471
0
Sets the number of rounds.
public function setRounds(int $rounds = null) : SaltShakerSHA256 { $this->rounds = $rounds ?? self::DEFAULT_ROUNDS; $this->rounds = max(self::MIN_ROUNDS, min(self::MAX_ROUNDS, $this->rounds)); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setRounds($rounds)\n {\n }", "public function setRounds($rounds)\n {\n $this->rounds = (int) $rounds;\n\n return $this;\n }", "public function nextRound() {\n $this->round++;\n }", "public function __construct(?int $rounds = null)\n {\n ...
[ "0.70621794", "0.68942344", "0.63923126", "0.6049359", "0.5794222", "0.55961066", "0.55954975", "0.5592787", "0.5541966", "0.553413", "0.5532557", "0.54609036", "0.5410736", "0.5394434", "0.5316022", "0.5308424", "0.53081477", "0.52955854", "0.52922404", "0.5288634", "0.52653...
0.5559131
8
Validates the given salt string. Important: A valid salt is one starting with $5$ having an optional rounds=$ mid part followed by a 16 long string and ending with $. The rounds value must be between 1000 and 999999999.
public static function isValid(string $salt) : bool { $matches = []; $regex = '/^\$5\$(?:rounds=(?<rounds>\d{4,9})\$)?.{16}\$$/'; if (!(bool) preg_match($regex, $salt, $matches)) { return false; } $rounds = intval($matches['rounds']); return ($rounds >= self::MIN_ROUNDS && $rounds <= self::MAX_ROUNDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifySalt($input)\n {\n $regex = '/^\\$sha1\\$(\\d{1,10})\\$([\\.\\/0-9A-Za-z]{0,64})\\$?$/';\n $matches = array ();\n\n $appearsValid = (1 === preg_match($regex, $input, $matches));\n if ($appearsValid) {\n $rounds = (int) $matches[1];\n $salt ...
[ "0.7102222", "0.57533675", "0.56755304", "0.5631861", "0.5601734", "0.5560309", "0.55600774", "0.55174667", "0.549579", "0.54636085", "0.5379163", "0.53334194", "0.53330284", "0.52810013", "0.5275898", "0.5263952", "0.5261657", "0.5248574", "0.5236559", "0.52357626", "0.52348...
0.775768
0
Renders top menu with child items.
public function getMenuItemsAction($template) { $locationSearchResults = $this->searchService->findLocations($this->menuQueryType->getQuery()); $menuItems = []; foreach ($locationSearchResults->searchHits as $hit) { $menuItems[] = $hit->valueObject; } return $this->templating->renderResponse( $template, [ 'menuItems' => $menuItems, ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function topMenuNavigation() {\n\t\t$out = '';\n\t\tif($modules = DataObject::get('WorkflowCategory', '', 'priority ASC')) {\n\t\t\tforeach ($modules as $module) {\n\t\t\t\tif (Permission::check(strtoupper(str_replace(\" \", \"_\", $module->name)))) {\n\t\t\t\t\t$icon = '';\n\t\t\t\t\tif($image = DataObject...
[ "0.67311025", "0.66930836", "0.66816956", "0.6573901", "0.650649", "0.6384152", "0.6359534", "0.6339273", "0.6254152", "0.6197516", "0.6197516", "0.6197516", "0.6197516", "0.6197516", "0.6197516", "0.6168161", "0.6136733", "0.6119142", "0.6110115", "0.6102166", "0.6097681", ...
0.0
-1
Save New Leave Uses
public function create(array $data) { return $this->model->create([ 'user_id' => $data['user_id'], 'application_id' => $data['application_id'], 'use_date' => $data['use_date'], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(LeaveRequest $request)\n {\n $formData = $request->all();\n // dd($formData);\n $formData['user_id'] = Auth::id();\n $formData['id'] = null;\n \n $insertid = $this->addUpdate($formData);\n \n $leave = Leave::find($insertid);\n \n ...
[ "0.59713787", "0.5901627", "0.589179", "0.5807232", "0.57922745", "0.57919735", "0.575865", "0.56937486", "0.5671089", "0.5670579", "0.5658878", "0.5642177", "0.5611119", "0.5611119", "0.5579424", "0.55777144", "0.5573068", "0.5557703", "0.55553347", "0.5542068", "0.5530309",...
0.0
-1
List of uses by user
public function AllByUser(string $userId, string $fromDate=null, string $toDate=null) { $model = $this->model->where('user_id', $userId); if (!is_null($fromDate)) { $model = $model->fromDate($fromDate); } if (!is_null($toDate)) { $model = $model->toDate($toDate); } return $model->orderBy('use_date', 'desc')->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsage() {\n\t\t// this function is not yet used.\n\t}", "public function getList($user);", "function UserAccessList()\n\t{\t$areas = array();\n\t\tforeach ($this->accessAreas as $area=>$digit)\n\t\t{\tif($this->CanUserAccess($area))\n\t\t\t{\t$areas[] = $area;\n\t\t\t}\n\t\t}\n\t\treturn imp...
[ "0.64200515", "0.62299585", "0.6152555", "0.59818363", "0.59504205", "0.5927671", "0.58843374", "0.5861394", "0.5849704", "0.5803719", "0.57746536", "0.57624817", "0.57624817", "0.5735264", "0.56983906", "0.5671726", "0.5666775", "0.5665385", "0.5665385", "0.5647897", "0.5633...
0.0
-1
Model class name for the concrete implementation
public function modelName() { return Client::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getModelName(): string;", "abstract protected function getModelClass();", "public function getModelNameBasedOnClassName(): string\n {\n $fqn = explode(\"\\\\\", get_class($this));\n\n return strtolower(end($fqn));\n }", "public function getModelClass();", "pu...
[ "0.755736", "0.7542866", "0.746127", "0.7390268", "0.7390268", "0.7390268", "0.7383411", "0.73786324", "0.7314187", "0.73058313", "0.7299745", "0.7265171", "0.71819276", "0.7165727", "0.7113674", "0.70238036", "0.7015854", "0.7008306", "0.69729304", "0.6971647", "0.6967307", ...
0.0
-1
Calling the constructor to execute any code on load of this class.
public function __construct() { /** * Setting the layout of the controller to something else * if the configuration is present. */ if (Config::get('packages/l4mod/sentryuser/sentryuser.master-tpl') != '') $this->layout = Config::get('packages/l4mod/sentryuser/sentryuser.master-tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __construct()\n {\n $this->load();\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t// Other code to run when object is instantiated\n\t}", "public static function _init() {\n // this is called upon loading the class\n }", "protected function _...
[ "0.81267273", "0.8010938", "0.79916537", "0.7868484", "0.7868484", "0.78263986", "0.7819904", "0.7812247", "0.77899784", "0.77332085", "0.7733038", "0.770458", "0.7667603", "0.765637", "0.7650941", "0.7650421", "0.7630799", "0.76200116", "0.7601985", "0.7587613", "0.7586232",...
0.0
-1
This page is displaying the list of Grievances. If the user has manage Grievances permission, then he will have some additional rights.
public function handleList() { // fetch get data $sortBy = Input::get('sortby'); $orderBy = Input::get('order'); $data = DB::table('grievances')->where('deleted', 0); // populating the array for default sorting $arrSortLinks = array( 'category' => 'desc', 'urgency' => 'desc', 'created_at' => 'desc', 'status' => 'desc', ); // flag to check sort based on which pagination link will change in view. $sort = false; if ($sortBy && $orderBy) { // if the sort is set, then the conditions will change $arrSortLinks[$sortBy] = $orderBy; $sortOrder = array( Input::get('sortby') => Input::get('order') ); $paginateSort = array( 'sortby' => Input::get('sortby'), 'order' => Input::get('order'), ); $sort = true; if (array_key_exists($sortBy, $arrSortLinks)) { if ($arrSortLinks[$sortBy] == 'desc') { $arrSortLinks[$sortBy] = 'asc'; } else { $arrSortLinks[$sortBy] = 'desc'; } } } else { $sortOrder = array( 'urgency' => 'desc', 'created_at' => 'desc', 'status' => 'desc', ); } // building the query with orderBy clauses foreach ($sortOrder as $col => $ord) { $data->orderBy($col, $ord); } // get the user session $userObj = Session::get('userObj'); if(isset($userObj->grievanceFilter)) { $whereClause = $userObj->grievanceFilter; foreach ($whereClause as $key => $value) { $data->where($key, $value); } } // check if the user has access to manage permissions. Based on this, manage link will come $access = PermApi::user_has_permission('manage_grievance'); // fetch Grievance count before admin check $Grievance = new Grievance; $userGrievanceCount = $Grievance->getGrievanceCount($userObj->id); // if the permission is not applicable, then see only own if (!$access) { $data = $data->where('user_id', $userObj->id); } else { // for admin the Grievance count is total because we are checking count condition. $userGrievanceCount = $Grievance->getGrievanceCount();; } $data = $data->paginate(10); $this->layout->content = View::make('grievance::grievance-list') ->with('grievanceCount', $userGrievanceCount) ->with('sortArray', $arrSortLinks) ->with('userObj', $userObj) ->with('sortBy', $sortBy) ->with('filters', (isset($whereClause)) ? $whereClause : false) ->with('sort', ($sort === true) ? $paginateSort : false) ->with('grievances', $data) ->with('access', $access) ->with('my_user_id',$userObj->id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n return view('groupe.list', ['my_groupes' => Auth::user()->founding_groupes()->get(), 'joined_groupes' => Auth::user()->joined_groupes()->get()]);\n }", "function listarRegistrosGruposAtivos() {\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'A' \")...
[ "0.6514996", "0.640655", "0.630108", "0.6289732", "0.6251051", "0.62126076", "0.61602056", "0.6118796", "0.6107705", "0.59989095", "0.59949887", "0.5957155", "0.59425133", "0.59200287", "0.5916147", "0.59113944", "0.5887135", "0.58843285", "0.5878778", "0.58756375", "0.587054...
0.6054594
9
The add Grievance / Suggestion form
public function handleAdd() { $this->layout->content = View::make('grievance::grievance-add'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addGuru()\n\t{\n\t\t$params = new StdClass();\n\t\t$params->nip = null;\n\t\t$params->alamat_guru = null;\n\t\t$params->nama_guru = null;\n\t\t$params->no_hp_guru = null;\n\t\t$params->gender_guru = null;\n\t\t$this->validasi();\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$this->load-...
[ "0.64783615", "0.6275282", "0.62110937", "0.620226", "0.6173282", "0.6162048", "0.6157795", "0.6132407", "0.6125446", "0.6096605", "0.60686517", "0.6045977", "0.6005481", "0.5982216", "0.59709376", "0.59695965", "0.59290063", "0.5908531", "0.5900023", "0.5888922", "0.5885274"...
0.0
-1
Handling the saving of the Grievance form.
public function handleGrievanceSave() { $rules = array( 'title' => 'required|min:3', 'body' => 'required|min:10', 'category' => 'required', 'urgency' => 'required', ); $messages = array( 'title.required' => 'A title is required', 'title.min' => 'Title should be longer. Min 3 characters', ); // doing the validation, passing post data, rules and the messages $validator = Validator::make(Input::all(), $rules, $messages); if ($validator->fails()) { // send back to the page with the input data and errors GlobalHelper::setMessage('Fix the errors.', 'warning'); // setting the error message return Redirect::back()->withInput()->withErrors($validator); } $Grievance = new Grievance; if ($Grievance->saveGrievance(Input::all())) { SentryHelper::setMessage('A new Grievance has been saved'); } else { SentryHelper::setMessage('Grievance has not been saved', 'warning'); } return Redirect::to('grievance/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\...
[ "0.72827417", "0.6942034", "0.6922067", "0.6868379", "0.6828924", "0.68148637", "0.6787164", "0.6787164", "0.6787164", "0.6761275", "0.6718057", "0.67121875", "0.6634515", "0.66339207", "0.6622403", "0.6616926", "0.6573769", "0.65668154", "0.65543133", "0.6511021", "0.6497866...
0.72191095
1
This is the view which will be used by the user who created the post.
public function handleGrievanceView($id) { $Grievance = new Grievance; $grievance = $Grievance->getGrievance($id); $userObj = Session::get('userObj'); $grievance->disable_val=''; // if the user is trying to edit / view an entry which he doesn't own if ($grievance->user_id != $userObj->id) { PermApi::access_check('@'); $grievance->disable_val='disabled'; } // view will change to read only for tickets status not 1 if ($grievance->status != 1) { $view = 'grievance::grievance-readonly'; } else { $view = 'grievance::grievance-view'; } $this->layout->content = View::make($view) ->with('grievance', $grievance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n session_start();\n\n // Falls der Benutzer eingeloggt ist wird ihm die Create View angezeigt, ansonsten ein Fehler\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $view = new View('post/create');\n $view->titl...
[ "0.7582167", "0.72278804", "0.7168987", "0.7167578", "0.71561044", "0.7130184", "0.71194327", "0.70863086", "0.7060257", "0.7053755", "0.70396334", "0.69783866", "0.6974172", "0.6965315", "0.69641644", "0.695145", "0.6948826", "0.6948597", "0.694309", "0.69369227", "0.6936922...
0.0
-1
This is the view readonly.
public function handleGrievanceReadonly($id) { $Grievance = new Grievance; $grievance = $Grievance->getGrievance($id); $userObj = Session::get('userObj'); $grievance->disable_val=''; // if the user is trying to edit / view an entry which he doesn't own if ($grievance->user_id != $userObj->id) { PermApi::access_check('@'); $grievance->disable_val='disabled'; } //make change for view is only readonly $view = 'grievance::grievance-readonly'; $this->layout->content = View::make($view) ->with('grievance', $grievance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_readonly() {\n $this->readonly = true;\n\n return $this;\n }", "function getReadOnly() { return $this->_readonly; }", "public function setReadonlyView($readonlyView)\n\t{\n\t\t$this->readonlyView = $readonlyView;\n\t}", "public function readonly()\n {\n $this->e...
[ "0.73879755", "0.72999674", "0.71805716", "0.71800995", "0.71326023", "0.70822024", "0.7081933", "0.70576584", "0.7054115", "0.70531046", "0.70442355", "0.70442355", "0.7043264", "0.7020195", "0.6977251", "0.69206417", "0.6908908", "0.6881175", "0.6870185", "0.6865859", "0.68...
0.56303936
91
Handling the update of the post. This is common for both view form and manage form.
public function handleGrievanceUpdate() { $rules = array( 'title' => 'required|min:3', 'body' => 'required|min:10', 'category' => 'required', 'urgency' => 'required', ); $messages = array( 'title.required' => 'A title is required', 'title.min' => 'Title should be longer. Min 3 characters', ); //If update come form mange then not run validation if (!(Input::get('status'))) { // doing the validation, passing post data, rules and the messages $validator = Validator::make(Input::all(), $rules, $messages); if ($validator->fails()) { // send back to the page with the input data and errors GlobalHelper::setMessage('Fix the errors........', 'warning'); // setting the error message $gid=Input::get('id'); return Redirect::to('grievance/view/'.$gid)->withInput()->withErrors($validator); } } $Grievance = new Grievance; if ($Grievance->updateGrievance()) { SentryHelper::setMessage('Grievance has been updated'); } else { SentryHelper::setMessage('Grievance has not been updated', 'warning'); } return Redirect::to('grievance/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n\t$this->layout='wide';\n $post=$this->loadPost();\n $post->content=($post->contentbig)?$post->contentbig:$post->contentshort;\n\n if(isset($_POST['Post']))\n {\n $post->attributes=$_POST['Post'];\n if(isset($_POST['previewPos...
[ "0.8085932", "0.8051509", "0.79410464", "0.7787735", "0.7730941", "0.7565212", "0.73553944", "0.72614676", "0.71582925", "0.71515983", "0.71420443", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "0.71054834", "...
0.0
-1
/$grievance = Grievance::find($id); $this>layout>content = View::make('grievance::grievancemanage') >with('grievance', $grievance);
public function handleGrievanceManage($id) { PermApi::access_check('manage_grievance'); $userObj = Session::get('userObj'); $Grievance = new Grievance; $grievance = $Grievance->getGrievance($id); $grievance->disable_val=''; // if the user is trying to edit / view an entry which he doesn't own if ($grievance->user_id != $userObj->id) { $grievance->disable_val='disabled'; } $this->layout->content = View::make('grievance::grievance-manage') ->with('grievance', $grievance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($id)\n {\n \n $grados = Grado::where('id', '=', $id)->get();\n return view('titulomiig::editar-area')->with('grados', $grados);\n \n }", "public function all_manufacture(){\n$all_manufacture_info=DB::table('tbl_manufacture')->get();\n$manage_manufacture=view('admin.a...
[ "0.66129833", "0.6573803", "0.6472388", "0.64296424", "0.63939464", "0.636697", "0.62907636", "0.6287406", "0.6286177", "0.6263025", "0.6243125", "0.6237976", "0.62243485", "0.6211769", "0.61885375", "0.6185985", "0.6166124", "0.613711", "0.6131135", "0.6128489", "0.6126823",...
0.0
-1
Handle for Request for Reopen
public function handleGrievanceRequestReopen() { //code for request to reopen $Grievance = new Grievance; if ($Grievance->RequestReoopenGrievance()) { SentryHelper::setMessage('Request sent ....'); } else { SentryHelper::setMessage('Request Not sent', 'warning'); } return Redirect::to('grievance/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleRequest() {}", "function handleRequest() ;", "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "function req_unhook() {\n \\...
[ "0.6340992", "0.62985456", "0.6265283", "0.6189609", "0.6189609", "0.6189609", "0.6088414", "0.5917999", "0.5850783", "0.5790484", "0.5726067", "0.5696581", "0.56604344", "0.5660314", "0.5640664", "0.5628068", "0.55742216", "0.5559663", "0.5554176", "0.55314547", "0.54796207"...
0.7514798
0
This is the delete.
public function handleGrievanceDelete($id) { $Grievance = new Grievance; $re=$Grievance->deleteGrievance($id); SentryHelper::setMessage('Grievance Deleted....'); return Redirect::to('grievance/list'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function delete() {\n\t}", "public function delete()\r\n\t{\r\n\t}", "public function delete() {\r\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete()\n\t{\n\t}", "public function DE...
[ "0.876966", "0.8694194", "0.86386025", "0.86292493", "0.8629228", "0.8629228", "0.86291766", "0.86016273", "0.8565054", "0.8541683", "0.85188097", "0.8481458", "0.8462262", "0.843941", "0.8419187", "0.84134376", "0.84134376", "0.84134376", "0.84134376", "0.84134376", "0.84134...
0.0
-1
belongsTo's /Un productor tiene una region
public function region() { return $this->belongsTo('App\Region', 'region_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function region(){\n /*return $this\n ->belongsTo(Region::class,'t_regiones','id_region');*/\n /*return $this\n ->belongsTo('App\\Models\\Region','t_regiones','id_region');*/\n return $this->belongsTo('App\\Models\\Region','id_region');\n }", "public function ...
[ "0.7561323", "0.7150349", "0.7150349", "0.7134622", "0.71269244", "0.70317084", "0.6974185", "0.65137416", "0.64944404", "0.6338248", "0.62820816", "0.6276726", "0.6240756", "0.61561346", "0.61561346", "0.6110796", "0.60489404", "0.60429835", "0.6027697", "0.5975145", "0.5967...
0.69792724
6
TODO $charset_local podria volverse opcional si pudiesemos detectar automaticamente el charset de $datos Espera que $datos sea una estructura php e intenta convertirlo a $formato.
function formatearSalida($datos, $formato, $charset_remoto, $charset_local){ switch($formato){ case "application/php" : if($charset_local != $charset_remoto){ $datos = convertir_charset_mix($datos, $charset_remoto, $charset_local); } return serialize($datos); case "text/xml": //$datos = utf8_encode_mix($datos); $factory = new XMLFactory(); $xml_parser = $factory->getArrayToXMLInstance(); /*if($charset_local != "utf-8"){ $datos = convertir_charset_mix($datos, "utf-8", $charset_local); }*/ if($charset_local != $charset_remoto){ $datos = convertir_charset_mix($datos, $charset_remoto, $charset_local); } $xml_parser->setCharsetSalida($charset_remoto); $datos_xml = $xml_parser->toXml($datos); return $datos_xml; case "text/html": if($charset_local != $charset_remoto){ $datos = convertir_charset_mix($datos, $charset_remoto, $charset_local); } return "<pre>".print_r($datos, TRUE)."</pre>"; case "application/json" : $charset_remoto = "utf-8";//obligatorio if($charset_local != $charset_remoto){ $datos = convertir_charset_mix($datos, $charset_remoto, $charset_local); } return json_encode($datos); default: return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatearEntrada($datos, $formato, $charset_local, $charset_remoto){\n\n switch($formato){\n\tcase \"application/php\" :\n\t\t$datos_php = unserialize(trim($datos));\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);\n ...
[ "0.75292677", "0.6107129", "0.58831346", "0.5664293", "0.56318307", "0.56116486", "0.55424964", "0.5515077", "0.54831815", "0.5479926", "0.5436612", "0.5416242", "0.5401706", "0.5398831", "0.53975886", "0.53917867", "0.53881615", "0.5341596", "0.5331917", "0.5321743", "0.5305...
0.69077533
1
TODO $charset_remoto podria volverse opcional si pudiesemos detectar automaticamente el charset de $datos Espera que $datos este en formato $formato e intenta convertirlo a php.
function formatearEntrada($datos, $formato, $charset_local, $charset_remoto){ switch($formato){ case "application/php" : $datos_php = unserialize(trim($datos)); if($charset_local != $charset_remoto){ $datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto); } return $datos_php; case "text/xml": /** La documentacion dice que XMLParser detecta automaticamente el encoding*/ $factory = new XMLFactory(); $xml_parser = $factory->getXMLToArrayInstance(); $datos_php = $xml_parser->toArray($datos); if($charset_local != $charset_remoto){ $datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto); } //echo "Datos traidos en XML <pre>".print_r($datos_php, TRUE)."</pre>"; return $datos_php; case "application/x-www-form-urlencoded": parse_str($datos, $datos_php); if($charset_local != $charset_remoto){ $datos_php = convertir_charset_mix($datos_php, $charset_remoto, $charset_local); } return $datos_php; case "application/json" : /**codificacion remota obligatoria: utf-8 o ASCII*/ //error_log("[".date("r")."] get datos".print_r($datos, TRUE)."\n",3,"error.log"); $datos_php = json_decode($datos, true); //error_log("[".date("r")."] get datos".print_r($datos_php, TRUE)."\n",3,"error.log"); if($charset_local != $charset_remoto){ $datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto); } return $datos_php; default: return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatearSalida($datos, $formato, $charset_remoto, $charset_local){\n\n switch($formato){\n\tcase \"application/php\" :\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);\n \t\t} \n\t\treturn serialize($datos);\n\tca...
[ "0.69566005", "0.58332425", "0.5765321", "0.56932706", "0.56637764", "0.56604564", "0.56287706", "0.55785847", "0.556895", "0.54836196", "0.54818404", "0.5448594", "0.5428814", "0.54053783", "0.53852713", "0.53700095", "0.53395414", "0.532923", "0.5308344", "0.5294057", "0.52...
0.7636499
0
Initiates any database connections
protected function _initDatabaseManager() { // implement in application. Get DatabaseManager }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initDBConnections(): void\n {\n $this->addConnectionsToConfig();\n $this->testConnections();\n }", "public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }", "protected function _initDbConnection() {\n\t\tif (!empty($this->...
[ "0.84182936", "0.7627308", "0.7593879", "0.74544615", "0.74366885", "0.7415265", "0.7400236", "0.7400144", "0.73842883", "0.73698133", "0.73384595", "0.72405064", "0.72297966", "0.72067875", "0.71897465", "0.7137161", "0.70895165", "0.7084701", "0.70732564", "0.70677155", "0....
0.6782051
42
Configure path constants that are used throughout the application.
protected function _initPaths() { defined('PROJECT_PATH') || define('PROJECT_PATH', $this->_getProjectPath()); defined('APPLICATION_PATH') || define('APPLICATION_PATH', $this->_getApplicationPath()); defined('LIBRARY_PATH') || define('LIBRARY_PATH', $this->_getLibraryPath()); defined('DOCUMENT_ROOT') || define('DOCUMENT_ROOT', $this->_getDocumentRoot()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function definePathConstants() {\n if ( !defined('EFC_ROOT_PATH') ) {\n if (strpos(__FILE__, 'webapp/_lib' ) !== false) { // root is up 3 directories\n define('EFC_ROOT_PATH', str_replace(\"\\\\\",'/', dirname(dirname(dirname(__FILE__)))) .'/');\n } else { ...
[ "0.73775625", "0.7218946", "0.70854515", "0.69488", "0.6694637", "0.6424973", "0.6419138", "0.6390369", "0.63402146", "0.63205814", "0.63002706", "0.62688774", "0.624353", "0.62138516", "0.6173951", "0.61704373", "0.61704373", "0.61704373", "0.61704373", "0.6144393", "0.61352...
0.7098083
2
Configures the application representative
protected function _configureApplication() { $this->getApplication() ->setRequest(\App\Factory::createRequest()) ->setRouter(\App\Factory::createRouter()) ->setDispatcher(\App\Factory::createDispatcher()) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function configure();", "protected function configure()\n {\n $this->setName('appconfig')\n ->setDescription('Create appserver.io Config')\n ->addArgument('application-name', InputOption::VALUE_REQUIRED, 'config application name')\n ->addArgument('namesp...
[ "0.6875046", "0.6846799", "0.68386084", "0.66899", "0.66442764", "0.66442764", "0.66149086", "0.66149086", "0.6572139", "0.6527485", "0.6494877", "0.6491571", "0.6490498", "0.64818615", "0.6464976", "0.6456143", "0.6443482", "0.64179", "0.6393115", "0.63750184", "0.6363162", ...
0.7210944
0
Configures the autoloader that is used to automatically require php files when they're needed.
protected function _initAutoloader() { require_once APPLICATION_PATH . DIRECTORY_SEPARATOR . 'Autoloader.php'; $this->_autoloader = new \App\Autoloader(); $this->_autoloader ->addNamespaces($this->_getAutoloaderNamespaces()) ->register(true) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setAutoLoader() {\n \n spl_autoload_register(array('self', 'autoLoader'));\n \n }", "function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATO...
[ "0.81605667", "0.78403693", "0.7707648", "0.7666732", "0.7551559", "0.7536737", "0.74899733", "0.74509996", "0.7429466", "0.7423897", "0.7280409", "0.72696775", "0.720366", "0.7190256", "0.7165946", "0.7149916", "0.7103146", "0.710133", "0.7083783", "0.70712304", "0.7067179",...
0.72639024
12
Get the indexable data array for the model.
public function toSearchableArray() { $searchable = [ 'id' => $this->id, 'first_name' => $this->first_name, 'middle_name' => $this->middle_name, 'last_name' => $this->last_name, 'name' => $this->renderFullname(), 'contact_no' => $this->contact_no, 'company_no' => $this->contact_no, 'email' => $this->email, 'location' => $this->location ? $this->location->name : null, 'leader' => $this->supervisor ? $this->supervisor->renderFullname() : '', 'category' => $this->category ? $this->category->title : '', ]; /* Check if the user has department */ if($this->department) { $holder = $this->department; $searchable['department'] = $holder->department->name; $searchable['division'] = $holder->department->division->name; $searchable['company'] = $holder->department->division->company->name; /* Include company abbreviation if it has */ if($holder->department->division->company->abbreviation) $searchable['company_abbr'] = $holder->department->division->company->abbreviation; /* Check if team exists */ if($holder->department->team) $searchable['team'] = $holder->department->team->name; } return $searchable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return $this->findModel()->toArray();\n }", "public function getIndexedValues(): array\n {\n return $this->indexedValues;\n }", "function index($model) {\n\t\t$index = array();\n\t\t$table = $this->fullTableName($model);\n\t\tif ($table) {\n\t\t\t$indexes...
[ "0.6584249", "0.65293354", "0.6500704", "0.64569104", "0.63561636", "0.63456315", "0.63011545", "0.63011545", "0.63006574", "0.63003474", "0.6256897", "0.62512094", "0.62319905", "0.621981", "0.62194175", "0.6203779", "0.61946076", "0.61771804", "0.6168819", "0.61604744", "0....
0.0
-1
/ Check if company is set
public function getCompany() { if(!$this->department || !$this->department->department || !$this->department->department->division || !$this->department->department->division->company) return false; return $this->department->department->division->company; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isCompanyRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired();\n }", "public function hasCompanyInfo()\n {\n $result = false;\n if ($this->getField('company') != '' && $this->getField('companyzipcode') != '') {\n ...
[ "0.7609332", "0.742832", "0.7238619", "0.7134508", "0.66851294", "0.66851294", "0.6490814", "0.6467453", "0.6422401", "0.6361208", "0.6344578", "0.6297016", "0.6255968", "0.62377185", "0.6237338", "0.6172491", "0.6143421", "0.61419755", "0.61055154", "0.60783106", "0.6076189"...
0.6245798
13
/ Check if division is set
public function getDivision() { if(!$this->department || !$this->department->department || !$this->department->department->division) return false; return $this->department->department->division; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDivSpecialCases()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $zero->div($number)->equals(...
[ "0.6606938", "0.6344441", "0.63271266", "0.6289801", "0.6123994", "0.592897", "0.58043265", "0.5771915", "0.574281", "0.57140964", "0.57109994", "0.5661653", "0.5660962", "0.5654676", "0.5594685", "0.5508417", "0.5495154", "0.5489073", "0.5468771", "0.53983593", "0.53876597",...
0.58258194
6
/ Check if deoartment is set
public function getDepartment() { if(!$this->department || !$this->department->department) return false; return $this->department->department; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasDepartment() {\n return $this->_has(2);\n }", "public function __isset( $var ){\n\t\t//if isset is invoked on $EM_Bookings->bookings then we'll assume it's only set if the bookings property is empty, not if null.\n\t\t$result = false;\n\t\tif( $var == 'bookings' ){\n\t\t\t$result = $th...
[ "0.5978499", "0.56854314", "0.56844413", "0.56222993", "0.55956125", "0.55177814", "0.5509514", "0.5496834", "0.5496834", "0.5493254", "0.5431746", "0.5429123", "0.5415983", "0.5401173", "0.53721154", "0.5367571", "0.53666025", "0.5366199", "0.5357321", "0.53481907", "0.53367...
0.53258514
21
/ Check if team is set
public function getTeam() { if(!$this->department || !$this->department->team) return false; return $this->department->team; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasTeam()\n {\n return $this->Team !== null;\n }", "function isTeamleiter() {\n \n $team = $this -> getTeamObject();\n if(!$team){\n return false;\n }\n \n \n $test_uid = $team -> getLeiter();\n if($test_uid == $this -> getUid...
[ "0.76891", "0.6932809", "0.6821606", "0.66545135", "0.66071033", "0.6488159", "0.6417442", "0.6345715", "0.63276935", "0.6301852", "0.62473947", "0.62187743", "0.61886096", "0.61671966", "0.60736126", "0.6047234", "0.596898", "0.5939194", "0.5928117", "0.59280276", "0.5842128...
0.6043342
16
/ Check if the user has an immediate leader
public function getNextLevelLeader() { if(!$this->getImmediateLeader()) return false; /* Fetch next level leader */ $leader = $this->supervisor->supervisor; /* Check if the user has an next level leader */ if(!$leader) return false; /* Check if supervisor is on vacation */ if($leader->isOnVacation()) $leader = $leader->proxy; return $leader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLeader(User $user) {\n return $user instanceof User && $this->object->getLeaderId() == $user->getId();\n }", "public function ismoduleleader()\n {\n return $this->hasuser() && $this->user()->ismoduleleader();\n }", "public function hasLeader($user): bool\n {\n ...
[ "0.73176944", "0.7273806", "0.71478784", "0.6977582", "0.6802311", "0.6410632", "0.6215428", "0.61310047", "0.6045074", "0.60090685", "0.59975624", "0.59599483", "0.5937746", "0.592111", "0.57906073", "0.57820976", "0.5780119", "0.5768654", "0.57619256", "0.57563686", "0.5754...
0.6225644
6
/ Delete previous department
public function assignDepartment($departmentID, $positionID = null, $teamID = null) { $this->unassignDepartment(); /* Create & Assign the department to the user */ $this->department()->associate( DepartmentEmployee::create([ 'employee_id' => $this->id, 'department_id' => $departmentID, 'position_id' => $positionID ? $positionID : null, 'team_id' => $teamID ? $teamID : null, ]) ); $this->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteDept(){\n\t\t$incomingFormData = $this->readHttpRequest();\n\t\t$formData = json_decode($incomingFormData);\n\t\t$deleteResult = $this->department_model->deleteDept($formData);\n\t\t$depListFlag = 1;\n\t\tif($deleteResult == true){\n\t\t\t$data['status'] = 'ok';\n\t\t\t\t}else{\n\t\t\t$data[...
[ "0.6601805", "0.6433483", "0.62186766", "0.61896515", "0.6069768", "0.6063643", "0.60410196", "0.6040104", "0.6017069", "0.59681237", "0.5951771", "0.5951473", "0.59392726", "0.59195757", "0.591735", "0.5909612", "0.58932525", "0.5888133", "0.5881974", "0.58600783", "0.581934...
0.0
-1
/ Delete previous department
public function unassignDepartment() { if($this->department) $this->department()->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteDept(){\n\t\t$incomingFormData = $this->readHttpRequest();\n\t\t$formData = json_decode($incomingFormData);\n\t\t$deleteResult = $this->department_model->deleteDept($formData);\n\t\t$depListFlag = 1;\n\t\tif($deleteResult == true){\n\t\t\t$data['status'] = 'ok';\n\t\t\t\t}else{\n\t\t\t$data[...
[ "0.6601805", "0.6433483", "0.62186766", "0.6069768", "0.6063643", "0.60410196", "0.6040104", "0.6017069", "0.59681237", "0.5951771", "0.5951473", "0.59392726", "0.59195757", "0.591735", "0.5909612", "0.58932525", "0.5888133", "0.5881974", "0.58600783", "0.5819342", "0.5814968...
0.61896515
3
/ Sync the assignees
public function updateAssignee($employees) { $this->assignees()->sync($employees); /* Notify all assignees */ foreach ($this->assignees as $key => $assignee) { $assignee->notify(new UserWasAssigned($this, $assignee)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAssignees(?array $value): void {\n $this->getBackingStore()->set('assignees', $value);\n }", "public function updateCompleteOwnersList()\n\t{\n\t\t$role = Role::where('name', 'Propietario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\t\n\n\t\ttry{\n\...
[ "0.63495946", "0.6148892", "0.60204536", "0.5972841", "0.5741457", "0.5667875", "0.55971116", "0.5577528", "0.55692124", "0.5550841", "0.5548409", "0.55469036", "0.5524185", "0.552135", "0.55018693", "0.5485532", "0.54692304", "0.5439212", "0.5407967", "0.5373635", "0.5366387...
0.6465456
0
/ Fetch needed vars
public function updateSupervisor($supervisor) { $newSupervisor = User::find($supervisor); if (!$newSupervisor) { return false; } $oldSupervisor = $this->supervisor; /* Update supervisor */ $this->supervisor_id = $newSupervisor->id; $this->save(); /* Check if supervisor exists */ if($newSupervisor && $oldSupervisor) { /* | @Update request approvers |-----------------------------------------------*/ $formApprovers = FormApprover::whereIn('form_id', $this->forms()->where('status', '!=', Form::APPROVED) ->pluck('id') ->toArray() ) ->where('status', FormApprover::PENDING) ->get(); /* Update each request and send in the notification */ foreach($formApprovers as $key => $formApprover) { /* Check if approver is for the immediate leader */ if($formApprover->form_template_approver && $formApprover->form_template_approver->type == FormTemplateApprover::LEVEL) { /* Check depending on the level */ switch($formApprover->form_template_approver->type_value) { case FormTemplateApprover::IMMEDIATE_LEADER: /* Update the approver */ $this->updateApprover($formApprover, $newSupervisor); break; case FormTemplateApprover::NEXT_LEVEL_LEADER: /* Update the approver */ $this->updateApprover($formApprover, $newSupervisor->supervisor); break; } } } /* Update also all next level leader approvers */ $this->updateNextLevelLeader($newSupervisor, $oldSupervisor); /* | @Update event approvers |-----------------------------------------------*/ $events = $this->events()->where('status', EventParticipant::PENDING) ->get(); /* Update approver on events */ foreach($events as $key => $event) { /* Update supervisor if needed */ if($event->approver_id != $newSupervisor->id) { $event->approver_id = $newSupervisor->id; $event->save(); /* Notify new approver */ $event->approver->notify(new EventWillAttend($event, $event->employee, false)); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGetVariables() {}", "public function getGetVariables();", "public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }", "protected function initVars() {\n\n\t\t}", "public function prepareVars()\n {\n $this->vars['...
[ "0.68353975", "0.680267", "0.6438923", "0.6366522", "0.6357337", "0.6290425", "0.6249066", "0.6208679", "0.62012815", "0.6190607", "0.6152645", "0.61180526", "0.61173415", "0.6112176", "0.6096331", "0.6063508", "0.6046589", "0.6033225", "0.6018076", "0.5993321", "0.5993321", ...
0.0
-1
/ Check if leader exists
public function updateNextLevelLeader($newSupervisor, $oldSupervisor) { if($oldSupervisor && $newSupervisor) { /* Fetch all subordinate forms */ $formIDs = Form::whereIn('employee_id', $this->subordinates()->pluck('id')->toArray()) ->where('status', '!=', [FormApprover::APPROVED, FormApprover::DISAPPROVED]) ->pluck('id') ->toArray(); /* Fetch all form approvers for the old supervisor */ $formApprovers = FormApprover::whereIn('id', $formIDs) ->where('status', FormApprover::PENDING) ->where('approver_id', $oldSupervisor->id) ->get(); /* Update each request and send in the notification */ foreach($formApprovers as $key => $formApprover) { /* Check if approver is for the immediate leader */ if($formApprover->form_template_approver && $formApprover->form_template_approver->type == FormTemplateApprover::LEVEL && $formApprover->form_template_approver->type_value == FormTemplateApprover::NEXT_LEVEL_LEADER) { /* Update the approver */ $this->updateApprover($formApprover, $newSupervisor); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasLeader($user): bool\n {\n return $this->leaders()->where('user_id', $user->id)->exists();\n }", "function isLeader(User $user) {\n return $user instanceof User && $this->object->getLeaderId() == $user->getId();\n }", "public function ismoduleleader()\n {\n ...
[ "0.6706399", "0.659673", "0.62562156", "0.62331855", "0.6125607", "0.6114554", "0.61042416", "0.6076869", "0.60717905", "0.606273", "0.5922969", "0.5907259", "0.58819735", "0.5866339", "0.58570665", "0.58178806", "0.5807636", "0.58070695", "0.5785734", "0.57544285", "0.565755...
0.0
-1
/ Check each User's group if role is available
public function hasRole($role) { foreach ($this->groups as $group) { if($group->hasRole($role)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$group = FormUtil::getPassedValue('group', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($group == null) {\n\t\t\treturn self::...
[ "0.674633", "0.6611128", "0.65264326", "0.6524511", "0.64956117", "0.6443354", "0.64286214", "0.6409271", "0.63693583", "0.6226767", "0.6219456", "0.6216316", "0.6166146", "0.6150079", "0.6129473", "0.6118312", "0.61063063", "0.61002517", "0.6081125", "0.6075731", "0.6046337"...
0.0
-1
/ Loop through the array
public function renderConstants($array, $value) { foreach ($array as $obj) { if($obj['value'] == $value) return $obj; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIteration() {\n $array = array(100, 101, 102, 103);\n $this->chartData->add($array);\n foreach ($this->chartData->getData() as $index => $value) {\n $this->assertEquals($array[$index], $value);\n }\n }", "public function analyseArray($array){\n for...
[ "0.6109884", "0.58564967", "0.58235127", "0.5816742", "0.567704", "0.56289643", "0.5605787", "0.5592173", "0.5580304", "0.5560358", "0.55528504", "0.55506635", "0.5521754", "0.5512692", "0.5480459", "0.54730874", "0.546947", "0.54664004", "0.54664004", "0.5451741", "0.5408931...
0.0
-1
Gets a list of the actions that can be performed.
public static function getActions() { $result = new Obj; $actions = Access::getActionsFromFile(dirname(__DIR__) . DS . 'config' . DS . 'access.xml'); foreach ($actions as $action) { $result->set($action->name, User::authorise($action->name, 'com_messages')); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActions()\n {\n return self::$actionList;\n }", "public function getActions();", "public function getActions();", "protected function getActions() {}", "public function getActions()\n {\n return $this->actions;\n }", "public function getActions()\n {\n ...
[ "0.84606814", "0.8448147", "0.8448147", "0.8191959", "0.81547195", "0.81547195", "0.81547195", "0.8146969", "0.81187963", "0.81015295", "0.8100823", "0.803259", "0.8023901", "0.79295254", "0.78862745", "0.788597", "0.7827673", "0.7827673", "0.77820987", "0.77298754", "0.77244...
0.66787356
96
Get a list of filter options for the state of a module.
static function getStateOptions() { // Build the filter options. $options = array(); $options[] = Html::select('option', '1', Lang::txt('COM_MESSAGES_OPTION_READ')); $options[] = Html::select('option', '0', Lang::txt('COM_MESSAGES_OPTION_UNREAD')); $options[] = Html::select('option', '-2', Lang::txt('JTRASHED')); return $options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = Html::select('option', '0', Lang::txt('JENABLED'));\n\t\t$options[] = Html::select('option', '1', Lang::txt('JDISABLED'));\n\n\t\treturn $options;\n\t}", "static function getStateOptions()\n...
[ "0.71666163", "0.7070689", "0.70211387", "0.6698852", "0.66495895", "0.6607784", "0.65299857", "0.6456342", "0.6450671", "0.63894296", "0.63894296", "0.638174", "0.6367483", "0.6334703", "0.6331895", "0.6275811", "0.6251321", "0.6213054", "0.62046725", "0.618413", "0.6178758"...
0.6689269
4
Send data by AJAX
public function handleGetData() { $data = $this->getData(); $options = $this->getOptions(); $this->presenter->sendResponse( new JsonResponse( [ "data" => $data, "options" => $options, ] ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendAjax($data){\n header(\"Content-Type:application/json\"); // Cabecera que indica el tipo de datos que recibe.\n echo json_encode($data); // Imprime los datos dentro de objetos JSON.\n }", "public function sendData()\n \t{\n \t\t$data = $this->m_admin->getData(\"s...
[ "0.777002", "0.6947997", "0.66195077", "0.66044474", "0.6588111", "0.6530799", "0.652145", "0.6487613", "0.64816165", "0.6401136", "0.6354211", "0.63522375", "0.63257176", "0.62940705", "0.6274898", "0.6242718", "0.62417746", "0.62162673", "0.62162673", "0.6212047", "0.621020...
0.0
-1
set DATA and OPTIONS helpers Add linear data
public function addSeries(array $data, $label = "", array $options = []) { if ($label) { $options["label"] = $label; } $this->data[] = array_merge( ["data" => $data], $options ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function convertData() {\n\t\tforeach ($this->Data as $i => $Data) {\n\t\t\t$Points = array();\n\t\t\tforeach ($Data['data'] as $x => $y) {\n\t\t\t\t$Points[] = array($x, $y);\n\t\t\t}\n\t\t\t$this->Data[$i]['data'] = $Points;\n\t\t}\n\n\t\tif (Configuration::ActivityView()->smoothCurves() && !isset($this-...
[ "0.59673333", "0.5696168", "0.5676577", "0.55647", "0.55645347", "0.556161", "0.55429286", "0.55138284", "0.55138284", "0.55138284", "0.5493929", "0.5489824", "0.5473862", "0.54715633", "0.54650253", "0.546242", "0.54324484", "0.5423442", "0.5415971", "0.5413735", "0.53904337...
0.52411807
34
Display a listing of the resource.
public function index(Request $request) { if($request->has('cari')){ $inventaris = \App\Models\Inventaris::where('nama_inventaris','LIKE','%'.$request->cari.'%')->get(); }else{ $inventaris = Inventaris::all(); } $role = RolePengurus::get(); return view('pages.inventaris',["inventaris"=>$inventaris,"role"=>$role]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create(array $inventaris) { return view('pages.inventaris'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'role_idWeb'=>'required', 'nama_inventarisWeb'=>'required', 'tanggal_inventarisWeb'=>'required', 'nilai_inventarisWeb'=>'required', 'asal_inventarisWeb'=>'required', 'keteranganWeb'=>'required' ]); $inventaris = new Inventaris(); $inventaris->role_id = $request->role_idWeb; $inventaris->nama_inventaris = $request->nama_inventarisWeb; $inventaris->tanggal_perolehan = $request->tanggal_inventarisWeb; $inventaris->nilai_perolehan = $request->nilai_inventarisWeb; $inventaris->asal_inventaris = $request->asal_inventarisWeb; $inventaris->keterangan = $request->keteranganWeb; $inventaris->save(); $inventaris = Inventaris::all(); return redirect('/datainventaris')->with('success','data berhasil disimpan'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Inventaris $inventaris) { $inventaris = Inventaris::all(); return view('pages.inventaris',compact('inventaris')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Inventaris $inventaris) { return view('pages.inventaris',compact('inventaris')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $request->validate([ 'role_idWeb'=>'required', 'nama_inventarisWeb'=>'required', 'tanggal_inventarisWeb'=>'required', 'nilai_inventarisWeb'=>'required', 'asal_inventarisWeb'=>'required', 'keteranganWeb'=>'required' ]); $inventaris = Inventaris::Find($request->id); $inventaris->role_id = $request->role_idWeb; $inventaris->nama_inventaris = $request->nama_inventarisWeb; $inventaris->tanggal_perolehan = $request->tanggal_inventarisWeb; $inventaris->nilai_perolehan = $request->nilai_inventarisWeb; $inventaris->asal_inventaris = $request->asal_inventarisWeb; $inventaris->keterangan = $request->keteranganWeb; $inventaris->save(); return redirect('/datainventaris')->with('success'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(Inventaris $inventaris) { $inventaris >delete(); return redirect()->route('/datainventaris')->with('success','Inventaris berhasil dihapus'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Returns the base URL
public function getBaseUrl() { return 'https://nextcloud.com'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_base_url()\r\n\t\t{\r\n\t\t\t$url = \"http\";\r\n \t\t\tif ( isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == \"on\" ) $url .= \"s\";\r\n\t\t\t$url .= \"://\";\r\n \t\t\tif ( $_SERVER[ 'SERVER_PORT' ] != \"80\" )\r\n\t\t\t\t$url .= $_SERVER[ 'SERVER_NAME' ]. \":\" . $_SERVER[ 'SERVER_PORT...
[ "0.8802075", "0.8792601", "0.87761796", "0.87676114", "0.8741932", "0.87314975", "0.8704271", "0.86936146", "0.8673302", "0.8673302", "0.8660023", "0.86224484", "0.8603651", "0.8575449", "0.85674196", "0.8564808", "0.8557457", "0.8512877", "0.84983295", "0.8483924", "0.847505...
0.0
-1
Returns the documentation URL
public function getDocBaseUrl() { return 'https://docs.nextcloud.com'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocumentationUrl();", "public function get_documentation_url() {\n\n\t\treturn 'http://docs.woocommerce.com/document/elavon-vm-payment-gateway/';\n\t}", "public function get_documentation_url() {\n\t\treturn 'https://docs.woocommerce.com/document/cost-of-goods-sold/';\n\t}", "public functi...
[ "0.9118569", "0.7644778", "0.7612588", "0.73489064", "0.7258886", "0.7229198", "0.70974684", "0.7057999", "0.704628", "0.7008962", "0.70025325", "0.68297416", "0.68111503", "0.68111503", "0.67919046", "0.67793465", "0.6757369", "0.6706965", "0.6644937", "0.65939426", "0.65937...
0.76181287
2
Returns the short name of the software
public function getName() { return 'Custom Cloud'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSoftwareName()\n {\n return $this->getParam(self::SOFTWARE_PARAM_NAME);\n }", "public static function getSoftwareName()\n\t\t{\n\t\t\treturn 'Wordpress 3.9.1 en WooCommerce 3.0.0+';\n\t\t}", "public function getOsShortName()\n {\n return $this->os_short_name;\n }", ...
[ "0.7789077", "0.7723213", "0.7229513", "0.7086347", "0.7067764", "0.70465887", "0.70089906", "0.69613016", "0.69341224", "0.6912616", "0.6908922", "0.6904534", "0.6804569", "0.6740599", "0.67201614", "0.67159134", "0.6682478", "0.6682478", "0.666562", "0.6645352", "0.6626608"...
0.0
-1
Returns the short name of the software containing HTML strings
public function getHTMLName() { return 'Custom Cloud'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shortName()\n {\n if (strlen($this->name) > 30) {\n return '<span title=\"' . e($this->name) . '\">' . substr(e($this->name), 0, 28) . '...</span>';\n }\n return $this->name;\n }", "static function name(): string { return 'Archival website'; }", "function g...
[ "0.6445625", "0.64201206", "0.63559395", "0.63434815", "0.62989324", "0.62918425", "0.6262053", "0.62161356", "0.62082255", "0.6074806", "0.605158", "0.6044846", "0.6035845", "0.6026266", "0.60148567", "0.601456", "0.6009372", "0.60062176", "0.6002874", "0.5986404", "0.597860...
0.5912862
31
Returns entity (e.g. company name) used for footer, copyright
public function getEntity() { return 'Custom Cloud Co.'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthorcompany() {}", "public function company(): string\n {\n return $this->getData('CompanyName');\n }", "public static function company()\n {\n return new TextNode('company');\n }", "public function title($entity) {\n\t\tstatic $financial = null;\n\n\t\tif ($fin...
[ "0.6701581", "0.65606016", "0.6544919", "0.63289535", "0.6276032", "0.62349343", "0.62065697", "0.6180747", "0.6156927", "0.6109544", "0.60964143", "0.60620594", "0.60403746", "0.6033397", "0.6009798", "0.5933545", "0.5899577", "0.5891846", "0.58878976", "0.5873929", "0.58700...
0.6710806
0
Returns short version of the footer
public function getShortFooter() { $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . '<br/>' . $this->getSlogan(); return $footer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLongFooter() {\n\t\t$footer = '© ' . date('Y') . ' <a href=\"' . $this->getBaseUrl() . '\" target=\"_blank\">' . $this->getEntity() . '</a>' .\n\t\t\t'<br/>' . $this->getSlogan();\n\n\t\treturn $footer;\n\t}", "public function getFooter();", "public function getFooter();", "public function...
[ "0.8119948", "0.8013002", "0.8013002", "0.790851", "0.778197", "0.7726154", "0.77153075", "0.7683358", "0.76807904", "0.76455015", "0.7595655", "0.7595655", "0.75911385", "0.7584095", "0.7559178", "0.7552255", "0.75474787", "0.7524389", "0.7497075", "0.74882084", "0.7474699",...
0.8595473
0
Returns long version of the footer
public function getLongFooter() { $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . '<br/>' . $this->getSlogan(); return $footer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShortFooter() {\n\t\t$footer = '© ' . date('Y') . ' <a href=\"' . $this->getBaseUrl() . '\" target=\"_blank\">' . $this->getEntity() . '</a>' .\n\t\t\t'<br/>' . $this->getSlogan();\n\n\t\treturn $footer;\n\t}", "public function getFooter();", "public function getFooter();", "public functio...
[ "0.8146224", "0.78987974", "0.78987974", "0.7714934", "0.76309913", "0.7554746", "0.75386643", "0.7467841", "0.74452364", "0.7434521", "0.7415478", "0.7406883", "0.7390948", "0.73530614", "0.7286164", "0.7229945", "0.7229945", "0.7227742", "0.7175284", "0.7161438", "0.7117651...
0.889675
0
Generate a documentation link for a given key
public function buildDocLinkToKey($key) { return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gen_help_url($sub_key = '') {\n\t\tif ($this->config->get('config_help_links') != 1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!empty($sub_key)) {\n\t\t\t$main_key = $sub_key;\n\t\t} else {\n\t\t\t$main_key = str_replace('/', '_', $this->controller);\n\t\t}\n\n\t\t$url = \"http://docs.abantecart.com/...
[ "0.6885762", "0.632404", "0.6261652", "0.6214391", "0.619343", "0.6083077", "0.6082882", "0.5912607", "0.5892871", "0.5849717", "0.58432573", "0.5837815", "0.57979935", "0.5767185", "0.57078314", "0.5693553", "0.56548554", "0.56516445", "0.5613801", "0.55771536", "0.55565697"...
0.8161257
0
Returns mail header color
public function getColorPrimary() { return '#745bca'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pl_header_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'headercolor' ) ) ) ? pl_hash_strip( ploption( 'headercolor' ) ) : '000000';\n\t\n\treturn $color;\t\n}", "function get_column_header_colour() {\n return array(\n 129, 245, 173);\n }", "function get_header_tex...
[ "0.7814012", "0.7270344", "0.71226764", "0.6629283", "0.6592015", "0.6486309", "0.6477016", "0.6472346", "0.6460307", "0.6340614", "0.63209987", "0.6261423", "0.6215585", "0.6160477", "0.61522585", "0.61382955", "0.61225325", "0.60878503", "0.606386", "0.60486686", "0.6019168...
0.0
-1
Returns variables to overload defaults from core/css/variables.scss
public function getScssVariables() { return [ 'color-primary' => '#745bca' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_scss_set_font_variables() {\n\n\t// Get the defaults.\n\tglobal $starter_default_fonts;\n\tglobal $starter_default_colors;\n\n\t// Create array of color variables.\n\t$variables = [];\n\n\tforeach ( $starter_default_colors as $key => $value ) {\n\n\t\t$variables[ $key ] = get_theme_mod( $key, $value );...
[ "0.71115303", "0.66057557", "0.6466062", "0.63583344", "0.6246334", "0.6243435", "0.6101464", "0.597163", "0.5958315", "0.5900788", "0.58901644", "0.5856367", "0.5819409", "0.57871747", "0.5755374", "0.5726822", "0.56927145", "0.56634414", "0.5653974", "0.56538546", "0.564378...
0.74441427
0
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.76544076", "0.74126637", "0.73943526", "0.7315881", "0.7226299", "0.7226299", "0.7189751", "0.7165679", "0.71507293", "0.71454424", "0.71073604", "0.7077418", "0.70732874", "0.7039465", "0.70294195", "0.70294195", "0.70294195", "0.70294195", "0.70294195", "0.69732153", "0....
0.0
-1
Do not touch me //
private function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __() {\n }", "public function oops () {\n }", "private function _i() {\n }", "abstract protected function doEvil();", "public function custom()\n\t{\n\t}", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public static function right_public(){return false;...
[ "0.6974424", "0.66867816", "0.6616395", "0.65483403", "0.6333307", "0.6292733", "0.6285628", "0.627268", "0.6254069", "0.625402", "0.62389", "0.6238507", "0.6238507", "0.6191326", "0.61800003", "0.6171449", "0.6147761", "0.6146575", "0.61276543", "0.6094713", "0.60934097", ...
0.0
-1
end of funcation addUrl
public function urlById($id){ try { if(!$user = JWTAuth::parseToken()->toUser()){ //no user found return response()->json([ 'message' => "User not found.", ], 404); } //generate token $token = TokenController::generateToken($user); //return token return response()->json([ 'status' => 'success', 'message' => "success", 'Urls' => Url::where('id',$id)->get(), 'token' => $token ], 200); } catch (\Exception $ex) { return response()->json([ 'status' => 'failure', 'message' => 'Something Went Wrong', 'info' => $ex->getMessage(), ], 200); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addUrl() {\r\n\t\t$current = $this->params['url']['url'];\r\n\t\t$accept = array('show', 'admin_show', 'admin_index');\r\n\t\tif(in_array($this->action, $accept)) {\r\n\t\t\tif ($this->Session->read('history.current') != $current){\r\n\t\t\t\t//$this->Session->write('history.previous', $this->Sessi...
[ "0.7780289", "0.71564347", "0.6966652", "0.683785", "0.68281657", "0.679876", "0.67956746", "0.66752154", "0.6642765", "0.6590574", "0.65459186", "0.6529325", "0.6529325", "0.6529325", "0.6529325", "0.64916915", "0.6463595", "0.6463595", "0.6463595", "0.6462543", "0.64537984"...
0.0
-1
Create a new controller instance.
public function __construct(ActivityRepository $activityRepository){ // $this->middleware('auth'); $activityRepository->UpdateStatistik(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index(){ return view('home'); // return redirect()->route('map.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
Lists all justicium entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $justicias = $em->getRepository(Justicia::class)->findAll(); return $this->render('justicia/index.html.twig', array( 'justicias' => $justicias, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function getAllEntities();", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flus...
[ "0.6980531", "0.68496346", "0.67485046", "0.6724493", "0.66907203", "0.66080004", "0.65311193", "0.6430179", "0.6384465", "0.63599294", "0.63599294", "0.6355407", "0.6353051", "0.634093", "0.6339823", "0.62901175", "0.62835395", "0.62770593", "0.62751764", "0.62238705", "0.62...
0.6470935
7
Creates a form to delete a justicium entity.
private function createDeleteForm(Justicia $justicium) { return $this->createFormBuilder() ->setAction($this->generateUrl('justicia_delete', array('id' => $justicium->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n ...
[ "0.7565924", "0.7354222", "0.7341708", "0.72316676", "0.7150517", "0.71355915", "0.70999205", "0.70867336", "0.70777845", "0.7053388", "0.69993454", "0.6972959", "0.6926406", "0.69212687", "0.69024855", "0.6899233", "0.6884797", "0.6874771", "0.6871098", "0.68676955", "0.6859...
0.7891954
0
Renders view for showing questions linked to tag
public function catchAll(...$args): object { if (count($args) != 1) { throw new NotFoundException("Tag doesn't exist"); } $tag = strtolower($args[0]); // tag name $qt = new QuestionToTags($this->di->dbqb); $questions = $qt->findAllWithTag($tag); $this->di->page->add("site/tags/tag", [ "tag" => $tag, "questions" => $questions, ]); return $this->di->page->render([ "title" => "Tag: $tag", ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_view($params) {\n $tag = safeParam($params, 0, false);\n if ($tag === false) {\n die(\"No tag selected\");\n }\n\t\n\t$tag = strtolower($tag);\n $records = Question::findAllRecordsByTag($tag);\n\t\n\n renderTemplate(\n \"views/tag_view.inc\",\n array(\n '...
[ "0.6691313", "0.66657925", "0.6464389", "0.63872015", "0.6340952", "0.6274514", "0.6195927", "0.6195824", "0.6186514", "0.6170348", "0.6137796", "0.6129563", "0.60700136", "0.6037978", "0.5989243", "0.5915993", "0.59030414", "0.5894787", "0.5894613", "0.5884346", "0.58800614"...
0.0
-1
Renders view for showing all tags
public function indexActionGet(): object { $tag = new Tag($this->di->dbqb); $tags = $tag->findAllByQuestionCount(); $this->di->page->add("site/tags/index", [ "tags" => $tags, ]); return $this->di->page->render([ "title" => "Tags", ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderTagView()\n {\n $tag = $this->di->get(\"tag\");\n $data = [\"title\" => \"guestbook\"];\n\n $tags = $tag->getAllTags();\n\n\n $this->di->get(\"view\")->add(\"components/tags\", [\"tags\" => $tags], \"main\");\n\n $this->di->get(\"pageRender\")->renderPage...
[ "0.79062843", "0.7783384", "0.767985", "0.76663285", "0.76118135", "0.7578889", "0.7569312", "0.7542474", "0.75017804", "0.74677837", "0.74484926", "0.7442387", "0.7438057", "0.74350363", "0.7413235", "0.73945403", "0.739403", "0.7391182", "0.73875666", "0.7345379", "0.733804...
0.6864147
63
Recoger datos del usuario y la imagen
public function like($image_id){ $user = \Auth::user(); // Condicion para ver si ya existe el like y no duplicarlo $isset_like = Like::where('user_id', $user->id)//le ingreso al objeto lo q este en la tabla likes donde el user_id sea igual al id del logeado y igual a la $image_id ->where('image_id', $image_id) ->count();//me saca la cantidad, si hubiera puest get() me sacaba las filas con los datos if($isset_like == 0){//si es 0 es porqe no existe y entro al if $like = new Like(); $like->user_id = $user->id; $like->image_id = (int)$image_id;//(int)casteo para q entre a la base de datos como int si no entra como string // Guardar $like->save();//estoy guardando el user_id del usuario logeado y el image_id de la imagen en la tabla like return response()->json([//public function like($image_id){ al ser un metodo q va ser consultado por ajax me conviene devolver un json, response son las "respuestas" que nos debe devolver Laravel ante cualquier solicitud que se realice al servidor 'like' => $like//me devuelve el objeto q he borrado ]); }else{ return response()->json([ 'message' => 'El like ya existe' ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actualizarUsuario()\n {\n //quitamos el id del array y lo guardamos a parte\n $datos = $_POST;\n $ciu = isset($datos['CIU']) ? $datos['CIU'] : $this->session->userdata(\"ciu\");\n unset($datos['CIU']);\n\n //miramos si ha enviado imagen de perfil. de ser asi se procesa en...
[ "0.7076706", "0.6824768", "0.6482034", "0.64555025", "0.6408572", "0.6383514", "0.63666344", "0.62597793", "0.62337357", "0.62081623", "0.6192756", "0.616417", "0.6159476", "0.6145417", "0.61233217", "0.61102825", "0.60914844", "0.6058916", "0.6043956", "0.60312074", "0.60307...
0.0
-1
Recoger datos del usuario y la imagen
public function dislike($image_id){ $user = \Auth::user(); // Condicion para ver si ya existe el like y no duplicarlo $like = Like::where('user_id', $user->id) ->where('image_id', $image_id) ->first();//me va permitir sacar un solo objeto de la base de datos if($like){//si existe // Eliminar like $like->delete(); return response()->json([ 'like' => $like,//me devuelve el objeto q he borrado 'message' => 'Has dado dislike correctamente' ]); }else{ return response()->json([ 'message' => 'El like no existe' ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actualizarUsuario()\n {\n //quitamos el id del array y lo guardamos a parte\n $datos = $_POST;\n $ciu = isset($datos['CIU']) ? $datos['CIU'] : $this->session->userdata(\"ciu\");\n unset($datos['CIU']);\n\n //miramos si ha enviado imagen de perfil. de ser asi se procesa en...
[ "0.7076706", "0.6824768", "0.6482034", "0.64555025", "0.6408572", "0.6383514", "0.63666344", "0.62597793", "0.62337357", "0.62081623", "0.6192756", "0.616417", "0.6159476", "0.6145417", "0.61233217", "0.61102825", "0.60914844", "0.6058916", "0.6043956", "0.60312074", "0.60307...
0.0
-1
Invokes a user process
static public function userProcess ( $pObject, $conf, $mConfKey, $passVar ) { return \JambageCom\Div2007\Utility\ObsoleteUtility::userProcess( $pObject, $conf, $mConfKey, $passVar ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runProcess($guid);", "public function invoke($action) {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = escapeshellarg($this->name);\n\t\t$cmdArgs[] = $action;\n\t\t$cmd = new \\OMV\\System\\Process(\"invoke-rc.d\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute();\n\t}", "protected abstract...
[ "0.5621175", "0.5590007", "0.55403286", "0.5504983", "0.55027723", "0.54247683", "0.5392353", "0.52774256", "0.52212715", "0.52137625", "0.51848376", "0.51337075", "0.51278484", "0.5106565", "0.5097803", "0.5091811", "0.50856316", "0.50713515", "0.50344414", "0.50343025", "0....
0.46324664
75
Fetches the FE user groups (fe_groups) of the logged in FE user
static public function fetchFeGroups () { $result = []; if ( isset($GLOBALS['TSFE']->fe_user) && isset($GLOBALS['TSFE']->fe_user->user) && isset($GLOBALS['TSFE']->fe_user->user['usergroup']) ) { $result = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_gro...
[ "0.73203427", "0.72411937", "0.7110806", "0.70966804", "0.6991979", "0.69108355", "0.6858293", "0.683968", "0.68328565", "0.68182594", "0.67765075", "0.6734005", "0.6715941", "0.6677012", "0.66682076", "0.6649335", "0.66362655", "0.6630931", "0.6619236", "0.6615782", "0.66018...
0.80179447
0
Fetches the FE user groups (fe_groups) of the logged in FE user as an array of record
static public function readFeGroupsRecords () { $result = false; $feGroups = static::fetchFeGroups(); if (!empty($feGroups)) { $feGroupList = implode(',', $feGroups); $where_clause = 'uid IN (' . $feGroupList . ')'; $result = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', 'fe_groups', $where_clause ); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function fetchFeGroups ()\n {\n $result = [];\n\n if (\n isset($GLOBALS['TSFE']->fe_user) &&\n isset($GLOBALS['TSFE']->fe_user->user) &&\n isset($GLOBALS['TSFE']->fe_user->user['usergroup'])\n ) {\n $result = explode(',', $GLOBALS['TS...
[ "0.82356024", "0.73394096", "0.7101859", "0.6964421", "0.6897223", "0.68906516", "0.68772984", "0.68538755", "0.67828745", "0.67818874", "0.6777793", "0.67765665", "0.67484015", "0.6706977", "0.66732204", "0.66684747", "0.66283506", "0.6609227", "0.65978146", "0.65956306", "0...
0.7721719
1
Adds the time zone to the given unix time parameter
static public function addTimeZone (&$time) { if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'])) { $time += ($GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'] * 3600); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_time_zone()\n {\n $this->set_date_to_now();\n $offset = $GLOBALS['time_diff'] - $GLOBALS['server_time_offset'];\n $this->timestamp+=($offset*3600);\n }", "public function createInTimeZone($time, \\DateTimeZone $timezone);", "function set_time_from_unix_time($unixtime)\n ...
[ "0.687727", "0.6207628", "0.6129918", "0.5756463", "0.57331896", "0.56162614", "0.5605271", "0.5579205", "0.55276346", "0.54616207", "0.5435536", "0.5430819", "0.539762", "0.53060365", "0.5254436", "0.5254418", "0.52477884", "0.52259606", "0.51958334", "0.51543206", "0.514200...
0.7310976
0
Reads the current time and considers the time zone
static public function createTime () { $result = time(); static::addTimeZone($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentTimeUsingTimezone()\n {\n // Get current DateTime obj\n $curDateTime = $this->getCurrentDateTimeUsingTimezone();\n\n // Return current time formatted nicely as string\n return $curDateTime->format('H:i:s');\n }", "public function getCurrentLocationTime(...
[ "0.6251655", "0.6181972", "0.61351347", "0.59982264", "0.59472555", "0.5810078", "0.5762869", "0.5755833", "0.573105", "0.56891257", "0.56733507", "0.56124014", "0.56015724", "0.5591855", "0.55890256", "0.5587482", "0.55211794", "0.55202746", "0.55181724", "0.5515907", "0.551...
0.0
-1
Returns a classname prefixed with $this>prefixId and with all underscores substituted to dashes () this is an initial state, not yet finished! Therefore the debug lines have been left.
static public function unserialize ( $str, $errorCheck = true ) { $result = false; $codeArray = ['a', 's']; $len = strlen($str); $depth = 0; $mode = 'c'; $i = 0; $errorOffset = -1; $controlArray = []; $controlCount = []; $controlData = []; $controlIndex = 0; while ($i < $len) { $ch = substr($str, $i, 1); $i++; $next = substr($str, $i, 1); if ($next == ':') { $i++; $paramPos = strpos($str, ':', $i); $param1 = substr($str, $i, $paramPos - $i); if ($param1 != '') { $i = $paramPos + 1; switch ($ch) { case 'a': if (isset($var)) { } else { $var = []; } if (substr($str, $i, 1) == '{') { $i++; $controlIndex++; $controlArray[$controlIndex] = $ch; $controlData[$controlIndex] = ['param' => $param1]; $controlCount[$controlIndex] = 0; } else { $errorOffset = $i; } break; case 's': if (isset($var)) { if (substr($str, $i, 1) == '"') { $i++; $param2 = substr($str, $i, $param1); $fixPos = strpos($param2, '";'); if ( $fixPos !== false && in_array(substr($param2, $fixPos + 2, 1), $codeArray) ) { $i += $fixPos; // fix wrong string length if it is really shorter now $param2 = substr($param2, 0, $fixPos); } else { $i += $param1; } if ( substr($str, $i, 1) == '"' && substr($str, $i + 1, 1) == ';' ) { $i += 2; if ($controlArray[$controlIndex] == 'a' && $controlData[$controlIndex]['k'] == '' && $controlCount[$controlIndex] < $controlData[$controlIndex]['param']) { $controlData[$controlIndex]['k'] = $param2; continue 2; } } if ($controlArray[$controlIndex] == 'a' && $controlCount[$controlIndex] < $controlData[$controlIndex]['param'] && isset($controlData[$controlIndex]['k'])) { $controlCount[$controlIndex]++; $var[$controlData[$controlIndex]['k']] = $param2; $controlData[$controlIndex]['k'] = ''; } } } else { $var = ''; } break; default: $errorOffset = $i; break; } } else { $errorOffset = $i; } } else { $errorOffset = $i; } if ($errorOffset >= 0) { if ($errorCheck) { trigger_error('unserialize_fh002(): Error at offset ' . $errorOffset . ' of ' . $len . ' bytes \'' . substr($str, $errorOffset, 12) . '\'', E_USER_NOTICE); $result = false; } break; } } if (isset($var) && (!$errorCheck || $errorOffset == 0)) { $result = $var; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function keyPrefix()\n {\n return Inflector::camel2id(StringHelper::basename(get_called_class()), '_');\n }", "protected function getIdentifierPrefix() {}", "protected function getIdentifierPrefix() {}", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', g...
[ "0.7053495", "0.6854935", "0.6854935", "0.66188264", "0.6600318", "0.6535847", "0.6503281", "0.64976794", "0.64699805", "0.6378216", "0.6350749", "0.62570953", "0.62457216", "0.6217836", "0.621627", "0.6186999", "0.6166207", "0.61520094", "0.6136551", "0.6109475", "0.6091722"...
0.0
-1
Initializes the caching system.
static protected function getPageCache() { return GeneralUtility::makeInstance(CacheManager::class)->getCache('pages'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeCache() {}", "protected function initializeCache() {}", "protected function initCaches() {}", "public function initCache() {\n $cacheclass = \"corelib_cache_mongoCache\";\n if (self::$_config['caching']['type']) {\n $cacheclass = \"corelib_cache_\" . self...
[ "0.8584296", "0.8583749", "0.84881705", "0.83957696", "0.8066637", "0.80081195", "0.7933703", "0.7816481", "0.781008", "0.7756178", "0.7741732", "0.7724739", "0.7694362", "0.7625155", "0.75689954", "0.7399352", "0.73960364", "0.73543406", "0.7299787", "0.7263333", "0.7250976"...
0.0
-1
Clears cache content for a list of page ids
static public function clearPageCacheContent_pidList($pidList) { $pageCache = static::getPageCache(); $pageIds = GeneralUtility::trimExplode(',', $pidList); foreach ($pageIds as $pageId) { $pageCache->flushByTag('pageId_' . (int)$pageId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearCachesOfRegisteredPageIds() {}", "public function clearPageCacheContent() {}", "function clearCacheIfSet()\t{\n\t\tif ($this->conf['clearCacheOfPages'])\t{\n\t\t\t$cc_pidList = $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['clearCacheOfPages']);\n\t\t\t$GLOBALS['TSFE']->clearPageCacheCont...
[ "0.76232606", "0.72297263", "0.6905112", "0.6659995", "0.64680296", "0.6443081", "0.6390617", "0.6294601", "0.6283241", "0.62448406", "0.6223703", "0.62227744", "0.6164316", "0.61532426", "0.61532426", "0.61458236", "0.614209", "0.61338717", "0.6115275", "0.6077659", "0.60319...
0.7235665
1
Display a listing of the resource.
public function index() { $employees = Employee::paginate(5); return view('employees.index', compact('employees')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { $firms = Firm::orderBy('name')->get(); return view('employees.create', compact('firms')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // dd(request()->all()); // dd(request(['lastname', 'firstname'])); $rules = [ 'lastname' => 'required', 'firstname' => 'required', 'firm_id' => 'required|integer|not_in:0', 'email' => 'nullable|email|unique:employees', 'phone' => 'nullable|digits:10' ]; $validator = Validator::make($request->all(), $rules, [ 'lastname.required' => 'Vous devez renseigner un nom', 'firstname.required' => 'Vous devez renseigner un prénom', 'firm_id.not_in' => 'Vous devez renseigner une entreprise', 'email.email' => 'Vous devez renseigner un email valide', 'email.unique' => 'L\'email renseigné existe déjà', 'phone.digits' => 'Le numéro de téléphone doit comporter 10 chiffres' ]); if ($validator->fails()) { return redirect('employees/create') ->withErrors($validator) ->withInput(); } // $employee = new Employee; // Create a new employee using the request data // $employee->lastname = request('lastname'); // $employee->firstname = request('firstname'); // $employee->firm_id = request('firm_id'); // $employee->email = request('email'); // $employee->phone = request('phone'); Employee::create(request(['lastname', 'firstname', 'firm_id', 'email', 'phone'])); // Save it to the database // $employee->save(); // And then redirect to the employee list return redirect('/employees'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Employee $employee) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Employee $employee) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Employee $employee) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { Employee::destroy($id); return response()->json([ 'success' => 'Record has been deleted successfully!' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Get the single plugin instance
function TIL () { return Tilnet_Blocks::instance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function plugin_instance()\r\n\t{\r\n\t\tif ( ! static::$instance)\r\n\t\t{\r\n\t\t\tstatic::$instance = static::forge(array(PLUGINPATH));\r\n\t\t}\r\n\t\treturn static::$instance;\r\n\t}", "public static function get_instance() {\n\t\t\t// Store the instance locally to avoid private static replica...
[ "0.8190271", "0.8099907", "0.79761577", "0.7705514", "0.7700244", "0.75202984", "0.75202984", "0.7472381", "0.74568194", "0.73574734", "0.7349095", "0.7313989", "0.72015655", "0.7173745", "0.7172046", "0.7172046", "0.7148387", "0.7148387", "0.7148387", "0.7148387", "0.710418"...
0.0
-1
Destroy the session, and logout the user.
public function logout(){ $this->session->sess_destroy(); redirect('customer/user'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logout()\n {\n $this->deleteSession();\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public function logout(){\n session_destroy();\n unset($_SESSION['user_session']);\n }", "public function logout()\n {\n $this->use...
[ "0.84718406", "0.8447848", "0.83620524", "0.83493525", "0.83249104", "0.82725483", "0.824755", "0.8221372", "0.8193855", "0.81512576", "0.8140633", "0.8130817", "0.81248945", "0.81231135", "0.81176543", "0.8100872", "0.809489", "0.8094169", "0.8081845", "0.8069044", "0.805475...
0.0
-1
Display a listing of the resource.
public function index() { return View::make('mobilephones.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1