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
Check if userA is owner of userB
public function isOwner(User $userA, User $userB) { return $userA->uuid === $userB->user_uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOwner(): bool {\n $f3 = \\Base::instance();\n\n return $f3->get('CURRENT_USER') && !is_null($this->owner) && $f3->get('CURRENT_USER') === $this->owner->id;\n }", "public function isOwner();", "public function isOwner()\n {\n return (\\Auth::check() and \\Auth::user(...
[ "0.73773444", "0.729978", "0.72988683", "0.72786283", "0.7213585", "0.7178543", "0.7029212", "0.70000166", "0.6997243", "0.6941019", "0.68980515", "0.67981243", "0.6788356", "0.6753567", "0.67530346", "0.6751261", "0.67500144", "0.6718592", "0.6717396", "0.66925955", "0.66738...
0.80140126
0
Check if userA is worker of userB
public function isWorker(User $userA, User $userB) { return $userA->user_uuid === $userB->uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function isWorker(User $u = null) {\n\t\tif($u === null) $u = User::load();\n\t\treturn $u->isWorker();\n\t}", "public function actingAsWorker()\n {\n $user = User::where('email', UserTableSeeder::WORKER_CREDENTIALS['email'])->firstOrFail();\n\n return $this->actingAs($user);\n }", "...
[ "0.70354295", "0.643147", "0.62396526", "0.5804154", "0.5792822", "0.5654928", "0.5624355", "0.5523166", "0.5380856", "0.5371569", "0.5357272", "0.5354128", "0.53426313", "0.5315583", "0.5297405", "0.529039", "0.5287794", "0.5270491", "0.52415025", "0.5238871", "0.52181643", ...
0.8376263
0
Check if device is property of user
public function isProperty(Model $model, User $user) { return $model->user_uuid === $user->uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isPowerUser()\n {\n return $this->user->can('sys_properties_edit', $this->app->modules[$this->area]);\n }", "public function getIsUserAttribute()\n {\n return $this->attributes['user_type'] == '3';\n }", "abstract public function deviceExists($devId, $user = null);"...
[ "0.6401842", "0.61350274", "0.61258274", "0.6044968", "0.5960383", "0.5945353", "0.5929077", "0.5912315", "0.58376336", "0.5824356", "0.5797431", "0.5703687", "0.56442", "0.56157184", "0.56096417", "0.5606107", "0.55995375", "0.55718386", "0.5569786", "0.5542428", "0.5528709"...
0.6222893
1
original replacement "($1) $2$3"
public function format_phone($phone) { $phone = preg_replace("/[^0-9]/", "", $phone); if(strlen($phone) == 10){ return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/","$1$2$3",$phone); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function virgule($nombre)\n{\n\t$nombre = preg_replace('#(.+),(.+)#','$1.$2',$nombre);\n\treturn $nombre;\n}", "function translate_replace($params){\n $string = array_shift($params);\n foreach ($params as $value){\n $replace[] = $value;\n }\n return XT::translate_replace($string, $replace);\n}...
[ "0.62748206", "0.6217898", "0.5920853", "0.5919817", "0.5756857", "0.57458156", "0.5726343", "0.56902534", "0.5679878", "0.5677174", "0.5649041", "0.5608493", "0.55879533", "0.55860096", "0.5580428", "0.55334085", "0.5505586", "0.5492033", "0.5458721", "0.5436347", "0.5419616...
0.0
-1
add_action( 'woocommerce_review_order_before_payment', 'wcpg_pay_on_credit_script' ); / This action hook calculates the interest to be paid
function pay_on_credit_apply_interest_fee() { $payment_method = WC()->session->get('chosen_payment_method'); $payment_duration = WC()->session->get('chosen_payment_duration'); if ( $payment_method === "wcpg-pay-on-credit" ) { $label = __( 'Interest Fee', 'wcpg-pay-on-credit' ); $am...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ec_woocommerce_custom_surcharge() {\nglobal $woocommerce;\n \n\tif ( is_admin() && ! defined( 'DOING_AJAX' ) )\n\treturn;\n\t \n\t$percentage = 0.01;\n\t$surcharge = ( $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total ) * $percentage;\n\t$woocommerce->cart->add_fee( 'Surcharge',...
[ "0.6457636", "0.6354419", "0.63102514", "0.58677727", "0.58461505", "0.57832384", "0.57083666", "0.5694343", "0.56919396", "0.5687329", "0.56806856", "0.56623244", "0.5660489", "0.5656696", "0.56446207", "0.56108165", "0.56063044", "0.55687577", "0.55647063", "0.5519983", "0....
0.713603
0
Class constructor, more about it in Step 3
public function __construct() { $this->id = 'wcpg-pay-on-credit'; // payment gateway plugin ID $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name $this->has_fields = true; // in case you need a custom credit card form $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __construct() {}", "final private function __construct() {}", "private final function __construct() {}", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function _...
[ "0.84098613", "0.84098613", "0.83704025", "0.8352889", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", "0.8338245", ...
0.0
-1
Plugin options, we deal with it in Step 3 too
public function init_form_fields(){ $this->form_fields = apply_filters( 'wc_pay_on_credit_form_fields', array( 'enabled' => array( 'title' => __( 'Enable/Disable', $this->domain ), 'type' => 'checkbox', 'label' => __( 'Enab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TS_VCSC_Set_Plugin_Options() {\r\n\t\t// Redirect Option\r\n\t\tadd_option('ts_vcsc_extend_settings_redirect', \t\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_activation', \t\t\t\t\t\t0);\r\n\t\t// Options for Theme Authors\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypes', \t\t\t\t ...
[ "0.7159061", "0.7022751", "0.67372566", "0.6723235", "0.6692813", "0.6684491", "0.6684491", "0.6684491", "0.6684491", "0.6684491", "0.6671828", "0.66435015", "0.66230845", "0.6606579", "0.6557367", "0.6557367", "0.6556103", "0.65409267", "0.6531412", "0.65183", "0.65162015", ...
0.0
-1
You will need it if you want your custom credit card form, Step 4 is about it
public function payment_fields(){ if ( $description = $this->get_description() ) { echo wpautop( wptexturize( $description ) ); } echo '<style>#payment_duration_field label.radio { display:inline-block;margin: .1em 2em 0 .05em !important;}</style>'; $opt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edds_credit_card_form( $echo = true ) {\n\n\tglobal $edd_options;\n\n\tif ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {\n\t\tedd_set_error( 'edd_stripe_error_limit', __( 'We are unable to process your payment at this time, please try again later or contact support.', 'edds' ) );\n\t\tretur...
[ "0.7503272", "0.7391417", "0.7170573", "0.7110351", "0.7044694", "0.7041549", "0.6821951", "0.6719731", "0.67184037", "0.65490043", "0.6494395", "0.64865166", "0.64793754", "0.64654046", "0.64470005", "0.6410393", "0.62688303", "0.62668586", "0.6253865", "0.6247276", "0.62326...
0.0
-1
/ Custom CSS and JS, in most cases required only when you decided to go with a custom credit card form
public function payment_scripts() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edds_credit_card_form( $echo = true ) {\n\n\tglobal $edd_options;\n\n\tif ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {\n\t\tedd_set_error( 'edd_stripe_error_limit', __( 'We are unable to process your payment at this time, please try again later or contact support.', 'edds' ) );\n\t\tretur...
[ "0.7104053", "0.69539416", "0.6941965", "0.66292685", "0.6551258", "0.6393032", "0.62827414", "0.62681174", "0.6202283", "0.6201445", "0.6193256", "0.61111736", "0.6008074", "0.5996392", "0.59563255", "0.59236854", "0.5918118", "0.59148246", "0.5907073", "0.59058887", "0.5904...
0.0
-1
/ Fields validation, more in Step 5
public function validate_fields() { //... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate_fields() {\n \n\t\t\n \n\t\t}", "function validate_fields() {\n\t\treturn true;\n\t}", "public function validation();", "public abstract function validation();", "protected function _validate() {\n\t}", "abstract public function validate();", "abstract public function validate(...
[ "0.84424067", "0.778876", "0.75082946", "0.74390954", "0.73955894", "0.7171267", "0.7171267", "0.7154056", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.7139206", "0.71238744",...
0.8348128
1
Save the chosen payment type as order meta data.
public function save_order_payment_type_meta_data( $order, $data ) { if ( $data['payment_method'] === $this->id && isset($_POST['payment_duration']) ) $order->update_meta_data('_payment_duration', esc_attr($_POST['payment_duration']) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function save_paypal_meta_data( $order, $posted ) {\n }", "private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'paymen...
[ "0.68446", "0.6783925", "0.65708745", "0.6372279", "0.63717794", "0.62204", "0.59535474", "0.5928842", "0.59159106", "0.58887404", "0.5867555", "0.5857349", "0.58248395", "0.58171946", "0.57976013", "0.57749295", "0.576518", "0.57424295", "0.572545", "0.57175356", "0.56757087...
0.7472435
0
Output for the order received page.
public function thankyou_page( $order_id ) { $order = wc_get_order( $order_id ); if ( $this->instructions ) { echo wpautop( wptexturize( $this->instructions ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receipt_page( $order ) {\n\n $result = $this->process_payment($order);\n echo $this->build_gateway_form( $result );\n }", "public static function output()\n\t{\n\t\t$transaction_id = ( isset( $_GET['transaction'] ) ) ? $_GET['transaction'] : NULL;\n?>\n\t\t<div class=\"wrap\">\n<?php\n\...
[ "0.68755394", "0.6675673", "0.65981567", "0.65277195", "0.6471173", "0.6371786", "0.6339118", "0.633703", "0.6127276", "0.6106125", "0.60883325", "0.6064364", "0.60423774", "0.60055333", "0.5986291", "0.5960736", "0.5955927", "0.5954413", "0.5947192", "0.5920202", "0.59131896...
0.0
-1
Display the chosen payment type on the order edit pages (backend)
public function display_payment_type_order_edit_pages( $order ){ if( $this->id === $order->get_payment_method() && $order->get_meta('_payment_duration') ) { $options = $this->options; echo '<p><strong>'.__('Payment Duration').':</strong> ' . $options[$order->get_meta('_payme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentType(){\n return $this->payment_type;\n }", "public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }", "public function form_order_type() {\n\t\tglobal $current_user;\n\n\t\tget_currentuserinfo();\n\n\t\t$data = array();\n\n\t\tif ( !isset( $_...
[ "0.68799037", "0.67747474", "0.6664609", "0.6485299", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.63783735", "0.6312605", "0.627827", "0.62674177", "0.6159791", "0.61376035", "0...
0.7405207
0
Display the chosen payment type on order totals table
public function display_payment_duration_order_item_totals( $total_rows, $order, $tax_display ){ if( is_a( $order, 'WC_Order' ) && $order->get_meta('_payment_duration') ) { $new_rows = []; // Initializing $options = $this->options; // Loop through order tota...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_payment_type_order_edit_pages( $order ){\n if( $this->id === $order->get_payment_method() && $order->get_meta('_payment_duration') ) {\n $options = $this->options;\n echo '<p><strong>'.__('Payment Duration').':</strong> ' . $options[$order->get_meta...
[ "0.67308384", "0.6375974", "0.6283193", "0.61426497", "0.6135261", "0.6049579", "0.60129523", "0.5979317", "0.5935143", "0.5902969", "0.588934", "0.5866886", "0.58155274", "0.58105475", "0.58013725", "0.5800767", "0.5781863", "0.5768579", "0.5765623", "0.5751702", "0.5674109"...
0.5739603
20
Add content to the WC emails.
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) { if ( $this->instructions && ! $sent_to_admin && $this->id === $order->get_payment_method() && $order->has_status( $this->order_status ) ) { echo wpautop( wptexturize( $this->instructions ) ) . PHP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($content) {\n $this->body .= (string)$content;\n }", "function addContent($content)\n {\n $this->content .= $content;\n }", "function content() {\n echo \"<div class='container'>{$this->params['body']}\n <p style='background-color: #95a5a6; padding...
[ "0.6229843", "0.60804087", "0.597197", "0.5841843", "0.58173203", "0.57626945", "0.57497644", "0.5740707", "0.56797355", "0.5646062", "0.55917954", "0.5569249", "0.5541263", "0.5531508", "0.5493379", "0.5475595", "0.54728705", "0.5455709", "0.5451513", "0.54320943", "0.540036...
0.0
-1
/ We're processing the payments here, everything about it is in Step 5
public function process_payment( $order_id ) { $order = wc_get_order( $order_id ); // Mark as on-hold (we're awaiting the payment) $order->update_status( $this->order_status, $this->status_text ); // Reduce stock levels wc_reduce_stock_levels( $order->get_id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processPayment();", "abstract protected function handlePayment();", "public function process_payment() {\n\n // Saves a suggestions group\n (new MidrubBasePaymentsCollectionBraintreeHelpers\\Process)->prepare();\n\n }", "public function calculatePayment()\n {\n }", "p...
[ "0.8109606", "0.75880474", "0.7244233", "0.7184708", "0.6881219", "0.6792774", "0.67690235", "0.67690235", "0.6684103", "0.65736663", "0.65589476", "0.65438706", "0.65329164", "0.6502036", "0.6493395", "0.648789", "0.64863414", "0.6442757", "0.64399236", "0.6438517", "0.64327...
0.0
-1
Return the object revision
public function getRevision() { return $this->systemProperties->getRevision(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRevision();", "public function getRevision() ;", "public function getRevision() {}", "public function getRevision()\n {\n return $this->revision;\n }", "public function getRevision()\n {\n return $this->result[\"revision\"];\n }", "public function getRevision(...
[ "0.85407716", "0.8487537", "0.84517837", "0.8120847", "0.8057016", "0.8056336", "0.801407", "0.7826149", "0.78019327", "0.7786097", "0.75995934", "0.7575436", "0.7567505", "0.7550486", "0.7513471", "0.7289781", "0.72660744", "0.72371894", "0.7084122", "0.69881266", "0.6956540...
0.74740654
15
Return the object ID
public function getId() { return $this->systemProperties->getId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObjectID();", "protected function get_object_id() {\n\t\t$id = rgget( 'id' );\n\t\t$id = absint( $id );\n\t\treturn $id; // example in the case of form id\n\t}", "public function objId()\n {\n return $this->objId;\n }", "public function getObjectID()\n {\n re...
[ "0.9077525", "0.8713674", "0.86303836", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8324616", "0.8281188", "0.82773954", "0.81616855", "0.8142013", "0.8140925", "0.8082416", "0.80633837",...
0.0
-1
Return the object type
public function getObjectType() { return $this->systemProperties->getObjectType(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_object_type()\n {\n }", "public function objType()\n {\n return $this->objType;\n }", "abstract public function objType();", "function getObjtype() {\n return $this->objtype;\n }", "public function getObjType()\r\n {\r\n return $this->ob...
[ "0.8844136", "0.8574877", "0.8493648", "0.8449328", "0.84193265", "0.8323623", "0.80815536", "0.8007992", "0.8007992", "0.7961018", "0.77765286", "0.7775925", "0.77748483", "0.77738297", "0.77738297", "0.77738297", "0.77738297", "0.77738297", "0.77738297", "0.77738297", "0.77...
0.0
-1
Return the creation date & time
public function getCreated() { return $this->systemProperties->getCreated(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "function getCreationTime() ;", "public function getCreationTime()\n {\n return $this->creation_time;\n }", "public function getCreationTime(){\n\t\treturn $this->creationTime;\n\t}", "public function ge...
[ "0.83884203", "0.8289198", "0.8266523", "0.8264676", "0.8262398", "0.8243884", "0.8221706", "0.82093894", "0.8193499", "0.81924367", "0.81549925", "0.81517893", "0.8142879", "0.8083068", "0.8082286", "0.8082286", "0.8082286", "0.8082286", "0.8082286", "0.8082286", "0.8082286"...
0.0
-1
Return the modification date & time
public function getModified() { return $this->systemProperties->getModified(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModificationTime()\n {\n return ( $this->mtime ? $this->mtime : self::dosFormatToTimestamp( array( $this->lastModFileTime, $this->lastModFileDate ) ) );\n }", "function getModificationTime() ;", "public function getModificationTime()\n {\n return $this->fileStructure->...
[ "0.849844", "0.845162", "0.84374785", "0.83548266", "0.8239957", "0.8238228", "0.81192154", "0.805624", "0.80394304", "0.798782", "0.7941283", "0.7883261", "0.7797572", "0.7759776", "0.76660717", "0.76601624", "0.7656909", "0.763595", "0.75878227", "0.75389063", "0.74670887",...
0.0
-1
Return the publication date & time
public function getPublished() { return $this->systemProperties->getPublished(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublishTime()\n {\n return $this->publish_time;\n }", "public function getPublishTime() {\n return $this->publish_time;\n }", "public function getPublicationDate()\n {\n return $this->publicationDate;\n }", "public function getPubDate()\n {\n return ...
[ "0.805476", "0.7970763", "0.78521216", "0.7841469", "0.7803298", "0.76753676", "0.764663", "0.7439755", "0.74007183", "0.74007183", "0.7370848", "0.7213208", "0.716644", "0.714308", "0.7089042", "0.7078624", "0.70270544", "0.7007398", "0.7007398", "0.6992985", "0.69673026", ...
0.0
-1
Return the deletion date & time
public function getDeleted() { return $this->systemProperties->getDeleted(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeleteTime()\n {\n return $this->delete_time;\n }", "public function getDeleteTime()\n {\n return $this->delete_time;\n }", "public function getDeleteTime()\n {\n return $this->delete_time;\n }", "public function getDelete_date(){\n return $thi...
[ "0.85383135", "0.85383135", "0.85383135", "0.7963248", "0.7698223", "0.7535596", "0.7359889", "0.72161144", "0.6876759", "0.668349", "0.6652759", "0.6524627", "0.6486851", "0.6458928", "0.6369093", "0.6318907", "0.63048434", "0.63048434", "0.6228657", "0.62255156", "0.6187217...
0.5691583
53
Set the system properties collection
protected function setSystemProperties(SystemProperties $systemProperties, $overwrite = false) { $this->systemProperties = $systemProperties; $systemPropsState = spl_object_hash($this->systemProperties); // If the system property collection state has changed if (!$overwrite ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveAllSystemProperties()\n {\n $endpoint = self::$endpoint . '/properties';\n return self::sendRequest(Method::GET, $endpoint);\n }", "function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n...
[ "0.59989345", "0.5547257", "0.55258924", "0.55180657", "0.54616874", "0.5418773", "0.53943336", "0.53902966", "0.53091383", "0.5307521", "0.53021973", "0.5284867", "0.5284645", "0.5283715", "0.5276692", "0.52700996", "0.5268349", "0.52508044", "0.5238927", "0.51487905", "0.51...
0.6809005
0
Set the object state to modified
abstract protected function setModifiedState();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUnmodified()\n {\n\t$this->modified= false;\n }", "protected final function _markModified()\n {\n DomainWatcher::addModifiedObject($this);\n }", "public function saveObjectState() {\n $this->objectState = base64_encode(serialize($this));\n $this->isNewRecord ...
[ "0.70076203", "0.6840151", "0.67913073", "0.6617337", "0.6614024", "0.6614024", "0.66109526", "0.66109526", "0.660026", "0.6573943", "0.65436834", "0.6500791", "0.62912333", "0.62900126", "0.6235461", "0.62232673", "0.62158406", "0.6174296", "0.6171379", "0.6151638", "0.61040...
0.7643002
0
Insert new user info
public function add($user){ $this->builder->insert($user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert() {\n\t\t$this->insert_user();\n\t}", "public function insertUser($data) {\n\t\t\n\t\t\n\t}", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "function register_user($new) {\n \n $this->...
[ "0.8218397", "0.7679022", "0.7328596", "0.72870135", "0.72731704", "0.72598064", "0.72368807", "0.7182992", "0.71550405", "0.7122911", "0.7068758", "0.70646167", "0.7017082", "0.6995018", "0.6989052", "0.6968148", "0.69653296", "0.6962806", "0.69616574", "0.69383615", "0.6934...
0.0
-1
SELECT FROM users WHERE username = $username AND password = $password
public function login(string $username , string $password){ $builder->select('*'); $builder->where('username',$username); $builder->where('password',$password); //return $builder->get()->getRowArray(); $num_results = $this->db->count_all_results(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserRowByUsernamePass($username, $password) {\n //mysql object\n $mysql = new my_mysql();\n $query = \"SELECT * FROM user_logging WHERE username='$username' AND pass=PASSWORD('$password');\";\n $res = $mysql->readQuery($query);\n if (!$res) {\n die($mysql->connect_error);\n }el...
[ "0.7676361", "0.75273454", "0.74291456", "0.7352666", "0.7316991", "0.7304728", "0.7238823", "0.72100663", "0.7201302", "0.714333", "0.7124845", "0.7103535", "0.7060701", "0.70584565", "0.70290756", "0.70230603", "0.698808", "0.69865906", "0.69721097", "0.6931977", "0.692959"...
0.0
-1
Get CB Product ID
public function getCbProductId($magentoProductId) { $productMapper = $this->_productMapperFactory->create(); $this->_productMapperResource->load( $productMapper, $magentoProductId, 'magento_product_id' ); return $productMapper->getId() ? $productMa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductID()\n {\n }", "public function getProductID()\n {\n return $this->productID;\n }", "public function getProductID()\n {\n return $this->productID;\n }", "public function getProductID()\n {\n return $this->productID;\n }", "public functi...
[ "0.8022957", "0.785412", "0.785412", "0.785412", "0.7822302", "0.76422435", "0.75846136", "0.75568646", "0.75454575", "0.75327927", "0.75327927", "0.75327927", "0.74992794", "0.7483724", "0.7481031", "0.7454113", "0.7406468", "0.7388701", "0.72725374", "0.7237655", "0.7212440...
0.6422121
70
List is sorted by title
public function getCbProducts() { $model = KenedoModel::getModel('ConfigboxModelAdminProducts'); return $model->getRecords( array(), array(), array(array('propertyName' => 'title', 'direction', 'ASC')) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSortByTitle()\n {\n $item1 = new \\Saitow\\Model\\Tire('sql', 1);\n $item1->setTitle('B');\n\n $item2 = new Saitow\\Model\\Tire('xml', 50);\n $item2->setTitle('A');\n\n $item3 = new \\Saitow\\Model\\Tire('other', 22);\n $item3->setTitle('C');\n\n ...
[ "0.69300795", "0.67497057", "0.67357314", "0.6601203", "0.65837765", "0.6483468", "0.64322656", "0.6370522", "0.6324118", "0.6277263", "0.6254934", "0.61863834", "0.6178413", "0.61716735", "0.61616683", "0.6117028", "0.6077277", "0.60718495", "0.6035423", "0.598601", "0.59727...
0.0
-1
die("Custom Remove Country == venezula_init_function");
function venezula_init_function(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function displayRestrictedCountryPage()\n {\n }", "protected function displayRestrictedCountryPage()\n {\n }", "protected function displayRestrictedCountryPage()\n {\n }", "public function actionAddCountryCode()\n {\n Loads::addCountryCode();\n }", "function tsapres...
[ "0.6114212", "0.6114212", "0.6114212", "0.584069", "0.5806897", "0.5806791", "0.5795465", "0.5783643", "0.57611406", "0.5761126", "0.55850184", "0.55345434", "0.552714", "0.5523529", "0.55215096", "0.55082226", "0.5495427", "0.54827684", "0.54710037", "0.54659474", "0.5450747...
0.6150253
0
Retourne le temps actuel de la machine
private function _getMicroTime (){ return microtime(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function time() {\n return $this->info['total_time'];\n }", "function getTimeProccess(){\n\t\treturn round($this->timeProccess,5);\n\t}", "public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}"...
[ "0.69072545", "0.6825759", "0.6698773", "0.6651592", "0.6526651", "0.65247583", "0.6484304", "0.6480462", "0.64451873", "0.6435941", "0.6435566", "0.6430083", "0.63721883", "0.6371592", "0.6359804", "0.635713", "0.63466597", "0.6343901", "0.6343901", "0.6343901", "0.6343901",...
0.0
-1
/ The functions file is a special file that WordPress will automatically execute. It holds things like our menus, our widgets, etc. Even our own functions we want to share throughout our theme. Small utility function to shorten bloginfo('stylesheet_directory')
function sd () { bloginfo('stylesheet_directory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_stylesheet_directory()\n {\n }", "function child_shortcode() {\nreturn get_bloginfo('stylesheet_directory');\n}", "function get_stylesheet_directory_uri()\n {\n }", "function wpstartup_theme_stylesheet(){\n $globalstyle = plugins_url().'/wp-startup/templates/basic/global.css';\n ...
[ "0.7406836", "0.7297175", "0.71755993", "0.70051926", "0.6897553", "0.6865237", "0.6816931", "0.67709196", "0.6681117", "0.66797787", "0.66583145", "0.6658298", "0.6632814", "0.66017556", "0.65994304", "0.6567605", "0.65631187", "0.65322125", "0.6531439", "0.6530844", "0.6525...
0.809549
0
Get path to home directory.
public function getHome(): string { if (null === $this->home) { $this->home = getenv('HOME'); } return $this->home; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHomeDir()\n {\n return $this->homeDir;\n }", "private function getHomeDir()\n {\n // On Linux/Unix-like systems, use the HOME environment variable\n if ($homeDir = getenv('HOME')) {\n return $homeDir;\n }\n // Get the HOMEDRIVE and HOMEPAT...
[ "0.8269688", "0.82472193", "0.82454246", "0.82454246", "0.8176658", "0.81389064", "0.80968463", "0.7867739", "0.78312653", "0.7783374", "0.7781867", "0.7780288", "0.77713096", "0.7634533", "0.7634533", "0.7596149", "0.7558425", "0.75460607", "0.7483214", "0.74436176", "0.7270...
0.7917441
7
Set path to home directory.
public function setHome(string $home): void { $this->home = $home; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHomeDir($path)\r\n\t{\r\n\t\t$this->pathHomeDir = $path;\r\n\t}", "private\tfunction expandHomeDirectory($path) {\n\t $homeDirectory = getenv('HOME');\n\t if (empty($homeDirectory)) {\n\t $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH');\n\t }\n\t return str_replace('~', realpath($hom...
[ "0.84578717", "0.70373255", "0.686513", "0.6699088", "0.6694386", "0.66760343", "0.66541326", "0.664476", "0.664476", "0.664476", "0.6630491", "0.6630491", "0.6599978", "0.659706", "0.6555835", "0.6456686", "0.63614833", "0.63116413", "0.62460643", "0.6212512", "0.6155931", ...
0.63451487
17
Construct a round model
public function __construct() { parent::__construct('rounds', 'gems__rounds', 'gro', true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _createRound()\n\t{\n\t\t$ut = $this->_ut;\n\t\t$dt = $this->_dt;\n\n\t\t$round['rund_id'] = -1;\n\t\t$round['rund_name'] = kform::getInput('roundName');\n\t\t$round['rund_stamp'] = kform::getInput('roundStamp');\n\t\t$round['rund_type'] = kform::getInput('roundType');\n\t\t$round['ru...
[ "0.6848297", "0.6537166", "0.59762955", "0.5613513", "0.54168355", "0.53107864", "0.52688974", "0.49823445", "0.49732658", "0.49675724", "0.49190596", "0.4909747", "0.48959652", "0.48936403", "0.4843986", "0.4843251", "0.48216793", "0.4818231", "0.47821364", "0.47406992", "0....
0.52544
7
Delete items from the model
public function delete($filter = true, array $saveTables = null) { $this->trackUsage(); $rows = $this->load($filter); if ($rows) { foreach ($rows as $row) { if (isset($row['gro_id_round'])) { $roundId = $row['gro_id_round']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public funct...
[ "0.7637804", "0.73928213", "0.7222594", "0.7117589", "0.7092785", "0.7018035", "0.7011803", "0.6981773", "0.6917967", "0.6917967", "0.686056", "0.6848821", "0.6845507", "0.683415", "0.6825909", "0.6817571", "0.6813478", "0.6810214", "0.6800028", "0.67936003", "0.67847633", ...
0.0
-1
Get the number of times a round is used in other rounds
public function getRefCount($roundId) { if (! $roundId) { return 0; } $sql = "SELECT COUNT(*) FROM gems__rounds WHERE gro_id_round != ? AND ( (gro_valid_after_id = ? AND gro_valid_after_source IN ('tok', 'ans')) OR ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoundsCount()\n {\n return $this->rounds()->count();\n }", "public function getRounds() : int\n {\n return $this->rounds;\n }", "public function nextRound() {\n $this->round++;\n }", "public function count()\n {\n return $this->timesRepeat * co...
[ "0.69859296", "0.6832713", "0.6290563", "0.62336093", "0.6154462", "0.6125598", "0.61233985", "0.58767897", "0.5854384", "0.5829975", "0.57314694", "0.5667032", "0.56670153", "0.5655716", "0.562926", "0.56138855", "0.5608129", "0.5594794", "0.5591536", "0.5590438", "0.5586971...
0.55869013
21
Get the number of times someone started answering this round.
public function getStartCount($roundId) { if (! $roundId) { return 0; } $sql = "SELECT COUNT(*) FROM gems__tokens WHERE gto_id_round = ? AND gto_start_time IS NOT NULL"; return $this->db->fetchOne($sql, $roundId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoundsCount()\n {\n return $this->rounds()->count();\n }", "public function count()\n {\n return $this->timesRepeat * count($this->test);\n }", "public function getRounds() : int\n {\n return $this->rounds;\n }", "public function getAnswerCount();", ...
[ "0.6572491", "0.6490636", "0.6267818", "0.62086135", "0.6124255", "0.6093631", "0.6088629", "0.60658365", "0.6034169", "0.60109115", "0.59809315", "0.59750104", "0.5968928", "0.59269613", "0.5921873", "0.5874608", "0.58624524", "0.58596146", "0.585799", "0.58430415", "0.58395...
0.62104297
3
Can this round be deleted as is?
public function isDeleteable($roundId) { if (! $roundId) { return true; } return ! ($this->getRefCount($roundId) + $this->getStartCount($roundId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _deleteRound()\r\n\t{\r\n\t\t$utr = new utRound();\r\n\t\t$roundId = kform::getInput(\"roundId\");\n\t\t$utr->delRound($roundId);\n\t\t$page = new utPage('none');\r\n\t\t$page->close();\r\n\t\texit;\n\t}", "public function destroy(Round $round)\n {\n //\n }", "function delete() ;", "fu...
[ "0.7122488", "0.65640885", "0.64989895", "0.64989895", "0.62908757", "0.6279225", "0.6264606", "0.6264606", "0.6188615", "0.6174071", "0.6174071", "0.6174071", "0.6174071", "0.6167102", "0.61457527", "0.6100151", "0.6097273", "0.6096901", "0.6096901", "0.6096886", "0.60887784...
0.589786
50
Get array of validation rules for user creation
public static function getRules() { return self::$rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationCreateRules(): array\n {\n }", "public function createRules()\n {\n return [\n 'name' => 'sometimes|required|min:3|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/|max:40',\n 'lastname' => 'sometimes|required|regex:/^...
[ "0.7948727", "0.7761068", "0.77152175", "0.769027", "0.7687657", "0.7672366", "0.7622043", "0.7593619", "0.7588799", "0.75867254", "0.75812423", "0.7579031", "0.75735277", "0.75734174", "0.75645924", "0.75628144", "0.7544675", "0.7525245", "0.7519711", "0.74977756", "0.747498...
0.0
-1
Get array of validation rules for user update
public static function getUpdateRules($id) { $_rules = self::$rules; $_rules['email'] = 'email|required|unique:users,email,'.(int)$id; return $_rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationRulesUpdate(): array;", "public function getValidationUpdateRules(): array\n {\n }", "public function getRulesForUpdate()\r\n\t{\r\n\t \treturn $this->rules_for_update ? $this->rules_for_update : array();\r\n\t}", "public function getUpdateRules()\n {\n return [\n...
[ "0.8164922", "0.80660534", "0.8027275", "0.7848168", "0.76230127", "0.7619991", "0.7541504", "0.7518182", "0.7433294", "0.74296415", "0.7389195", "0.7309279", "0.7296824", "0.72919214", "0.72801805", "0.7195218", "0.7195099", "0.7185468", "0.716711", "0.7161601", "0.7116141",...
0.7335479
11
Password mutator Automatically encrypt password whenever user is created/updated
public function setPasswordAttribute($password) { $this->attributes['password'] = bcrypt($password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }", "public function setPassword...
[ "0.78122973", "0.72350854", "0.7233653", "0.72311366", "0.7216509", "0.71811795", "0.7111733", "0.707928", "0.7040386", "0.69755876", "0.6962576", "0.68949205", "0.6893743", "0.6878337", "0.6853345", "0.6853345", "0.68355036", "0.6824331", "0.681691", "0.67968774", "0.6792199...
0.67966485
20
If board is empty always stars with center position, else random position
protected function getStandardMove($player) : Move { $possibleMoves = $this->board->getPossibleMoves(); return (count($possibleMoves) == Board::BOARD_SIZE) ? MoveFactory::create($player, 4) : MoveFactory::create($player, $possibleMoves[array_rand($possibleMoves, 1)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function randomPos() {\n $this->columna=rand(0,3);\n $this->fila=rand(0,3);\n }", "public function resetBoard()\n\t{\n\t\t$this->board = array();\n\t\t\n\t\t// Not available positions in the square.\n\t\t$this->board[3][-3] = false;\n\t\t$this->board[3][-2] = false;\n\t\t$this->board[2][-3] = f...
[ "0.6807012", "0.6332468", "0.6327304", "0.6028362", "0.58834106", "0.5838774", "0.5755929", "0.5677716", "0.55795795", "0.55647016", "0.5538724", "0.5534853", "0.5519929", "0.55084825", "0.54879636", "0.54752654", "0.5428012", "0.5420906", "0.5418502", "0.54119855", "0.533887...
0.0
-1
return encoded image as string
public static function uploadImage($formname, $query, $params) { $image = base64_encode(file_get_contents($_FILES[$formname]['tmp_name'])); //create stream $options = array('http'=>array( 'method'=>"POST", 'header'=>"Authorization: Bearer 8f071a0c68940eb80440a1315f56c5d0b5657ca2\n". "Content-Type: application/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function base64()\n {\n ob_start();\n\n imagepng($this->image);\n\n $string = ob_get_contents();\n\n ob_end_clean();\n\n return 'data:image/png;base64,'.base64_encode($string);\n }", "public function toEncodedURI() : string {\n\t\t\tif ($this->uri === null) {\n\t\t...
[ "0.753947", "0.71419525", "0.7137143", "0.6902758", "0.6886801", "0.6709782", "0.6605621", "0.66046065", "0.65861344", "0.6503917", "0.6462494", "0.64574516", "0.6378609", "0.62408894", "0.6157885", "0.61287796", "0.6127807", "0.6124351", "0.6118434", "0.6097813", "0.6088528"...
0.0
-1
Test for a valid login.
public function login($email, $password) { $sql =<<<SQL SELECT * from $this->tableName where email=? SQL; $pdo = $this->pdo(); $statement = $pdo->prepare($sql); $statement->execute(array($email)); if ($statement->rowCount() === 0) { return null; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoginValid(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => 'Wrong'\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertTrue($validLogin);\r\n\t\t}", "public function testLoginValidation() {\n $this->visit('http://londonc...
[ "0.7949967", "0.7896541", "0.7820316", "0.76345176", "0.7546002", "0.7487321", "0.74871004", "0.7424611", "0.73917216", "0.7371021", "0.736682", "0.73563", "0.7347938", "0.7292206", "0.7286806", "0.7285147", "0.72610533", "0.7236265", "0.7224706", "0.7194455", "0.71805775", ...
0.0
-1
Determine if a user exists in the system.
public function exists($email) { $sql =<<<SQL SELECT * from $this->tableName where email=? SQL; $pdo = $this->pdo(); $statement = $pdo->prepare($sql); $statement->execute(array($email)); if($statement->rowCount() != 0) { return true; } return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "public function userExists()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No us...
[ "0.84201425", "0.8270654", "0.80924934", "0.79800403", "0.77763367", "0.77761674", "0.77181005", "0.7678708", "0.76119775", "0.7574578", "0.75365174", "0.75308853", "0.7527032", "0.750591", "0.75009435", "0.7496897", "0.74842715", "0.7477602", "0.7477016", "0.74139595", "0.73...
0.0
-1
Create a new user.
public function add($email, $name, $password) { // Ensure we have no duplicate email address if($this->exists($email)) { return "Email address already exists."; } // Add a record to the user table $tableName = $this->getTableName(); $sql = <<<SQL INSERT INT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "protected function _createUser()\n {\n $data = [\n 'email' => 'newuser@email.nl',\n 'password' => 'test',\n ];\n\n $user = $this-...
[ "0.85153574", "0.85153574", "0.85153574", "0.85153574", "0.82277685", "0.8069288", "0.7957354", "0.7900486", "0.78813195", "0.7845325", "0.77993155", "0.7786434", "0.77579015", "0.7729928", "0.7729928", "0.77009255", "0.7692633", "0.76830924", "0.76699877", "0.7637759", "0.76...
0.0
-1
Add group object entitlement
public function addGroupObjectEntitlement($groupid = null, $groupurn = null, $objecturn = null, $entitlementurn = null){ return $this->UserEntitlementRepository->addGroupObjectEntitlement($groupid, $groupurn, $objecturn, $entitlementurn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createObjectGroupEntitlement($param = array()){\n\n /** @var bool $access */\n $access = self::$UserEntitlementService->userHasEntitlement(CoreUser::getUser(), self::$UserEntitlementService->getEntitlement(UserModule::ENTITLEMENT_FULL_SYSTEM_ADMIN));\n\n if($access) {\n\...
[ "0.75349265", "0.7358924", "0.69630563", "0.6932164", "0.68249846", "0.6470073", "0.64643216", "0.64615744", "0.642736", "0.6346967", "0.6315833", "0.6173878", "0.6145158", "0.6142501", "0.6124277", "0.6048939", "0.60431534", "0.60280913", "0.5997604", "0.59603924", "0.595299...
0.70697236
2
Remove group object entitlement
public function removeGroupObjectEntitlements($groupid = null, $groupurn = null, $objecturn = null){ return $this->UserEntitlementRepository->deleteGroupObjectEntitlements($groupid, $groupurn, $objecturn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteObjectGroupEntitlements($param = array()){\n\n /** @var bool $access */\n $access = self::$UserEntitlementService->userHasEntitlement(CoreUser::getUser(), self::$UserEntitlementService->getEntitlement(UserModule::ENTITLEMENT_FULL_SYSTEM_ADMIN));\n\n if($access) {\n...
[ "0.71121645", "0.7071344", "0.6971369", "0.68317074", "0.6795791", "0.65803415", "0.64900273", "0.641548", "0.641548", "0.641548", "0.6406149", "0.6350548", "0.627349", "0.62702745", "0.6265641", "0.6246368", "0.6234176", "0.6203987", "0.61531264", "0.61428034", "0.6138982", ...
0.6398877
11
Get object group entitlements
public function getObjectEntitlements($objecturn = null){ return $this->UserEntitlementRepository->getObjectEntitlements($objecturn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObjectEntitlements($objecturn = null){\n return CoreSqlUtils::rows(self::GET_GROUP_ENTITLEMENTS_FOR_OBJECT_SQL, array(\n ':objecturn' => $objecturn\n ));\n }", "public function getGroup ()\n {\n return $this->getObject();\n }", "public function getEavGroup() ...
[ "0.61818695", "0.5925428", "0.5901507", "0.57266545", "0.5624003", "0.559433", "0.54979736", "0.5496891", "0.54718804", "0.54650855", "0.54650855", "0.54650855", "0.54650855", "0.54144377", "0.54144377", "0.54144377", "0.5396394", "0.53620243", "0.53141594", "0.5265641", "0.5...
0.5721617
4
/ Obtengo el nombre de la tabla
public function getSelect($paramSelect) { $info = $this->getDbTable()->info(); $table = $info['name']; /* Armo el select */ $select = $this->getDbTable()->select(); $select->from($table); $this->aplicaParamSelect($paramSelect, $select); return $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtenerNombreTabla() {\n return $this->nombre;\n }", "public function getTableName();", "public function getTableName();", "public function getTableName() {}", "public function getTableName() {}", "public function getTblName()\n {\n return $this->tbl_name;\n }", "...
[ "0.75973105", "0.7541626", "0.7541626", "0.7479761", "0.7479761", "0.7469244", "0.7462143", "0.7415301", "0.7375801", "0.7371506", "0.7346053", "0.7330673", "0.7329456", "0.72827893", "0.72729284", "0.7270253", "0.7249949", "0.7249774", "0.7229642", "0.72248405", "0.72111136"...
0.0
-1
Display a listing of the users.
public function index(IndexRequest $request): View { $users = $this->users->search($request); $search = $request->get('search'); if ($users->count() > 0) { return view('admin.users.index', [ 'users' => $users, 'user_found' => trans('messages.found...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve al...
[ "0.84975696", "0.8424116", "0.8382212", "0.83699566", "0.8355048", "0.83195335", "0.8219673", "0.82143384", "0.82093567", "0.8201486", "0.81907934", "0.8156546", "0.81461644", "0.80821127", "0.8063815", "0.80488044", "0.8031988", "0.8002079", "0.79930633", "0.798597", "0.7977...
0.0
-1
Display the specified user.
public function show(User $user): View { return view('admin.users.show', [ 'user' => $user, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayUser()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayUser();\n }\n }", "private function userDisplay() {\n $showHandle = $this->get('username');\n if (isset($showHandle)) {\n echo '<li class=\"user-handle\">'.$sho...
[ "0.7908481", "0.77904975", "0.7351653", "0.72784024", "0.72784024", "0.723638", "0.7144317", "0.7103893", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", "0.7098826", ...
0.0
-1
Show the form for editing the specified user.
public function edit(UserRequest $request, User $user): View { return view('admin.users.edit', [ 'user' => $user, 'input_name' => $request->input('input_name'), // variable que le dice a la vista cual input mostrar ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t/...
[ "0.8212737", "0.7995539", "0.79488236", "0.79168403", "0.7796333", "0.77315855", "0.77141505", "0.7681968", "0.7671786", "0.7670402", "0.7632981", "0.763202", "0.7626699", "0.76171184", "0.761694", "0.7611683", "0.758565", "0.7563325", "0.7554998", "0.7525682", "0.75177723", ...
0.0
-1
Update the specified user in storage.
public function update(UserRequest $request, User $user): RedirectResponse { $this->users->update($request, $user); return redirect(route( 'users.show', ['user' => $user] )) ->with('success', trans('messages.crud', [ 'resource' => trans_ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($user)\n {\n }", "public function updateUser(UserInterface $user);", "public function testUpdateUser()\n {\n }", "public function update(User $user): void\n {\n }", "public function updating(User $user)\n {\n //\n }", "public function updated(User $us...
[ "0.75115865", "0.7362121", "0.7132806", "0.71238434", "0.7088548", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.70305514", "0.6919266", ...
0.0
-1
Remove the specified user from storage.
public function destroy(User $user): RedirectResponse { $this->users->destroy($user); return redirect('admin/users')->with('success', trans('messages.crud', [ 'resource' => trans_choice('users.user', 1, ['user_count' => '']), 'status' => trans('fields.deleted') ])); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeUser(UserInterface $user);", "public function remove_user() { return $this->STOR->remove_user(); }", "public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}", "public functio...
[ "0.75832164", "0.7455628", "0.7360062", "0.72751135", "0.72652036", "0.72400856", "0.6998661", "0.6949125", "0.69444776", "0.69277453", "0.69260436", "0.6918273", "0.690451", "0.6900282", "0.6893226", "0.6893226", "0.6893226", "0.68820506", "0.68820506", "0.68820506", "0.6882...
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.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { if ($this->input("_method") == "PUT") return [ "first_name" => "required|min:5", "last_name" => "required|min:5", "update_email" => "required|email|sometimes:unique:users", "password" => "sometimes|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.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
Create a new controller instance.
public function __construct( CustomerRepository $customerRepository, CouponRepository $couponRepository, RewardRepository $rewardRepository) { $this->customerRepository = $customerRepository; $this->couponRepository = $couponRepository; $this->rewardRepository = $re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Crucible API doesn't provide logout ability.
public function clearAuthorization() { // So we just get rid of the token. $this->clearCrucibleSession(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function logout() {\n }", "public static function logout();", "abstract public function logout();", "abstract protected function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "p...
[ "0.7991213", "0.75631726", "0.7530181", "0.7524986", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7497259", "0.7479541", "0.74735904", "0.7437774", "0.73860055", "0.7357137", "0.730293", "0.730293", ...
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.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Specifies the access control rules. This method is used by the 'accessControl' filter.
public function accessRules() { return array( array('allow', // allow authenticated user to perform 'create' and 'update' actions 'actions'=>array('createAjax'), 'roles'=>array('Superadmin', 'Account Admin', 'User') ), array('deny', // deny all users 'users'=>array('*'), ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admins only\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t\t\t/*'users' => array(\"?\"),*/\n 'expression' => array($this,'isLogedInOrHasKey'),\n ),\n\t\t\tar...
[ "0.7229873", "0.72012293", "0.70917755", "0.70844513", "0.708018", "0.708018", "0.70799863", "0.7072431", "0.7072431", "0.70660526", "0.7064439", "0.700873", "0.700494", "0.70015746", "0.69986796", "0.69898736", "0.69839835", "0.6977239", "0.69746107", "0.6972772", "0.6970371...
0.0
-1
Creates a new model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreateAjax() { $response = array(); $form = new AjaxUploadImageForm; if(isset($_POST['AjaxUploadImageForm'])) { // $form->attributes = $_POST['AjaxUploadImageForm']; if($form->validate()) { $form->image = CUploadedFile::getInstance($form,'im...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['cre...
[ "0.79611313", "0.79000247", "0.78687686", "0.75944376", "0.75330836", "0.74855393", "0.7461119", "0.7461119", "0.7461119", "0.7461119", "0.7448935", "0.74430025", "0.74393713", "0.74307716", "0.74092305", "0.7408396", "0.7384483", "0.73768485", "0.7333238", "0.7333016", "0.73...
0.0
-1
Create a new event instance.
public function __construct(User $user) { $this->user = $user; $this->user->last_login = new DateTime; $this->user->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEvent()\n {\n return new Event();\n }", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = ...
[ "0.8178475", "0.73455495", "0.67515916", "0.6665345", "0.66544545", "0.66479546", "0.6640835", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6543442", "0.64682955", "0.645909", "0.64520663", "0.6441302", "0.6438299", "0.63917476", "0.6371641", "0.6371641...
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth', ['except'=>['index','show','search']]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Display a listing of the resource.
public function index() { // $user = auth()->user()->name; // User name for naming the image folder $posts = Post::latest()->paginate(30); // This will return last created post on top return view('posts.index')->with('posts', $posts); }
{ "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 a listing of the resource.
public function search(Request $request) { // $request->validate( // ['search'=>'required|min:1'] // ); $search = $request->input('searchQuery'); $posts = Post::where('title', 'like', "%$search%")->get(); return view('search')->with('posts', $posts); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('posts.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'title' => 'required', 'body' => 'required', // 'image' => 'image|nullable|mimes:jpeg,png,jpg,gif,svg|max:2048' 'image' => 'nullable|mimes:jpeg,png,jpg,gif,svg|max:2048' ]); ...
{ "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) { $posts = Post::find($id); return view('posts.show')->with('posts',$posts); }
{ "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) { $posts = Post::find($id); // Check admin auth // if (Auth::user()->role == 'admin') { // return view('posts/edit')->with('posts',$posts); // } // Check for correct user if(Auth::user()->id !== $posts->user_id && Auth::user()-...
{ "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, $id) { $this->validate($request, [ 'title' => 'required', 'body' => 'required', 'image' => 'nullable|mimes:jpeg,png,jpg,gif,svg|max:2048' ]); // Check if request has image in form $user = auth()->use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // $post = Post::find($id); $post = Post::findOrFail($id); // Check for correct user if(Auth::user()->id !== $post->user_id){ return redirect('/posts')->with('error', 'Nije moguce'); } // Delete image from folder $...
{ "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 list of global variables to add to the existing list.
public function getGlobals() { $locales = $this->registry->getRegisteredLocales(); try { $locale = $this->requestStack->getCurrentRequest()->getLocale(); } catch (\Exception $e) { $locale = current($locales); } return [ '_locale' => $loc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGlobals()\n {\n return array();\n }", "public function getGlobals()\n {\n return array();\n }", "public function getGlobals()\n {\n return [\n 'cache' => $this->flextype['cache'],\n ];\n }", "public function getGlobals();", "public...
[ "0.729674", "0.729674", "0.7222214", "0.70583993", "0.70583993", "0.6949429", "0.69218194", "0.68164724", "0.6792427", "0.6674383", "0.6634355", "0.6616216", "0.65718746", "0.6538482", "0.64802563", "0.64465857", "0.64193285", "0.6374329", "0.63421863", "0.63240165", "0.63206...
0.65424633
13
Returns a list of functions to add to the existing list.
public function getFunctions() { return [ new \Twig_SimpleFunction('get_active_locales', [$this, 'getActiveLocales']), new \Twig_SimpleFunction('set_locale_switch_paths', [$this, 'setSwitchPaths']), new \Twig_SimpleFunction('get_locale_switch_paths', [$this, 'getSwitchPat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFunctions(): Collection\n {\n return $this->functions;\n }", "public function getFuncs()\n\t{\n\t\t$this->context = null;\n\t\t\n\t\treturn array_merge($this->groupFuncs, $this->valueFuncs);\n\t}", "public function funcs()\n { \n //start a new array, which which will...
[ "0.67827487", "0.67122453", "0.6573546", "0.65012515", "0.63629913", "0.6340914", "0.6255122", "0.6201298", "0.617127", "0.615298", "0.6129031", "0.6116953", "0.6109381", "0.60917217", "0.60755455", "0.6059028", "0.6025216", "0.60183895", "0.60178745", "0.60003287", "0.599937...
0.61696684
9
Returns a list of filters to add to the existing list.
public function getFilters() { return [ new \Twig_SimpleFilter('country', [$this, 'getCountry']), new \Twig_SimpleFilter('language', [$this, 'getLanguage']), new \Twig_SimpleFilter('locale_date', [$this, 'getLocaleDate']), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilters ()\n {\n $filters = [];\n\n return $filters;\n }", "protected function filters(): array\n {\n return $this->filters;\n }", "public function getFilters()\n {\n $filters = [];\n\n return $filters;\n }", "public function getFilters(...
[ "0.7288725", "0.7239691", "0.7215225", "0.71943426", "0.71684265", "0.712334", "0.70831263", "0.7078608", "0.70732886", "0.70470625", "0.7046991", "0.7045658", "0.7045658", "0.70395565", "0.70335275", "0.7015256", "0.6961713", "0.69372207", "0.6914802", "0.68778676", "0.68758...
0.68714684
21
Returns the name of the extension.
public function getName() { return '_locale'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExtensionName() {}", "public function getName()\n {\n return self::EXTENSION_NAME;\n }", "abstract public function getExtensionName();", "public function getExtensionName() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "public function getN...
[ "0.91565424", "0.8927959", "0.8711921", "0.84661037", "0.83886665", "0.8361621", "0.83368284", "0.82452506", "0.8239709", "0.8229256", "0.81653655", "0.81653655", "0.80174255", "0.79762125", "0.79629993", "0.788117", "0.7860908", "0.7790925", "0.7765071", "0.7755446", "0.7723...
0.0
-1
Returns all active locales with short and long names
public function getActiveLocales($locale = null) { $registeredLocales = $this->registry->getRegisteredLocales(); if (empty($registeredLocales)) { return []; } elseif ($locale === null) { $translatedLocales = $registeredLocales; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocales(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('localelist');\n return $this->execute($qb);\n }", "public function get_locales() {\n\t\t$existing_locales = Plugin::get_existing_locales();\n\n\t\t$locales = array();\n\t\tforeach ( $existin...
[ "0.68166745", "0.68029225", "0.6692968", "0.6680582", "0.6617291", "0.66101766", "0.6500134", "0.6458341", "0.6443665", "0.64423686", "0.64178395", "0.6325171", "0.63234866", "0.6251534", "0.62099206", "0.61870235", "0.61541796", "0.61338836", "0.61008817", "0.605658", "0.604...
0.6615467
5
Translate a country indicator to its locale full name Uses default system locale by default. Pass another locale string to force a different translation
public function getCountry($country, $default = '', $locale = null) { $locale = $locale == null ? 'en' : $locale; $countries = Intl::getRegionBundle()->getCountryNames($locale); return array_key_exists($country, $countries) ? $countries[$country] : $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getLocaleName();", "public static function label() {\n return __('nova-laravel-world::novaLaravelWorld.countryLocale');\n }", "public function getCountryName();", "function agst_pmpro_default_country($country) {\n\treturn 'AU';\n}", "function erp_get_country_name( $countr...
[ "0.69071174", "0.6741136", "0.65871954", "0.6413279", "0.6352875", "0.6106532", "0.5999787", "0.59754026", "0.5950175", "0.5944036", "0.59170043", "0.5893998", "0.5869184", "0.58462375", "0.58101314", "0.578492", "0.578492", "0.578492", "0.57775694", "0.5773178", "0.57681876"...
0.60338485
6
Translate a timestamp to a localized string representation. Parameters dateType and timeType defines a kind of format. Allowed values are (none|short|medium|long|full). Default is medium for the date and no time. Uses default system locale by default. Pass another locale string to force a different translation. You mig...
public static function getLocaleDate($date, $dateType = 'medium', $timeType = 'none', $locale = null, $pattern = null) { $formatter = new DateFormatter(); return $formatter->format($date, $dateType, $timeType, $locale, $pattern); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultLocalizedFormat($locale = null, $dateType = null, $timeType = null);", "public function getLocalizedDateTimeFormat($locale = null, $dateType = null, $timeType = null);", "function getLocaleSurchargedDatetimeFormat($locale = null, $dateType = null, $timeType = null, $localizedFormats =...
[ "0.6706632", "0.6418938", "0.6399475", "0.63208014", "0.61560684", "0.59890026", "0.5985692", "0.5985692", "0.5930802", "0.57994646", "0.578247", "0.5779096", "0.5758838", "0.57588124", "0.57393134", "0.5688777", "0.5686392", "0.5627449", "0.56128955", "0.5556577", "0.5541157...
0.6119174
5
Inject function when saving
public function save(array $options = []) { parent::save(); $this->formulir->formulirable_type = get_class($this); $this->formulir->formulirable_id = $this->id; $this->formulir->save(); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onAfterSave();", "function after_save() {}", "protected function hook_afterSave(){}", "abstract public static function saved($callback);", "public function postSave() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function preSave...
[ "0.75574815", "0.74190736", "0.7367076", "0.73183525", "0.7296953", "0.7281775", "0.7281775", "0.7281147", "0.72363794", "0.71672297", "0.7081549", "0.70772314", "0.7058463", "0.7029529", "0.7027085", "0.7027085", "0.7019591", "0.70089823", "0.7006287", "0.6989736", "0.698973...
0.0
-1
Create a new controller instance.
public function index(Books $books) { return view('home',['books'=>$books->first()->get()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Display a listing of the resource.
public function peminjaman() { try { $borrows =DB::table('borrows') ->join('books', 'books.id', '=', 'borrows.book_id') ->select('borrows.id as id','books.id as book_id','books.title as title','books.description as description','borrows.expired as expired') ...
{ "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
Function contains script for adding Resource Entry
public function doExecute() { $this->out('Do you want to add Resource(Name of Main files.) : (y/n)'); $add = $this->in(); ($add == 'y') ? $this->out('Enter Name of your Resource File :') : die('Bye'); $fileName = $this->in(); if($fileName) { for(; ; ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_new_resource() {\n // @codingStandardsIgnoreLine\n $add_resource_name = wc_clean( $_POST['add_resource_name'] );\n\n if ( empty( $add_resource_name ) ) {\n wp_send_json_error();\n }\n\n $resource = array(\n 'post_title' => $add_resou...
[ "0.7275109", "0.72169685", "0.6989702", "0.6976009", "0.657211", "0.65254927", "0.6423049", "0.6344306", "0.6328075", "0.63171864", "0.6298656", "0.6261765", "0.62451994", "0.62208265", "0.62089735", "0.61942047", "0.61826116", "0.61339694", "0.60545945", "0.5991201", "0.5958...
0.62616014
12
Setup DB before each test.
public function setUp() : void { parent::setUp(); require_once(__DIR__.'/stubs/Stub_User.php'); require_once(__DIR__.'/stubs/Widget.php'); $this->loadLaravelMigrations(); $this->loadMigrationsFrom(__DIR__ . '/../src/database/migrations'); $this->withFactories(__DIR_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUpTestDatabase() {}", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createS...
[ "0.8160622", "0.8041275", "0.7950353", "0.79292965", "0.79174125", "0.78887624", "0.785612", "0.781613", "0.77883744", "0.77487916", "0.7687011", "0.7618829", "0.7593557", "0.75930375", "0.7565489", "0.75577295", "0.7547589", "0.7539172", "0.750567", "0.7492445", "0.7492095",...
0.0
-1
PENDING SANG KDA ROW KA PRODUCT
public function get_restock_notif_list($pro_id){ $sql = "SELECT *, SUM(qty_total) as total_pending FROM tbl_order, tbl_orditem WHERE tbl_order.order_id=tbl_orditem.order_id AND tbl_order.status='0' AND pro_id='$pro_id'"; $result = mysqli_query($this->db,$sql); $row = mysqli_fetch_assoc($result); $value = $row['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ProductQuery() {\n\t $csvilog = JRequest::getVar('csvilog');\n\t \n\t /* Bind the initial data */\n\t $this->_vm_product->bind($this);\n\t \n\t /* Set some initial values */\n\t /* Set the modified date as we are modifying the product */\n\t $this->_vm_product->mdate = time();\n\t \n\t /* We hav...
[ "0.5962777", "0.59511894", "0.5944888", "0.5887753", "0.5860954", "0.5823517", "0.5810148", "0.57833606", "0.5783175", "0.5773097", "0.57255316", "0.56867623", "0.56749165", "0.5671198", "0.56633353", "0.5644062", "0.56353927", "0.56340504", "0.56190133", "0.56091285", "0.558...
0.0
-1
Add an importer and the directory (relative to the root directory) of where entity files to be imported live.
public function addImporter(EntityImporterInterface $entityImporterInterface, string $directory, int $order) { $this->entityImporterMappings[] = [ self::DIRECTORY => $directory, self::IMPORTER => $entityImporterInterface, self::ORDER => $order, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function import()\n {\n // Reorder importers\n usort($this->entityImporterMappings, function ($a, $b) {\n return $a[ORDER] <=> $b[ORDER];\n });\n\n // Import each entity type in turn\n foreach ($this->entityImporterMappings as $entityImporterMapping) {\n ...
[ "0.6770029", "0.5787068", "0.5758207", "0.5675538", "0.5665603", "0.5594215", "0.55703926", "0.5562516", "0.55560493", "0.5548485", "0.5514167", "0.5483573", "0.54782194", "0.54143226", "0.5408595", "0.5360179", "0.53329307", "0.5274535", "0.5245418", "0.5241675", "0.5233548"...
0.62480545
1
Import data for all registered importers.
public function import() { // Reorder importers usort($this->entityImporterMappings, function ($a, $b) { return $a[ORDER] <=> $b[ORDER]; }); // Import each entity type in turn foreach ($this->entityImporterMappings as $entityImporterMapping) { $files ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('woocommerce_wf_order_csv', 'WooCommerce Order (CSV/XML)', __('Import <strong>Orders</strong> to your store via a csv file.', 'wf_order_import_export'), '...
[ "0.7452175", "0.7201632", "0.7172058", "0.7165438", "0.7058334", "0.69870883", "0.66171306", "0.6552752", "0.641454", "0.61889255", "0.6158516", "0.6139733", "0.6107283", "0.60530967", "0.59979624", "0.5971815", "0.5950689", "0.5939875", "0.5925115", "0.5904865", "0.5889245",...
0.69760245
6
Display a listing of the resource.
public function index(Request $request) { // $this->repository->where('id','!=',23); //$signatures = $this->repository->getByCriteria(new SignaturesCriteria()); $signatures = $this->repository->paginate($limit = null, $columns = ['*']); return response()->json($signatures, 2...
{ "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
Store a newly created resource in storage.
public function store(SignatureCreateRequest $request) { try { $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE); $signature = $this->repository->create($request->all()); $response = [ 'message' => 'Signature created...
{ "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) { $signature = $this->repository->find($id); return response()->json([ 'data' => $signature, ]); }
{ "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 update(SignatureUpdateRequest $request, $id) { try { $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_UPDATE); $signature = $this->repository->update($request->all(), $id); $response = [ 'message' => 'Signat...
{ "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
Remove the specified resource from storage.
public function destroy($id) { $deleted = $this->repository->delete($id); return response()->json([ 'message' => 'Signature deleted.', 'deleted' => $deleted, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Get the phone record associated with the user.
public function keyword() { return $this->hasOne(Keyword::class, 'id', 'keyword'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserPhone() {\n\t\treturn ($this->userPhone);\n\t}", "public function getUserPhone() {\n\t\treturn ($this->userPhone);\n\t}", "public function getPhone()\n {\n return $this->get(self::PHONE);\n }", "public function phone()\n {\n return $this->hasOne('App\\Models\\Use...
[ "0.7334191", "0.7334191", "0.7149543", "0.7094013", "0.70562094", "0.7025061", "0.7022897", "0.69494003", "0.6903554", "0.6801412", "0.6782116", "0.6742409", "0.6729517", "0.6727836", "0.6727836", "0.6727836", "0.6727836", "0.6727836", "0.6727836", "0.6727836", "0.6727836", ...
0.0
-1
Adds the given class to the element options
public function addClass(array $options = [], $class = null, $key = 'class') { if (is_array($class)) { $class = implode(' ', array_unique(array_map('trim', $class))) ; } if (isset($options[$key])) { $optClass = $options[$key]; if (is_array($optClass)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Html_CSS_Add($class,&$options)\n {\n if (empty($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array();\n }\n elseif(!is_array($options[ \"CLASS\" ]))\n {\n $options[ \"CLASS\" ]=array($options[ \"CLASS\" ]);\n }\n\n array_push(...
[ "0.736083", "0.7319217", "0.6949275", "0.6916004", "0.6856451", "0.6813059", "0.6812957", "0.6481236", "0.6479111", "0.6473873", "0.6448002", "0.6433297", "0.6428669", "0.63693374", "0.63535833", "0.63302654", "0.63106817", "0.63017637", "0.629639", "0.627731", "0.6263095", ...
0.6992845
2
Create a new navbar.
public function create ($brand, $options = []) { $this->_fixed = $this->_extractOption('fixed', $options, false) ; unset($options['fixed']) ; $this->_responsive = $this->_extractOption('responsive', $options, false) ; unset($options['responsive']) ; $this->_static = $this->_extra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view(\"backend.navbars.create\");\n }", "public function create()\n {\n return view('navbar.create');\n }", "Public function Anavbar(){\n\t\n\t}", "function navbar()\r\n {\r\n }", "public function navbar() {\n global $CFG;\n ...
[ "0.7866018", "0.7706027", "0.75328577", "0.71954405", "0.6846228", "0.68332154", "0.6788386", "0.66661584", "0.653865", "0.6507996", "0.649587", "0.6449366", "0.6417094", "0.63968784", "0.6388708", "0.6362252", "0.63547385", "0.63131136", "0.63118845", "0.629783", "0.6249518"...
0.6414221
13
Add a link to the navbar or to a menu.
public function link ($name, $url = '', array $options = [], array $linkOptions = []) { if ($this->_level == 0 && $this->autoButtonLink) { $options = $this->addClass ($options, 'btn btn-default navbar-btn') ; return $this->Html->link ($name, $url, $options) ; } if (Router...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMainMenuLink()\n {\n return '<a href=\"/Plugins/Products/Actions/Products.php\">Products</a> ';\n }", "public function addLink(AdminLink $link, string $desiredHeading = null): MenuWidget;", "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat...
[ "0.64595234", "0.6451323", "0.6442086", "0.63449335", "0.6333488", "0.6293829", "0.6293795", "0.6258476", "0.6257735", "0.6255168", "0.62467146", "0.6231069", "0.6186833", "0.6182114", "0.61751217", "0.6152263", "0.61469096", "0.6121513", "0.61150986", "0.6092867", "0.6092637...
0.5727567
82
Add a button to the navbar.
public function button ($name, array $options = []) { $options = $this->addClass ($options, 'navbar-btn') ; return $this->Form->button ($name, $options) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navbar()\r\n {\r\n }", "function nav_buttons()\n\t{\n\t\t?>\n\t\t<input type=\"button\" value=\"Create New Preorder &gt;\" onclick=\"document.location='/admin/utilities/preorder.php?act=new'\" class=\"btn\">\n\t\t<p />\n\t\t<?php\n\t}", "function addButton($label='Continue'){\n if(!is_arr...
[ "0.6394405", "0.63553274", "0.6319652", "0.6235728", "0.61661375", "0.6148528", "0.6140288", "0.6131436", "0.6082005", "0.6066705", "0.6054757", "0.6024961", "0.6018478", "0.5985662", "0.59780526", "0.5928924", "0.588992", "0.58065575", "0.5780179", "0.5755452", "0.5691292", ...
0.58777165
17
Add a divider to the navbar or to a menu.
public function divider (array $options = []) { $options = $this->addClass ($options, 'divider') ; $options['role'] = 'separator' ; return $this->Html->tag('li', '', $options) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addDivider()\n\t{\n\t\t$this->items[] = new MenuItem(array('name' => 'divider'));\n\n\t\treturn $this;\n\t}", "function horizon_separator() {\n\t\tget_template_part('inc/partials/homepage', 'separator');\n\t}", "function addDivider(& $divider, & $parentElement) {\n\t\t$dividerElement =& $this->...
[ "0.71136826", "0.6871223", "0.67022276", "0.6700888", "0.6480203", "0.64491737", "0.6408355", "0.6349327", "0.6333924", "0.6320825", "0.623159", "0.62203777", "0.59711915", "0.58870906", "0.5759771", "0.5755224", "0.57179284", "0.5698374", "0.5642188", "0.56184876", "0.560996...
0.66344464
4
Add a header to the navbar or to a menu, should not be used outside a submenu.
public function header ($name, array $options = []) { $options = $this->addClass ($options, 'dropdown-header') ; return $this->Html->tag('li', $name, $options) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_header_menu() {\r\n register_nav_menu('header-menu',__( 'Header Menu' ));\r\n}", "protected function actionHeader() {\n Navigation::activateItem($this->navlink);\n $this->setTabNavigationIcon('black');\n $this->addSubNavigation(_('Lesen'), 'show');\n if (Utils\\hasP...
[ "0.72142714", "0.7131464", "0.68916434", "0.68634874", "0.66280705", "0.6590642", "0.6531796", "0.64827025", "0.6472052", "0.6464167", "0.645855", "0.6417311", "0.63774425", "0.6368261", "0.63662624", "0.6329185", "0.631694", "0.6232463", "0.62131196", "0.6178124", "0.6141416...
0.57562786
64