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
$this>middleware('auth'); // All routes are protected
public function __construct() { // Routes [create/store/edit/delete] are protected // $this->middleware('auth', ['only' => ['create', 'store', 'edit', 'delete']]); // All routes are protected except [search] $this->middleware('auth', ['except' => ['search']]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __cosnstruct(){\n $this->middleware('auth');\n }", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __construct()\n{\n $this->middleware('auth');\n}", "public function __...
[ "0.8353701", "0.8323374", "0.8317794", "0.8317794", "0.81435764", "0.8123447", "0.80951554", "0.8092697", "0.80908525", "0.8076008", "0.80620664", "0.80537456", "0.80500925", "0.8048863", "0.8029944", "0.8028037", "0.8026223", "0.8026223", "0.80212593", "0.8011837", "0.800939...
0.0
-1
Display a listing of the resource.
public function index() { $allProperties = Property::getAllActiveProperties([ 'sellerId' => Auth::id(), ]); return view('property.index', compact( 'allProperties' )); }
{ "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() { $seller = User::find(Auth::id())->seller; if (null === $seller) { unset($seller); return view('property.info'); } else { $propertyTypes = MMFormHelper::getPropertyTypes(); $apartmentTypes = MMFormHelper::getApartmentTypes(); $propertyMeasurements = MMFormHelper::getPropertyMeasurements(); return view('property.create', compact( 'propertyTypes', 'apartmentTypes', 'propertyMeasurements' )); } }
{ "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(ValidateProperty $request) { $seller = User::find(Auth::id())->seller; $property = new Property; $property->seller_id = $seller->id; $property->is_private = $request->input('is_private'); $property->property_type = $request->input('property_type'); $property->apartment_type = $request->input('apartment_type'); $property->measurement = $request->input('measurement'); $property->measurement_type = $request->input('measurement_type'); $property->maintenance_charges = $request->input('maintenance_charges'); $property->ownership = $request->input('ownership'); $property->joint_owners_name = $request->input('joint_owners_name'); $property->sale_price = $request->input('sale_price'); $property->min_expected_price = $request->input('min_expected_price'); $property->address = $request->input('address'); $property->homeloan_details = $request->input('homeloan_details'); $property->amenities = $request->input('amenities'); $property->locality_features = $request->input('locality_features'); $property->is_active = Property::ACTIVE; // May be Admin should verify and then approve it. if (1 === (int) $request->input('is_private')) { $dtObj = new \DateTime(); $property->is_private_ts = $dtObj->format('Y-m-d H:i:s'); unset($dtObj); } $property->save(); unset($property, $seller); return redirect('/property')->with( 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_STORED' )); }
{ "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($id = 0) { if ($id < 1) { return redirect('/property')->with( 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING' )); } // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } return view('property.show', compact('property')); }
{ "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($id = 0) { if ($id < 1) { return redirect('/property')->with( 'error', Lang::get('property.ERROR_MESSAGES.EDIT_ID_MISSING' )); } // Property::findOrFail($id); // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } $propertyTypes = MMFormHelper::getPropertyTypes(); $apartmentTypes = MMFormHelper::getApartmentTypes(); $propertyMeasurements = MMFormHelper::getPropertyMeasurements(); $editForm = 'T'; return view('property.create', compact( 'propertyTypes', 'apartmentTypes', 'propertyMeasurements', 'property', 'editForm', 'id' )); }
{ "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(ValidateProperty $request, $id = 0) { // Check ID exists in the system, before updating the data if (! $property = Property::find($id) ) { return redirect('/property')->with( 'warn', Lang::get('property.ERROR_MESSAGES.EDIT_ID_NOT_EXISTS' )); } $property->property_type = $request->input('property_type'); $property->apartment_type = $request->input('apartment_type'); $property->measurement = $request->input('measurement'); $property->measurement_type = $request->input('measurement_type'); $property->maintenance_charges = $request->input('maintenance_charges'); $property->ownership = $request->input('ownership'); $property->joint_owners_name = $request->input('joint_owners_name'); $property->sale_price = $request->input('sale_price'); $property->min_expected_price = $request->input('min_expected_price'); $property->address = $request->input('address'); $property->homeloan_details = $request->input('homeloan_details'); $property->amenities = $request->input('amenities'); $property->locality_features = $request->input('locality_features'); $property->save(); unset($property); return redirect('/property')->with( 'status', Lang::get('site.SUCCESS_MESSAGES.APARTMENT_UPDATED' )); }
{ "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) { // }
{ "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
Run the database seeds.
public function run() { $items = [ [ 'title' => 'Email contato', 'description' => "teste@teste.com", ], [ 'title' => 'Facebook', 'description' => 'https://facebook.com', ], [ 'title' => 'Instagram', 'description' => 'https://instagram.com', ], [ 'title' => 'YouTube', 'description' => 'https://youtube.com', ], [ 'title' => 'Whatsapp', 'description' => "00000000000", ], [ 'title' => 'Endereco', 'description' => "Rua Gregório de Matos, 26, Loja 03 - Gramado Mall II, Nova Parnamirim, Parnamirim/RN <br> <strong>Fone:</strong> (84) 3608-3246 <br> <strong>E-mail:</strong> contato@anahildaimoveis.com.br", ], [ 'title' => 'Mapa', 'description' => '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4197.009463863399!2d-35.212680032487626!3d-6.266750950337974!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x7b28778d5ddd3a7%3A0x4ef2c348712d2324!2sGoianinha%20-%20RN!5e0!3m2!1spt-BR!2sbr!4v1620775498822!5m2!1spt-BR!2sbr" width="100%" height="250" style="border:0;" allowfullscreen="" loading="lazy"></iframe>' ], [ 'title' => 'Google Analytics Head', 'description' => ' ' ], [ 'title' => 'Google Analytics Boby', 'description' => ' ' ], [ 'title' => 'Descricao do site', 'description' => 'Proporcionar à seus cliente soluções, conclusões e realizações nas suas transações Imobiliárias. Esta é a missão da Ana Hilda Negócios Imobiliários é uma empresa que atua no mercado de Natal e Grande Natal...' ], [ 'title' => 'Palavras Chaves', 'description' => 'Imóveis, casa, aluguel, apartamento, quartos, compra, Imobiliária, negócios, imobiliários,' ], [ 'title' => 'Simulador', 'description' => 'http://www8.caixa.gov.br/siopiinternet-web/simulaOperacaoInternet.do?method=inicializarCasoUso' ], ]; foreach ($items as $value) { Settings::create($value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.784...
0.0
-1
Show the application dashboard.
public function index() { $data = [ 'deals' => Deals::all(), 'dealsPaginate' => Deals::paginate(10) ]; return View::make('crm.deals.index')->with($data); }
{ "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
Show the form for creating a new resource.
public function create() { $deals = Companies::pluck('name', 'id'); return View::make('crm.deals.create', compact('deals')); }
{ "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() { $allInputs = Input::all(); $validator = Validator::make($allInputs, Deals::getRules('STORE')); if ($validator->fails()) { return Redirect::to('deals/create')->with('message_danger', $validator->errors()); } else { if (Deals::insertRow($allInputs)) { return Redirect::to('deals')->with('message_success', 'Z powodzeniem dodano umowę!'); } else { return Redirect::back()->with('message_success', 'Błąd podczas dodawania umowę!'); } } }
{ "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($id) { $clients = Deals::find($id); return View::make('crm.deals.show') ->with('deals', $clients); }
{ "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($id) { $clients = Deals::find($id); return View::make('crm.deals.edit') ->with('deals', $clients); }
{ "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($id) { $allInputs = Input::all(); $validator = Validator::make($allInputs, Deals::getRules('STORE')); if ($validator->fails()) { return Redirect::back()->with('message_danger', $validator); } else { if (Deals::updateRow($id, $allInputs)) { return Redirect::back()->with('message_success', 'Z powodzeniem zaktualizowano umowę!'); } else { return Redirect::back()->with('message_success', 'Błąd podczas aktualizowania umowy!'); } } }
{ "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) { $clients = Deals::find($id); $clients->delete(); return Redirect::back()->with('message_success', 'Umowa została pomyślnie usunięta.'); }
{ "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
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('userDataId',$this->userDataId); $criteria->compare('firstName',$this->firstName,true); $criteria->compare('lastName',$this->lastName,true); $criteria->compare('registrationDate',$this->registrationDate,true); $criteria->compare('lastLoginDate',$this->lastLoginDate,true); $criteria->compare('lastLoginIP',$this->lastLoginIP,true); $criteria->compare('avatarUploadFid',$this->avatarUploadFid); $criteria->compare('facebookLink',$this->facebookLink,true); $criteria->compare('twitterLink',$this->twitterLink,true); $criteria->compare('linkedInLink',$this->linkedInLink,true); $criteria->compare('googlePlusLink',$this->googlePlusLink,true); $criteria->compare('aboutMeLink',$this->aboutMeLink,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object...
[ "0.72114086", "0.7134845", "0.7092629", "0.70920587", "0.6984018", "0.6959329", "0.69463736", "0.69402134", "0.69324994", "0.6922489", "0.6909505", "0.69015145", "0.6897336", "0.68967223", "0.6890991", "0.6881179", "0.6878767", "0.6872834", "0.6847958", "0.6847501", "0.683457...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163...
0.0
-1
Funcion para buscar todo los usuarios
function BuscarTodosUsuarios($documento){ $this->db->select(); //$this->db->from($this->tablaProveedor); $this->db->join($this->TablatipoDocumento, 'proveedor.idTipoDocumento = tipodocumento.idTipoDocumento'); $resultado = $this->db->get_where('proveedor', array('proveedor.documento' => $documento), 1); return $resultado->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buscarUsuarios(){\n\t\t}", "public function get_usuarios()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM usuarios\";\n\n\t\t\t$resultado = $this->db->prepare($sql);\n\n\t\t\tif(!$resultado->execute())\n\t\t\t{\n\t\t\t\techo \"<h1 class='text-danger bg-danger'>Falla en la consulta</h1>\";\n\t...
[ "0.83681846", "0.7818351", "0.7800432", "0.77368486", "0.75791925", "0.75250095", "0.75234514", "0.75049764", "0.746439", "0.74233663", "0.740634", "0.73891306", "0.7364318", "0.73588616", "0.7349994", "0.734593", "0.7306767", "0.7270997", "0.7263026", "0.7242003", "0.7226064...
0.0
-1
/FUNCIONES DE VENTA DE SERVICIOS
function anularVenta_servicio($idFactura, $estado){ $this->db->set('estado', $estado); $this->db->where('idFactura' ,$idFactura); $this->db->update('ventaservicio'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexenvios()\n {\n $envios=OrdenEnvio::with(\"NombreSucursal\")->get();\n if(!$envios){\n return response()->json(['mensaje' => 'No se encuentran envios actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $envios],200);\n }...
[ "0.6846483", "0.68060184", "0.6712416", "0.66758347", "0.66529197", "0.6523308", "0.65188104", "0.65082955", "0.6499907", "0.6493494", "0.64906424", "0.6458665", "0.64569205", "0.64502287", "0.6431944", "0.64294827", "0.6416725", "0.6403489", "0.63975435", "0.6388734", "0.638...
0.0
-1
Create a new URI.
public function createUri(string $uri = ''): UriInterface { return ArkWebUri::fromUriString($uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUri($uri = '');", "protected function createUri($uri)\n {\n return Uri::createFromString($uri);\n }", "public function newInstance($uri);", "protected function createUri($url)\n\t{\n\t\tif ($url instanceof Uri)\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\n\t\t// Create full URL if ...
[ "0.81631756", "0.7459214", "0.6932149", "0.6802539", "0.67834455", "0.66700137", "0.66098815", "0.65342426", "0.652941", "0.6491179", "0.6415549", "0.6333603", "0.6279601", "0.6269844", "0.622669", "0.622669", "0.622669", "0.61822903", "0.6151719", "0.614083", "0.6135218", ...
0.72622216
2
Asserts that the given register value is valid A valid register value is smaller than 0xffff
public static function assertValidRegisterValue($value) { if ($value > 0xffff) { throw new InvalidArgumentException('Invalid register value, should be <= 0xffff'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validateUint($value) {\n if (preg_match(\"/^[0-9]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive integer\"));\n return false;\n }", "public static function assertValidAddress($address)\n {\n if ($address < 0x0000) {\n throw new InvalidA...
[ "0.6001733", "0.5901429", "0.58518916", "0.55640876", "0.5523201", "0.53632444", "0.5333517", "0.53283733", "0.53252244", "0.53240764", "0.53147423", "0.52634823", "0.5258938", "0.51837677", "0.51708406", "0.5152644", "0.5145378", "0.5138096", "0.5131073", "0.5103631", "0.509...
0.7637197
0
Asserts that the given address is valid A valid address
public static function assertValidAddress($address) { if ($address < 0x0000) { throw new InvalidArgumentException('Invalid address, should be >= 0x0000'); } if ($address > 0xffff) { throw new InvalidArgumentException('Invalid address, should be <= 0xffff'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bit...
[ "0.7956734", "0.7896082", "0.75274664", "0.72501427", "0.717179", "0.7116345", "0.7113547", "0.70465136", "0.6971146", "0.69659317", "0.69403756", "0.69289315", "0.6924772", "0.6850172", "0.6849148", "0.6831929", "0.6822808", "0.67175794", "0.6686444", "0.6666322", "0.6610483...
0.7425706
3
Asserts that the given quantity of bits is valid
public static function assertValidQuantityOfBits($quantityOfBits) { if ($quantityOfBits < 1) { throw new InvalidArgumentException('Invalid quantity of bits, should be >= 1'); } if ($quantityOfBits > 0x7d0) { throw new InvalidArgumentException('Invalid quantity of bits, should be <= 0x7d0'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBitArray()\n {\n $array = new BitArray(19);\n for ($i = 0; $i < 19; $i++) {\n $this->assertEquals(0, $array[$i]);\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $array[$i] = 1;\n } else {\n $array[$i] = 0;\n }...
[ "0.61510164", "0.60687387", "0.57213634", "0.5700703", "0.56383836", "0.5460097", "0.5394237", "0.5367398", "0.53535885", "0.53521085", "0.53506017", "0.5327079", "0.5305128", "0.5290436", "0.52713686", "0.5266541", "0.52328056", "0.5227709", "0.52213705", "0.5207892", "0.520...
0.7590083
0
Asserts that the given quantity of registers is valid
public static function assertValidQuantityOfRegisters($quantityOfRegisters) { if ($quantityOfRegisters < 1) { throw new InvalidArgumentException('Invalid quantity of registers, should be >= 1'); } if ($quantityOfRegisters > 0x7d) { throw new InvalidArgumentException('Invalid quantity of registers, should be <= 0x7d'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegistrationValuesTooShort(): void { }", "public function testRegistrationValuesContainNumbers(): void { }", "public function testRegistrationValuesTooLong(): void { }", "public function testCheckIfAllRegisterFieldsHaveInputAndError()\n {\n $validate = new Validate();\n $...
[ "0.6522232", "0.6493642", "0.617038", "0.60679156", "0.6053062", "0.59602296", "0.5896966", "0.57915497", "0.5752414", "0.5747303", "0.5710024", "0.5658892", "0.5642109", "0.56260484", "0.56233144", "0.5583203", "0.55553687", "0.55391455", "0.5532799", "0.55254424", "0.552525...
0.6822848
0
Asserts that the given coil value is valid
public static function assertValidCoilValue($value) { if ($value !== Coil::ON && $value !== Coil::OFF) { throw new InvalidArgumentException( sprintf('Invalid coil value. Should be %x or %x', Coil::ON, Coil::OFF) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function it_can_identify_valid_values()\n {\n $this->assertTrue(Testee::isValid(self::TEST_NULL_VALUE));\n }", "public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->v...
[ "0.6008962", "0.59076023", "0.58623385", "0.5819444", "0.56846976", "0.5613157", "0.55885965", "0.5501875", "0.5497066", "0.5492128", "0.54439676", "0.5432192", "0.5430047", "0.53856987", "0.5355875", "0.53495747", "0.5348872", "0.5342657", "0.5341787", "0.5340112", "0.532435...
0.7477078
0
Create a new command instance.
public function __construct(ConnectionFactory $factory) { parent::__construct(); $this->factory = $factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle() { $table = $this->input->getArgument('table'); $file = base_path($this->input->getArgument('file')); $type = $this->input->getOption('type'); $indent = $this->input->getOption('indent'); $driver = 'mysql'; $host = '127.0.0.1'; $port = 3306; $username = 'root'; $password = 'root'; $database = 'laravel_starter58'; $prefix = ''; $charset = 'utf8mb4'; $collation = 'utf8mb4_unicode_ci'; switch ( $type ) { case 'txt': try { $db = $this->factory->make([ 'driver' => $driver, 'host' => $host, 'port' => $port, 'username' => $username, 'password' => $password, 'database' => $database, 'charset' => $charset, 'collation' => $collation, 'prefix' => $prefix, 'prefix_indexes' => true, 'unix_socket' => '', 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ]); $data = $db->table($table)->get(); $data = json_decode(json_encode($data), true); // 转换为数组 $data = unflating($data, ['type', 'slug']); $data = unleveling($data, $indent); if ( file_put_contents($file, $data) ) { echo "Success!\n"; } else { echo "Error!\n"; } } catch ( \Exception $e ) { echo $e->getMessage()."\n"; } break; default: echo "不支持的类型:{$type}!\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
wp_enqueue_script( 'airshp_chat_socket.io', ' array( 'jquery' ), date('Ymd').'12', true );
function airshp_chat_scripts() { wp_enqueue_script( 'airshp_chat_socket.io', 'http://beta.tourgigs.com:8080/socket.io/socket.io.js', array( 'jquery' ), date('Y-m-d').'12', true ); /* Serve JS page with Admin controls to only users with permissions */ if ( (current_user_can( 'manage_options' ))) { wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'clientAdmin.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true ); } else { wp_enqueue_script( 'airshp_chat_client', AIRSHPCHAT_URL.'client.js', array( 'jquery','childscripts' ), date('Y-m-d').'12', true ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts()\n\t{\n\t\twp_register_script('peepso-activitystream', $this->plugin_url . 'asset/js/activitystream.js',\n\t\t\tarray('peepso'), PeepSo::PLUGIN_VERSION, TRUE);\n\t}", "function add_scripts() {\r\n \twp_enqueue_script('contact-scripts', plugins_url().'/contact-widget/js/script.js'...
[ "0.6992234", "0.6499352", "0.64374214", "0.64326483", "0.6426292", "0.6425722", "0.6418166", "0.6372247", "0.637026", "0.636368", "0.6354725", "0.63387126", "0.6337767", "0.63250667", "0.6319121", "0.6316091", "0.63114905", "0.63013506", "0.62790394", "0.6278932", "0.62735635...
0.81571126
0
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE TABLE customer (id INT AUTO_INCREMENT NOT NULL, company_id INT NOT NULL, name VARCHAR(32) NOT NULL, surname VARCHAR(32) NOT NULL, phone VARCHAR(24) NOT NULL, email VARCHAR(64) NOT NULL, comment LONGTEXT NOT NULL, INDEX IDX_81398E09979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE customer ADD CONSTRAINT FK_81398E09979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('DROP TABLE customer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.705336...
0.0
-1
Display a listing of the resource.
public function index() { return view('admin::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
Show the form for creating a new resource.
public function create() { return view('admin::create'); }
{ "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.7594622", "0.7594622", "0.7588457", "0.7580005", "0.75723624", "0.7499764", "0.7436887", "0.74322647", "0.7387517", "0.735172", "0.73381543", "0.73117113", "0.72958225", "0.7280436", "0.7273787", "0.72433424", "0.7230227", "0.7225085", "0.71851814", "0.71781176", "0.717402...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $id = (string)Str::uuid(); $deviceSite = DeviceSite::create([ 'id' => $id, 'site_id'=> $request->site_id, 'device_name' => $request->device_name, 'device_id' => $request->masterListDeviceId, 'device_serial' => empty($request->device_serial) ? Null : $request->device_serial, 'device_software_version' => empty($request->device_software_version) ? Null : $request->device_software_version ]); return response()->json([$deviceSite,'success'=>'Device data is added successfully']); }
{ "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
Show the specified resource.
public function show($id) { return view('admin::show'); }
{ "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 }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function show($id)\n {\n ...
[ "0.86625683", "0.8656298", "0.7061081", "0.7016237", "0.69712675", "0.693585", "0.6916958", "0.68928856", "0.6802355", "0.66791755", "0.6661057", "0.6640048", "0.66189003", "0.66071963", "0.6594754", "0.65945184", "0.65812767", "0.65802205", "0.6552344", "0.65498114", "0.6549...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { if ($id) { $record = DeviceSite::find($id); return response()->json([$record]); } }
{ "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) { $data = array( 'device_name' => $request->device_name, 'device_serial' => $request->device_serial, 'device_software_version' => $request->device_software_version ); DeviceSite::where('id', $request->device_id)->update($data); $result = DeviceSite::where('site_id', $request->site_id)->get(); return response()->json($result); }
{ "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.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445",...
0.0
-1
Remove the specified resource from storage.
public function destroy(Request $request,$id) { if ($request->ajax()) { $delete = DeviceSite::find($id); $delete->delete(); return response()->json(['success'=>'Device Site is 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
Show Devices by Site ID
public function showDeviceBySiteId(Request $request,$id) { if ($request->ajax()) { $results = DeviceSite::where('site_id',$id)->get(); return view('admin::sites.device-sites',compact('results')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Site $site)\n {\n //\n }", "public function show(Site $site)\n {\n //\n }", "public function show($id)\n {\n $devices = Device::all();\n $user = User::find($id);\n $userDevices = $user->devices;\n $devices = $devices->pluck('name', '...
[ "0.615408", "0.615408", "0.6031217", "0.60052186", "0.60039437", "0.599986", "0.59005696", "0.5880219", "0.58760303", "0.58738685", "0.58738685", "0.58738685", "0.58721524", "0.58606946", "0.58577704", "0.57881343", "0.5701316", "0.55794376", "0.55430174", "0.55428094", "0.54...
0.7684554
0
/ Check the Device serial and name if it exists
public function deviceSerialValueIsExist(Request $request) { $data = array( 'device_serial'=>$request->post('deviceSerial'), 'device_name'=>$request->post('device_name') ); $check = DeviceSite::where($data)->first(); if ($check !== null) { return response()->json(['success'=>'Device Serial number already Exist']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function common_serial_scan() {\r\n\t//Daftar perangkat serial, untuk Linux akan dimulai dengan ttyACMx atau ttyUSBx\r\n\t$acm = \"ttyACM\";\r\n\t$usb = \"ttyUSB\";\r\n\t//Dapatkan daftar perangkat yang terhubung ke komputer\r\n\t$cmd = shell_exec('ls /dev/');\r\n\t//Cari perangkat serial yang tersedia\r\n\t//cari...
[ "0.6394301", "0.6107094", "0.604391", "0.5802561", "0.56972903", "0.56277186", "0.560827", "0.5600196", "0.5573533", "0.5550399", "0.55337155", "0.5478658", "0.5411178", "0.5410289", "0.5398903", "0.5388905", "0.53744066", "0.5370979", "0.53184354", "0.5305017", "0.52924865",...
0.5525592
11
Run Method. Write your database seeder using this method. More information on writing seeders is available here:
public function run() { // $data = [ // [ // 'username' => 'michaell', // 'password' => password_hash('michaell_x0hjKasL0!2', PASSWORD_DEFAULT), // 'status' => '1' // ] // ]; // $insert = $this->table('app_users'); // $insert->insert($data) // ->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n )...
[ "0.8407967", "0.83793277", "0.83509517", "0.83218557", "0.8317822", "0.83079505", "0.8302541", "0.82998204", "0.82953537", "0.8291797", "0.82812285", "0.82641244", "0.82501954", "0.8241908", "0.8236088", "0.8232583", "0.8226141", "0.8222938", "0.8219742", "0.8218918", "0.8217...
0.0
-1
check for session and cookie presence
public function notification_list() { $this->admin_header(); //fetch the total number of categories $data['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the total number of categories $config['total_num_notification'] = $this->Admin_model->fetch_all_rows('notification'); $config['base_url'] = site_url("Admin/notification_list/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_notification'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['notifications'] = $this->Admin_model->fetch_notification($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_notification'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_notification']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_category_template('notification_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
check for session and cookie presence
public function view_notification() { $this->admin_header(); //check and confirm if the total url segment is 3 $url_segments = $this->uri->total_segments(); if ($url_segments == 3) { //retrieved the unreviewed property id $notification_id = $this->uri->segment(3); //retrieve from the database all the details of this property $result = $this->Admin_model->fetch_notification_message($notification_id); if ($result === FALSE) { redirect('Admin/notification_list'); } $data['notification_details'] = $result; $this->add_category_template('notification_message', $data); }else { redirect('Admin/notification_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
fetch the total number of categories
public function add_author() { //$data['brands'] = $this->Admin_model->fetch_all_rows_datas('vendor_id','vendors'); $data['total_num_authors'] = $this->Admin_model->fetch_all_rows('authors'); //fetch the total number of tags $data['total_num_blog'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the categories //$data['categories'] = $this->Admin_model->fetch_all_rows_datas('category_id', 'category'); if((isset($_POST) && (!empty($_POST)))){ if ($this->form_validation->run('add_author-form') === FALSE) { $this->add_author_template('add_author', $data); } else { //Set All The Configurations Needed For File Upload $config['upload_path'] = './assets/images/author/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = 2048; $this->load->library('upload', $config); //Next Check if the Food Logo Has Been Uploaded if (!$this->upload->do_upload('author_photo')) { $data['msg'] = $this->upload->display_errors('<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>', '</div>'); $this->add_author_template('add_author', $data); } else { $imgdata['author_photo'] = $this->upload->data('file_name'); if ($this->Admin_model->insert_author($imgdata) === TRUE) { $data['msg'] = '<div class="alert alert-success col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>The Author Has Been Added Successfully.</div>'; $this->add_author_template('add_author', $data); } else { $data['msg'] = '<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>An Error Was Encountered While Adding The Author. Pls Try Again</div>'; $this->add_author_template('add_author', $data); } } } } else { $this->add_author_template('add_author', $data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountCategory()\n {\n return $this->category_model->countAll();\n }", "public function count()\n {\n $categories = (new Magento())->api('categories')\n ->all($this->pageSize, $this->currentPage)\n ->json();\n\n return $categories['total_count...
[ "0.8172272", "0.8108455", "0.8071208", "0.80370337", "0.80329585", "0.7988405", "0.7986061", "0.7979145", "0.7891595", "0.78375643", "0.781486", "0.781486", "0.77282786", "0.7714196", "0.7681679", "0.7589186", "0.7556574", "0.7515886", "0.7515886", "0.7515886", "0.7480202", ...
0.0
-1
check for session and cookie presence
public function authors_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_author'] = $this->Admin_model->fetch_all_rows('authors'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/authors/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_author'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['authors'] = $this->Admin_model->fetch_author($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_author'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_author']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_author_template('authors_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.8163929", "0.8163929", "0.79391783", "0.781278", "0.73408365", "0.7292273", "0.7254012", "0.7233287", "0.72067773", "0.7206573", "0.71651375", "0.70685685", "0.7068241", "0.7052831", "0.70487046", "0.70306545", "0.70276755", "0.7023005", "0.69998795", "0.69891644", "0.6946...
0.0
-1
check for session and cookie presence
public function edit_author_segment($author_id, $data = array()) { $this->admin_header(); $result = $this->Admin_model->fetch_author_details($author_id); if ($result !== FALSE) { $data['author_details'] = $result; $this->add_author_template('edit_author', $data); }else { redirect('Admin/authors_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
get the total new orders
public function add_author_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getT...
[ "0.7547082", "0.74541545", "0.7319906", "0.7304201", "0.7273912", "0.7236974", "0.7035243", "0.70203006", "0.69083", "0.6716686", "0.6693381", "0.66745406", "0.6674423", "0.66742945", "0.6600579", "0.65978557", "0.6545862", "0.6533057", "0.64909494", "0.64725965", "0.64624506...
0.0
-1
check for session and cookie presence
public function category_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/category_list/"); $config['per_page'] = 10; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_category'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['categorys'] = $this->Admin_model->fetch_category($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_category'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_category']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_category_template('category_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
check for session and cookie presence
public function edit_category_segment($category_id, $data = array()) { $this->admin_header(); $result = $this->Admin_model->fetch_category_details($category_id); if ($result !== FALSE) { $data['category_details'] = $result; $this->add_category_template('edit_category', $data); }else { redirect('Admin/category_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.8163929", "0.8163929", "0.79391783", "0.781278", "0.73408365", "0.7292273", "0.7254012", "0.7233287", "0.72067773", "0.7206573", "0.71651375", "0.70685685", "0.7068241", "0.7052831", "0.70487046", "0.70306545", "0.70276755", "0.7023005", "0.69998795", "0.69891644", "0.6946...
0.0
-1
get the total new orders
public function add_category_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getT...
[ "0.7547082", "0.74541545", "0.7319906", "0.7304201", "0.7273912", "0.7236974", "0.7035243", "0.70203006", "0.69083", "0.6716686", "0.6693381", "0.66745406", "0.6674423", "0.66742945", "0.6600579", "0.65978557", "0.6545862", "0.6533057", "0.64909494", "0.64725965", "0.64624506...
0.0
-1
check for session and cookie presence
public function add_tags() { $this->admin_header(); //fetch the total number of categories $data['total_num_category'] = $this->Admin_model->fetch_all_rows('category'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); if((isset($_POST) && (!empty($_POST)))){ if ($this->form_validation->run('add_tags-form') === FALSE) { $this->add_tag_template('add_tag', $data); } else { if ($this->Admin_model->insert_tags() === TRUE) { $data['msg'] = '<div class="alert alert-success col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Tags Has Been Added Successfully.</div>'; $this->add_tag_template('add_tag', $data); } else { $data['msg'] = '<div class="alert alert-danger col-sm-offset-2"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>An Error Was Encountered While Adding Tags. Pls Try Again</div>'; $this->add_tag_template('add_tag', $data); } } } else{ $this->add_tag_template('add_tag', $data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
check for session and cookie presence
public function tags_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_tag'] = $this->Admin_model->fetch_all_rows('tags'); //fetch the total number of tags //$data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/tags_list/"); $config['per_page'] = 50; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_tag'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['tags'] = $this->Admin_model->fetch_tags($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_tag'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_tag']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->add_tag_template('tags_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
get the total new orders
public function add_tag_template($filename, $data = array()) { //$data["there_is_new_order"] = $this->Admin_model->return_total_rows('order', 'status', 'open'); $this->admin_header(); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/'.$filename, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->service()->getTotalOfOrder();\n }", "protected function getTotalOrders()\n {\n\n if (auth()->user()) {\n $userId = auth()->user()->id;\n return \\Cart::session($userId)->getTotal();\n }\n return \\Cart::getT...
[ "0.7546358", "0.7452311", "0.7319344", "0.7303506", "0.7273696", "0.7237501", "0.7034528", "0.70185477", "0.6907238", "0.67148966", "0.6694225", "0.6673422", "0.66723335", "0.66720164", "0.65973926", "0.6596917", "0.6544206", "0.6532083", "0.64902276", "0.6473195", "0.6461081...
0.0
-1
check for session and cookie presence
public function blog_list() { $this->admin_header(); //fetch the total number of categories $config['total_num_blog'] = $this->Admin_model->fetch_all_rows('blog'); //fetch the total number of tags $data['total_num_tags'] = $this->Admin_model->fetch_all_rows('tags'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/blog_list/"); $config['per_page'] = 50; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_blog'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['blogs'] = $this->Admin_model->fetch_blog($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_blog'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_blog']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $this->create_blog_template('blog_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
check for session and cookie presence
public function edit_blog_segment($blog_id, $data = array()) { $this->admin_header(); //get all the tags attached this blog from the blogs_and tags_table $data['tag_ids'] = $this->Admin_model->fetch_tags_tied_to_blog($blog_id); $result = $this->Admin_model->fetch_blog_details($blog_id); if ($result !== FALSE) { $data['blog'] = $result; $this->create_blog_template('edit_blog', $data); }else { redirect('Admin/blog_list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
check for session and cookie presence
public function add_image_template($data = array()) { $this->admin_header(); //fetch the total number of categories $config['total_num_image'] = $this->Admin_model->fetch_all_rows('blog_images'); //fetch the total number of tags $data['total_num_blogs'] = $this->Admin_model->fetch_all_rows('blog'); //$config['total_rows'] = $this->Admin_model->fetch_all_rows('food'); $config['base_url'] = site_url("Admin/image_list/"); $config['per_page'] = 60; $config['uri_segment'] = '3'; $config['num_links'] = round($config['total_num_image'] / $config['per_page']); $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = FALSE; $config['last_link'] = FALSE; $config['next_link'] = FALSE; $config['prev_link'] = FALSE; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '</li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page_number = $this->uri->segment(3); $data['images'] = $this->Admin_model->fetch_image($config['per_page'], $page_number); $data['total_num_pages'] = ceil($config['total_num_image'] / $config['per_page']); $data['total_num_rows'] = $config['total_num_image']; $url_segments = $this->uri->total_segments(); $data['page_num'] = ($url_segments !== 3) ? 1 : $this->uri->segment(3); $data['header'] = $this->load->view('templates/admin_header', $data, TRUE); $data['footer'] = $this->load->view('templates/admin_footer', '', TRUE); $this->load->view('admins/image_list', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n ...
[ "0.81636137", "0.81636137", "0.79403365", "0.781226", "0.7339937", "0.72912765", "0.7254127", "0.7232952", "0.7207409", "0.72067076", "0.7164481", "0.7069074", "0.7067995", "0.70526785", "0.7048773", "0.7032118", "0.7026872", "0.7022291", "0.69995004", "0.6988223", "0.6946052...
0.0
-1
get the table name of the id to be deleted. that will enable us know which view to redirect
public function delete_property() { $table_name = $this->input->post('table'); switch ($table_name) { case "admin": $redirection_path = "Admin/manage_admins"; break; case "notification": $redirection_path = "Admin/notifications"; break; default: $redirection_path = ""; } if ($this->Admin_model->delete_property() === TRUE) { redirect($redirection_path); }else { redirect($redirection_path); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function permanentDelete($table,$id,$pageId=''){\n\t\t DB::table($table)\n ->where('id',$id)\n ->delete();\n\t return Redirect::back()->with('message', 'Data Deleted Permanently !!');\n\t}", "function _delete ($table_name) {\n\t\treturn \"DELETE FROM `{$table_name}`\";\n\t}", "pu...
[ "0.67175186", "0.6357331", "0.62982947", "0.62653023", "0.61950403", "0.61947906", "0.6182341", "0.6068081", "0.60667115", "0.6060392", "0.60446167", "0.60446167", "0.60306495", "0.601908", "0.6010143", "0.5976361", "0.59739995", "0.5960086", "0.59375477", "0.592166", "0.5921...
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->select = "t.*,f.name as franchiseeName"; $criteria->join = "left join gaiwang.gw_franchisee f on f.id = t.franchisee_id"; $criteria->compare('t.name',$this->name,true); $criteria->compare('f.name',$this->franchiseeName,true); $criteria->compare('t.code', $this->code,true); $criteria->order = 't.id desc'; return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>array( 'pageSize'=>10, ), 'sort' => false )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object...
[ "0.7212116", "0.7135383", "0.7093303", "0.70931214", "0.69846356", "0.6960259", "0.69467723", "0.69414675", "0.69331795", "0.69232404", "0.69098496", "0.69022155", "0.6897633", "0.6896968", "0.6891722", "0.6881716", "0.68790054", "0.68732494", "0.6849048", "0.6848422", "0.683...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.75756", "0.75287056", "0.7271292", "0.7270462", "0.72616756", "0.721129", "0.7210465", "0.7131541", "0.71285504", "0.71285504", "0.71023285", "0.71023285", "0.7102174", "0.7074315", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", "0.7063922", ...
0.0
-1
always allow new user registrations
protected function hasPermission($permission, Model $requester) { if ($permission == 'create') { return true; } // users can only edit themselves if ($permission === 'edit' && $requester instanceof self && $requester->id() == $this->id()) { return true; } // otherwise, defer to admin permissions return $requester->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n ...
[ "0.7774363", "0.75109047", "0.721249", "0.71512955", "0.70099556", "0.6758585", "0.67004764", "0.6594448", "0.6591646", "0.65537596", "0.6490408", "0.64290816", "0.6426371", "0.63772327", "0.636086", "0.6356537", "0.63364154", "0.63057166", "0.629169", "0.62706554", "0.626401...
0.0
-1
Sends the user a notification and records a security event if the password was changed.
public static function passwordChanged(ModelEvent $event) { $user = $event->getModel(); if (!$user->_changedPassword) { return; } $app = $user->getApp(); $auth = $app['auth']; $req = $auth->getRequest(); $ip = $req->ip(); $userAgent = $req->agent(); // record the reset password request event $event = new AccountSecurityEvent(); $event->user_id = $user->id(); $event->type = AccountSecurityEvent::CHANGE_PASSWORD; $event->ip = $ip; $event->user_agent = $userAgent; $event->save(); // changing the password signs the user out, everywhere $auth->signOutAllSessions($user); $user->markSignedOut(); $currentUser = $auth->getCurrentUser(); if ($currentUser->id() == $user->id()) { $auth->logout(); } // send the user an email about it $user->sendEmail('password-changed', ['ip' => $ip]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventUpdatePassword(){\r\n\t\t$userid = util::getData(\"id\");\r\n\t\t$password1 = util::getData(\"password1\");\r\n\t\t$password2 = util::getData(\"password2\");\r\n\r\n\t\tif(!$this->canUpdateUser($userid))\r\n\t\t\treturn $this->setEventResult(false, \"You cannot update this account\");\r\n\r\n\t\t$res...
[ "0.75053704", "0.73948956", "0.69817233", "0.6858406", "0.6706365", "0.6668559", "0.6494165", "0.6400581", "0.63987195", "0.6390222", "0.6379403", "0.6363224", "0.6330098", "0.62678313", "0.62637186", "0.623378", "0.62071574", "0.6154372", "0.61483186", "0.61292154", "0.61172...
0.62981385
13
/////////////////////////////////// Getters /////////////////////////////////// Checks if the user is an admin.
public function isAdmin() { return $this->isSuperUser() || $this->isMemberOf('admin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAdminUser() {}", "function is_user_admin()\n {\n }", "function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n ...
[ "0.90633446", "0.8883823", "0.8828815", "0.8797422", "0.8791371", "0.8788454", "0.87776685", "0.87754124", "0.8775187", "0.87613875", "0.8742259", "0.8651232", "0.86511666", "0.8610092", "0.85893625", "0.8566619", "0.8524231", "0.8524231", "0.85223204", "0.8501421", "0.850093...
0.8440744
27
Gets the groups this user is a member of.
public function groups() { $return = ['everyone']; $groups = GroupMember::where('user_id', $this->id()) ->sort('`group` ASC') ->all(); foreach ($groups as $group) { $return[] = $group->group; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_t...
[ "0.79191273", "0.77802896", "0.7761671", "0.75694394", "0.7554897", "0.7506751", "0.7502249", "0.7477684", "0.7460359", "0.7455597", "0.7444235", "0.7432532", "0.73641896", "0.7239706", "0.7162546", "0.7143406", "0.71295285", "0.7111747", "0.7003287", "0.7000231", "0.6942885"...
0.77837163
1
Checks if the user is a member of a group.
public function isMemberOf($group) { if ($group == 'everyone') { return true; } return GroupMember::where('group', $group) ->where('user_id', $this->id()) ->count() == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isMemberOf(User $user,String $groupname){\r\n foreach($user->groups as $group){\r\n if($groupname ==$group->name)\r\n return true;\r\n }\r\n return false;\r\n }", "public function isUserMember($group, $user_id)\n\t{\n\t\t$isJoined = DB::sel...
[ "0.8035996", "0.79780734", "0.7972357", "0.7961608", "0.76660615", "0.7637746", "0.7534992", "0.74583316", "0.7403331", "0.7391561", "0.7371816", "0.7315123", "0.7304859", "0.7296571", "0.72681624", "0.7262133", "0.71850294", "0.71803296", "0.7122837", "0.7077486", "0.7054518...
0.75206
7
Generates the URL for the user's profile picture. Gravatar is used for profile pictures. To accomplish this we need to generate a hash of the user's email.
public function profilePicture($size = 200) { // use Gravatar $hash = md5(strtolower(trim($this->email))); return "https://secure.gravatar.com/avatar/$hash?s=$size&d=mm"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfileImageURL()\n {\n return 'https://s.gravatar.com/avatar/9ff2a97e7faf3529f1b78f1f737ebca0?s=80';\n }", "public function profilePicture()\n {\n if ($this->picture) {\n return \"/storage/{$this->picture}\";\n }\n\n return 'http://i.pravatar.cc...
[ "0.8228067", "0.79609513", "0.78571045", "0.78442013", "0.7733157", "0.752398", "0.7515414", "0.7403009", "0.73866755", "0.73330367", "0.7307078", "0.7291679", "0.7241204", "0.7205576", "0.71945435", "0.7167073", "0.71546173", "0.71373457", "0.71316975", "0.71290326", "0.7116...
0.71799755
15
///////////////////////////////// Super User Permissions ///////////////////////////////// Elevates the current user to super user status. This grants all permissions to everything. BE CAREFUL. Typically, this is reserved for cron jobs that need to work with models belonging to other users. WARNING: do not forget to remove super user permissions when done with demoteToNormalUser() or else the permissions system will be rendered moot until the request/app exits
public function promoteToSuperUser() { $this->superUser = true; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __allowSuperAdminOnly() {\n\t\t$isSuperAdmin = $this->_isSuperAdmin();\n\t\tif ($isSuperAdmin === false) {\n\t\t\t$this->redirect('/admin/users/accessDenied');\n\t\t}\n\t}", "function grant_super_admin($user_id)\n {\n }", "public function elevatePremissions() {\n\t\tif($user->group == 'U...
[ "0.69079274", "0.6745763", "0.66878134", "0.65931726", "0.65859765", "0.6282568", "0.62758195", "0.6175562", "0.617072", "0.605698", "0.60408735", "0.60200965", "0.6015181", "0.6006418", "0.5982928", "0.5970617", "0.5950362", "0.5945626", "0.59228784", "0.587156", "0.58685124...
0.6588281
4
Demotes the current user back to a normal user.
public function demoteToNormalUser() { $this->superUser = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unimpersonateUser()\n {\n $realId = $this->session->remove('__realId');\n if ($realId !== null) {\n $this->user->identity->remove();\n $this->session->set($this->user->idParam, $realId);\n $identity = User::findOne($realId);\n $this->user...
[ "0.7529753", "0.69122195", "0.6704955", "0.65128493", "0.64253587", "0.6311096", "0.62500435", "0.6101565", "0.5996663", "0.5996663", "0.59962934", "0.59714663", "0.5932396", "0.5932396", "0.5878607", "0.5861854", "0.5861407", "0.5794638", "0.57779634", "0.577666", "0.5724945...
0.66805047
3
Checks if this user is a super user.
public function isSuperUser() { return $this->superUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuperUser()\n\t{\n\t\treturn $this->hasPermission('superuser');\n\t}", "public function isSuper(): bool\n {\n return $this->hasRole('super');\n }", "public function isSuper() {\n\t\treturn ($this->isAdmin() || $this->Session->read('Acl.isSuper'));\n\t}", "public static function...
[ "0.8656607", "0.8067006", "0.7806444", "0.7735465", "0.7717412", "0.7711298", "0.7690409", "0.7686475", "0.76703", "0.7548985", "0.7546685", "0.75208914", "0.7514398", "0.7484136", "0.74354565", "0.74181664", "0.7391688", "0.7342893", "0.73301756", "0.72911024", "0.7204467", ...
0.8446523
1
///////////////////////////////// Registration ///////////////////////////////// Sets the temporary link attached to the user.
function setTemporaryLink(UserLink $link) { $this->_temporaryLink = $link; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTemporaryLink()\n {\n return $this->_temporaryLink;\n }", "public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}", "public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] ...
[ "0.6377997", "0.5984485", "0.5952041", "0.5725836", "0.5650684", "0.5540842", "0.5490224", "0.54593796", "0.54348767", "0.54314286", "0.53844345", "0.5360663", "0.5346193", "0.5344653", "0.53431016", "0.53301203", "0.5314621", "0.5307288", "0.5291185", "0.5272707", "0.5272270...
0.7245877
0
Clears the temporary link attached to the user.
function clearTemporaryLink() { $this->_temporaryLink = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTemporaryLink(UserLink $link)\n {\n $this->_temporaryLink = $link;\n return $this;\n }", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "protected function clearCachedUserData()\n {\n ...
[ "0.6479358", "0.63353336", "0.60632753", "0.60345715", "0.60232234", "0.5948072", "0.58667064", "0.5866026", "0.5856409", "0.58261806", "0.5790806", "0.57888466", "0.57888466", "0.5779552", "0.57674336", "0.5752255", "0.5721877", "0.5716556", "0.5706657", "0.5636891", "0.5618...
0.71915627
0
Gets the temporary link from user registration.
function getTemporaryLink() { return $this->_temporaryLink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}", "public function getTempLink()\n {\n return $this->temp_loc;\n }", "public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profil...
[ "0.66361535", "0.6517011", "0.6459022", "0.62687826", "0.62031275", "0.61700606", "0.61397725", "0.6110055", "0.6071891", "0.6024001", "0.59574497", "0.59408706", "0.5908403", "0.58708066", "0.5862238", "0.58469903", "0.58068836", "0.5785397", "0.5782469", "0.5757268", "0.575...
0.7446525
0
///////////////////////////////// Utilities ///////////////////////////////// Gets the mailer parameters when sending email to this user.
protected function getMailerParams() { $app = $this->getApp(); return [ 'base_url' => $app['base_url'], 'siteEmail' => $app['config']->get('app.email'), 'email' => $this->email, 'username' => $this->name(true), 'to' => [ [ 'email' => $this->email, 'name' => $this->name(true), ], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareAndGetMailParams()\n {\n $sendParam['title'] = strip_tags($this->notification->post->title);\n $sendParam['subject'] = \"[{$this->config->site->name}] \" . strip_tags($this->notification->post->title);\n $sendParam['post_url'] = $this->notificationService->getRelat...
[ "0.66469073", "0.5935871", "0.59236914", "0.58808434", "0.58651364", "0.5838087", "0.58282256", "0.5778842", "0.576199", "0.5737972", "0.57207555", "0.5699138", "0.5698846", "0.56985754", "0.5648554", "0.56373966", "0.5615381", "0.5610425", "0.55992424", "0.5593945", "0.55396...
0.7699981
0
Deletes the user account permanently (DANGER!).
public function deleteConfirm($password) { if ($this->id() <= 0) { return false; } if ($this->isAdmin()) { return false; } // the current user can only delete their own account $auth = $this->getApp()['auth']; $user = $auth->getCurrentUser(); if ($user->id() != $this->id()) { return false; } // Verify the supplied the password. $verified = $auth->getStrategy('traditional') ->verifyPassword($this, $password); if (!$verified) { return false; } return $this->grantAllPermissions()->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function delete_user_account() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Delete the user's data saved by apps\n $this-...
[ "0.80796385", "0.7814329", "0.76608986", "0.7640679", "0.7541677", "0.7523015", "0.74926573", "0.72269547", "0.71670294", "0.7146755", "0.7092586", "0.707935", "0.70350283", "0.69743186", "0.6973685", "0.69732744", "0.6970319", "0.69675094", "0.696012", "0.6954495", "0.693773...
0.0
-1
Get an empty query for this model.
public function emptyQuery() { return Content::query(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultQuery()\n {\n return $this->model->newQuery()->where(function ($q) {\n $q->whereNull('team_id');\n $q->orWhere('team_id', app(ActiveTeam::class)->get()->id);\n });\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->...
[ "0.76495457", "0.76254785", "0.7282372", "0.7181244", "0.70589983", "0.6870792", "0.6868853", "0.6846359", "0.68052167", "0.679631", "0.67434055", "0.67417955", "0.67417955", "0.66920865", "0.6679704", "0.6657223", "0.6643897", "0.6548368", "0.6538156", "0.65365356", "0.65291...
0.8157269
0
set the protect model to the admin user this will be used in the repository
function __construct(Page $model) { $this->model = $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\n {\n return AdminUser::class;\n }", "public function admin(){\n return $this->belongsToOne('App\\User');\n }", "function userAdmin( )\n {\n return $this->UserAdmin ;\n }", "function setUserAdmin( $value )\n {\n $this->UserAdmin = $value;\n }", "publ...
[ "0.671602", "0.64701205", "0.6364213", "0.63076234", "0.6147593", "0.61101615", "0.61015445", "0.60588425", "0.6057786", "0.6049278", "0.6049278", "0.60417366", "0.59784704", "0.59615624", "0.59615624", "0.5950313", "0.5950313", "0.5941667", "0.59262383", "0.5889636", "0.5883...
0.0
-1
List the pending requests
public function listRequests($filters = []) { $query = ''; if($filters instanceof \Connect\RQL\Query){ $query = $filters->compile(); } else { if ($this->config->products) { $filters['asset.product.id__in'] = implode(",", $this->config->products); } if ($filters) { $query = '?' . preg_replace('/%5B[0-9]+%5D/simU', '', http_build_query($filters)); $query = urldecode($query); } } $body = $this->sendRequest('GET', '/requests' . $query); /** @var Request[] $models */ $models = Model::modelize('requests', json_decode($body)); foreach ($models as $index => $model) { $models[$index]->requestProcessor = $this; } return $models; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listRequests()\r\n {\r\n return $this->BunqClient->getHttpService()->get(\r\n $this->getResourceEndpoint()\r\n );\r\n }", "public function getAllPending(): array;", "public function all_pending_course_request(){\n\t\t\t$load = new Load();\n\t\t\t$requ...
[ "0.70767593", "0.70722795", "0.68819374", "0.6545676", "0.64211327", "0.6415138", "0.6252808", "0.62441504", "0.62315136", "0.62193036", "0.62039465", "0.61149687", "0.60981727", "0.5998885", "0.59964275", "0.59868234", "0.59623104", "0.59546995", "0.5932672", "0.59290415", "...
0.0
-1
Gets Activation template for a given request
public function renderTemplate($templateId, $request) { $query = ($request instanceof Request) ? $request->id : $request; return $this->sendRequest('GET', '/templates/' . $templateId . '/render?request_id=' . $query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActivateTpl(){\n return $this->templates['activate'];\n }", "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH...
[ "0.6655882", "0.6380275", "0.62237734", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6158033", "0.6095883", "0.60682386", "0.5994028", "0.5909841", "0.59044534", "0.5903606", "0.5876821", "0.58621365", "0.5805195", "0.5765261", "0.57605064", "0.57206684...
0.0
-1
Dynamically call connect native module functions.
public function __call($name, $arguments) { if (is_callable([$this->tierConfiguration, $name])) { return call_user_func_array([$this->tierConfiguration, $name], $arguments); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function connect(): void;", "function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();",...
[ "0.6605719", "0.65040565", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6441351", "0.6402392", "0.6402392", "0.6402392", "0.63883746", "0.6387224", "0.638261", "0.6330225", "0.6330225", ...
0.0
-1
To be used only with provider token
public function createRequest(Request $request) { $body = ConnectClient::getInstance()->fulfillment->sendRequest('POST', '/requests', $request); return Model::modelize('Request', json_decode($body)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getToken()\n\t{\n\n\t}", "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n // $user->token;\n }",...
[ "0.7112789", "0.68405384", "0.67412883", "0.67335963", "0.6719355", "0.671025", "0.671025", "0.671025", "0.671025", "0.6708169", "0.6696814", "0.6612021", "0.6595612", "0.6490803", "0.64782923", "0.64050883", "0.640002", "0.6373231", "0.63728666", "0.63728666", "0.63728666", ...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request, $media_id) { $request->request->add(['media_id' => $media_id]); $this->validate($request, [ 'user_id' => 'required|exists:users,id', 'media_id' => 'required|exists:media,uuid', 'from' => 'required|numeric', 'to' => 'required|numeric' ]); $media = Media::where('uuid', $request->input('media_id'))->firstOrFail(); $stat = new \App\VideoStatisticRecord(); $stat->user_id = $request->input('user_id'); $stat->media_id = $media->id; $stat->from = $request->input('from'); $stat->to = $request->input('to'); $stat->save(); return $stat; }
{ "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
Get all parts with id's in the list provided
public static function find_by_ids($entity_data, $entity_ids) { $search_results = array(); $entities = call_user_func(array($entity_data['entity_name'], 'find'), $entity_ids); foreach ($entities as $key => $entity) { array_push($search_results, EntityAPIUtils::entity_to_data($entity_data, $entity, false)); } return $search_results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_ids();", "public function getIds();", "public function getIds();", "public function getLinesByID($idlist) {\n $mid = 0;\n $results = array();\n $this->stmt_getLinesByID->bindValue(':tid', $this->fileid, PDO::PARAM_INT);\n $this->stmt_getLinesByID->bind...
[ "0.64211637", "0.6004124", "0.6004124", "0.59873", "0.583833", "0.5833695", "0.5796205", "0.573125", "0.57001585", "0.5693698", "0.56521666", "0.56065035", "0.5601299", "0.559823", "0.558715", "0.55368316", "0.552551", "0.55111474", "0.54915637", "0.5477433", "0.54038537", ...
0.0
-1
Get all parts with id's in the list provided
public static function find_all($entity_data) { $search_results = array(); $entities = call_user_func(array($entity_data['entity_name'], 'all')); foreach ($entities as $key => $entity) { $entity_data = EntityAPIUtils::entity_to_data($entity_data, $entity, false); array_push($search_results, $entity_data); } return $search_results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_ids();", "public function getIds();", "public function getIds();", "public function getLinesByID($idlist) {\n $mid = 0;\n $results = array();\n $this->stmt_getLinesByID->bindValue(':tid', $this->fileid, PDO::PARAM_INT);\n $this->stmt_getLinesByID->bind...
[ "0.6420084", "0.60030794", "0.60030794", "0.5988216", "0.58373505", "0.58330727", "0.57944685", "0.5730895", "0.5700448", "0.56927484", "0.5651546", "0.5605905", "0.5600647", "0.55976015", "0.5583606", "0.5539566", "0.5526694", "0.55116004", "0.54907256", "0.54771364", "0.540...
0.0
-1
getAllBlocks Extract all block names defined in a twig source file
public static function getAllBlocks($source) { preg_match_all("/\{%\s+block\s+([a-zA-Z\_0-9]+)\s+%\}/", $source, $matches); return $matches[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n ...
[ "0.67372894", "0.67216897", "0.6720243", "0.6596654", "0.6427418", "0.64245087", "0.64033616", "0.63791496", "0.6349548", "0.6288271", "0.6253894", "0.62385756", "0.6037089", "0.6031048", "0.6022278", "0.60054207", "0.6003441", "0.5951053", "0.5949634", "0.59451175", "0.59195...
0.66291857
3
Implements theme_links() targeting the main menu specifically Outputs Foundation Nav bar
function zurpal_js_alter(&$javascript) { // Swap out jQuery to use an updated version of the library. $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js'; $javascript['misc/jquery.js']['version'] = '1.9.0'; //drupal_static_reset('drupal_add_js'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grav_footer_links() {\n wp_nav_menu(\n \tarray(\n \t\t'menu' => 'footer_links', /* menu name */\n \t\t'theme_location' => 'footer_links', /* where in the theme it's assigned */\n \t\t'container_class' => 'footer-links clearfix' /* container class */\n \t)\n\t);\n}", "function bones_foo...
[ "0.7113077", "0.70320904", "0.6966262", "0.6917811", "0.68781126", "0.6854585", "0.68189496", "0.6788216", "0.6774287", "0.6764216", "0.6724297", "0.6718661", "0.67095035", "0.6706072", "0.6700749", "0.6697152", "0.6693893", "0.6688484", "0.66379315", "0.66367763", "0.6593475...
0.0
-1
$migrate_jquery_path = drupal_get_path('theme', 'zurpal') .'/javascripts/foundation/jquerymigrate1.2.1.js';
function zurpal_preprocess_page(&$variables) { //drupal_add_js($migrate_jquery_path,array('scope'=>'header','weight'=>-20)); $app_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/app.js'; $topbar_path = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.foundation.topbar.js'; $options = array( 'type' => 'file', 'scope' => 'footer', ); drupal_add_js($topbar_path, $options); drupal_add_js($app_path, $options); drupal_add_js('jQuery(document).ready(function () { jQuery.noConflict(); });', 'inline'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zurpal_js_alter(&$javascript)\n{\n// Swap out jQuery to use an updated version of the library.\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js';\n $javascript['misc/jquery.js']['version'] = '1.9.0';\n //drupal_static_reset('drupal_...
[ "0.7491919", "0.66155326", "0.64506966", "0.63435155", "0.63203275", "0.61494094", "0.6082915", "0.60221577", "0.6000548", "0.59756213", "0.59429735", "0.5939543", "0.59253275", "0.5906793", "0.5877728", "0.5873013", "0.5860365", "0.5848788", "0.5805668", "0.57959795", "0.577...
0.7486024
1
Get all the main menu links
function links__system_secondary_menu($vars){ $menu_links = menu_tree_output(menu_tree_all_data('main-menu')); // Initialize some variables to prevent errors $output = ''; $sub_menu = ''; foreach ($menu_links as $key => $link) { // Add special class needed for Foundation dropdown menu to work !empty($link['#below']) ? $link['#attributes']['class'][] = 'has-dropdown' : ''; // Render top level and make sure we have an actual link if (!empty($link['#href'])) { $output .= '<li' . drupal_attributes($link['#attributes']) . '>' . l($link['#title'], $link['#href']); // Get sub navigation links if they exist foreach ($link['#below'] as $key => $sub_link) { if (!empty($sub_link['#href'])) { $sub_menu .= '<li>' . l($sub_link['#title'], $sub_link['#href']) . '</li>'; } } $output .= !empty($link['#below']) ? '<ul class="dropdown">' . $sub_menu . '</ul>' : ''; // Reset dropdown to prevent duplicates unset($sub_menu); $sub_menu = ''; $output .= '</li>'; } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSiteLinks() {\n\t\t$menu = new MenuBuilder();\n\n\t\t// About link\n\t\t$title = Title::newFromText( $this->msg( 'aboutpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'aboutsite' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'about' )\n\t\t\t\t->addCompo...
[ "0.7617748", "0.7346518", "0.7173838", "0.7138265", "0.70042235", "0.6969077", "0.67202187", "0.67118806", "0.6673371", "0.6672161", "0.66416234", "0.663571", "0.6630273", "0.6629401", "0.6610782", "0.66017115", "0.6600994", "0.65581375", "0.6550936", "0.6536647", "0.65333414...
0.0
-1
Metodo para actualizar un tipo de cerca existente..
public function modificarExamenSocio($examen) { $conn = new mysqli($this->data->getServidor(), $this->data->getUsuario(), $this->data->getContrasena(), $this->data->getDbNombre()); $conn->set_charset("utf8"); if (!$conn) { die("Connection failed: ".mysqli_connect_error()); } $sql = "UPDATE tbexamentuberculosis SET examentuberculosisvigente = '".$examen->getExamenVigente()."', examentuberculosisfechavencimiento = '".$examen->getExamenFechaVencimiento()."' WHERE idsocio = '".$examen->getIdSocio()."'"; $result = $conn->query($sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveType()\n {\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "public function updateType($ob...
[ "0.60322297", "0.60233635", "0.6004221", "0.5997717", "0.59477013", "0.5923751", "0.586839", "0.58570904", "0.57125837", "0.57125837", "0.5710669", "0.5692167", "0.56222475", "0.5577622", "0.54869014", "0.5479676", "0.5421639", "0.5415735", "0.53749734", "0.5364547", "0.53334...
0.0
-1
Metodo para eliminar una cerca
public function eliminarExamenSocio($idSocio) { $conn = new mysqli($this->data->getServidor(), $this->data->getUsuario(), $this->data->getContrasena(), $this->data->getDbNombre()); $conn->set_charset("utf8"); if (!$conn) { die("Connection failed: ".mysqli_connect_error()); } $sql = "DELETE FROM tbexamentuberculosis WHERE idsocio = '$idsocio'"; $result = $conn->query($sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los...
[ "0.68179184", "0.6734023", "0.6734023", "0.6734023", "0.6734023", "0.6697119", "0.66154534", "0.6610955", "0.6588504", "0.6569565", "0.6562366", "0.6561241", "0.65327585", "0.65010154", "0.6490085", "0.64750946", "0.6467054", "0.6466945", "0.6466945", "0.6466945", "0.64425683...
0.0
-1
Returns a human readable String that describes the equipment type
public static function get($id) { // Set the predefined list that can be mapped self::$types = [ 0 => 'Légkondícionáló', 1 => 'WC', 2 => 'Napelem', 3 => 'Kert', ]; return (isset(self::$types[$id])) ? self::$types[$id] : ' - '; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_equipment_type();", "private function getTypeDescription()\n {\n switch($this->_type)\n {\n case 'Mountain':\n return \"Mountains are peaceful places. Your ships don't do any damage here, while your tanks will do 10% less damage. ...
[ "0.7937649", "0.74292845", "0.6973579", "0.69684464", "0.69566965", "0.6866603", "0.6836304", "0.6683927", "0.66822743", "0.6661374", "0.6656128", "0.66085863", "0.65160596", "0.6470887", "0.6439697", "0.6425038", "0.6425038", "0.6361141", "0.63461214", "0.6324345", "0.631896...
0.0
-1
Gets all the sharer occupations. Retrieves all the sharer occupations, encapsulates them in individual Model_Insurance_TenantsContentsPlus_SharerOccupation objects, and returns them in an array.
public function getOccupations() { $select = $this->select(); $occupationTypesArray = $this->fetchAll($select); if (count($occupationTypesArray) > 0) { $returnArray = array(); foreach($occupationTypesArray as $currentOccupationType) { $sharerOccupation = new Model_Insurance_TenantsContentsPlus_SharerOccupation(); $sharerOccupation->setId($currentOccupationType->id); $sharerOccupation->setType($currentOccupationType->type); $sharerOccupation->setLabel($currentOccupationType->label); $returnArray[] = $sharerOccupation; } return $returnArray; } else { // Can't get sharer occupations - log a warning Application_Core_Logger::log("Can't get sharer occupations from table {$this->_name}", 'warning'); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sharings() {\n return $this->hasMany('Rockit\\Models\\Sharing');\n }", "public function GetOwedShirts()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetOwedShirts();\n }", "public function getScorers()\n\t{\n\t\t$data = array();\n\t\t// get the match score...
[ "0.48722792", "0.46658", "0.46150953", "0.45550534", "0.45131707", "0.44591275", "0.44442242", "0.44346818", "0.44301885", "0.43728068", "0.4333932", "0.4326525", "0.43250144", "0.43225452", "0.4315065", "0.4313812", "0.43009678", "0.42977285", "0.42977285", "0.42892334", "0....
0.79673994
0
Method tests insertBasicFields method
public function testInsertBasicFields(): void { // setup $connection = new PdoCrudMock(); $model = new CrudServiceModel(); $model->setConnection($connection); // test body $result = $model->insertBasicFields([ 'title' => 'title' ]); // assertions $this->assertTrue(isset($result['id']), 'Invalid record was returned'); $this->assertTrue(isset($result['title']), 'Invalid record was returned'); $this->assertEquals(1, $connection->executeWasCalledCounter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddFields()\n\t{\n\t\t$entity = new Entity;\n\n\t\t$entity->addFields($this->getTestFields());\n\n\t\t$entity->bind($this->getTestData());\n\n\t\t$this->assertNull($entity->params);\n\t\t$this->assertEquals('Sakura', $entity->title);\n\t}", "public function insertTest()\n {\n $this-...
[ "0.7188045", "0.67224455", "0.6683838", "0.66360605", "0.6591263", "0.6531837", "0.6491127", "0.64433825", "0.63571703", "0.6332511", "0.63292843", "0.6325749", "0.6325749", "0.6294873", "0.62896013", "0.6263086", "0.6215676", "0.6193762", "0.61888945", "0.6188588", "0.617930...
0.7977314
0
function to connect to database
function connection() { $dbhost= "localhost"; $dbuser= "root"; $dbpass= ""; $dbname= "db_fellowme"; $dbh = new PDO("mysql:host=$dbhost;dbname=$dbname;charset=utf8", $dbuser, $dbpass); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $dbh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connectToDB() {}", "function connectDB();", "public function connectDB() {}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setData...
[ "0.85834914", "0.85123163", "0.84394974", "0.8315615", "0.8304146", "0.8145481", "0.81304723", "0.8003419", "0.7973031", "0.7962493", "0.7948191", "0.79332757", "0.7919065", "0.7893934", "0.78896993", "0.7868149", "0.78675675", "0.78307843", "0.7822361", "0.7803563", "0.77807...
0.0
-1
creates an array to encode the this array into json(string) format in order to show the response
function response($status,$message,$data){ $result = array(); $result['status'] = $status; $result['message'] = $message; $result['data'] = $data; $result = json_encode($result); echo $result; exit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize()\n {\n return [['id' => $this->id,\n 'users_id' => $this->users,\n 'result' => $this->result,\n 'time' => $this->time]\n\n ];\n }", "public function jsonString(){\n return json_encode($this->createRequestsArray());\n }", "p...
[ "0.76298577", "0.75087965", "0.7481282", "0.7480564", "0.72939545", "0.7226239", "0.7224063", "0.72040206", "0.71653235", "0.71484435", "0.7131901", "0.7105395", "0.7093896", "0.70742196", "0.7069603", "0.70495", "0.70408046", "0.7038674", "0.7035656", "0.70282227", "0.701823...
0.0
-1
Make sure Orchestra is started.
public function __construct() { Bundle::start('orchestra'); if (false === Orchestra\Installer::installed()) { throw new RuntimeException("Orchestra need to be install first."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public function start()\n {\n // For example you can check Auth\n }", "public functi...
[ "0.5725793", "0.5621714", "0.5621693", "0.54500204", "0.5418137", "0.5398228", "0.5357811", "0.5356517", "0.53394306", "0.53394306", "0.53387874", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53379965", "0.53373814", "0.5330977", "0.53188014", "0.5...
0.70848686
0
Make changes to the database.
public function up() { $admin = Orchestra\Model\Role::admin(); $member = Orchestra\Model\Role::member(); $acl = Orchestra\Acl::make('diskus', Orchestra::memory()); $guest_actions = array('View Topic'); $member_actions = array_merge($guest_actions, array('Create Topic')); $actions = array_merge($member_actions, array('Manage Diskus')); $acl->add_actions($actions); $acl->add_roles(array($admin->name, $member->name)); $acl->allow($admin->name, $actions); $acl->allow($member->name, $member_actions); $acl->allow('guest', $guest_actions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateDB()\n {\n\n }", "public function run()\n {\n $date = new DateTime();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n DB::table('objectives')->insert([\n 'label' => 'root',\n 'goal' => 0,\n 'deadline' => 0,\n 'pa...
[ "0.6804121", "0.6752532", "0.67253137", "0.6673578", "0.66534156", "0.66308665", "0.6619019", "0.6599233", "0.6596829", "0.6577637", "0.6575207", "0.654772", "0.65433913", "0.65149957", "0.65132374", "0.6464267", "0.6440528", "0.6428927", "0.6424582", "0.64132035", "0.6395142...
0.0
-1
Revert the changes to the database.
public function down() { // nothing to do here. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function revert();", "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "function rollback() {\n\t\t\tself::$db->rollback();\n\t\t}", "protected function rollback()\n\t{\n\t\t$this->db->rollback();\n\t}", "public function rollback...
[ "0.7292081", "0.71497995", "0.7059885", "0.6909689", "0.6856882", "0.6805857", "0.67922175", "0.67557395", "0.67557395", "0.65832794", "0.65734553", "0.6336209", "0.62988555", "0.6282911", "0.62360376", "0.6209886", "0.619224", "0.6180292", "0.6160064", "0.6139101", "0.611888...
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "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.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.687757...
0.0
-1
Show the application dashboard.
protected function store() { $request = Input::all(); Proyect::create([ 'nombre' => Input::get('nombre_proyecto'), 'fecha_inicio' => Input::get('fecha_inicio'), 'fecha_fin' => Input::get('fecha_fin'), 'id_responsable' => Input::get('idCreator'), ]); $proyect = Proyect::where('nombre', Input::get('nombre_proyecto'))->first(); //Busco el id del proceso $idProceso = RequestController::getProcessId(); //Aca se instanciaria el proceso $idCase = RequestController::instantiateProcess($idProceso); //Aca buscamos el user $idUser = RequestController::getUserId(); //Buscamos la primer tarea $idTask = RequestController::getTask($idCase); RequestController::assignTask($idTask, $idUser); //Guardo en el proyecto el caseId y el tasdkId actual $proyect->update(array('id_case'=>$idCase, 'id_task' => $idTask)); return Redirect::to('addProtocols/'.$proyect->id) ; }
{ "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
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/
public 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.76543593", "0.7412489", "0.7393922", "0.7316217", "0.7226221", "0.7226221", "0.7189358", "0.71651", "0.71512204", "0.7145325", "0.7106802", "0.7077021", "0.7072975", "0.703941", "0.7028629", "0.7028629", "0.7028629", "0.7028629", "0.7028629", "0.69722307", "0.6966803", "...
0.0
-1
$method contains the second segment of your URI
function _remap( $method ) { switch( $method ) { case 'index': $this->index(); break; case 'price': $this->price(); break; case 'why-sms': $this->why_sms(); break; case 'long-code': $this->long_code(); break; case 'other-services': $this->other_services(); break; case 'about': $this->about(); break; case 'successful': $this->display_successful_message(); break; default: $this->page_not_found(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_method() {\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 3) {\n return $parts[3];\n }\n return 'index';\n }", "abstract protected function getMethodUrl(): string;", "static function method(): string\n\t{\n\t\treturn $_SERVER['REQUEST_M...
[ "0.7757784", "0.7044713", "0.69993806", "0.6950676", "0.69425595", "0.69022083", "0.68499595", "0.6751434", "0.67512506", "0.673701", "0.6710632", "0.6710632", "0.67083174", "0.66991824", "0.66866857", "0.66839993", "0.6681608", "0.6681608", "0.6681608", "0.6681608", "0.66816...
0.0
-1