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
For deleting the respective model from storage
public function delete(Questionbank $questionbank) { if ($questionbank->delete()) { return true; } throw new GeneralException(trans('exceptions.backend.questionbanks.delete_error')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "protected function performDeleteOnModel()\n {\n $this->newQuery()->delete($this->fileName);\n }", "public function delete($model);", "public function deleting($model)\...
[ "0.74152046", "0.72333366", "0.72318393", "0.72096205", "0.71944743", "0.7173847", "0.7116503", "0.7116503", "0.70894504", "0.6969402", "0.6969402", "0.6969039", "0.6967573", "0.69650006", "0.69650006", "0.69650006", "0.69650006", "0.69650006", "0.69650006", "0.69650006", "0....
0.0
-1
Display a listing of the resource.
public function index() { $attributes = $this->showAttribute->getTopAttributesWithSite( app('veer')->siteId ); return $this->viewIndex('attributes', $attributes); }
{ "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
Display the specified resource.
public function show($id, $childId = null) { $attribute = $this->showAttribute->getAttribute($id, $childId); if(!is_object($attribute)) { return \Redirect::route('index'); } $data = array( "attribute" => $attribute, "template" => $this->template ); if(!empty($childId)) { $page_sort = get_paginator_and_sorting(); array_set($data, 'products', $this->showAttribute->withProducts(app('veer')->siteId, $childId, $page_sort)); array_set($data, 'pages', $this->showAttribute->withPages(app('veer')->siteId, $childId, $page_sort)); array_set($data, 'tags', $this->showAttribute->withTags($attribute->name, $attribute->val, app('veer')->siteId)); array_set($data, 'categories', $this->showAttribute->withCategories($attribute->name, $attribute->val, app('veer')->siteId)); } $view = viewx($this->template.'.attribute', $data); $this->view = $view; return $view; }
{ "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
used by select dropdown list
function read(){ //select all data $query = "SELECT id, name, status FROM " . $this->table_name . " ORDER BY id DESC"; $stmt = $this->conn->prepare( $query ); $stmt->execute(); return $stmt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_option()\r\n{}", "function hundope_select_field_render() { \n\t\n}", "function getDropDown() ;", "public static function renderSelect();", "public function getDropDown() {}", "public function getDropDown() {}", "function select($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->app...
[ "0.7486098", "0.73576593", "0.72264445", "0.70925325", "0.7079501", "0.7079501", "0.696074", "0.692876", "0.6914811", "0.6907395", "0.6907395", "0.68755406", "0.6704296", "0.67016107", "0.6674178", "0.66357315", "0.65783453", "0.65446454", "0.65177053", "0.6516232", "0.651407...
0.0
-1
used to read category name by its ID
function readName(){ $query = "SELECT id, name, status FROM " . $this->table_name . " WHERE id = ? limit 0,1"; $stmt = $this->conn->prepare($query); $stmt->bindParam(1, $this->id); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); $this->name = $row['name']; $this->status = $row['status']; $this->id = $row['id']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCategoryNameById($id = null){\n\t}", "function readCategoryName ()\n {\n $query = \"SELECT name FROM \" . $this->table_name . \" WHERE id = ? limit 0,1\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n $row =...
[ "0.8111061", "0.7917211", "0.7877273", "0.7776956", "0.7758787", "0.77232206", "0.770558", "0.76871425", "0.7660406", "0.7650876", "0.7619128", "0.7573651", "0.750564", "0.74878937", "0.74533266", "0.7451373", "0.7422692", "0.7414026", "0.74097264", "0.74030364", "0.7398122",...
0.0
-1
Create a new message instance.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We wi...
[ "0.81376195", "0.7959614", "0.77619994", "0.7713793", "0.76559645", "0.7553059", "0.7458076", "0.71510184", "0.6852663", "0.68347865", "0.67154217", "0.6689976", "0.6683088", "0.6644564", "0.6628052", "0.6549025", "0.6514292", "0.6501647", "0.645071", "0.645071", "0.645071", ...
0.0
-1
Turn this item object into a generic array
public static function transform(Article $article): ?array { return [ 'product_uid' => $article->oxarticles__oxid->value, 'stock' => $article->oxarticles__oxstock->value, 'price' => money_format('%.2n', $article->getPrice()->getBruttoPrice()), 'vat' => $article->getArticleVat(), 'imageUrl' => self::getMasterImageUrl($article), 'thumbUrl' => $article->getThumbnailUrl(), 'description' => $article->getShortDescription(), 'category' => $article->oxarticles__oxsearchkeys->value, 'rating' => $article->oxarticles__oxrating->value, 'title' => $article->oxarticles__oxtitle->value, 'brand' => $article->getManufacturerName(), 'active' => $article->oxarticles__oxactive->value, 'description_full' => $article->getLongDesc(), 'parent' => $article->oxarticles__oxvarcount->value > 0 ? true : false, 'buyable' => $article->isBuyable(), 'variant_keys' => $article->getVariantKeys(), 'priceNet' => money_format('%.2n', $article->getPrice()->getNettoPrice()), 'persParams' => self::getPersParams($article->oxarticles__oxpersparam->value), 'artnum' => $article->oxarticles__oxartnum->value, 'url' => $article->getLink(), 'sold_amount' => $article->oxarticles__oxsoldamount->value ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertItemArray() {}", "public function toArray(): array {\n return $this->items;\n }", "public function toArray(): array\n {\n return (array) $this->items;\n }", "abstract protected function toArray();", "public function getItemsAsArray()\n {\n $map = function ($item)...
[ "0.8215638", "0.7369313", "0.72756594", "0.72397596", "0.7219428", "0.7183687", "0.714448", "0.71435165", "0.71435165", "0.7130484", "0.7113554", "0.7002409", "0.7002409", "0.7002409", "0.7002409", "0.7002409", "0.6983335", "0.69709265", "0.69534105", "0.6944703", "0.6944703"...
0.0
-1
Returns absolute URL to master image otherwise transforms OXID false into null
protected static function getMasterImageUrl($oArticle) { $masterImageUrl = $oArticle->getMasterZoomPictureUrl(1); return $masterImageUrl ? $masterImageUrl : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLoc...
[ "0.70274717", "0.68613935", "0.67954427", "0.6747177", "0.6676173", "0.66071075", "0.6560915", "0.64241153", "0.64233774", "0.64129317", "0.6393591", "0.63915026", "0.63722175", "0.6359381", "0.6276505", "0.6269279", "0.62575024", "0.6229864", "0.6188078", "0.61579025", "0.61...
0.65090936
7
Converts OXPERSPARAM to an array as per apidefinition an array is required
protected function getPersParams($sPersParam) { if (empty($sPersParam)) { return []; } return [$sPersParam]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function getAsArray();", "public function AsArray();", "private function toArray()\n {\n \treturn array(\n...
[ "0.6610058", "0.6610058", "0.6610058", "0.6610058", "0.6610058", "0.6610058", "0.63780737", "0.63600695", "0.6290569", "0.62802523", "0.62292093", "0.62292093", "0.6223689", "0.61402774", "0.61402774", "0.61402774", "0.61402774", "0.6140034", "0.6140034", "0.613968", "0.61396...
0.0
-1
Login dan mendapatkan token
public function login_admin(Request $request) { $status = TRUE; $mesasge = "Berhasil login"; $currentUser = array(); $credentials = $request->only('username', 'password'); try { if (!$token = JWTAuth::attempt($credentials)) { $status = FALSE; $mesasge = "Invalid username or password"; } else { $currentUser = JWTAuth::user(); Admin::where('id', $currentUser['id'])->update(["remember_token" => $token]); } } catch (JWTException $e) { $status = FALSE; $mesasge = "Something wrong in communicating with API or JWT"; } return response()->json(array("status" => $status, "message" => $mesasge, "user" => $currentUser, "token" => $token)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the...
[ "0.77151346", "0.7690799", "0.7525846", "0.74654305", "0.74281216", "0.7427368", "0.7408794", "0.7408794", "0.73675805", "0.73368496", "0.72624767", "0.7250791", "0.71710867", "0.7158363", "0.71438223", "0.71239537", "0.7110031", "0.7109658", "0.7084286", "0.7072495", "0.7067...
0.0
-1
test if input is submit
public function is_submit() { if( $this->taintedInputs->isAutogenerated()){ return false; } else{ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSubmit() {\n return Tools::isSubmit($this->key());\n }", "public function has_submit() {\n\t\treturn false;\n\t}", "public static function is_submitting(){\n\t\treturn (strcasecmp('POST', $_SERVER['REQUEST_METHOD'] ) == 0);\n\t}", "public function canSubmit(): bool\n {\n\t\tret...
[ "0.769213", "0.76298267", "0.7531143", "0.7357879", "0.73345697", "0.72739327", "0.72684723", "0.693697", "0.6921913", "0.6915062", "0.682642", "0.6763867", "0.6613829", "0.6568472", "0.65449667", "0.6441842", "0.63441294", "0.6329457", "0.6314148", "0.62510103", "0.62400603"...
0.7467477
3
test if value is submit but is empty
public function is_empty() { if( $this->is_submit() && ($this->taintedInputs->length()=== 0)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkEmpty(){\n\t\tif(!empty($_POST)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function fieldsEmpty() {\n if(empty($_POST['title']) || empty($_POST['date']) || empty($_POST['location'])) {\n return true;\n } else {\n return false;\n }\n}", "function n...
[ "0.7227422", "0.6979103", "0.6805974", "0.6757064", "0.67430276", "0.6710216", "0.6621762", "0.66206884", "0.6590798", "0.6555877", "0.63911146", "0.6390588", "0.6387652", "0.63636065", "0.63464504", "0.63461804", "0.63356763", "0.6332535", "0.63195604", "0.6318699", "0.63169...
0.7660282
0
Registers services on the given app. This method should only be used to configure services and parameters. It should not get services.
public function register(\Silex\Application $app) { parent::register($app); $this->registerFactory($app); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register(Container $app);", "public function register(Application $app)\n {\n // if console register console providers\n if (php_sapi_name() === 'cli') {\n $app->register(new ConsoleProvider);\n }\n $app->register(new DoctrineOrmManagerRegistryPr...
[ "0.70936173", "0.69585246", "0.6948926", "0.6896024", "0.6868094", "0.6790034", "0.67835665", "0.6748575", "0.67224777", "0.67031777", "0.664835", "0.66165304", "0.6596234", "0.6593159", "0.65621346", "0.65402484", "0.65215915", "0.650128", "0.6488797", "0.6485595", "0.647964...
0.63959956
29
Registers the opauth security factory.
protected function registerFactory(Application $app) { //opauth listener for event callbacks $app[self::LISTENER] = $app->share( function() use ($app) { return new OpauthListener( $app['security'], $app['security.authentication_manager'], $app['users'], $app['monolog'] ); } ); $app['security.authentication_listener.factory.opauth'] = $app->protect(function ($name, $options) use ($app) { // define the authentication provider object $app['security.authentication_provider.'.$name.'.opauth'] = $app->share(function () use ($app) { return new PreAuthenticatedAuthenticationProvider( $app['users'], new UserChecker(), 'opauth' ); }); // define the authentication listener object $app['security.authentication_listener.'.$name.'.opauth'] = $app->share(function () use ($app) { $subscriber = $app[\Metagist\OpauthSecurityServiceProvider::LISTENER]; $dispatcher = $app['dispatcher']; /* @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcher */ $dispatcher->addSubscriber($subscriber); return $subscriber; }); return array( // the authentication provider id 'security.authentication_provider.'.$name.'.opauth', // the authentication listener id 'security.authentication_listener.'.$name.'.opauth', // the entry point id null, // the position of the listener in the stack 'pre_auth' ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n Auth::extend('sso', function ($app, $name, array $config) {\n // 返回一个 Illuminate\\Contracts\\Auth\\Guard 实例...\n return new OaGuard(Auth::createUserProvider($config['provider']),$app->make('request'));\n });\n\n Auth::provider('sso', fu...
[ "0.5964114", "0.58091486", "0.5795723", "0.5752426", "0.56555516", "0.54800516", "0.5350494", "0.5330069", "0.5253543", "0.51911646", "0.5127825", "0.51206654", "0.51169145", "0.5104762", "0.5098509", "0.50660956", "0.5059717", "0.50509346", "0.5026287", "0.4990238", "0.49528...
0.67247784
0
Get a validator for an incoming registration request.
protected function validator(array $data) { return Validator::make($data, [ 'name' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|min:6|confirmed', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidator() {}", "public function getValidator();", "public function getValidator();", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n ...
[ "0.72186273", "0.7102629", "0.7102629", "0.70492387", "0.70492387", "0.70492387", "0.6924329", "0.6917619", "0.6899377", "0.6854331", "0.68485713", "0.6813546", "0.68022", "0.6797856", "0.67473096", "0.6697816", "0.66884923", "0.66457576", "0.6594956", "0.6565441", "0.6507073...
0.0
-1
Create a new user instance after a valid registration.
protected function create(array $data) { if( URL::previous() == "http://localhost:8000/register/company"){ $type="company"; } if(URL::previous() =="http://localhost:8000/register/user"){ $type="user"; } $user=User::create([ 'name' => $data['name'], 'email' => $data['email'], 'user_type'=> $type, 'password' => bcrypt($data['password']), ]); if($type=="company"){ Company::create([ 'user_id' => $user->id, 'slug' => $this->slugCreator($data['name'],'company'), 'logo'=>'default.png', 'cover_photo'=>'default1.jpg' ]); } // return redirect('/login')->with('status', 'We sent you an activation code. Check your email.'); return $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _createUser()\n {\n $data = [\n 'email' => 'newuser@email.nl',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n ...
[ "0.7750602", "0.7489929", "0.7474633", "0.7474633", "0.7474633", "0.7474633", "0.7418831", "0.7418831", "0.7361687", "0.73091877", "0.7290402", "0.7170887", "0.7153413", "0.71367514", "0.7130723", "0.7116712", "0.7107231", "0.7092155", "0.70859027", "0.7084165", "0.706826", ...
0.0
-1
Overriding default register function vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php
public function register(Request $request){ $validator = $this->validator($request->all()); Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message){ $message->to('memmedlicngz@gmail.com'); }); if ($validator->fails()) { $this->throwValidationException( $request, $validator ); } $user = $this->create($request->all()); $this->activationService->sendActivationMail($user); // Auth::guard($this->getGuard())->login($this->create($request->all())); return redirect('/login')->with('status', 'We sent you an activation code. Check your email.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function overrideRegistration()\n {\n $this->app->instance(\n Spark\\Contracts\\Http\\Requests\\Auth\\RegisterRequest::class,\n RegisterRequest::class\n );\n }", "private function register(): void\n {\n $user = User::factory()->create();\n $this-...
[ "0.7052437", "0.6950762", "0.694193", "0.68857855", "0.6858675", "0.68544984", "0.67340356", "0.6729897", "0.6708091", "0.6695558", "0.6683645", "0.6681073", "0.6673626", "0.6662636", "0.66473657", "0.6637524", "0.6625367", "0.6625321", "0.6623041", "0.66192216", "0.6583457",...
0.0
-1
Get schedules & timesheets of current date
public function index() { $currentDate = (new Datetime())->format('Y-m-d'); $timesheets = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->get(); $schedule = Schedule::whereDate('start_date','=',$currentDate) ->where('member_id', Auth::user()->id) ->get(); //Get total time worked $hours = 0; foreach ($timesheets as $timesheet) { $date1 = new Datetime($timesheet->start_time); $date2 = new Datetime($timesheet->end_time); $diff = $date2->diff($date1); $hours = $hours + (($diff->h * 60) + $diff->i); } //Get total breaks $breaks = 0; $first_timesheet = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->first(); $last_timesheet = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->latest()->first(); if($first_timesheet){ $date1 = new Datetime($first_timesheet->start_time); $date2 = new Datetime($last_timesheet->end_time); $diff = $date2->diff($date1); $breaks = (($diff->h * 60) + $diff->i) - $hours; } $worked = $this->hoursandmins($hours); $breaks = $this->hoursandmins($breaks); // First Punch In in current day $first_punch_in = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->first(); return view('attendance/index', ['timesheets'=>$timesheets, 'schedule'=>$schedule, 'first_punch_in'=>$first_punch_in, 'worked'=>$worked, 'breaks'=>$breaks, 'first_timesheet'=>$first_timesheet, 'last_timesheet'=>$last_timesheet]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStationsWithSchedules();", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysda...
[ "0.7257073", "0.7110655", "0.7099814", "0.6993164", "0.6679632", "0.6627502", "0.6613863", "0.6559386", "0.65200734", "0.63781595", "0.6370736", "0.6368895", "0.6330975", "0.63191515", "0.6252868", "0.6239762", "0.6195127", "0.6193422", "0.6184624", "0.61693406", "0.6165503",...
0.6317431
14
Get schedules & timesheets of current date
public function add(Request $req, $account) { $currentDate = (new Datetime())->format('Y-m-d'); $schedule = Schedule::whereDate('start_date','=',$currentDate) ->where('member_id', Auth::user()->id) ->get(); //Add timesheet $timesheet = new Timesheet(); $timesheet->start_time = date('Y-m-d H:i:s', strtotime($req->start_time)); $timesheet->end_time = date("Y-m-d H:i:s", strtotime($req->start_time) + $req->seconds); $timesheet->member_id = Auth::user()->id; $timesheet->activity = 'in'; $timesheet->status = 'approved'; $schedule_hours = 0; if(count($schedule)){ $timesheet->schedule_id = $schedule[0]->id; //Update attendance on schedule-to investigate follow $schedule_hours $schedule_date1 = new Datetime($schedule[0]->start_date.' '.$schedule[0]->start_time.':00:00'); $schedule_date2 = new Datetime($schedule[0]->end_date.' '.$schedule[0]->end_time.':00:00'); $schedule_diff = $schedule_date1->diff($schedule_date2); $schedule_hours = $schedule_hours + (($schedule_diff->h * 60) + $schedule_diff->i); } $timesheet->save(); $timesheets = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->get(); //Get total time worked $hours = 0; foreach ($timesheets as $timesheet) { $date1 = new Datetime($timesheet->start_time); $date2 = new Datetime($timesheet->end_time); $diff = $date2->diff($date1); $hours = $hours + (($diff->h * 60) + $diff->i); } if(count($schedule)){ $schedule_updated = Schedule::find($schedule[0]->id); //More than 30 min still to finish if($schedule_hours-$hours > 30 && $schedule_hours != 0){ $schedule_updated->attendance = 'working'; }elseif ($schedule_hours-$hours <= 30 || $schedule_hours-$hours <= 0) { $schedule_updated->attendance = 'attended'; }//Less than 5 min to finish //late $first_timesheet = Timesheet::whereDate('start_time','=',$currentDate) ->where('member_id', Auth::user()->id) ->first(); $date1 = new Datetime($schedule_updated->start_date.' '.$schedule_updated->start_time.':00:00'); $date2 = new Datetime($first_timesheet->start_time); $diff = $date2->diff($date1); $late = (($diff->h * 60) + $diff->i); // dd($late); if($late > 10){ $schedule_updated->attendance = 'late'; } // $schedule_updated->save(); } //Get total breaks $breaks = 0; $first_timesheet = Timesheet::whereDate('start_time','=',$currentDate)->first(); $last_timesheet = Timesheet::whereDate('start_time','=',$currentDate)->latest()->first(); if($first_timesheet){ $date1 = new Datetime($first_timesheet->start_time); $date2 = new Datetime($last_timesheet->end_time); $diff = $date2->diff($date1); $breaks = (($diff->h * 60) + $diff->i) - $hours; } $worked = $this->hoursandmins($hours); $breaks = $this->hoursandmins($breaks); // First Punch In in current day $first_punch_in = Timesheet::whereDate('start_time','=',$currentDate)->first(); // return view('attendance/index', ['timesheets'=>$timesheets, 'schedule'=>$schedule, 'first_punch_in'=>$first_punch_in, 'worked'=>$worked, 'breaks'=>$breaks, 'first_timesheet'=>$first_timesheet, 'last_timesheet'=>$last_timesheet]); $activities = view('attendance/ajax/activities', ['timesheets'=>$timesheets])->render(); $statistics = view('attendance/ajax/statistics', ['schedule'=>$schedule, 'worked'=>$worked])->render(); return response()->json(['activities'=>$activities, 'statistics'=>$statistics]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStationsWithSchedules();", "public function getSchedule() {\n// from schedule\n// ORDER BY gameDate\";\n $sql = \"Select id, opponent, location, stadiumName, homeoraway, byuScore, oppScore,\n gameDate, closeDate, showUntilDate, sysda...
[ "0.7256374", "0.71105003", "0.7100954", "0.69936794", "0.6679812", "0.662617", "0.66140044", "0.6559951", "0.65200895", "0.6378182", "0.63710755", "0.63694805", "0.6331583", "0.63183326", "0.63179296", "0.6252371", "0.62396836", "0.6194984", "0.61937284", "0.6185281", "0.6171...
0.0
-1
Liste distinct etats d'un devis
public function get_etats() { $q = $this->db->query('SELECT DISTINCT vef_etat FROM `t_factures` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` ORDER BY fac_etat ASC '); if ($q->num_rows() > 0) { $resultat = $q->result(); return $resultat; } else { return array(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function distinct();", "public static function distinct();", "public function distinct($distinct = TRUE);", "public function getAllDecoupage() {\n $qb = $this->createQueryBuilder('e')\n ->where('e.etatDecoupage != ' . TypeEtat::SUPPRIME);\n // ->orderBy('e.typeDecou...
[ "0.7054337", "0.69479585", "0.6070929", "0.5809279", "0.57638013", "0.5729196", "0.57240325", "0.5675078", "0.5649254", "0.5609112", "0.55991715", "0.5586681", "0.5474495", "0.54269713", "0.5387184", "0.53556687", "0.53295255", "0.5291401", "0.52845657", "0.5275648", "0.52736...
0.0
-1
Liste des factures for DataTables
public function liste($id = 0, $limit = 0, $offset = 1, $filters = null, $ordercol = 2, $ordering = "asc") { /* PHP Logic replaced by query: ==================================================================================== SELECT fac_id AS RowID, fac_id, fac_date, fac_tva, ctc_nom, dvi_correspondant, cor_nom, fac_transmise, fac_relance, fac_contentieux, fac_notes, vef_etat, fac_couleur, fac_masque, fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise, fac_montant_htnr, fac_montant_ht, fac_montant_tva, fac_montant_ttc, fac_regle, fac_reste, fac_reste AS solde_du, fac_etat, IF( fac_reste>=0.01 AND fac_etat=2, 1, 0) AS due, ipu_facture, ipu_reglements, rgl_references, dvi_client, dvi_id_comptable, IF( dvi_client=0, dvi_id_comptable, ctc_id_comptable) AS ctc_id_comptable, cor_email, ctc_email, IF( dvi_client=0, '', COALESCE(cor_email, ctc_email,'')) AS mail, cor_telephone1, ctc_telephone, IF( dvi_client=0, '', COALESCE(cor_telephone1, ctc_telephone,'')) AS telephone, cor_telephone2, ctc_mobile, IF( dvi_client=0, '', COALESCE(cor_telephone2, ctc_mobile,'')) AS portable, '' AS texte_rappel, fac_id_rappel, IF(fac_id_rappel=0, '', fac_rappel) AS fac_rappel FROM `t_factures` LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande` LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis` LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client` LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant` LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` LEFT JOIN ( SELECT `ipu_facture` , GROUP_CONCAT(`ipu_reglement` SEPARATOR ':') AS ipu_reglements, GROUP_CONCAT(`rgl_reference` SEPARATOR ':') AS rgl_references FROM `t_imputations` LEFT JOIN `t_reglements` ON `rgl_id` = `ipu_reglement` WHERE `ipu_inactif` IS NULL GROUP BY `ipu_facture` ORDER BY `ipu_facture` ) AS REGLEMENTS ON fac_id = ipu_facture WHERE `fac_inactif` IS NULL ORDER BY `fac_date` DESC , `fac_reference` DESC ==================================================================================== */ // première partie du select, mis en cache $this->db->start_cache(); // lecture des informations $this->db->select("*", false); $this->db->stop_cache(); $table = "(SELECT fac_id AS RowID, fac_id, fac_date, fac_tva, ctc_nom, dvi_correspondant, cor_nom, fac_transmise, fac_relance, fac_contentieux, fac_notes, vef_etat, fac_couleur, fac_masque, fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise, fac_montant_htnr, fac_montant_ht, fac_montant_tva, fac_montant_ttc, fac_regle, fac_reste, fac_reste AS solde_du, fac_etat, IF( fac_reste>=0.01 AND fac_etat=2, 1, 0) AS due, ipu_facture, ipu_reglements, rgl_references, dvi_client, dvi_id_comptable, IF(dvi_id_comptable > 0, CAST(dvi_id_comptable AS CHAR(30)), idc_id_comptable) AS ctc_id_comptable, cor_email, ctc_email, IF( dvi_client=0, '', COALESCE(cor_email, ctc_email,'')) AS mail, cor_telephone1, ctc_telephone, IF( dvi_client=0, '', COALESCE(cor_telephone1, ctc_telephone,'')) AS telephone, cor_telephone2, ctc_mobile, IF( dvi_client=0, '', COALESCE(cor_telephone2, ctc_mobile,'')) AS portable, '' AS texte_rappel, fac_id_rappel, IF(fac_id_rappel=0, '', fac_rappel) AS fac_rappel FROM `t_factures` LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande` LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis` LEFT JOIN `t_id_comptable` ON (`dvi_client` = `idc_contact` AND `dvi_societe_vendeuse` = `idc_societe_vendeuse`) LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client` LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant` LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` LEFT JOIN ( SELECT `ipu_facture` , GROUP_CONCAT(`ipu_reglement` SEPARATOR ':') AS ipu_reglements, GROUP_CONCAT(`rgl_reference` SEPARATOR ':') AS rgl_references FROM `t_imputations` LEFT JOIN `t_reglements` ON `rgl_id` = `ipu_reglement` WHERE `ipu_inactif` IS NULL GROUP BY `ipu_facture` ORDER BY `ipu_facture` ) AS REGLEMENTS ON fac_id = ipu_facture WHERE `fac_inactif` IS NULL AND `fac_masque` = 0 "; if ($id) { $table .= " AND fac_id = " . intval($id); } $table .= " ORDER BY `fac_date` DESC , `fac_reference` DESC )"; // aliases $aliases = array(); $resultat = $this->_filtre($table, $this->get_filterable_columns(), $aliases, $limit, $offset, $filters, $ordercol, $ordering, true); $this->db->flush_cache(); return $resultat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFabricanteDatatablesData () \n {\n return Laratables::recordsOf(Fabricante::class);\n }", "public function dataTable();", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table...
[ "0.7059445", "0.6906595", "0.67237484", "0.66691446", "0.64599985", "0.63746053", "0.6253364", "0.6237214", "0.6220534", "0.619548", "0.61886793", "0.6149823", "0.6132348", "0.6101599", "0.6090547", "0.6060537", "0.604652", "0.60460377", "0.60268265", "0.60148716", "0.6008487...
0.0
-1
Liste des factures for DataTables
public function liste_chunk($limit = 0, $offset = 1, $filters = null, $ordercol = 2, $ordering = "asc") { /* Replace by query: SELECT fac_id AS RowID, fac_id, fac_rappel, fac_id_rappel, fac_date, fac_tva, ctc_id_comptable, dvi_id_comptable, dvi_client, ctc_nom, dvi_correspondant, cor_nom, cor_email, fac_transmise, fac_etat, fac_relance, fac_contentieux, fac_notes, cor_telephone1, vef_etat, cor_telephone2, ctc_email, ctc_telephone, ctc_mobile, fac_couleur, fac_masque, fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise, fac_montant_htnr, fac_montant_ht, fac_montant_tva, fac_montant_ttc, fac_regle, fac_reste, --psevdo-php ($v->solde_du >= 0.01 AND $v->fac_etat == 2)? $v->due = 1 : $v->due = 0; fac_reste AS solde_du, IF( fac_reste>=0.01 AND fac_etat=2, 1, 0) AS due FROM `t_factures` LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande` LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis` LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client` LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant` LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` WHERE `fac_inactif` IS NULL ORDER BY `fac_date` DESC , `fac_reference` DESC */ $this->load->helper('calcul_factures'); /* Disable query builder // première partie du select, mis en cache $this->db->start_cache(); // lecture des informations $this->db->select("fac_id, fac_id AS RowID,fac_rappel,fac_id_rappel,fac_date,fac_tva,ctc_id_comptable,dvi_id_comptable,dvi_client,ctc_nom," ."dvi_correspondant,cor_nom,cor_email,fac_transmise,fac_etat,fac_relance,fac_contentieux,fac_notes," ."cor_telephone1,vef_etat,cor_telephone2,ctc_email,ctc_telephone,ctc_mobile,fac_couleur,fac_masque," ."fac_fichier,fac_id_rappel,fac_reference,scv_nom,dvi_reference,fac_reprise",false); $this->db->join('t_commandes','cmd_id=fac_commande','left'); $this->db->join('t_devis','dvi_id=cmd_devis','left'); $this->db->join('t_contacts','ctc_id=dvi_client','left'); $this->db->join('t_correspondants','cor_id=dvi_correspondant','left'); $this->db->join('t_societes_vendeuses','scv_id=dvi_societe_vendeuse','left'); $this->db->join('v_etats_factures','vef_id=fac_etat','left'); $this->db->where('fac_inactif is null'); $this->db->order_by('fac_date','DESC'); $this->db->order_by('fac_reference','DESC'); $this->db->stop_cache(); $table = 't_factures'; // aliases $aliases = array( ); $resultat = $this->_filtre($table,$this->get_filterable_columns(),$aliases,$limit,$offset,$filters,0,NULL); $this->db->flush_cache(); */ $resultat = array(); $q = $this->db->query("SELECT fac_id, fac_id AS RowID, fac_rappel, fac_id_rappel, fac_date, fac_tva, IF(dvi_id_comptable > 0, CAST(dvi_id_comptable AS CHAR(30)), idc_id_comptable) AS ctc_id_comptable, dvi_id_comptable, dvi_client, ctc_nom, dvi_correspondant, cor_nom, cor_email, fac_transmise, fac_etat, fac_relance, fac_contentieux, fac_notes, cor_telephone1, vef_etat, cor_telephone2, ctc_email, ctc_telephone, ctc_mobile, fac_couleur, fac_masque, fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise FROM `t_factures` LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande` LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis` LEFT JOIN `t_id_comptable` ON (`dvi_client` = `idc_contact` AND `dvi_societe_vendeuse` = `idc_societe_vendeuse`) LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client` LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant` LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` WHERE `fac_inactif` IS NULL ORDER BY `fac_date` DESC , `fac_reference` DESC "); if ($q->num_rows() > 0) { $resultat = array("data" => $q->result(), "recordsTotal" => $q->num_rows(), "recordsFiltered" => $q->num_rows(), "recordsOffset" => $offset, "recordsLimit" => $limit, "ordercol" => "fac_date", "ordering" => "desc"); //return $result; } else { $resultat = array("data" => array(), "recordsTotal" => 0, "recordsFiltered" => 0, "recordsOffset" => $offset, "recordsLimit" => $limit); //return $result; } $resultat2 = array(); foreach ($resultat['data'] as $v) { // informations de prix $data = new stdClass(); $data->fac_id = $v->fac_id; $data->fac_tva = $v->fac_tva; $data->fac_etat = $v->fac_etat; $data->vef_etat = $v->vef_etat; $data->fac_reprise = $v->fac_reprise; $data = calcul_factures($data); $v->fac_etat = $data->fac_etat; $v->vef_etat = $data->vef_etat; $v->total_HT = $data->fac_montant_ht; $v->total_TTC = $data->fac_montant_ttc; $v->solde_du = $data->fac_reste; if ($v->solde_du >= 0.01 and $v->fac_etat == 2) { $v->due = 1; } else { $v->due = 0; } // informations de règlement $query = $this->db->where('ipu_facture', $v->fac_id) ->where('ipu_inactif is null') ->select('ipu_reglement,rgl_reference') ->join('t_reglements', 'rgl_id=ipu_reglement', 'left') ->get_compiled_select('t_imputations', false); //log_message('DEBUG', 'M_factures informations de règlement\n '. $query); $q = $this->db->query($query); $reglements = ''; $sep = ''; foreach ($q->result() as $r) { $reglements .= $sep . anchor_popup('reglements/detail/' . $r->ipu_reglement, $r->rgl_reference); $sep = '<br />'; } $v->reglements = $reglements; // autres informations $v->mail = ($v->cor_email != '') ? $v->cor_email : $v->ctc_email; $v->telephone = ($v->cor_telephone1 != '') ? $v->cor_telephone1 : $v->ctc_telephone; $v->portable = ($v->cor_telephone2 != '') ? $v->cor_telephone2 : $v->ctc_mobile; $v->texte_rappel = ''; if ($v->fac_id_rappel == 0) { $v->fac_rappel = ''; } //$v->fac_fichier = construit_lien_fichier("",$v->fac_fichier); // cas des reprises de données if ($v->dvi_client == 0) { $v->ctc_id_comptable = $v->dvi_id_comptable; $v->mail = ''; $v->telephone = ''; $v->portable = ''; } $resultat2[] = $v; } $resultat['data'] = $resultat2; return $resultat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFabricanteDatatablesData () \n {\n return Laratables::recordsOf(Fabricante::class);\n }", "public function dataTable();", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table...
[ "0.7059445", "0.6906595", "0.67237484", "0.66691446", "0.64599985", "0.63746053", "0.6253364", "0.6237214", "0.6220534", "0.619548", "0.61886793", "0.6149823", "0.6132348", "0.6101599", "0.6090547", "0.6060537", "0.604652", "0.60460377", "0.60268265", "0.60148716", "0.6008487...
0.0
-1
Envoi de la facture par email
public function envoyer_email($id) { $q = $this->db->where('fac_id', $id) ->where('fac_inactif is null') ->select('t_factures.*,scv_email') ->join('t_commandes', 'cmd_id=fac_commande', 'left') ->join('t_devis', 'dvi_id=cmd_devis', 'left') ->join('t_societes_vendeuses', 'scv_id=dvi_societe_vendeuse', 'left') ->get('t_factures'); if ($q->num_rows() != 1) { throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture numéro ' . $id); } $row = $q->row(); // récupération du contact et du correspondant $q = $this->db->select("dvi_client,dvi_correspondant") ->join('t_commandes', 'cmd_id=' . $row->fac_commande, 'left') ->join('t_devis', 'dvi_id=cmd_devis', 'left') ->get('t_factures'); if ($q->num_rows() == 0) { throw new MY_Exceptions_NoSuchUser('Pas de correspondant trouvé pour la facture ' . $id); } $row2 = $q->row(); // récupération de l'adresse email $q = $this->db->where('cor_id', $row2->dvi_correspondant) ->where('LENGTH(cor_email)>0') ->get('t_correspondants'); if ($q->num_rows() == 1) { $email = $q->row()->cor_email; } else { $q = $this->db->where('ctc_id', $row2->dvi_client) ->where('LENGTH(ctc_email)>0') ->get('t_contacts'); if ($q->num_rows() == 1) { $email = $q->row()->ctc_email; } } if (!$email) { throw new MY_Exceptions_NoEmailAddress("Le contact n'a pas d'adresse email"); } // récupération du modèle de document $q = $this->db->where('mod_nom', 'FACTURE') ->get('t_modeles_documents'); if ($q->num_rows() == 0) { throw new MY_Exceptions_NoSuchTemplate("Pas de modèle disponible pour le message email"); } $sujet = $q->row()->mod_sujet; $corps = $q->row()->mod_texte; $fac_fichier = $this->generer_pdf($id); // envoi du mail $this->load->library('email'); $resultat = $this->email->send_one($email, $row->scv_email, $sujet, $corps, $fac_fichier); if (!$resultat) { return false; } // enregistrement de la transmission $transmise = $row->fac_transmise; if ($transmise != '') { $transmise .= '<br />'; } $transmise .= date('d/m/Y') . '&nbsp;Mail'; $data = array( 'fac_transmise' => $transmise, ); return $this->_update('t_factures', $data, $id, 'fac_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function traerPorMail($email) {\n\n}", "private function emailAtLogin() {}", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName =...
[ "0.73424506", "0.7195795", "0.7187269", "0.71534693", "0.71534693", "0.71534693", "0.7153466", "0.7153466", "0.7123985", "0.7047314", "0.7009211", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0.69521254", "0....
0.69109416
23
Marquer "transmise par courrier"
public function marquer_transmise($id) { // enregistrement de la transmission $q = $this->db->where('fac_id', $id) ->get('t_factures'); if ($q->num_rows() == 1) { $transmise = $q->row()->fac_transmise; if ($transmise != '') { $transmise .= '<br />'; } $transmise .= date('d/m/Y') . '&nbsp;Courrier'; $data = array( 'fac_transmise' => $transmise, ); return $this->_update('t_factures', $data, $id, 'fac_id'); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function traerCualquiera()\n {\n }", "public function partirAuTravail(): void\n\t{\n\t}", "function autorizar_esp_pm_acumulado_servicio_tecnico($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen from movimiento_ma...
[ "0.6171186", "0.60245335", "0.5993337", "0.59451747", "0.5928489", "0.5876128", "0.56914407", "0.56448734", "0.56165874", "0.5615523", "0.561118", "0.5557502", "0.5541933", "0.5539782", "0.55296063", "0.5528142", "0.5507307", "0.55041945", "0.5480178", "0.54512435", "0.544030...
0.54293776
23
Liste des factures (actions de relance)
public function liste_commande($commande) { switch ($commande) { case 'get': $id = $this->input->get('fac_id'); if (empty($id)) { return array(); } $query = "(SELECT fac_id AS RowID, fac_id, fac_date, fac_tva, ctc_nom, dvi_correspondant, cor_nom, fac_transmise, fac_relance, fac_contentieux, fac_notes, vef_etat, fac_couleur, fac_masque, fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise, fac_montant_htnr, fac_montant_ht, fac_montant_tva, fac_montant_ttc, fac_regle, fac_reste, fac_reste AS solde_du, fac_etat, IF( fac_reste>=0.01 AND fac_etat=2, 1, 0) AS due, ipu_facture, ipu_reglements, rgl_references, dvi_client, dvi_id_comptable, IF(dvi_id_comptable > 0, CAST(dvi_id_comptable AS CHAR(30)), idc_id_comptable) AS ctc_id_comptable, cor_email, ctc_email, IF( dvi_client=0, '', COALESCE(cor_email, ctc_email,'')) AS mail, cor_telephone1, ctc_telephone, IF( dvi_client=0, '', COALESCE(cor_telephone1, ctc_telephone,'')) AS telephone, cor_telephone2, ctc_mobile, IF( dvi_client=0, '', COALESCE(cor_telephone2, ctc_mobile,'')) AS portable, '' AS texte_rappel, fac_id_rappel, IF(fac_id_rappel=0, '', fac_rappel) AS fac_rappel FROM `t_factures` LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande` LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis` LEFT JOIN `t_id_comptable` ON (`idc_contact` = `dvi_client` AND `dvi_societe_vendeuse` = `idc_societe_vendeuse`) LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client` LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant` LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse` LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat` LEFT JOIN ( SELECT `ipu_facture` , GROUP_CONCAT(`ipu_reglement` SEPARATOR ':') AS ipu_reglements, GROUP_CONCAT(`rgl_reference` SEPARATOR ':') AS rgl_references FROM `t_imputations` LEFT JOIN `t_reglements` ON `rgl_id` = `ipu_reglement` WHERE `ipu_inactif` IS NULL GROUP BY `ipu_facture` ORDER BY `ipu_facture` ) AS REGLEMENTS ON fac_id = ipu_facture WHERE `fac_id` = $id ORDER BY `fac_date` DESC , `fac_reference` DESC )"; $q = $this->db->query($query); if ($q->num_rows() == 1) { return $q->result(); } else { return array(); } break; case 'update': $date_rappel = new DateTime($this->input->get('fac_rappel')); $data = array( 'fac_couleur' => $this->input->get('fac_couleur'), 'fac_masque' => $this->input->get('fac_masque'), 'fac_relance' => $this->input->get('fac_relance'), 'fac_rappel' => $date_rappel->format('Y-m-d H:i:s'), 'fac_id_rappel' => $this->input->get('fac_id_rappel'), 'fac_notes' => $this->input->get('fac_notes'), 'fac_contentieux' => $this->input->get('fac_contentieux'), ); $id = $this->input->get('fac_id'); $res = $this->_update('t_factures', $data, $id, 'fac_id'); if ($res !== false) { return 1; } return 0; break; case 'demasque_all': $res = $this->db->query('UPDATE `t_factures` SET fac_masque=0 WHERE `fac_inactif` IS NULL AND `fac_masque` > 0 '); if ($res !== false) { return 1; } return 0; break; default: return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listarFactura(){\r\n\t\t$this->procedimiento='tesor.ft_factura_sel';\r\n\t\t$this->transaccion='TSR_FAC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_factura','int4');\r\n\t\t$this->captura('...
[ "0.6688035", "0.66018736", "0.6486235", "0.6442815", "0.63959014", "0.6341493", "0.6336905", "0.627739", "0.62099594", "0.6113848", "0.61048365", "0.60739315", "0.6025713", "0.6021141", "0.60193765", "0.60136425", "0.6013067", "0.5962052", "0.59499896", "0.5919626", "0.591282...
0.0
-1
Returns PDF file path for the facture If the PDF file does not already exist, it will attempt to generate it.
public function pdf($id) { $valeurs = $this->detail($id); if (!$valeurs) { throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture ' . $id); } /*if ($valeurs->fac_fichier && file_exists($valeurs->fac_fichier)) { return array( 'path' => $valeurs->fac_fichier, 'created' => false, ); }*/ $chemin = $this->generer_pdf($id, true); if ($chemin) { return array( 'path' => $chemin, 'created' => true, ); } return $chemin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPDF() {\n $data = Input::all();\n $document = document::where(\"id\", \"=\", $data['docuId'])->first();\n $this->makePDF($document->path);\n return str_replace(\"/var/www/sphinx/\", \"\", $document->path) . \"/build/latex/\" . $document->name . \".pdf\";\n }", "f...
[ "0.6740762", "0.66286397", "0.6583642", "0.6376451", "0.63649046", "0.6250997", "0.6179405", "0.61252725", "0.6080214", "0.60725754", "0.60463244", "0.60244125", "0.6021199", "0.60163313", "0.60079575", "0.5991282", "0.5987215", "0.5974274", "0.59698224", "0.5969203", "0.5966...
0.5689301
42
Trigger lignes de factures
public function trigger_lignes_factures($id) { // récupération du taux de TVA $q = $this->db->select('fac_tva') ->where('fac_id', $id) ->get('t_factures'); $tva = $q->row()->fac_tva; // récupération des lignes de la facture $q = $this->db->select("lif_code,lif_prix,lif_quantite,lif_remise_ht") ->where('lif_inactif is null') ->where('lif_facture', $id) ->get('t_lignes_factures'); if ($q->num_rows() > 0) { $lignes = $q->result(); // calcul des montants HT et TTC $ht = 0; $remise = 0; foreach ($lignes as $l) { if ($l->lif_code == 'R') { $remise += $l->lif_prix; } else { $ht += $l->lif_prix * $l->lif_quantite - $l->lif_remise_ht; } } $montant_htnr = $ht; $ht = $ht * (1 - $remise); $tva = $ht * $tva; $ttc = $ht + $tva; $montant_ht = $ht; $montant_tva = $tva; $montant_ttc = $ttc; } else { $montant_htnr = 0; $montant_ht = 0; $montant_tva = 0; $montant_ttc = 0; } $data = array( 'fac_montant_htnr' => $montant_htnr, 'fac_montant_ht' => $montant_ht, 'fac_montant_tva' => $montant_tva, 'fac_montant_ttc' => $montant_ttc, 'fac_regle' => 0, 'fac_reste' => $montant_ttc, ); $this->db->where('fac_id', $id) ->update('t_factures', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fly()\n\t {\n\t }", "final function velcom(){\n }", "public function trigger($hook) {\n }", "public function trasnaction(){\n\n\t}", "function awaiting_add_trigger($vars) {\n\t\t$vars[] = 'lepress-student-awaiting';\n \treturn $vars;\n\t}", "abstract public function fire()...
[ "0.56260514", "0.5462409", "0.54193556", "0.5403832", "0.5346582", "0.53199923", "0.5278226", "0.5269869", "0.5261898", "0.52120674", "0.51425695", "0.51224446", "0.51133925", "0.5097605", "0.5096836", "0.5089075", "0.5081767", "0.5066548", "0.5037627", "0.50289696", "0.50114...
0.53328156
5
The Account identifier .accounts.v1.Account account = 1;
public function getAccount() { return $this->account; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccount();", "public function setAccount($account);", "public function getAccountID();", "public function getAccount() {\n return $this->account;\n }", "public function setAccount($var)\n {\n GPBUtil::checkUint32($var);\n $this->account = $var;\n\n retur...
[ "0.70212007", "0.68139976", "0.6770603", "0.67239463", "0.6561144", "0.6561144", "0.65431345", "0.64482534", "0.64073855", "0.64073855", "0.6404588", "0.63779604", "0.6362563", "0.635606", "0.635606", "0.63256705", "0.6302682", "0.6302682", "0.62722546", "0.626836", "0.626836...
0.67687607
8
The Account identifier .accounts.v1.Account account = 1;
public function setAccount(&$var) { GPBUtil::checkMessage($var, \Accounts\V1\Account::class); $this->account = $var; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccount();", "public function setAccount($account);", "public function getAccountID();", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n return $this->account;\n }", "public function getAccount()\n {\n ...
[ "0.70204073", "0.6817364", "0.67696935", "0.6768164", "0.6768164", "0.6768164", "0.6768164", "0.6768164", "0.6768164", "0.6723405", "0.65639955", "0.65639955", "0.6542415", "0.6448142", "0.64067554", "0.64067554", "0.6403941", "0.6378236", "0.63561636", "0.63561636", "0.63259...
0.6365399
18
/ $Module = $Object>Module; $Repository = $Object>Repository; $Function = $Object>Function;
Public Function Harvest(\stdClass $Object) { $Datasource = \SYSTEM\Module\Datasource::Generate_Object('Database\MySQL'); $SubRoutine = \SYSTEM\Library\XML::Convert_to_Object('SYSTEM/Configuration/Database.xml'); If($SubRoutine->Result) { + $Datasource_Configuration = $SubRoutine->Data; } $Datasource->Connection = $Datasource->Generate_Connection($Datasource_Configuration); $Parameters->Database = "SYSTEM"; $Parameters->Table = "Quotes.Repositories"; $Parameters->Fields = Array('Object_ID','Name','URL','Map'); $Parameters->Filters = Array("Harvest" => 1); $Parameters->Limit = 1; Try { $SubRoutine = $Datasource->Retrieve($Datasource->Connection,$Parameters); If($SubRoutine->Result) { $Repository_Count = $SubRoutine->Record_Count; $Repositories = $SubRoutine->Data; For($I=0;$I < $Repository_Count;$I++) { $Repository = $Datasource->Retrieve_Record($Repositories,$I)->Data; // Retrieve Remote Data $SubRoutine = \SYSTEM\Library\XML::Convert_to_Object($Repository->URL); If($SubRoutine->Result) { $Source_Object = $SubRoutine->Data;; } $SubRoutine = \SYSTEM\Library\Serialization\__Main::UnSerialize($Repository->Map); If($SubRoutine->Result) { $Abstraction_Map = $SubRoutine->Data;; } $Target_Object = \SYSTEM\Module\Datasource::Abstraction_Layer($Source_Object,$Abstraction_Map); // Set the Target Paraemeters $Parameters = NULL; $Parameters->Database = "SYSTEM"; $Parameters->Table = "Quotes"; // Crate Interdata Object $SubRoutine = $Datasource->Create($Datasource->Connection,$Parameters,$Target_Object); If($SubRoutine->Result = TRUE) { } } } } Catch (\Exception $Exception) { $Exception->Debug[] = "Unable to harvest."; Throw $Exception; } Return $Result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function someFunction($someObject)\n {\n }", "public function someFunction(object $someObject)\n {\n }", "function getObject();", "function getObject();", "abstract public function object();", "function &object(object $value, string $namespace = 'default'): object\n{\n $var = new Va...
[ "0.5870213", "0.57042986", "0.5509055", "0.5509055", "0.54634637", "0.5437314", "0.531605", "0.5279412", "0.527066", "0.51980036", "0.51980036", "0.51730275", "0.5148099", "0.5103402", "0.5103402", "0.5008957", "0.49985433", "0.49985433", "0.49906066", "0.49351576", "0.493159...
0.4906437
26
Display a listing of the resource.
public function index() { if(\Request::ajax()){ $storages=Storage::where('type_storage_id','=', 2)->get(); return view('agencies.index', compact('storages')); }else{ return Redirect::to('home'); } }
{ "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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002...
0.0
-1
Show the form for creating a new resource.
public function create() { if(\Request::ajax()){ $bank=Bank::where('status',1)->pluck('name_bank','id'); $val=2; $country=Country::pluck('name_country','id'); $code=TelephoneOperator::pluck('code','id'); return view('agencies.create',compact('bank','country','code','val')); }else{ return Redirect::to('home'); } }
{ "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.75934863", "0.75934863", "0.7587591", "0.75782615", "0.75711566", "0.74992937", "0.74349296", "0.7432467", "0.7387912", "0.7351958", "0.73380226", "0.73111826", "0.72957826", "0.72812104", "0.72734547", "0.7242778", "0.72294843", "0.7225723", "0.718609", "0.71780044", "0.7...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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) { // }
{ "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) { if(\Request::ajax()){ $agency=Storage::find($id); $val=2; return view('agencies.edit',compact('agency','val')); }else{ return Redirect::to('home'); } }
{ "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665",...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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.7423347", "0.70622426", "0.70568657", "0.6896551", "0.65835553", "0.64519453", "0.6348333", "0.6212436", "0.61450946", "0.6122591", "0.6114199", "0.6101911", "0.60876113", "0.60528636", "0.60177964", "0.6006609", "0.59725446", "0.594558", "0.59395295", "0.5938792", "0.5893...
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
Initializes internal state of \Base\FPartenaireQuery object.
public function __construct($dbName = 'appliaviaco', $modelName = '\\FPartenaire', $modelAlias = null) { parent::__construct($dbName, $modelName, $modelAlias); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initQuery()\n {\n $this->_lastSql = null;\n $this->_limit = null;\n $this->_offset = null;\n $this->_order = array();\n $this->_group = array();\n $this->_table = null;\n $this->_stmt = null;\n\n $this->fromStates = array();\n $this...
[ "0.69815016", "0.6957141", "0.68892246", "0.644427", "0.63781613", "0.6340685", "0.6301757", "0.6281937", "0.6210236", "0.6206955", "0.61747116", "0.6160726", "0.6122521", "0.6120216", "0.6102252", "0.60429347", "0.6026074", "0.601321", "0.59934163", "0.59687966", "0.5963133"...
0.0
-1
Returns a new ChildFPartenaireQuery object.
public static function create($modelAlias = null, Criteria $criteria = null) { if ($criteria instanceof ChildFPartenaireQuery) { return $criteria; } $query = new ChildFPartenaireQuery(); if (null !== $modelAlias) { $query->setModelAlias($modelAlias); } if ($criteria instanceof Criteria) { $query->mergeWith($criteria); } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newQuery()\n {\n return new self($this->connection, $this->processor);\n }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function newQuery()\...
[ "0.58240664", "0.5667718", "0.56349194", "0.5550315", "0.5487825", "0.54748595", "0.54152554", "0.5399251", "0.53866017", "0.53828245", "0.53617585", "0.53514296", "0.5343655", "0.5331906", "0.5331102", "0.53147566", "0.52597743", "0.52150524", "0.5177173", "0.50612515", "0.5...
0.5312128
16
Find object by primary key. Propel uses the instance pool to skip the database if the object exists. Go fast if the query is untouched. $obj = $c>findPk(12, $con);
public function findPk($key, ConnectionInterface $con = null) { if ($key === null) { return null; } if ((null !== ($obj = FPartenaireTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { // the object is already in the instance pool return $obj; } if ($con === null) { $con = Propel::getServiceContainer()->getReadConnection(FPartenaireTableMap::DATABASE_NAME); } $this->basePreSelect($con); if ($this->formatter || $this->modelAlias || $this->with || $this->select || $this->selectColumns || $this->asColumns || $this->selectModifiers || $this->map || $this->having || $this->joins) { return $this->findPkComplex($key, $con); } else { return $this->findPkSimple($key, $con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findPk($key, $con = null)\n\t{\n\t\tif ($key === null) {\n\t\t\treturn null;\n\t\t}\n\t\tif ((null !== ($obj = RepositoryPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {\n\t\t\t// the object is alredy in the instance pool\n\t\t\treturn $obj;\n\t\t}\n\t\tif ($con === null) {\n\t\t\...
[ "0.76266354", "0.76266354", "0.7566684", "0.7547668", "0.7544397", "0.75244606", "0.75094116", "0.74984694", "0.7488985", "0.7463394", "0.7444283", "0.74432284", "0.7435427", "0.74185157", "0.7412812", "0.7412765", "0.740688", "0.7393943", "0.73758215", "0.73715127", "0.73660...
0.0
-1
Find object by primary key using raw SQL to go fast. Bypass doSelect() and the object formatter by using generated code.
protected function findPkSimple($key, ConnectionInterface $con) { $sql = 'SELECT indx_part, abonnement, notes, dte_maj, id_contact FROM finance_part WHERE indx_part = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->execute(); } catch (Exception $e) { Propel::log($e->getMessage(), Propel::LOG_ERR); throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); } $obj = null; if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { /** @var ChildFPartenaire $obj */ $obj = new ChildFPartenaire(); $obj->hydrate($row); FPartenaireTableMap::addInstanceToPool($obj, (string) $key); } $stmt->closeCursor(); return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnFindByPK($id);", "public abstract function find($primary_key, $model);", "public function select(){\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$...
[ "0.67413396", "0.6730667", "0.6711073", "0.6685281", "0.6598015", "0.64450324", "0.6370154", "0.63644123", "0.6338688", "0.6323882", "0.62813044", "0.62813044", "0.62671226", "0.6254733", "0.62487155", "0.6225053", "0.6199222", "0.6186898", "0.61775994", "0.6174109", "0.61737...
0.0
-1
Find object by primary key.
protected function findPkComplex($key, ConnectionInterface $con) { // As the query uses a PK condition, no limit(1) is necessary. $criteria = $this->isKeepQuery() ? clone $this : $this; $dataFetcher = $criteria ->filterByPrimaryKey($key) ->doSelect($con); return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnFindByPK($id);", "public abstract function find($primary_key, $model);", "public static function find($primary_key)\n {\n return static::select()\n ->where(static::getPrimaryKey(), $primary_key)\n ->fetchOne();\n }", "public static function fin...
[ "0.81539774", "0.7867759", "0.7742976", "0.7725865", "0.7634623", "0.7554392", "0.7401224", "0.7310899", "0.7229907", "0.7208223", "0.7153336", "0.7110828", "0.7093999", "0.707613", "0.70712215", "0.7046294", "0.7036454", "0.70232224", "0.69681656", "0.6949603", "0.69344795",...
0.0
-1
Find objects by primary key $objs = $c>findPks(array(12, 56, 832), $con);
public function findPks($keys, ConnectionInterface $con = null) { if (null === $con) { $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); } $this->basePreSelect($con); $criteria = $this->isKeepQuery() ? clone $this : $this; $dataFetcher = $criteria ->filterByPrimaryKeys($keys) ->doSelect($con); return $criteria->getFormatter()->init($criteria)->format($dataFetcher); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findPk($pk)\r\n {\r\n $pkColumns = $this->getObject()->getTable()->getIdentifierColumnNames();\r\n if(($count = count($pkColumns)) > 1)\r\n {\r\n // composite primary key\r\n if(!is_array($pk))\r\n {\r\n throw new Exception(sprintf('Class %s has a composite primary k...
[ "0.72084314", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7026247", "0.7009533", "0.7009533", "0.6912297", "0.6912297", "0.6912297", "0.6912297", "0.6912297", "0.6912297", "0.6912297", "0.6912297", "0.6912297", ...
0.0
-1
Filter the query by primary key
public function filterByPrimaryKey($key) { return $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $key, Criteria::EQUAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $key, Criteria::EQUAL);\n\t}", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $key, Criteria::EQUAL);\n\t}", "public function filterByPrimaryKey($key)\n\t{\n\t...
[ "0.69991887", "0.69991887", "0.67881906", "0.67727506", "0.6746357", "0.6727411", "0.6715742", "0.6699015", "0.66762334", "0.66304606", "0.6589114", "0.6561384", "0.65595937", "0.65463", "0.64767", "0.6468148", "0.6443785", "0.6442517", "0.6435018", "0.6431353", "0.64259726",...
0.5879483
99
Filter the query by a list of primary keys
public function filterByPrimaryKeys($keys) { return $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $keys, Criteria::IN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(ActividadPeer::ID, $keys, Criteria::IN);\n\t}", "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $keys, Criteria::IN);\n\t}", "public function filterByPrimaryKeys($keys)\n\t{\n\...
[ "0.71646", "0.71553826", "0.71553826", "0.70211303", "0.69700336", "0.6964152", "0.6959337", "0.6957887", "0.69565123", "0.69475883", "0.6936647", "0.69334376", "0.69142634", "0.68992543", "0.68960387", "0.6879217", "0.6863628", "0.68526083", "0.68505305", "0.6816923", "0.680...
0.6345258
91
Filter the query on the indx_part column Example usage: $query>filterByIDPart(1234); // WHERE indx_part = 1234 $query>filterByIDPart(array(12, 34)); // WHERE indx_part IN (12, 34) $query>filterByIDPart(array('min' => 12)); // WHERE indx_part > 12
public function filterByIDPart($iDPart = null, $comparison = null) { if (is_array($iDPart)) { $useMinMax = false; if (isset($iDPart['min'])) { $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $iDPart['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($iDPart['max'])) { $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $iDPart['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $iDPart, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index($id, $id_part, $id_match)\n {\n //\n }", "private function getPart($part)\n {\n $result = null;\n\n $array_part = preg_replace('/.*\\[(.*)\\]/', '$1', $part);\n $filters = explode('|',$array_part);\n $array_part = $filters[0]; // Temporary fix for...
[ "0.52300304", "0.513603", "0.49697256", "0.49450245", "0.48295516", "0.47859487", "0.47576988", "0.45960146", "0.4589348", "0.45866054", "0.45665765", "0.4553718", "0.45532", "0.45393977", "0.4528993", "0.45231795", "0.4443745", "0.44374856", "0.4426183", "0.44222435", "0.441...
0.65440524
0
Filter the query on the abonnement column Example usage: $query>filterByisAbonnement(true); // WHERE abonnement = true $query>filterByisAbonnement('yes'); // WHERE abonnement = true
public function filterByisAbonnement($isAbonnement = null, $comparison = null) { if (is_string($isAbonnement)) { $isAbonnement = in_array(strtolower($isAbonnement), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(FPartenaireTableMap::COL_ABONNEMENT, $isAbonnement, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setFiltroBusqueda()\n {\n \tsfLoader::loadHelpers('Date');\n\n \t$parcial = '';\n \t$modulo = $this->getModuleName();\n\n\t\t$this->cajaBsq = $this->getRequestParameter('caja_busqueda');\n\t\t$this->desdeBsq = $this->getRequestParameter('desde_busqueda');\n\t\t$this->hastaBsq = $this->getR...
[ "0.5510458", "0.5483433", "0.53874505", "0.5380181", "0.5334744", "0.5277825", "0.5277809", "0.5211707", "0.5193127", "0.5193069", "0.5192595", "0.5141807", "0.51237", "0.51216686", "0.5112058", "0.50942326", "0.5081892", "0.5075318", "0.5073921", "0.50569737", "0.50569737", ...
0.5719954
0
Filter the query on the notes column Example usage: $query>filterByNotes('fooValue'); // WHERE notes = 'fooValue' $query>filterByNotes('%fooValue%'); // WHERE notes LIKE '%fooValue%'
public function filterByNotes($notes = null, $comparison = null) { if (null === $comparison) { if (is_array($notes)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $notes)) { $notes = str_replace('*', '%', $notes); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(FPartenaireTableMap::COL_NOTES, $notes, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByNotes($notes = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($notes)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $notes)) {\n $notes = str_replace('*', '%', $notes);\n ...
[ "0.65479434", "0.53552955", "0.53209394", "0.52974755", "0.5292584", "0.5192094", "0.51822233", "0.5125954", "0.51029927", "0.5094221", "0.5073027", "0.50335497", "0.50330824", "0.5015415", "0.50072765", "0.5005611", "0.5001612", "0.49864164", "0.49557132", "0.49454725", "0.4...
0.63811463
1
Filter the query on the dte_maj column Example usage: $query>filterByDateMAJ('20110314'); // WHERE dte_maj = '20110314' $query>filterByDateMAJ('now'); // WHERE dte_maj = '20110314' $query>filterByDateMAJ(array('max' => 'yesterday')); // WHERE dte_maj > '20110313'
public function filterByDateMAJ($dateMAJ = null, $comparison = null) { if (is_array($dateMAJ)) { $useMinMax = false; if (isset($dateMAJ['min'])) { $this->addUsingAlias(FPartenaireTableMap::COL_DTE_MAJ, $dateMAJ['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($dateMAJ['max'])) { $this->addUsingAlias(FPartenaireTableMap::COL_DTE_MAJ, $dateMAJ['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(FPartenaireTableMap::COL_DTE_MAJ, $dateMAJ, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function compute_datemaj($data) {\n\n $date_maj = DateTime::createFromFormat('d/m/Y', trim($data['INFO_GENERALES'][0]['DATE_MAJ']))->format('Y-m-d') . ' 00:00:00';\n\n if(array_key_exists('IMAGES', $data)) {\n foreach($data['IMAGES'][0]['IMG'] as $url) {\n $image_r...
[ "0.53664845", "0.4902595", "0.4895765", "0.48171052", "0.48142895", "0.4790387", "0.4750255", "0.47181535", "0.46908593", "0.46673393", "0.46537486", "0.45589516", "0.45520145", "0.4521064", "0.44943503", "0.4493331", "0.4482688", "0.44791892", "0.4469322", "0.44574177", "0.4...
0.57090414
0
Filter the query on the id_contact column Example usage: $query>filterByIDContact(1234); // WHERE id_contact = 1234 $query>filterByIDContact(array(12, 34)); // WHERE id_contact IN (12, 34) $query>filterByIDContact(array('min' => 12)); // WHERE id_contact > 12
public function filterByIDContact($iDContact = null, $comparison = null) { if (is_array($iDContact)) { $useMinMax = false; if (isset($iDContact['min'])) { $this->addUsingAlias(FPartenaireTableMap::COL_ID_CONTACT, $iDContact['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($iDContact['max'])) { $this->addUsingAlias(FPartenaireTableMap::COL_ID_CONTACT, $iDContact['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(FPartenaireTableMap::COL_ID_CONTACT, $iDContact, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customerContactsSL($filters, $custID){\n\t\t\t$sql = \"SELECT *\n\t\t\t\t\tFROM `customers_contacts`\n\t\t\t\t\tWHERE `id_customer` = '{$custID}'\";\n\t\t\treturn $this->asList($sql, 'id_contact');\n\t\t}", "public function filterByIdCustomer($idCustomer = null, $comparison = null)\n\t{\n\t\tif (...
[ "0.59569854", "0.5794039", "0.572715", "0.56802535", "0.55793524", "0.55549866", "0.5431466", "0.53855306", "0.53632826", "0.5352048", "0.5304842", "0.52497417", "0.52341574", "0.51872474", "0.51688474", "0.5168229", "0.51607233", "0.51512164", "0.51450753", "0.5132014", "0.5...
0.60712636
0
Filter the query by a related \Partenaire object
public function filterByPartenaire($partenaire, $comparison = null) { if ($partenaire instanceof \Partenaire) { return $this ->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $partenaire->getID(), $comparison); } elseif ($partenaire instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $partenaire->toKeyValue('PrimaryKey', 'ID'), $comparison); } else { throw new PropelException('filterByPartenaire() only accepts arguments of type \Partenaire or Collection'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function partidas()\n {\n \treturn $this->hasMany('App\\Presupuesto_Partida', 'tPresupuesto_idPresupuesto', 'idPresupuesto');\n }", "public function relationshipFilter()\n\t{\n\t\tee()->load->add_package_path(PATH_ADDONS.'relationship');\n\t\tee()->load->library('EntryList');\n\t\tee()->output->s...
[ "0.5500396", "0.5462601", "0.5343429", "0.53256613", "0.53233516", "0.5231814", "0.522393", "0.51875085", "0.5181604", "0.5172275", "0.515979", "0.51268375", "0.5119865", "0.51097906", "0.51071954", "0.50755453", "0.5066229", "0.50441974", "0.5034452", "0.50329965", "0.503075...
0.4970369
27
Adds a JOIN clause to the query using the Partenaire relation
public function joinPartenaire($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('Partenaire'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if ($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'Partenaire'); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinQuery()\n {\n }", "abstract public function join($alias_from, $rel_name, $alias_to);", "function joinClause( $join ) {\n\t global $wpdb;\n\t $join .= \" INNER JOIN $wpdb->postmeta dm ON (dm.post_id = $wpdb->posts.ID AND dm.meta_key = '$this->orderby') \";\n\t return $join;\n...
[ "0.73890704", "0.66605043", "0.6617807", "0.64953744", "0.6383768", "0.6323522", "0.63007224", "0.62926966", "0.62266564", "0.6190041", "0.61895835", "0.61452544", "0.61168504", "0.611552", "0.610706", "0.61064625", "0.61038846", "0.6087383", "0.60788417", "0.60751504", "0.60...
0.60417414
20
Use the Partenaire relation Partenaire object
public function usePartenaireQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinPartenaire($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Partenaire', '\PartenaireQuery'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function partidas()\n {\n \treturn $this->hasMany('App\\Presupuesto_Partida', 'tPresupuesto_idPresupuesto', 'idPresupuesto');\n }", "public function paris() {\n $relation = $this->hasMany(\"Paris\");\n return $relation;\n }", "public function palmares() {\n $relation ...
[ "0.6557172", "0.6145237", "0.612695", "0.6056674", "0.59523565", "0.5908393", "0.58706284", "0.5841203", "0.58261645", "0.5817294", "0.57479125", "0.57300043", "0.5690598", "0.56748044", "0.56741697", "0.5649222", "0.5648384", "0.5643968", "0.56408304", "0.56371486", "0.56311...
0.0
-1
Filter the query by a related \Contact object
public function filterByContact($contact, $comparison = null) { if ($contact instanceof \Contact) { return $this ->addUsingAlias(FPartenaireTableMap::COL_ID_CONTACT, $contact->getID(), $comparison); } elseif ($contact instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(FPartenaireTableMap::COL_ID_CONTACT, $contact->toKeyValue('PrimaryKey', 'ID'), $comparison); } else { throw new PropelException('filterByContact() only accepts arguments of type \Contact or Collection'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByContactRelatedById($contact, $comparison = null)\n {\n if ($contact instanceof Contact) {\n return $this\n ->addUsingAlias(ContactPeer::ID, $contact->getParentId(), $comparison);\n } elseif ($contact instanceof PropelObjectCollection) {\n ...
[ "0.63372123", "0.59283763", "0.58173424", "0.5781456", "0.5766986", "0.5686253", "0.5680812", "0.5675413", "0.5630451", "0.55932033", "0.55681187", "0.5543595", "0.55394554", "0.55358946", "0.55269974", "0.5512471", "0.54591155", "0.54591155", "0.545226", "0.5433128", "0.5417...
0.5049155
54
Adds a JOIN clause to the query using the Contact relation
public function joinContact($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('Contact'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if ($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'Contact'); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinQuery()\n {\n }", "public function join($table, $alias = NULL, $condition = NULL, $arguments = []);", "function joinon_Contact_and_Vehicle_singlerecord($rID, $where = NULL) {\r\n if ($where != NULL) { $this->db->where($where); } \r\n $this->db->join(\r\n ...
[ "0.67770046", "0.6350321", "0.61648023", "0.6131973", "0.6130841", "0.6125234", "0.6118476", "0.6102864", "0.60495263", "0.5968277", "0.592365", "0.58999246", "0.58668643", "0.58578193", "0.58406776", "0.5833929", "0.58220345", "0.5800758", "0.577767", "0.5775287", "0.5735906...
0.5843198
14
Use the Contact relation Contact object
public function useContactQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { return $this ->joinContact($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'Contact', '\ContactQuery'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contact()\n {\n return $this->belongsTo('App\\Models\\Contact');\n }", "public function contact(){\n return $this->hasOne(Contact::class,'id','contact_id');\n }", "public function contact()\n {\n return $this->belongsTo('App\\Contact');\n }", "public functi...
[ "0.7237885", "0.71899456", "0.7167769", "0.7106036", "0.7030174", "0.6958951", "0.6871262", "0.6871262", "0.6871262", "0.6758147", "0.6756453", "0.6687988", "0.6679869", "0.6659945", "0.6618142", "0.66133916", "0.66133916", "0.65705556", "0.6534784", "0.651357", "0.6507618", ...
0.0
-1
Filter the query by a related \IConcernePays object
public function filterByIConcernePays($iConcernePays, $comparison = null) { if ($iConcernePays instanceof \IConcernePays) { return $this ->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $iConcernePays->getIDInfos(), $comparison); } elseif ($iConcernePays instanceof ObjectCollection) { return $this ->useIConcernePaysQuery() ->filterByPrimaryKeys($iConcernePays->getPrimaryKeys()) ->endUse(); } else { throw new PropelException('filterByIConcernePays() only accepts arguments of type \IConcernePays or Collection'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function query()\n {\n $company_id = request()->company_id;\n\n $trips = Trips::CompanyPayoutTripsOnly()->select('trips.*','users.company_id as company_id','companies.name as company_name')\n ->with(['currency','driver']);\n\n if($this->filter_type == 'Weekly') {\n ...
[ "0.5257184", "0.5186439", "0.50765485", "0.5068911", "0.5060244", "0.5034767", "0.49791214", "0.49419966", "0.4924594", "0.4924459", "0.4923939", "0.48719427", "0.4864781", "0.48574683", "0.48567918", "0.48467356", "0.484182", "0.48295373", "0.48228535", "0.48119122", "0.4801...
0.5782482
0
Adds a JOIN clause to the query using the IConcernePays relation
public function joinIConcernePays($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('IConcernePays'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if ($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'IConcernePays'); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function useIConcernePaysQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinIConcernePays($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'IConcernePays', '\\IConcernePaysQuery');\n }", "function joinQuery(...
[ "0.65018654", "0.6084332", "0.5795712", "0.5771382", "0.56853354", "0.54811746", "0.54685354", "0.5439745", "0.53833187", "0.5378942", "0.5371064", "0.53464717", "0.5333564", "0.5320476", "0.53058743", "0.52861017", "0.52651405", "0.5255205", "0.5233911", "0.5230929", "0.5223...
0.6496832
1
Use the IConcernePays relation IConcernePays object
public function useIConcernePaysQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinIConcernePays($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'IConcernePays', '\IConcernePaysQuery'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByIConcernePays($iConcernePays, $comparison = null)\n {\n if ($iConcernePays instanceof \\IConcernePays) {\n return $this\n ->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $iConcernePays->getIDInfos(), $comparison);\n } elseif ($iConcernePays ins...
[ "0.54829735", "0.52944255", "0.51724446", "0.5141058", "0.51190513", "0.5112738", "0.5101737", "0.5090666", "0.5056922", "0.5028633", "0.50052315", "0.5001507", "0.498274", "0.49762902", "0.49697334", "0.49585783", "0.4956564", "0.4929576", "0.49202684", "0.4912594", "0.49070...
0.6053427
0
Exclude object from result
public function prune($fPartenaire = null) { if ($fPartenaire) { $this->addUsingAlias(FPartenaireTableMap::COL_INDX_PART, $fPartenaire->getIDPart(), Criteria::NOT_EQUAL); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_exclude_id(){\n $data = get_object_vars($this);\n unset($data[\"id\"]);\n return $data;\n }", "protected function getExcludeFields() {}", "public function getAllExcept($id);", "public static function getExcludeFields() {}", "public function getExcludeQueryPar...
[ "0.6944211", "0.6665992", "0.6381747", "0.6298523", "0.628999", "0.6212721", "0.61923695", "0.615611", "0.61423695", "0.6132622", "0.6029146", "0.60162425", "0.59564036", "0.5921121", "0.5910564", "0.58563745", "0.58482957", "0.58308554", "0.5769157", "0.57635164", "0.5682927...
0.0
-1
Deletes all rows from the finance_part table.
public function doDeleteAll(ConnectionInterface $con = null) { if (null === $con) { $con = Propel::getServiceContainer()->getWriteConnection(FPartenaireTableMap::DATABASE_NAME); } // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. return $con->transaction(function () use ($con) { $affectedRows = 0; // initialize var to track total num of affected rows $affectedRows += parent::doDeleteAll($con); // Because this db requires some delete cascade/set null emulation, we have to // clear the cached instance *after* the emulation has happened (since // instances get re-added by the select statement contained therein). FPartenaireTableMap::clearInstancePool(); FPartenaireTableMap::clearRelatedInstancePool(); return $affectedRows; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAll()\n {\n $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';\n $this->db->sql_query($query);\n }", "public function deleteAll(){\n try {\n $this->getTable()->delete();\n } catch (\\Exception $e) {\n $this->handleException($e);\...
[ "0.6068534", "0.6063363", "0.59792346", "0.59505737", "0.5945243", "0.593927", "0.5900646", "0.5849666", "0.584938", "0.58352566", "0.5801661", "0.5786374", "0.5777864", "0.5771135", "0.5711773", "0.57073176", "0.56904346", "0.56736815", "0.56513053", "0.5643103", "0.5628", ...
0.0
-1
Performs a DELETE on the database based on the current ModelCriteria
public function delete(ConnectionInterface $con = null) { if (null === $con) { $con = Propel::getServiceContainer()->getWriteConnection(FPartenaireTableMap::DATABASE_NAME); } $criteria = $this; // Set the correct dbName $criteria->setDbName(FPartenaireTableMap::DATABASE_NAME); // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. return $con->transaction(function () use ($con, $criteria) { $affectedRows = 0; // initialize var to track total num of affected rows FPartenaireTableMap::removeInstanceFromPool($criteria); $affectedRows += ModelCriteria::delete($con); FPartenaireTableMap::clearRelatedInstancePool(); return $affectedRows; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteBy($criteria, $params = false)\n {\n $query = $this->model->query();\n\n /*== FILTER ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;\n\n if (isset($filter->field))//Where field\n $field = $filter->field;\n }...
[ "0.71742123", "0.6940287", "0.6878338", "0.6871387", "0.6870411", "0.67544645", "0.67374706", "0.6723886", "0.67231476", "0.67134583", "0.6704745", "0.6659441", "0.66567934", "0.66559327", "0.66308695", "0.66101927", "0.6608142", "0.659862", "0.65924466", "0.65509707", "0.653...
0.0
-1
Bootstrap the application services.
public function boot() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n // Boot here application\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', functi...
[ "0.7216422", "0.7040846", "0.70043975" ]
0.0
-1
Register the application services.
public function register() { $this->app->bind(\App\Repositories\UserTypesRepository::class, \App\Repositories\UserTypesRepositoryEloquent::class); $this->app->bind(\App\Repositories\UserRepository::class, \App\Repositories\UserRepositoryEloquent::class); $this->app->bind(\App\Repositories\UserTypeUserRepository::class, \App\Repositories\UserTypeUserRepositoryEloquent::class); $this->app->bind(\App\Repositories\CustomerRepository::class, \App\Repositories\CustomerRepositoryEloquent::class); $this->app->bind(\App\Repositories\CompanyRepository::class, \App\Repositories\CompanyRepositoryEloquent::class); $this->app->bind(\App\Repositories\CategoryItemsRepository::class, \App\Repositories\CategoryItemsRepositoryEloquent::class); $this->app->bind(\App\Repositories\ItemRepository::class, \App\Repositories\ItemRepositoryEloquent::class); $this->app->bind(\App\Repositories\TypeOrderServiceRepository::class, \App\Repositories\TypeOrderServiceRepositoryEloquent::class); $this->app->bind(\App\Repositories\OrderServiceRepository::class, \App\Repositories\OrderServiceRepositoryEloquent::class); $this->app->bind(\App\Repositories\ItemsOrderServiceRepository::class, \App\Repositories\ItemsOrderServiceRepositoryEloquent::class); $this->app->bind(\App\Repositories\UserTypeRepository::class, \App\Repositories\UserTypeRepositoryEloquent::class); $this->app->bind(\App\Repositories\ItemRepository::class, \App\Repositories\ItemRepositoryEloquent::class); //:end-bindings: }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.72834975", "0.7129936", "0.7108755", "0.70365775", "0.69857496", "0.6981425", "0.69721615", "0.6920895", "0.69191223", "0.6882845", "0.6881585", "0.6819491", "0.6818964", "0.68054336", "0.68047476", "0.6799833", "0.6794076", "0.679339", "0.6788445", "0.67767453", "0.677005...
0.0
-1
Bind the interface to an implementation repository class
public function register() { $this->app->bind( UserRepositoryInterface::class, UserRepository::class ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function bindInterfaceImplementor()\n {\n $this->app->bind(\n 'vital40\\Repositories\\ArticleRepositoryInterface',\n 'vital40\\Repositories\\DBArticleRepository'\n );\n $this->app->bind(\n 'vital40\\Repositories\\InventorySummaryRepositoryInterface...
[ "0.77564687", "0.70190316", "0.69290274", "0.6833546", "0.6764538", "0.6762858", "0.6675673", "0.6675673", "0.6630934", "0.66248554", "0.6530316", "0.6494448", "0.64578426", "0.6373778", "0.62960887", "0.62955844", "0.62670034", "0.6155329", "0.61315334", "0.6119732", "0.6030...
0.58186305
32
Check the Isotope config directory for a particular template
public static function getTemplate($strTemplate, $strFormat = 'html5') { $arrAllowed = StringUtil::trimsplit(',', $GLOBALS['TL_CONFIG']['templateFiles'] ?? ''); if (\is_array($GLOBALS['TL_CONFIG']['templateFiles'] ?? null) && !\in_array($strFormat, $arrAllowed)) { throw new \InvalidArgumentException("Invalid output format $strFormat"); } $strKey = $strTemplate . '.' . $strFormat; $strPath = TL_ROOT . '/templates'; $strTemplate = basename($strTemplate); // Check the templates subfolder $strTemplateGroup = str_replace(array('../', 'templates/'), '', Isotope::getConfig()->templateGroup); if ($strTemplateGroup != '') { $strFile = $strPath . '/' . $strTemplateGroup . '/' . $strKey; if (file_exists($strFile)) { return $strFile; } if (file_exists($strFile)) { return $strFile; } } return parent::getTemplate($strTemplate, $strFormat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skcw_check_directory($template) {\n\tif (is_dir($template) && is_readable($template)) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function template_exists($template)\n {\n return (bool)$this->get_template_path($template);\n }", "public function templateExists($template);", "function...
[ "0.60045975", "0.5990606", "0.58582795", "0.5849739", "0.5643575", "0.5642613", "0.55691415", "0.5552786", "0.55412686", "0.5503013", "0.54554456", "0.54395413", "0.5438118", "0.54147214", "0.539594", "0.53264266", "0.5316579", "0.5316362", "0.5307759", "0.53022546", "0.52892...
0.0
-1
Find a particular template file and return its path
protected function getTemplatePath($strTemplate, $strFormat='html5', $blnDefault=false) { if ($blnDefault) { return TemplateLoader::getDefaultPath($strTemplate, $strFormat); } return static::getTemplate($strTemplate, $strFormat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplatePathAndFilename() {}", "protected function getTemplatePathAndFilename() {}", "public function getTemplateFile();", "public function findTemplate($template) {\n if (isset($this->_cache[$template])) {\n return $this->_cache[$template];\n }\n\n $templat...
[ "0.75048566", "0.733183", "0.7213391", "0.7150922", "0.7107095", "0.70787853", "0.70666903", "0.7062942", "0.7062942", "0.7060727", "0.69417447", "0.6854018", "0.67902046", "0.67867744", "0.6780575", "0.6734469", "0.66990584", "0.6693961", "0.66597366", "0.66588867", "0.66523...
0.0
-1
Prepare data for insert
protected function _prepareInsertData($data) { $dataPrepared = $this->_prepareUpdateData($data); return $dataPrepared; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareData();", "function prepare_insert($data = []){\n // if there is no data to set, then return an empty string\n if($data == []){\n return '';\n }\n $set_sql = $this->create_set($data);\n // check again to make sure there were proper col...
[ "0.77594894", "0.7279711", "0.7135351", "0.7036927", "0.7015035", "0.68090016", "0.6750677", "0.6743331", "0.6688451", "0.6596149", "0.655019", "0.6514279", "0.64939564", "0.6490289", "0.6414656", "0.6399984", "0.6382684", "0.63788635", "0.63788635", "0.6376306", "0.63553476"...
0.6669812
9
Prepare data for update
protected function _prepareUpdateData($data) { $dataPrepared = array( 'name' => $data->getName(), 'module_id' => $data->getModule_id(), 'system' => $data->getSystem(), 'person_id' => $data->getPerson_id(), 'color' => $data->getColor(), ); return $dataPrepared; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareData();", "protected function prepareDataForUpdate(){\n\n\t\t// the object get by isUsing function\n\t\t$object = $this->_currentObject[$this->_model->alias];\n\t\t$post = $this->request->data;\n\t\tif (!$this->_model->validates()){\n\t\t\tthrow new NotFoundException($this->_model...
[ "0.7103722", "0.7100322", "0.6887894", "0.6813769", "0.6648072", "0.65205246", "0.65174204", "0.65110296", "0.64727515", "0.64644086", "0.64620405", "0.64552224", "0.6392809", "0.6330844", "0.63108474", "0.6304468", "0.62723124", "0.6270269", "0.6261377", "0.6257602", "0.6239...
0.7291098
0
prepare data to be returned from query
protected function _prepareReturnData($data, $returnArray = true) { $ret = parent::_prepareReturnData($data, $returnArray); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareData();", "abstract protected function prepareData( $data );", "public function prepare( $data );", "public function prepare(){\n\t\tif ( !$this->created_at)\n\t\t\t$this->set();\n\t\treturn array(\n\t\t\t'created_at' => $this->created_at,\n\t\t\t'created_by' => $this->created...
[ "0.72777534", "0.67242235", "0.65121174", "0.64748305", "0.6466333", "0.6412503", "0.6350914", "0.6318678", "0.62788427", "0.62628794", "0.6241167", "0.6218731", "0.61926454", "0.6186326", "0.61344886", "0.610965", "0.60872614", "0.60728127", "0.60520667", "0.6040443", "0.597...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8399528", "0.83755803", "0.83755803", "0.8342532", "0.8252005", "0.8246491", "0.82114965", "0.81451535", "0.81095713", "0.80819905", "0.799094", "0.79885143", "0.79823685", "0.7959513", "0.7950321", "0.7947592", "0.7925319", "0.7914417", "0.7899287", "0.7892423", "0.788904...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'nome' => 'required|max:50', 'codigo' => 'required|numeric', 'fabricante' => 'required|max:50', 'valor' => 'required|numeric', 'descricao' => 'required|min:10', 'detalhes' => 'required|min:10', 'categoria' => 'required|max:100', 'imagem' => 'nullable|sometimes|image|mimes:jpg,jpeg,png,gif', 'ativo' => 'required' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342797", "0.8013068", "0.79357624", "0.79257727", "0.7922943", "0.7903906", "0.7859204", "0.7789624", "0.7783409", "0.77624106", "0.773673", "0.7732383", "0.77094924", "0.7691624", "0.7684878", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", ...
0.0
-1
Set the current URL
private function setUrl(): void { $completeUrl = $_SERVER['REQUEST_URI']; $explodedUrl = \explode('?', $completeUrl); $this->url = trim($explodedUrl[0], '/'); // Cleaned URL }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_current_url() {\r\n\t\t\t$this->current_url = $this->get_current_url();\r\n\t\t}", "protected function initCurrentUrl() {}", "protected function initCurrentUrl() {}", "protected function setUrl() {\r\n\t\t$this->url = htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), ENT_QUOTES);\r\n\...
[ "0.87452483", "0.7824347", "0.7824347", "0.7288479", "0.7239495", "0.72066015", "0.6935518", "0.67902577", "0.6782264", "0.6771426", "0.6742055", "0.672379", "0.672379", "0.6699337", "0.6698233", "0.66434944", "0.65670234", "0.65430605", "0.64147294", "0.64147294", "0.6414483...
0.7527487
3
Get the URL and return it as a string
public function getUrlAsString(): string { return $this->url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "public function getURL(): string\n {\n return $this->http->getURL();\n }", "public function getURL();", "public function getURL();", "protected function getUrl(): string\n {\n return $this->...
[ "0.8298792", "0.82575816", "0.8222928", "0.8222928", "0.8146713", "0.80857027", "0.7984615", "0.7959286", "0.79391223", "0.79391223", "0.7905314", "0.7896312", "0.7877292", "0.7848821", "0.7848821", "0.78416365", "0.78416365", "0.7818941", "0.78179413", "0.7758728", "0.774719...
0.8354214
0
Get the route as an array
public function getUrlAsArray(): array { return \explode('/', $this->url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieve()\n {\n return (array) $this->routes;\n }", "public function getRoutes() : array;", "public function getRoutes() : array;", "function getRouteArray()\n{\n\t// Get the current route as a string from the getRoute function.\n\t$route = getRoute();\n\n\t// Remove the first d...
[ "0.8150687", "0.799582", "0.799582", "0.78544194", "0.7790769", "0.7790769", "0.76074785", "0.7492852", "0.74811256", "0.7464368", "0.7464368", "0.7434219", "0.7418059", "0.7342652", "0.7342456", "0.73370284", "0.73144794", "0.7306966", "0.7247783", "0.7242051", "0.724065", ...
0.0
-1
Select a file and search for the corresponding route
public function fromFiles($files, string $templates): void { if (is_array($files)) { foreach ($files as $file) { $this->fromFiles($file, $templates); } } elseif (\is_string($files)) { $file = new File($files); if ($file->exists()) { $this->section = new Section($file->getArray()); } } $this->route(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function openFileRoute(){\n return File::get( self::getRouteFileName() );\n }", "public function find($file);", "public function file() {\n $args = func_get_args();\n if(empty($args)) return $this->files()->first();\n return call_user_func_array(array($this->files(), 'find'), $...
[ "0.6684296", "0.6115889", "0.58696115", "0.57555526", "0.5574047", "0.55665183", "0.5436301", "0.5377675", "0.5353834", "0.53378254", "0.5337532", "0.52984655", "0.5260143", "0.52382135", "0.5193937", "0.5178753", "0.5158825", "0.5151206", "0.5146507", "0.5125674", "0.5118467...
0.0
-1
Parse all route objects to find the good router
private function route(): void { $url = $this->getUrlAsArray(); $size = \sizeof($url); $section = $this->section; for ($i = 0; $i < $size; $i++) { if ($i < ($size - 1)) { $section = $section->searchInSections($url[$i]); if ($section instanceof Section) { } } else { $route = $section->searchInRoutes($url[$i]); // TODO: Show view and use models if ($route instanceof Route) { } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parseRoutes()\n {\n $this->cacheRoutes();\n\n $request_uri = $this->prepareUrl($_SERVER['REQUEST_URI']);\n\n foreach (static::$routes as $uri => $data) {\n static::$uri = $uri;\n static::$routingType = $data['routingType'];\n\n ...
[ "0.7401408", "0.7218068", "0.70673287", "0.6954263", "0.6932447", "0.6897082", "0.6848692", "0.6770521", "0.6485033", "0.6481818", "0.64623004", "0.64084536", "0.63719916", "0.63162845", "0.6311418", "0.62873656", "0.62836057", "0.6278669", "0.626385", "0.62376565", "0.623029...
0.57732666
52
Display a listing of the resource.
public function index() { $title = $this->title; $blogs = Blog::all(); return view('admin.'.$title.'.index',compact('title','blogs')); }
{ "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() { $title = $this->title; $data = ''; $users = User::all(); return view('admin.'.$title.'.create',compact('title','data','users')); }
{ "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) { $validator = Validator::make($request->all(), [ 'title' => 'required|string', 'user_id' => 'required|string', 'date' => 'required|date', 'details' => 'required|string', 'img' => 'image|mimes:jpeg,png,jpg', ]); //image validate if ($validator->passes()) { $model = $request->all(); $model['img'] = $request->img->getClientOriginalName(); $request->img->move(public_path('images/blog'), $model['img']); Blog::create($model); Alert::success('Successfully Updated', 'Success'); }else{ Alert::error('Something went wrong!', 'Oops...'); } return Redirect::to('admin/'.$this->title); }
{ "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.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0....
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "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) { $title = $this->title; $data = Blog::find($id); $users = User::all(); return view('admin.'.$title.'.edit', compact('title','data','users')); }
{ "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) { $model = $request->all(); $data=Blog::find($model['id']); $data->fill($request->except('img')); if($file = $request->hasFile('img')) { $fullPath = public_path("images/blog/{$data->img}"); if (File::exists($fullPath)) { File::delete($fullPath); } $file = $request->file('img'); $fileName = $file->getClientOriginalName(); $destinationPath = public_path().'/images/blog/' ; $file->move($destinationPath,$fileName); $data->img = $fileName ; } if($data->save()){ Alert::success('Successfully Updated', 'Success'); }else{ Alert::error('Something went wrong!', 'Oops...'); } return Redirect::to('admin/'.$this->title); }
{ "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($id) { if ($data = Blog::find($id)) { $filename = $data->img; $fullPath = public_path("images/blog/{$data->img}"); if (File::exists($fullPath)) { File::delete($fullPath); } $data->delete($fullPath); Alert::success('The Item was deleted.', 'Congrats'); }else{ Alert::error('Something went wrong!', 'Oops...'); } return Redirect::to('admin/'.$this->title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Returns a rules checker object that will be used for validating application integrity.
public function buildRules(RulesChecker $rules) { $rules->add($rules->existsIn(['event_id'], 'Events')); $rules->add($rules->existsIn(['sub_event_id'], 'SubEvents')); $rules->add($rules->existsIn(['occurrence_type_id'], 'TypeOccurrences')); $rules->add($rules->existsIn(['local_id'], 'Locals')); $rules->add($rules->existsIn(['cinema_id'], 'Cinemas')); return $rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildRules(RulesChecker $rules): RulesChecker\n {\n return $rules;\n }", "private static function rules() : mixed\n {\n return AppContainer::get(Constants::validatorRules);\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::c...
[ "0.64002764", "0.6388235", "0.6269912", "0.62365985", "0.61949646", "0.60835993", "0.6026187", "0.6018978", "0.60069567", "0.59928614", "0.5965456", "0.59599984", "0.59508055", "0.59508055", "0.58873993", "0.58730704", "0.5868297", "0.58623487", "0.5858684", "0.58502865", "0....
0.0
-1
Enqueue public facing scripts
public function enqueue_scripts() { wp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false ); wp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueueScripts(){}", "private function load_public_scripts() {\n\n\t}", "public function loadPublicSideScripts()\n\t{\n\t\t$localizationArray = array(\n\t\t\t'ajax_url'\t\t=> public_url('public-ajax.php'),\n\t\t);\n\n\t\twp_enqueue_script('cit-boilerplate-public-script', CIT_PLUGIN_PUBLIC_URL.'...
[ "0.7829267", "0.73509604", "0.72832805", "0.72436476", "0.7110145", "0.70321256", "0.6953151", "0.6947101", "0.68235636", "0.6817338", "0.67939854", "0.67900777", "0.67878705", "0.6787381", "0.6749537", "0.67472607", "0.6745643", "0.6738071", "0.67162114", "0.67156655", "0.67...
0.0
-1
Enqueue public facing styles
public function enqueue_styles() { wp_enqueue_style( 'slick-css', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/css/slick-theme.css', array(), '1.8.1' ); wp_enqueue_style( 'style-css', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/css/style.css', array(), '1.0.0' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "public function loadPublicSideStyles()\n\t{\n\t\twp_enqueue_style('cit-boilerplate-public-style', CIT_PLUGIN_PUBLIC_URL.'css/cit-boilerplate-p...
[ "0.7656127", "0.76434433", "0.7509909", "0.7114221", "0.7089131", "0.708411", "0.7073835", "0.7067314", "0.7057531", "0.7032917", "0.695422", "0.6937341", "0.6903128", "0.68570906", "0.684499", "0.68443966", "0.6842805", "0.6838502", "0.6826086", "0.6811533", "0.6810357", "...
0.0
-1
Unserializes serialized string to card.
public function unserialize($serialized);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deserialise(string $data): void;", "function MBunserialize($serial_str)\n{\n $serial_str = preg_replace_callback('!s:(\\d+):\"(.*?)\";!s', function($match){return 's:'.strlen($match['2']).':\"'.$match['2'] . '\";';}, $serial_str);\n $serial_str= str_replace(\"\\r\", \"\", $serial_str);\n return...
[ "0.6515251", "0.6501372", "0.61641085", "0.61190814", "0.61153203", "0.5894037", "0.5891624", "0.5775682", "0.57551986", "0.573713", "0.57226884", "0.56602275", "0.5641515", "0.5571057", "0.5541177", "0.5496675", "0.54868853", "0.5457735", "0.54435647", "0.5427161", "0.539887...
0.6062301
6
Serializes card to serialization string.
public function serialize(Card $card);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize() \n {\n return serialize([\n 'boardingCardNumber'=>$this->boardingCardId,\n 'arrival'=>$this->arrival, \n 'departure'=>$this->departure, \n 'passenger'=>$this->passen...
[ "0.6130203", "0.59581643", "0.59273213", "0.5885571", "0.58813125", "0.5772732", "0.5638529", "0.5582901", "0.553565", "0.55190796", "0.55066", "0.55066", "0.55066", "0.55066", "0.55066", "0.55066", "0.55061454", "0.55061454", "0.5470354", "0.5470354", "0.5470354", "0.54401...
0.84580797
0
A basic test example.
public function test_is_new_user_can_register() { $data = factory('App\User')->make(); $this->post(route('register'), $data->toArray()) ->assertRedirect("/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "functio...
[ "0.7977854", "0.77753335", "0.76435244", "0.7610687", "0.754975", "0.75405073", "0.75393844", "0.74867696", "0.74400353", "0.7432722", "0.7412231", "0.73547494", "0.73383486", "0.7337478", "0.7308627", "0.7305436", "0.72681046", "0.7260569", "0.72460294", "0.7215908", "0.7195...
0.0
-1
Registers services on the given container. This method should only be used to configure services and parameters. It should not get services.
public function register(Container $container) { /** * @param Container $container A container instance. * @return LoggerConfig */ $container['logger/config'] = function (Container $container) { $config = $container['config']; $loggerConfig = new LoggerConfig($config['logger']); return $loggerConfig; }; /** * @return \Charcoal\Factory\FactoryInterface */ $container['logger/processor/factory'] = function () { return new GenericFactory([ 'map' => [ 'memory-usage' => MemoryUsageProcessor::class, 'uid' => UidProcessor::class ] ]); }; /** * @return StreamHandler|null */ $container['logger/handler/stream'] = function (Container $container) { $loggerConfig = $container['logger/config']; $handlerConfig = $loggerConfig['handlers.stream']; if ($handlerConfig['active'] !== true) { return null; } $level = $handlerConfig['level'] ?: $loggerConfig['level']; return new StreamHandler($handlerConfig['stream'], $level); }; /** * @return FactoryInterface */ $container['logger/handler/browser-console'] = function (Container $container) { $loggerConfig = $container['logger/config']; $handlerConfig = $loggerConfig['handlers.console']; if ($handlerConfig['active'] !== true) { return null; } $level = $handlerConfig['level'] ?: $loggerConfig['level']; return new BrowserConsoleHandler($level); }; /** * @return Container */ $container['logger/handlers'] = function (Container $container) { $loggerConfig = $container['logger/config']; $handlersConfig = $loggerConfig['handlers']; $handlers = new Container(); $handlerFactory = $container['logger/handler/factory']; foreach ($handlersConfig as $h) { $handlers[$h['type']] = function () use ($h, $handlerFactory) { $type = $h['type']; $handler = $handlerFactory->create($type); return $handler; }; } return $handlers; }; /** * Fulfills the PSR-3 dependency with a Monolog logger. * * @param Container $container A container instance. * @return \Psr\Log\Logger */ $container['logger'] = function (Container $container) { $loggerConfig = $container['logger/config']; if ($loggerConfig['active'] !== true) { return new NullLogger(); } $logger = new Logger('Charcoal'); $memProcessor = new MemoryUsageProcessor(); $logger->pushProcessor($memProcessor); $uidProcessor = new UidProcessor(); $logger->pushProcessor($uidProcessor); $consoleHandler = $container['logger/handler/browser-console']; if ($consoleHandler) { $logger->pushHandler($consoleHandler); } $streamHandler = $container['logger/handler/stream']; if ($streamHandler) { $logger->pushHandler($streamHandler); } return $logger; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n...
[ "0.76220584", "0.7496132", "0.7486803", "0.7226702", "0.709186", "0.7090704", "0.70849425", "0.7044107", "0.70271254", "0.69571245", "0.68560326", "0.6775979", "0.67649376", "0.6710107", "0.6689824", "0.6671853", "0.66576654", "0.6650755", "0.6617787", "0.6607811", "0.6599367...
0.6340968
36
Lists all Products models.
public function actionIndex() { $identity = Yii::$app->user->identity; if (isset($identity) && !empty($identity)) { $searchModel = new ProductsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider ]); } else { return $this->goHome(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return Products::all();\n }", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]...
[ "0.7836315", "0.77278125", "0.7666311", "0.766483", "0.766483", "0.766483", "0.766483", "0.76008505", "0.7582378", "0.7582378", "0.7582378", "0.757785", "0.754175", "0.7528902", "0.75164896", "0.7480879", "0.74664444", "0.74483633", "0.743865", "0.74316525", "0.73868424", "...
0.0
-1
Displays a single Products model.
public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show()\n\t{\n\t\t$this->layout->set(null);\n\t\t$id = getParameter('id');\n\t\t$data = [\n\t\t\t'product' => $this->model->product->find_by_id($id)\n\t\t];\n\t\t$this->view->load('product/show', $data);\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_ge...
[ "0.8293662", "0.8071155", "0.80692613", "0.7860882", "0.78254086", "0.7802931", "0.7780388", "0.775374", "0.7743456", "0.7731081", "0.7731081", "0.7731081", "0.7731081", "0.7731081", "0.7731081", "0.7731081", "0.7719352", "0.7717894", "0.7714537", "0.76986873", "0.7697792", ...
0.0
-1
Creates a new Products model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Products(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Product();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\...
[ "0.8466368", "0.83674884", "0.8355095", "0.8326711", "0.82675", "0.8135018", "0.80130744", "0.8007102", "0.78880584", "0.77849776", "0.77426726", "0.77388746", "0.7736695", "0.7681387", "0.7625231", "0.75885767", "0.7572512", "0.75501007", "0.75344485", "0.7519762", "0.751976...
0.8813426
0
Updates an existing Products model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('update', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Product']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Product'];\n\t\t\tif($model->save())\n\t\t\t\t$thi...
[ "0.7540397", "0.74639803", "0.7417645", "0.71670014", "0.7125029", "0.7098763", "0.705194", "0.7037757", "0.70298064", "0.701927", "0.70086175", "0.6990879", "0.6963584", "0.6953177", "0.6911517", "0.69088477", "0.6888778", "0.68792397", "0.6877923", "0.6874478", "0.6873135",...
0.0
-1
Deletes an existing Products model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['index']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteProductAction()\n {\n $id = $_GET['id'];\n $productManager = new ProductManager();\n $productManager->deleteProduct($id);\n header('Location: index.php?section=admin&page=adminproducts');\n }", "public function actionDeleteProduct()\n\t{\n\t\t$model = Order...
[ "0.7610725", "0.74789375", "0.7395661", "0.73849636", "0.73515576", "0.73369306", "0.7251166", "0.72144717", "0.72100323", "0.71848077", "0.7176279", "0.71727866", "0.71661097", "0.70784324", "0.70346415", "0.69973296", "0.6978662", "0.6947993", "0.6946215", "0.6924913", "0.6...
0.0
-1
Finds the Products model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Products::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findProduct($id)\n {\n if (($model = Products::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n\t\tif (($model = Produ...
[ "0.7096683", "0.69281363", "0.68892086", "0.68689305", "0.6781257", "0.67795634", "0.67555207", "0.67537737", "0.67354786", "0.669665", "0.6689381", "0.6681461", "0.66600597", "0.6647091", "0.6635836", "0.6617717", "0.6615045", "0.6606352", "0.65860337", "0.6543096", "0.65294...
0.66464347
16
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE imp_sensor ADD name VARCHAR(255) DEFAULT NULL, ADD multi_value TINYINT(1) DEFAULT NULL, ADD minimum_value INT DEFAULT NULL, ADD maximum_value INT DEFAULT NULL, ADD value INT NOT NULL, CHANGE uuid uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', CHANGE value_type value_type VARCHAR(255) DEFAULT NULL'); }
{ "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) { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE imp_sensor DROP name, DROP multi_value, DROP minimum_value, DROP maximum_value, DROP value, CHANGE uuid uuid CHAR(36) DEFAULT NULL COLLATE utf8_unicode_ci COMMENT \'(DC2Type:guid)\', CHANGE value_type value_type VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); }
{ "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.79502094", "0.7863702", "0.7606416", "0.7492738", "0.73199725", "0.7245919", "0.7187675", "0.7153845", "0.71537775", "0.71420383", "0.71353674", "0.71216005", "0.7115856", "0.7105365", "0.70985687", "0.7080349", "0.70783705", "0.7072629", "0.7068311", "0.7065529", "0.70536...
0.0
-1
Get the enabled status of the api endpoints.
public static function isEnabled() { return self::get('is_enabled', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isApiEnabled()\n {\n return (Mage::getStoreConfig('easywebshopsms/api_connection/active')==0) ? false : true;\n }", "public function isApiEnabled()\n {\n return (Mage::getStoreConfig('smsnotifier/main_conf/active')==0) ? 0 : 1;\n\n }", "public function apiStatus(): str...
[ "0.7272074", "0.7128765", "0.65910566", "0.65754145", "0.64825964", "0.64425254", "0.63732636", "0.6361831", "0.6336304", "0.6330282", "0.6250149", "0.62391156", "0.6210928", "0.619669", "0.6139708", "0.6112924", "0.60781074", "0.6073868", "0.60506004", "0.6000985", "0.599012...
0.56801987
89