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
Revert back to previously configured payment plan values if any
public function paymentFeatureUnapply(Entity\Type\IEntity $entity, Feature $feature, array &$values) { if ($prev_value = $feature->getMeta('prev_value')) { $values['payment_plan'] = $prev_value; } else { $values['payment_plan'] = false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::payment_method] = null;\n $this->values[self::wechat_pay] = null;\n $this->values[self::alipay_express] = null;\n $this->values[self::order_id] = array();\n $this->values[self::order] = array();\n }", "public function reset()\n {\n $this->values[self::pending_pay] = null;\n $this->values[self::pending_shipped] = null;\n $this->values[self::pending_received] = null;\n $this->values[self::user_received] = null;\n $this->values[self::to_share] = null;\n }", "public function restored(PlanSubscription $planSubscription)\n {\n //\n }", "public function reset()\n {\n $this->values[self::product_id] = null;\n $this->values[self::product_num] = null;\n $this->values[self::deal_price] = null;\n $this->values[self::new_user_price] = null;\n }", "public function resetPaymentMethodFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#PaymentMethod#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function reset()\n {\n $this->values[self::RMB] = null;\n $this->values[self::CHARGE_SUM] = null;\n $this->values[self::HEROES] = array();\n $this->values[self::RECHARGE_LIMIT] = array();\n $this->values[self::_MONTH_CARD] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_BUY_TIMES] = null;\n }", "public function reset()\n {\n $this->values[self::_CURRENT] = null;\n $this->values[self::_LASTCHANGE] = null;\n $this->values[self::_TODAYBUY] = null;\n $this->values[self::_LASTBUY] = null;\n }", "public function reset()\n {\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::wholesaler_id] = null;\n $this->values[self::order_id] = null;\n $this->values[self::quality] = null;\n $this->values[self::delivery] = null;\n $this->values[self::comment] = null;\n }", "public function reset()\n {\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_DAILYJOB] = null;\n }", "public function reset()\n {\n $this->values[self::contractorstatics] = null;\n $this->values[self::stores] = array();\n $this->values[self::visited] = array();\n $this->values[self::review_info] = array();\n $this->values[self::customer_info] = array();\n $this->values[self::mark_price_info] = array();\n $this->values[self::more_url] = null;\n $this->values[self::order_tracking] = array();\n }", "public function revert();", "public function reset()\n {\n $this->values[self::SHIPMENTRECEIPTDATE] = null;\n $this->values[self::ATTORNEY] = null;\n $this->values[self::ACCEPTEDBY] = null;\n $this->values[self::RECEIVEDBY] = null;\n $this->values[self::SIGNER] = null;\n $this->values[self::ADDITIONALINFO] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_UIN] = null;\n $this->values[self::_ACCESS_TOKEN] = null;\n $this->values[self::_RECHARGE_URL] = null;\n }", "public function payment_status_canceled_reversal()\n {\n do_action(\n 'wc_paypal_plus__ipn_payment_update',\n 'canceled_reversal',\n $this->settingRepository\n );\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ACTIVITY_REWARD] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_EXCAVATE] = null;\n $this->values[self::_REWARD] = null;\n }", "public function reset()\n {\n $this->values[self::_STAGE_ID] = null;\n $this->values[self::_DPS_RANK] = array();\n $this->values[self::_FIRST_PASS] = null;\n $this->values[self::_FAST_PASS] = null;\n }", "public function unsetRatePlans($index)\n {\n unset($this->ratePlans[$index]);\n }", "public function reset()\n {\n $this->values[self::PHONE] = null;\n $this->values[self::PIN] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_PACK] = null;\n }", "public function reset()\n {\n $this->values[self::_GUILDS] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_CREATE_COST] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_SHOP] = null;\n }", "public function reset(): void\n {\n $this->activationKey = null;\n $this->dateOfBirth = null;\n $this->lpaReferenceNumber = null;\n }", "public function reset() {\n $this->values[self::IS_SUPPORTED] = null;\n $this->values[self::URL] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INCOME] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_SHOP] = null;\n $this->values[self::_SSHOP] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARD] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_STAGE_ID] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_HEROES] = array();\n }", "public function reset()\n {\n $this->values[self::_GUILDS] = array();\n $this->values[self::_RESULT] = null;\n $this->values[self::_CREATE_COST] = null;\n }", "public static function reset() {\n\t\tself::$_cache = array (\n\t\t\t'environment' => 'sandbox',\n\t\t\t'business_name' => '',\n\t\t\t'cancel_url' => '',\n\t\t\t'return_url' => '',\n\t\t\t'notify_url' => '',\n\t\t\t'currency' => 'USD',\n\t\t\t'username' => '',\n\t\t\t'password' => '',\n\t\t\t'signature' => '',\n\t\t\t'incontext_url' => 'yes',\n\t\t\t'mobile_url' => 'no',\n\t\t\t'locale_code' => 'US', // A special form of the locale for PayPal's mixed handling (i.e. expects 2 character for some locales and 5 for others. Full list here: https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/)\n\t\t\t);\n\t}", "public function unsetHostedPaymentSettings($index)\n {\n unset($this->hostedPaymentSettings[$index]);\n }", "public function reset() {\n $this->values[self::FROM_TIME] = null;\n $this->values[self::PRICE] = array();\n $this->values[self::MILEAGE] = null;\n $this->values[self::GEO] = null;\n }", "public function reset()\n {\n $this->values[self::_CURRENT_RAID_ID] = null;\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_STAGE_PASS] = null;\n $this->values[self::_IS_CAN_JUMP] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_EXCAVATE] = null;\n }", "private function rollbackMerchantOrder()\n {\n $this->magentoOrder->setState(\\Magento\\Sales\\Model\\Order::STATE_PENDING_PAYMENT, true);\n $this->magentoOrder->setStatus(\\Magento\\Sales\\Model\\Order::STATE_PENDING_PAYMENT);\n $this->magentoOrder->save();\n }", "abstract public function revert();", "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }", "public function reset()\n {\n $this->values[self::OPERATIONINFO] = null;\n $this->values[self::TRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGTRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGINFO] = null;\n $this->values[self::ADDITIONALINFOS] = array();\n }", "public function reset()\n {\n $this->values[self::services] = array();\n $this->values[self::mapping] = array();\n $this->values[self::short_tcp] = self::$fields[self::short_tcp]['default'];\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function undoFinalDeny()\n {\n $this->finalDeny = null;\n $this->decisionViewed = null;\n $this->decisionLetter = null;\n }", "public function revert(){\n\t}", "public function reset()\n {\n $this->values[self::_SELF_TEAM] = null;\n $this->values[self::_OPPO_TEAM] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_RECORD_ID] = null;\n $this->values[self::_RECORD_SVRID] = null;\n }", "public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::LEVELUP_TIME] = null;\n $this->values[self::BEHELPED_TIMES] = null;\n $this->values[self::HELP_ASKED] = self::$fields[self::HELP_ASKED]['default'];\n $this->values[self::TOTAL_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HIRE_REWARD] = null;\n $this->values[self::_STAY_REWARD] = null;\n $this->values[self::_HEROID] = null;\n }", "public function reset()\n {\n $this->values[self::BOXID] = null;\n $this->values[self::DRAFTID] = null;\n $this->values[self::TOBOXID] = null;\n $this->values[self::TODEPARTMENTID] = null;\n $this->values[self::DOCUMENTSIGNATURES] = array();\n $this->values[self::PROXYBOXID] = null;\n $this->values[self::PROXYDEPARTMENTID] = null;\n }", "public function reset()\n {\n $this->values[self::_SERIAL_ID] = null;\n $this->values[self::_CHARGE_ID] = null;\n }", "public function reset_shipping() {\n\t\tunset( WC()->session->chosen_shipping_methods );\n\t\t$this->shipping_total = null;\n\t\t$this->shipping_taxes = array();\n\t\t$this->packages = array();\n\t}", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_MONEY] = null;\n }", "protected function _processRevertToDefault()\n {\n }", "public function clearNovalnetPaymentLock()\n {\n $aPinPayments = array( 'novalnetsepa', 'novalnetinvoice' );\n foreach ($aPinPayments as $sPayment) {\n $this->oSession->deleteVariable('blNovalnetPaymentLock' . $sPayment);\n $this->oSession->deleteVariable('sNovalnetPaymentLockTime' . $sPayment);\n }\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_APPLY_REWARDS] = array();\n $this->values[self::_STAGE_OLD_PROGRESS] = null;\n $this->values[self::_JOIN_TIMES] = null;\n $this->values[self::_BREAK_HISTORY] = null;\n }", "public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_APPLY_OPPO] = null;\n $this->values[self::_START_BATTLE] = null;\n $this->values[self::_END_BATTLE] = null;\n $this->values[self::_SET_LINEUP] = null;\n $this->values[self::_QUERY_RECORDS] = null;\n $this->values[self::_QUERY_REPLAY] = null;\n $this->values[self::_QUERY_RANKBORAD] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_CLEAR_BATTLE_CD] = null;\n $this->values[self::_DRAW_RANK_REWARD] = null;\n $this->values[self::_BUY_BATTLE_CHANCE] = null;\n }", "public function reset()\n {\n $this->values[self::_LAST_CHANGE] = null;\n $this->values[self::_TODAY_TIMES] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_BEST_RANK_REWARD] = null;\n $this->values[self::_BEST_RANK] = null;\n $this->values[self::_CUR_RANK] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_USER] = null;\n $this->values[self::_TIME_ZONE] = null;\n }", "public function reset()\n {\n $this->values[self::PHONE] = null;\n $this->values[self::PASSWORD] = null;\n $this->values[self::EQUIPMENT] = null;\n $this->values[self::LOGIN_TYPE] = null;\n }", "public function reset()\n {\n $this->values[self::_RANK] = null;\n $this->values[self::_LEFT_COUNT] = null;\n $this->values[self::_LAST_BT_TIME] = null;\n $this->values[self::_BUY_TIMES] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n $this->values[self::_OPPOS] = array();\n }", "public function declinePayment() {\n return array('#markup' => iish_t('Unfortunately, your payment has been declined. Please try to finish your final registration ' .\n 'at a later moment or try a different payment method.'));\n }", "public function reset()\n {\n $this->setValue($this->getDefaultValue());\n }", "public function reset()\n {\n $this->values[self::LIVETYPE_] = null;\n $this->values[self::CONTINUEFLAG_] = null;\n $this->values[self::DRESSINGFLAG_] = null;\n }", "public function reset()\n {\n $this->values[self::_COMP] = array();\n }", "public function reset()\n {\n $this->values[self::_STAGE] = null;\n $this->values[self::_WAVE] = null;\n $this->values[self::_HP] = array();\n $this->values[self::_RECORD] = array();\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_CHALLENGER_STATUS] = null;\n }", "public function reset() {\n $this->values[self::TOTAL] = null;\n $this->values[self::COUNT] = null;\n $this->values[self::TOTAL_BUSLINE_NUM] = null;\n $this->values[self::AREAID] = null;\n }", "public function reset()\n {\n $this->values[self::_EXP] = null;\n $this->values[self::_MONEY] = null;\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_TEAMS] = array();\n $this->values[self::_REWARD] = null;\n $this->values[self::_GUESS] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_NEW_MAN] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_PASS_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::VCARD] = null;\n }", "public static function checkout_order_payment_plan() {\n\n check_ajax_referer( 'sumo-pp-checkout-order-payment-plan' , 'security' ) ;\n\n if ( 'yes' === $_POST[ 'enabled' ] ) {\n $payment_type = wc_clean( $_POST[ 'payment_type' ] ) ;\n $deposited_amount = null ;\n $chosen_payment_plan = null ;\n\n switch ( $payment_type ) {\n case 'pay-in-deposit':\n if ( isset( $_POST[ 'deposited_amount' ] ) ) {\n $deposited_amount = $_POST[ 'deposited_amount' ] ;\n }\n break ;\n case 'payment-plans':\n if ( isset( $_POST[ 'chosen_payment_plan' ] ) ) {\n $chosen_payment_plan = $_POST[ 'chosen_payment_plan' ] ;\n }\n break ;\n }\n\n if ( ! is_null( $deposited_amount ) || ! is_null( $chosen_payment_plan ) ) {\n WC()->session->__unset( _sumo_pp()->prefix . 'order_payment_plan_props' ) ;\n WC()->session->set( _sumo_pp()->prefix . 'order_payment_plan_props' , SUMO_PP_Order_Payment_Plan::set_order_props( $deposited_amount , $chosen_payment_plan ) ) ;\n } else {\n WC()->session->set( _sumo_pp()->prefix . 'order_payment_plan_props' , array () ) ;\n }\n } else {\n WC()->session->set( _sumo_pp()->prefix . 'order_payment_plan_props' , array () ) ;\n }\n die() ;\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_PRICE] = null;\n $this->values[self::_IS_SALE] = null;\n }", "public function reset()\n {\n $this->values[self::_HP_PERC] = null;\n $this->values[self::_MP_PERC] = null;\n $this->values[self::_CUSTOM_DATA] = null;\n }", "public function reset()\n {\n $this->values[self::_IS_ATTACKED] = null;\n }", "public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[self::CONTACT] = null;\n $this->values[self::LOCATION] = null;\n $this->values[self::URLMSG] = null;\n $this->values[self::DOCUMENT] = null;\n $this->values[self::AUDIO] = null;\n $this->values[self::VIDEO] = null;\n $this->values[self::CALL] = null;\n $this->values[self::CHAT] = null;\n }", "public function reset()\n {\n $this->values[self::_VITALITY] = null;\n }", "public function reset()\n {\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HEROES] = array();\n $this->values[self::_MONTH_CARD] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_LEFT_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::sku_arr] = array();\n $this->values[self::pagination] = null;\n }", "public function unsetRentalPaymentPref($index)\n {\n unset($this->rentalPaymentPref[$index]);\n }", "function jigoshop_upgrade_145() {\n\t\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_paypal_send_shipping' );\n\tdelete_option( 'jigoshop_paypal_send_shipping' );\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_display_totals_tax' );\n\tdelete_option( 'jigoshop_display_totals_tax' );\n\t\n}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_DRAW_VITALITY] = null;\n }", "private function restore()\n {\n if ($this->session->has('sergsxm_form_'.$this->formId)) {\n $this->parameters = $this->session->get('sergsxm_form_'.$this->formId);\n } else {\n $this->parameters = array();\n }\n }", "abstract protected function _restoreStandardValues();", "private function restoreFieldsForCount()\n {\n $this->orders = $this->orders_backup;\n $this->orders_backup = null;\n }", "public function reset()\n {\n $this->values[self::TRANSACTION_ID] = null;\n $this->values[self::EVENTS] = [];\n $this->values[self::REQUIRE_MASTER] = null;\n }", "public function reset()\n {\n $this->values[self::INIT_BU] = null;\n $this->values[self::BU] = null;\n $this->values[self::GOLD] = null;\n $this->values[self::VIGOUR] = null;\n }", "public function reset()\n {\n $this->values[self::_LAST_RESET_TIME] = null;\n $this->values[self::_TODAY_FREE_SWEEP_TIMES] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LEFT_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::promotions] = array();\n }", "public function reset()\n {\n $this->values[self::_MONEY] = null;\n $this->values[self::_RMB] = null;\n $this->values[self::_HEROES] = array();\n $this->values[self::_ITEMS] = array();\n }", "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function restored(Currency $currency)\n {\n //\n }", "public function reset()\n {\n $this->values[self::_EXCAVATE] = null;\n }", "public function restored(Credit $credit)\n {\n //\n }", "public function restored(Provider $provider)\n {\n //\n }", "public function unsetPaymentFormPref($index)\n {\n unset($this->paymentFormPref[$index]);\n }" ]
[ "0.648664", "0.6321165", "0.60850126", "0.599961", "0.5974198", "0.59538877", "0.59259766", "0.5915009", "0.5894519", "0.5847676", "0.5810308", "0.58009154", "0.5763487", "0.5755101", "0.5725274", "0.57251734", "0.570478", "0.5691487", "0.56784356", "0.56764233", "0.5674209", "0.5635928", "0.56257576", "0.562399", "0.5617961", "0.560485", "0.56039846", "0.5590093", "0.55716306", "0.556154", "0.5549841", "0.5546788", "0.553504", "0.5532728", "0.55121875", "0.55099547", "0.550737", "0.5498566", "0.54971844", "0.5493721", "0.5490072", "0.54795325", "0.54714465", "0.54684055", "0.5456396", "0.54537725", "0.5449513", "0.5444259", "0.5443367", "0.5442415", "0.5429497", "0.5424677", "0.54160166", "0.5414234", "0.5409529", "0.54023504", "0.5399085", "0.53987664", "0.5396693", "0.53966564", "0.53959966", "0.53874594", "0.5381199", "0.5374259", "0.53736305", "0.53687674", "0.53487176", "0.5348375", "0.53437436", "0.5340775", "0.5339999", "0.53386676", "0.53289783", "0.53252745", "0.5320785", "0.53189045", "0.53162616", "0.53141284", "0.531111", "0.5305975", "0.5305397", "0.5303848", "0.53022254", "0.5299484", "0.5297407", "0.5294542", "0.52926165", "0.5289344", "0.5289041", "0.52889585", "0.52876794", "0.52815145", "0.52806", "0.5280366", "0.52796", "0.52703273", "0.52701694", "0.52697235", "0.5269444", "0.52688277" ]
0.54798806
41
Test getting all certificates
public function testAllMatchesRequest() { $expectedValue = [ '/1.0/certificates/fingerprint1', '/1.0/certificates/fingerprint2', ]; $returnedValue = [ 'fingerprint1', 'fingerprint2', ]; $endpoint = $this->getEndpointMock($this->getEndpointClass()); $endpoint->expects($this->once()) ->method('get') ->with('/certificates/') ->will($this->returnValue($expectedValue)); $this->assertEquals($returnedValue, $endpoint->all()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testQueryCertificates()\n {\n }", "public function testCreateCertificates()\n {\n }", "private static function loadCACertificates(): void\n {\n if (!empty(self::$caCertificates)) {\n // the certificates have already been loaded\n return;\n }\n\n $caCertificates = [];\n\n // Load Trusted CA's, first the .cer which are DER certificates (binary)\n $files = glob(__DIR__ . self::TRUSTED_ROOT_CERTIFICATE_DIRECTORY . '*.cer', GLOB_ERR);\n\n foreach ($files as $filename) {\n // The certificate is DER, we have to convert it to PEM\n $rootCertificateDer = file_get_contents(realpath($filename));\n $rootCertificatePem = OpenSSLUtility::coerceBinaryCertificate($rootCertificateDer);\n $rootCertificate = openssl_x509_read($rootCertificatePem);\n\n $rootCertificateParsed = openssl_x509_parse($rootCertificate);\n\n $rootPublicKey = openssl_pkey_get_public($rootCertificate);\n $rootPublicKeyDetails = openssl_pkey_get_details($rootPublicKey);\n\n $caCertificates[$rootCertificateParsed['hash']] = [\n 'filename' => realpath($filename),\n 'certificate' => $rootCertificate,\n 'parsed' => $rootCertificateParsed,\n 'pem' => $rootCertificatePem,\n 'der' => $rootCertificateDer,\n 'public_key' => $rootPublicKeyDetails['key'],\n 'hash' => $rootCertificateParsed['hash'],\n ];\n }\n\n // Load Trusted CA's, then the .crt which are PEM certificates (base64)\n $files = glob(__DIR__ . self::TRUSTED_ROOT_CERTIFICATE_DIRECTORY . '*.crt', GLOB_ERR);\n\n foreach ($files as $filename) {\n // The certificate is PEM, we can use it as-is, but we'll still need the DER file later on\n $rootCertificatePem = file_get_contents(realpath($filename));\n $rootCertificateDer = self::certificatePemToDer($rootCertificatePem);\n $rootCertificate = openssl_x509_read($rootCertificatePem);\n\n $rootCertificateParsed = openssl_x509_parse($rootCertificate);\n\n $rootPublicKey = openssl_pkey_get_public($rootCertificate);\n $rootPublicKeyDetails = openssl_pkey_get_details($rootPublicKey);\n\n $caCertificates[$rootCertificateParsed['hash']] = [\n 'filename' => realpath($filename),\n 'certificate' => $rootCertificate,\n 'parsed' => $rootCertificateParsed,\n 'pem' => $rootCertificatePem,\n 'der' => $rootCertificateDer,\n 'public_key' => $rootPublicKeyDetails['key'],\n 'hash' => $rootCertificateParsed['hash'],\n ];\n }\n\n // Store it in our Static variable\n self::$caCertificates = $caCertificates;\n\n return;\n }", "public function certificates(): array\n {\n return $this->certs;\n }", "public function certificates(): array\n {\n return $this->_certs;\n }", "public function testGetCertificate()\n {\n }", "public function certificates($domain = null)\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/certificates?domain='.$domain);\n }", "public function getCertificates()\n {\n return $this->Certificates;\n }", "public function testGetCertificateSetup()\n {\n }", "public function testListAttributesForCertificate()\n {\n }", "public function nssCiphers()\n {\n static $cache;\n if (isset($cache)) {\n return $cache;\n }\n $ver = curl_version();\n if (preg_match('/^NSS.*Basic ECC$/', $ver['ssl_version'])) {\n $ciphers = file(__DIR__ . '/../res/nss_ciphers.txt', \\FILE_IGNORE_NEW_LINES | \\FILE_SKIP_EMPTY_LINES);\n return $cache = implode(',', $ciphers);\n }\n return $cache = false;\n }", "#[ArrayShape([\n 'default_cert_file' => 'string',\n 'default_cert_file_env' => 'string',\n 'default_cert_dir' => 'string',\n 'default_cert_dir_env' => 'string',\n 'default_private_dir' => 'string',\n 'default_default_cert_area' => 'string',\n 'ini_cafile' => 'string',\n 'ini_capath' => 'string'\n])]\nfunction openssl_get_cert_locations(): array {}", "public function testRequestCertificateSetup()\n {\n }", "public function testListCustomersForCertificate()\n {\n }", "private function getSignonCerts() {\n return array(\"keyid\" => $this->pem);\n }", "function openssl_cms_read(string $input_filename, &$certificates): bool {}", "public function pendingCertificates()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/pending-certificates');\n }", "public function certificate_addon_get() {\n $response = array();\n if (isset($_GET['auth_token']) && !empty($_GET['auth_token'])) {\n $auth_token = $_GET['auth_token'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n $user_id = $logged_in_user_details['user_id'];\n $course_id = $_GET['course_id'];\n\n $response = $this->api_model->certificate_addon_get($user_id, $course_id);\n }else{\n $response['status'] = 'failed';\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "public function getCertificate()\n {\n $polling = 0;\n while ($this->status == 'processing' && $polling < 4) {\n $this->log->info('Certificate for ' . $this->basename . ' being processed. Retrying in 5 seconds...');\n\n $this->sleep->for(5);\n $this->updateOrderData();\n $polling++;\n }\n\n if ($this->status != 'valid' || empty($this->certificateURL)) {\n $this->log->warning(\n 'Order for ' . $this->basename . ' not valid. Cannot retrieve certificate.'\n );\n return false;\n }\n\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->certificateURL\n );\n\n $post = $this->connector->post($this->certificateURL, $sign);\n if (strpos($post['header'], \"200 OK\") === false) {\n $this->log->warning(\n 'Invalid response for certificate request for \\'' . $this->basename .\n '\\'. Cannot save certificate.'\n );\n return false;\n }\n\n return $this->writeCertificates($post['body']);\n }", "public function listCertificates($serviceName)\n {\n if ($serviceName == '' || is_null($serviceName)) {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Management/Exception.php';\n \t\tthrow new Zend_Service_WindowsAzure_Management_Exception('Service name should be specified.');\n \t}\n\n \t$operationUrl = self::OP_HOSTED_SERVICES . '/' . $serviceName . '/certificates';\n $response = $this->_performRequest($operationUrl);\n\n \tif ($response->isSuccessful()) {\n\t\t\t$result = $this->_parseResponse($response);\n\n\t\t\tif (!$result->Certificate) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t if (count($result->Certificate) > 1) {\n \t\t $xmlServices = $result->Certificate;\n \t\t} else {\n \t\t $xmlServices = [$result->Certificate];\n \t\t}\n\n\t\t\t$services = [];\n\t\t\tif (!is_null($xmlServices)) {\n\n\t\t\t\tfor ($i = 0; $i < count($xmlServices); $i++) {\n\t\t\t\t\t$services[] = new Zend_Service_WindowsAzure_Management_CertificateInstance(\n\t\t\t\t\t (string)$xmlServices[$i]->CertificateUrl,\n\t\t\t\t\t (string)$xmlServices[$i]->Thumbprint,\n\t\t\t\t\t (string)$xmlServices[$i]->ThumbprintAlgorithm,\n\t\t\t\t\t (string)$xmlServices[$i]->Data\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $services;\n\t\t} else {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Management/Exception.php';\n\t\t\tthrow new Zend_Service_WindowsAzure_Management_Exception($this->_getErrorMessage($response, 'Resource could not be accessed.'));\n\t\t}\n }", "public function test_admin_certification_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'certification_programs']);\n $this->assertResponseCode(404);\n }", "public function findCertifications($team);", "public function testDecodeCertificate()\n {\n\n $this->post('api/decodeCertificate', ['certificate' => $this->getCertificate()])\n ->seeJsonEquals(\n [\n 'common_name' => 'ssltools.sslutil.com',\n 'subject_altname' => null,\n 'organization' => 'SSL Test',\n 'organization_unit' => 'Development',\n 'country_code' => 'AU',\n 'valid_from' => 1514617406,\n 'valid_to' => 1546153406,\n 'issuer' => [\n 'C' => 'AU',\n 'CN' => 'ssltools.sslutil.com',\n 'L' => 'Sydney',\n 'O' => 'SSL Test',\n 'ST' => 'NSW',\n 'OU' => 'Development'\n ],\n 'key_size' => 2048,\n 'serial_number' => '14225341186233066637',\n 'is_expired' => false,\n 'is_has_ev' => false,\n 'is_host_match' => null\n ]\n\n );\n }", "protected function __validCerts($cert = null){\n\t\t//$privateKey\t\t= $this->pathCertificado.$this->filename_privateKey;\n\t\t$publicKey\t\t= $this->pathCertificado.$this->filename_publicKey;\n\t\t//$certificado\t= $this->pathCertificado.$this->filename_certificado;\n\t\t//$filename_pfx\t= $this->filename_pfx;\n\t\t//$cert = null;\n\n\t\tif(is_file($publicKey)){\n\t\t\t$this->certificadoIsOpend = true;\n\t\t\t$cert = file_get_contents($publicKey);\n\t\t} else {\n\t\t\t$this->certificadoIsOpend = false;\n\t\t}\n\n\t\tif (is_null($cert)){\n\t\t\t$this->setLog(\"Certificado não foi aberto.\", 3);\n\t\t\treturn array('status'=>false,'strError'=>\"Certificado não foi aberto.\");\n\t\t}\n\t\tif (!$data = openssl_x509_read($cert)){\n\t\t\t$this->setLog(\"Erro no certificado, ele não pode ser lido pelo OpenSSL.\",3);\n\t\t\treturn array('status'=>false,'strError'=>\"Erro no certificado, ele não pode ser lido pelo OpenSSL.\");\n\t\t}\n\n\t\t$status = true;\n\t\t$strError = \"\";\n\t\t$cert_data = openssl_x509_parse($data);\n\t\t//var_dump($cert_data);exit;\n\t\t$this->name = $cert_data['name'];\n\t\t$this->CommonName\t= isset($cert_data['subject']['CN'])?$cert_data['subject']['CN']:'';\n\t\t$this->OrgUnit\t\t= \"\";\n\t\tif(isset($cert_data['subject']['OU']) and is_array($cert_data['subject']['OU'])){\n\t\t\tforeach ($cert_data['subject']['OU'] as $indice=>$ou){\n\t\t\t\t$this->OrgUnit\t\t.= \"[\".($indice+1).\"] \".$ou.\"\\r\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\t$this->OrgUnit\t\t.= $cert_data['subject']['OU'].\"\\r\\n\";\n\t\t}\n\t\t$this->Location\t\t= isset($cert_data['subject']['L'])?$cert_data['subject']['L']:'';\n\t\t$this->State\t\t= isset($cert_data['subject']['ST'])?$cert_data['subject']['ST']:\"\";\n\t\t$this->Country\t\t= isset($cert_data['subject']['C'])?$cert_data['subject']['C']:'';\n\n\t\t//Reformata a data de validade - yy-mm-dd\n\t\t$anoF = substr($cert_data['validFrom'],0,2);\n\t\t$mesF = substr($cert_data['validFrom'],2,2);\n\t\t$diaF = substr($cert_data['validFrom'],4,2);\n\t\t//obtem o timeestamp da data de validade do certificado\n\t\t$dValidFrom = gmmktime(0,0,0,$mesF,$diaF,$anoF);\n\n\t\t//Reformata a data de validade - yy-mm-dd\n\t\t$ano = substr($cert_data['validTo'],0,2);\n\t\t$mes = substr($cert_data['validTo'],2,2);\n\t\t$dia = substr($cert_data['validTo'],4,2);\n\t\t//obtem o timeestamp da data de validade do certificado\n\t\t$dValid = gmmktime(0,0,0,$mes,$dia,$ano);\n\n\t\t$this->timeValidFrom = $dValidFrom;\n\t\t$this->timeValid = $dValid;\n\t\t// obtem o timestamp da data de hoje\n\t\t$dHoje = gmmktime(0,0,0,date(\"m\"),date(\"d\"),date(\"Y\"));\n\t\t// compara a data de validade com a data atual\n\t\tif ($dValid < $dHoje ){\n\t\t\t$status = false;\n\t\t\t$strError = \"Erro no certificado: Certificado expirou em {$dia}/{$mes}/{$ano}\";\n\t\t}\n\t\t//diferenca em segundos entre os timestamp\n\t\t$diferenca = $dValid - $dHoje;\n\t\t// convertendo para dias\n\t\t$diferenca = round($diferenca /(60*60*24),0);\n\t\t//carregando a propriedade\n\t\t$daysToExpire = $diferenca;\n\t\t//Convertendo para meses e carregando a propriedade\n\t\t$m = ($ano * 12 + $mes);\n\t\t$n = (date(\"y\") * 12 + date(\"m\"));\n\t\t//numero de meses ate o certificado expirar\n\t\t$monthsToExpire = ($m-$n);\n\t\tif($status==false){\n\t\t\t$this->setLog($strError,3);\n\t\t}\n\n\t\treturn array('status'=>$status,'strError'=>$strError,'name'=>$this->name,'meses'=>$monthsToExpire,'dias'=>$daysToExpire,'dtExpire'=>$cert_data['validTo']);\n\t}", "public function listResponseItemsKey()\n {\n return 'certificates';\n }", "public function test_admin_certification_list_b()\n {\n $this->request('GET', ['pages/MemberSkills', 'certification_programs']);\n $this->assertResponseCode(404);\n }", "public function testDecodeCertificateRequest()\n {\n\n $this->post('api/decodeCertificateRequest', ['certificateRequest' => $this->getCertificateRequest()])\n ->seeJsonEquals(\n [\n 'city' => 'Sydney',\n 'common_name' => 'ssltools.sslutil.com',\n 'country_code' => 'AU',\n 'email' => null,\n 'key_size' => 2048,\n 'organization' => 'SSL Test',\n 'organization_unit' => 'Development',\n 'state' => 'NSW'\n ]\n );\n }", "public function testLinkAttributesToCertificate()\n {\n }", "function ssl_cert_found($url) {\n\n\t// First, strip the subfolder from the passed url, if any\n\t$parsedurl = parse_url($url);\n\t$url = 'ssl://' . $parsedurl['host'] . ':443'; \n\t\n\t// Next, check the ssl stream context for certificate info \n\t$result = false;\n\t$context = stream_context_create (array(\"ssl\" => array(\"capture_peer_cert\" => true, \"verify_peer\" => true, \"allow_self_signed\" => true)));\n\t$stream = @stream_socket_client($url, $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $context);\n\tif ($stream !== false)\n\t{\n\t\t$params = stream_context_get_params($stream);\n\t\t$result = isset($params[\"options\"][\"ssl\"][\"peer_certificate\"]) ? true : false;\n\t}\n return $result;\n}", "public function testLinkCustomersToCertificate()\n {\n }", "public function selfSignsCertificates()\n {\n return ($this->meta['tls'] ?? null) === 'self-signed';\n }", "public function getCertificates()\n {\n return Controllers\\CertificatesController::getInstance();\n }", "public function testGetAll()\n {\n $contentCategories = factory(ContentCategory::class, 2)->create();\n $results = $this->contentCategoryService->getAll();\n\n $this->assertTrue( $contentCategories->count() == $results->count() );\n $contentCategories->each( function($contentCategory, $index) use ($results) {\n $this->assertTrue($contentCategory->id == $results[$index]->id);\n });\n }", "public function testCanGetDatacenters(): void\n {\n $client = new CatalogClient(ConsulManager::testConfig());\n\n [$dcs, $err] = $client->Datacenters();\n\n try {\n self::assertNull($err, 'CatalogClient::datacenters returned error: ' . $err);\n self::assertIsArray($dcs);\n self::assertCount(1, $dcs);\n self::assertSame('dc1', $dcs[0]);\n } catch (AssertionFailedError $e) {\n \\var_dump($dcs);\n throw $e;\n }\n }", "public function loadPersonCertsForIdentifier($identifier)\n {\n $repo = $this->_em->getRepository($this->getPersonCertClassName());\n return $repo->findAll(array('identifier' => $identifier));\n }", "public function testMissingCertificate()\n {\n\n $this->post('api/decodeCertificate', [])\n ->seeJsonEquals(\n [\n 'error' => [\n 'message' => '422 Unprocessable Entity',\n 'errors' => [\n 'certificate' => [\n 'The certificate field is required.'\n ]\n ],\n 'status_code' => 422\n ]\n ]\n\n );\n }", "protected abstract function fetch_private_cert(&$request);", "function get_certificates($agent, $player, $stock) {\n $this->db->where('agent', $agent);\n $this->db->where('player', $player);\n $this->db->where('stock', $stock);\n\n $query = $this->db->get($this->_tableName);\n\n if ($query->num_rows() < 1)\n return false;\n\n $certificates = array();\n foreach($query->result() as $row) {\n array_push($certificates, $row->token);\n }\n\n return $certificates;\n }", "public function getCertificate()\n {\n # GET /accounts/{accountId}/envelopes/{envelopeId}/documents/certificate\n }", "public function caPaths()\n {\n return (object) [\n 'key' => $this->certificatesPath.'/KleverPorterCASelfSigned.key',\n 'pem' => $this->certificatesPath.'/KleverPorterCASelfSigned.pem',\n 'srl' => $this->certificatesPath.'/KleverPorterCASelfSigned.srl',\n ];\n }", "public function testDeleteCertificate()\n {\n }", "public function get_test_ssl_support()\n {\n }", "public function getKeys(){\n\t\t$returnLoad = $this->load();\n\t\tif($returnLoad===true){\n\t\t\t$priKeyFile\t= $this->pathCertificado.$this->filename_privateKey;\n\t\t\t$pubKeyFile\t= $this->pathCertificado.$this->filename_publicKey;\n\t\t\t$certFile\t= $this->pathCertificado.$this->filename_certificado;\n\t\t\t//$filename_pfx'\t=> $this->filename_pfx;\n\t\t\t$pass = $this->certificadoPass;\n\n\t\t\treturn new certKeys($priKeyFile, $pubKeyFile, $certFile,$pass);\n\t\t} else {\n\t\t\t$this->setLog($returnLoad,3);\n\t\t\treturn false;\n\t\t}\n\t}", "public function executeMyCertificates(sfWebRequest $request)\n {\n //we use the username to retrieve the user issued certificates.\n $user_id = $this->getUser()->getGuardUser()->getId();\n // print $user_id; exit;\n $this->certificates = Doctrine_Core::getTable('InvestmentCertificate')->getMyCertificates($user_id);\n }", "public function test_getAll() {\n\t\t$this->testAction('/disease/index', array('method'=>'get'));\n\t\t// the result of the previous GET action was loaded into $this->vars\n\t\t// $this->vars is an array\n\t\t// the contents of this array is in form of \"categories\" => [inner array]\n\t\t// the inner array (we expect) to be greater than zero.\n\t\t$this->assertTrue(count($this->vars['diseases']) > 0);\n\t}", "public static function GetCertificateById($id){\n $result = CertificationModel::where('certificate_id',$id)->get();\n\treturn $result->toArray();\n }", "public function certificates()\n {\n return $this->hasMany(ContractCertificate::class, \"invoice_id\");\n }", "public static function get_certificate_path()\n {\n }", "private function parseCert($pemCertificateFileName){\n if (empty($pemCertificateFileName)){\n throw new Exception(\"Given param PEMCERTIFICATEFILENAME can not be empty.\");\n }\n\n $r = array(\n \"serial\" => \"\",\n \"version\" => \"\",\n \"valid_from\" => \"\",\n \"valid_to\" => \"\",\n \"subject\" => array(\n \"serial\" => \"\",\n \"ou\" => \"\",\n \"o\" => \"\",\n \"cn\" => \"\",\n \"c\" => \"\",\n \"st\" => \"\",\n \"l\" => \"\",\n ),\n \"issuer\" => array(\n \"ou\" => \"\",\n \"o\" => \"\",\n \"cn\" => \"\",\n \"c\" => \"\",\n )\n );\n\n $cmd = sprintf(\"openssl asn1parse -inform PEM -in %s\", $pemCertificateFileName);\n $output = exec($cmd, $fullOutput);\n\n $patternOrganizationName= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*OBJECT\\s*:organizationName\\s*<>\\s*\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*(UTF8STRING|PRINTABLESTRING)\\s*:([^<>]*)\\s*<>/\";\n $countOrganizationName = preg_match_all($patternOrganizationName, implode(\"<>\", $fullOutput), $matches);\n if($countOrganizationName == 1){\n $r[\"subject\"][\"o\"] = $matches[2][0];\n } else if($countOrganizationName == 2){\n $r[\"issuer\"][\"o\"] = $matches[2][0];\n $r[\"subject\"][\"o\"] = $matches[2][1];\n }\n\n $patternCountryName= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*OBJECT\\s*:countryName\\s*<>\\s*\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*(UTF8STRING|PRINTABLESTRING)\\s*:([^<>]*)\\s*<>/\";\n $countCountryName = preg_match_all($patternCountryName, implode(\"<>\", $fullOutput), $matches);\n if($countCountryName == 1){\n $r[\"subject\"][\"c\"] = $matches[2][0];\n } else if($countCountryName == 2){\n $r[\"issuer\"][\"c\"] = $matches[2][0];\n $r[\"subject\"][\"c\"] = $matches[2][1];\n }\n\n $patternCommonName= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*OBJECT\\s*:commonName\\s*<>\\s*\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*(UTF8STRING|PRINTABLESTRING)\\s*:([^<>]*)\\s*<>/\";\n $countCommonName = preg_match_all($patternCommonName, implode(\"<>\", $fullOutput), $matches);\n if($countCommonName == 1){\n $r[\"subject\"][\"cn\"] = $matches[2][0];\n } else if($countCommonName == 2){\n $r[\"issuer\"][\"cn\"] = $matches[2][0];\n $r[\"subject\"][\"cn\"] = $matches[2][1];\n }\n\n $patternSerial= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*OBJECT\\s*:serialNumber\\s*<>\\s*\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*(UTF8STRING|PRINTABLESTRING)\\s*:([^<>]*)\\s*<>/\";\n $countSerial = preg_match_all($patternSerial, implode(\"<>\", $fullOutput), $matches);\n if($countSerial == 1){\n $r[\"subject\"][\"serial\"] = $matches[2][0];\n }\n\n $patternVersion= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*INTEGER\\s*:([^<>]*)\\s*<>/\";\n $countVersion = preg_match_all($patternVersion, implode(\"<>\", $fullOutput), $matches);\n if($countVersion == 1){\n $r[\"version\"] = $matches[1][0];\n }\n if($countVersion == 2){\n $r[\"version\"] = $matches[1][0];\n $r[\"serial\"] = $matches[1][1];\n }\n\n $patternTime= \"/\\d+:d=\\d+\\s*hl=\\d+\\s*l=\\s*\\d+\\s*prim:\\s*UTCTIME\\s*:([^<>]*)\\s*<>/\";\n $countTime = preg_match_all($patternTime, implode(\"<>\", $fullOutput), $matches);\n if($countTime == 2){\n $r[\"valid_from\"] = $this->parseUTCTime($matches[1][0]);\n $r[\"valid_to\"] = $this->parseUTCTime($matches[1][1]);\n }\n\n return $r;\n }", "public function testGetAllCompanies()\n {\n $response = $this->get('/api/v1/company');\n\n $response->assertStatus(200);\n }", "public function test_it_should_return_an_invalid_certificate_on_bogus_certificate()\n {\n $web = new Web('somesource');\n $cert = $web->load();\n $this->assertInstanceOf(CertInfo::class, $cert);\n }", "public function enableSSLChecks() {}", "public function testListAll() {\n $array = [\n 'status' => true,\n 'data' => [\n 0 => [\n 'company_id' => 4564658766,\n 'name' => 'My Test Key',\n 'slug' => 'my-test-key',\n 'public' => '4c9184f37cff01bcdc32dc486ec36961',\n 'private' => '2c17c6393771ee3048ae34d6b380c5ec',\n 'production' => 0,\n 'special' => 1,\n 'created_at' => time(),\n 'updated_at' => time()\n ]\n ]\n ];\n\n /**\n * Mocks the HTTP Response.\n */\n $this->httpResponse = $this\n ->getMockBuilder('GuzzleHttp\\Psr7\\Response')\n ->getMock();\n $this->httpResponse\n ->method('getBody')\n ->will($this->returnValue(json_encode($array)));\n $this->httpClient\n ->method('request')\n ->will($this->returnValue($this->httpResponse));\n\n /**\n * Calls the listAll() method.\n */\n $response = $this->credentialsEndpoint->listAll();\n\n /**\n * Assertions.\n */\n $this->assertNotEmpty($response);\n\n $this->assertArrayHasKey('status', $response);\n $this->assertTrue($response['status']);\n\n $this->assertArrayHasKey('data', $response);\n $this->assertNotEmpty($response['data']);\n\n $this->assertArrayHasKey('company_id', $response['data'][0]);\n $this->assertSame(4564658766, $response['data'][0]['company_id']);\n\n $this->assertArrayHasKey('name', $response['data'][0]);\n $this->assertSame('My Test Key', $response['data'][0]['name']);\n\n $this->assertArrayHasKey('slug', $response['data'][0]);\n $this->assertSame('my-test-key', $response['data'][0]['slug']);\n\n $this->assertArrayHasKey('public', $response['data'][0]);\n $this->assertSame('4c9184f37cff01bcdc32dc486ec36961', $response['data'][0]['public']);\n\n $this->assertArrayHasKey('private', $response['data'][0]);\n $this->assertSame('2c17c6393771ee3048ae34d6b380c5ec', $response['data'][0]['private']);\n\n $this->assertInternalType('int', $response['data'][0]['production']);\n $this->assertSame(0, $response['data'][0]['production']);\n\n $this->assertInternalType('int', $response['data'][0]['special']);\n $this->assertSame(1, $response['data'][0]['special']);\n\n $this->assertInternalType('int', $response['data'][0]['created_at']);\n $this->assertInternalType('int', $response['data'][0]['updated_at']);\n }", "public function testShouldReturnAllClients(){\n $this->get(\"clients\", [\"Authorization\" => \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik56WTRPREkyUVVJNU5VSTNRa05ETWpaRlF6RTNOREUwTlRrd09UZEJSVVkzTVVGRE16RXhPUSJ9.eyJpc3MiOiJodHRwczovL3Nvbm55MTk4Ny5hdXRoMC5jb20vIiwic3ViIjoiVVRYUTV1eEYwMzYyMVdHMGp2RkllSzBrbW0xemVoUUJAY2xpZW50cyIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMCIsImlhdCI6MTUzNzc1ODU3NSwiZXhwIjoxNTM3ODQ0OTc1LCJhenAiOiJVVFhRNXV4RjAzNjIxV0cwanZGSWVLMGttbTF6ZWhRQiIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.gVBOw_tK1aBrQW880QAFCfEWcXMr4ADIdWBb8NtYEZ6gkE81WCBTsTUZak5PHVm3lFqPBTYJ8_ffTpRPwcetheumyFftBP3AAXAlssMWCgVgNMefCkAVx4pARgPGvNgwZXrSYl6e4CGuk_L-en6j7pqZTVHR0qvJiMsf0zqab3_IrTAT4eu_4pZGOqZwwVoF5XI2coAfnJjm5YC9lTqaM-nPhPLklSvXQvhM2vooi98cCMhgV2D18e7qaEMv8pUtpCO35NC7ewC975zcr8xS9YQ00xACk6wo2l-jwqnzBeRXiKGgdtmfiC4ODVHx_WarUp06W-MvMkN7Z05sWvS3zw\"]);\n $this->seeStatusCode(200);\n $this->seeJsonStructure([\n 'data' => ['*' =>\n [\n 'name',\n 'address',\n 'active',\n 'created_at',\n 'updated_at',\n 'links'\n ]\n ],\n 'meta' => [\n '*' => [\n 'total',\n 'count',\n 'per_page',\n 'current_page',\n 'total_pages',\n 'links',\n ]\n ]\n ]);\n \n }", "protected abstract function fetch_public_cert(&$request);", "public function testListSubjects()\n {\n echo \"\\nTesting subject listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/subjects\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/subjects\";\n \n $response = $this->curl_get($url);\n //echo \"-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->total;\n \n $this->assertTrue(($total > 0));\n \n }", "private function has_certificate() {\n\t\t// Get siteurl.\n\t\t$home_url = get_option( 'siteurl' );\n\n\t\t// Change siteurl protocol.\n\t\tif ( preg_match( '/^http\\:/s', $home_url ) ) {\n\t\t\t$home_url = str_replace( 'http', 'https', $home_url );\n\t\t}\n\n\t\t$site_url = add_query_arg(\n\t\t\t'sgCacheCheck', // The key.\n\t\t\t'022870ae06716782ce17e4f6e7f69cc2', // The value.\n\t\t\t$home_url\n\t\t);\n\n\t\tini_set( 'user_agent', 'SG-Optimizer 3.0.2;' );\n\t\t// Create a streams context.\n\t\t$stream = stream_context_create(\n\t\t\tarray(\n\t\t\t\t'ssl' => array(\n\t\t\t\t\t'capture_peer_cert' => true,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$read = @fopen( $site_url, 'rb', false, $stream );\n\t\t$cont = @stream_context_get_params( $read );\n\n\t\treturn is_null( $cont['options']['ssl']['peer_certificate'] ) ? false : true;\n\t}", "public static function GetCertificatesByUserId($user_id){\n $result = CertificationModel::where('user_id',$user_id)->orderBy('certificate_id','DESC')->get();\n\tif(!empty($result)){\n\t\treturn $result->toArray();\n\t}\n\treturn false;\n }", "public function testAllMatchesRequest()\n {\n $expectedValue = [\n '/1.0/profiles/default',\n '/1.0/profiles/docker',\n ];\n\n $returnedValue = [\n 'default',\n 'docker',\n ];\n\n $endpoint = $this->getEndpointMock($this->getEndpointClass());\n\n $endpoint->expects($this->once())\n ->method('get')\n ->with('/profiles/')\n ->will($this->returnValue($expectedValue));\n\n $this->assertEquals($returnedValue, $endpoint->all());\n }", "function is_initialized()\n {\n // Load libraries and grab status information\n //-------------------------------------------\n\n try {\n $this->load->library('certificate_manager/SSL');\n\n $system_cert_exists = $this->ssl->exists_system_certificate();\n $ca_exists = $this->ssl->exists_certificate_authority();\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return FALSE;\n }\n\n if ($ca_exists && $system_cert_exists)\n return TRUE;\n else\n return FALSE;\n }", "function hasValidCert() {\n if (!isset($_SERVER['SSL_CLIENT_M_SERIAL'])\n || !isset($_SERVER['SSL_CLIENT_V_END'])\n || !isset($_SERVER['SSL_CLIENT_VERIFY'])\n || $_SERVER['SSL_CLIENT_VERIFY'] !== 'SUCCESS'\n || !isset($_SERVER['SSL_CLIENT_I_DN'])\n ) {\n return false;\n }\n\n if ($_SERVER['SSL_CLIENT_V_REMAIN'] <= 0) {\n return false;\n }\n\n return true;\n}", "public function testGetterMethod()\n {\n $publickey = '-----BEGIN CERTIFICATE-----\nMIIDijCCAvOgAwIBAgIJAOXBQLEpMB4rMA0GCSqGSIb3DQEBBQUAMIGLMQswCQYD\nVQQGEwJKUDEOMAwGA1UECBMFVG9reW8xETAPBgNVBAcTCFNoaW5qdWt1MRAwDgYD\nVQQKEwdleGFtcGxlMRAwDgYDVQQLEwdleGFtcGxlMRQwEgYDVQQDEwtleGFtcGxl\nLmNvbTEfMB0GCSqGSIb3DQEJARYQcm9vdEBleGFtcGxlLmNvbTAeFw0wOTEwMTUw\nODMyNDdaFw0xOTEwMTMwODMyNDdaMIGLMQswCQYDVQQGEwJKUDEOMAwGA1UECBMF\nVG9reW8xETAPBgNVBAcTCFNoaW5qdWt1MRAwDgYDVQQKEwdleGFtcGxlMRAwDgYD\nVQQLEwdleGFtcGxlMRQwEgYDVQQDEwtleGFtcGxlLmNvbTEfMB0GCSqGSIb3DQEJ\nARYQcm9vdEBleGFtcGxlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA\norhSQotOymjP+lnDqRvrlYWKzd3M8vE82U7emeS9KQPtCBoy+fXP/kMEMxG/YU+c\nNAS/2BLFGN48EPM0ZAQap384nx+TNZ6sGuCJa60go8yIWff72DZjSZI6otfPjC9S\nNlxOnNLNAfGWAiaCcuBP1uJVhyrs1pu7SaEXBOP4pQ0CAwEAAaOB8zCB8DAdBgNV\nHQ4EFgQU3mEIdWrvKu+yuwIJD2WczQLI3j4wgcAGA1UdIwSBuDCBtYAU3mEIdWrv\nKu+yuwIJD2WczQLI3j6hgZGkgY4wgYsxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIEwVU\nb2t5bzERMA8GA1UEBxMIU2hpbmp1a3UxEDAOBgNVBAoTB2V4YW1wbGUxEDAOBgNV\nBAsTB2V4YW1wbGUxFDASBgNVBAMTC2V4YW1wbGUuY29tMR8wHQYJKoZIhvcNAQkB\nFhByb290QGV4YW1wbGUuY29tggkA5cFAsSkwHiswDAYDVR0TBAUwAwEB/zANBgkq\nhkiG9w0BAQUFAAOBgQAO2ZKL0/tPhpVfbOoSXl+tlmTyyb8w7mCnjYYWwcwUAf1N\nylgYxKPrKfamjZKpeRY487VbTee1jfud709oIK5l9ghjz64kPRn/AYHTRwRkBKbb\nwuBWH4L6Rw3ml0ODXW64bdTx/QsAv5M1SyCp/nl8R27dz3MX2D1Ov2o4ipTlZw==\n-----END CERTIFICATE-----';\n $this->assertEquals('testuser', $this->consumer->getKey());\n $this->assertEquals('testpass', $this->consumer->getSecret());\n $this->assertEquals($publickey, $this->consumer->getPublicKey());\n }", "public function getIterator(): \\ArrayIterator\n {\n return new \\ArrayIterator($this->_certs);\n }", "private function setSSL()\n {\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n }", "public function test_it_should_return_an_certificate()\n {\n $web = new Web('somefile');\n $this->assertInstanceOf(CertInfo::class, $web->load());\n }", "function parcelcheckout_getUrlCertificate($sUrl, $bDebug = false)\n\t{\n\t\tif($bDebug || parcelcheckout_getDebugMode())\n\t\t{\n\t\t\tif(version_compare(PHP_VERSION, '5.3.0') < 0)\n\t\t\t{\n\t\t\t\tparcelcheckout_log('PHP version is to low for retrieving certificates.', __FILE__, __LINE__);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($oStream = @stream_context_create(array('ssl' => array('capture_peer_cert' => true))))\n\t\t\t\t{\n\t\t\t\t\tparcelcheckout_log('Fetching peer certificate for: ' . $sUrl, __FILE__, __LINE__);\n\n\t\t\t\t\tif($oHandle = @fopen($sUrl, 'rb', false, $oStream))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(function_exists('stream_context_get_params'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$aParams = stream_context_get_params($oHandle);\n\n\t\t\t\t\t\t\tif(isset($aParams['options'], $aParams['options']['ssl'], $aParams['options']['ssl']['peer_certificate']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$oPeerCertificate = $aParams['options']['ssl']['peer_certificate'];\n\n\t\t\t\t\t\t\t\t$sTempPath = dirname(__DIR__) . '/temp';\n\n\t\t\t\t\t\t\t\t// Save certificate\n\t\t\t\t\t\t\t\tif(@openssl_x509_export_to_file($oPeerCertificate, $sTempPath . '/peer.' . time() . '.crt'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparcelcheckout_log('Stream function does not exist on this PHP version.', __FILE__, __LINE__);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tparcelcheckout_log('Peer certificate capture failed for: ' . $sUrl, __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function index()\n {\n $certificates = Certificate::all();\n\n return view('admin.certificates.index')->with('certificates', $certificates);\n }", "private function sslInfo()\n {\n $this->botman->hears('ssl-info {domain}', function(BotMan $bot, $domain) {\n\n $domainInfoMsg = '';\n\n try\n {\n $certificate = SslCertificate::createForHostName($domain);\n $domainInfo['valid'] = $certificate->isValid() ? 'yes' : 'no';\n $domainInfo['issuer'] = $certificate->getIssuer();\n $domainInfo['exp-data'] = $certificate->expirationDate();\n $domainInfo['sig-algorithm'] = $certificate->getSignatureAlgorithm();\n\n foreach($domainInfo as $propertyName => $propertyValue)\n {\n $domainInfoMsg .= \"\\n{$propertyName}: \\t $propertyValue\";\n }\n }\n catch(CouldNotDownloadCertificate $e)\n {\n $domainInfoMsg = 'Error: check the domain please';\n }\n\n $bot->reply($domainInfoMsg);\n });\n }", "public function certificates($page = null, $per_page = null, $direction = null)\n {\n $data = [\n 'page' => $page,\n 'per_page' => $per_page,\n 'direction' => $direction,\n ];\n\n return $this->get('certificates', $data);\n }", "public function test_public_getCookies_SecureLC()\n {\n $headers = array('Set-Cookie: person=\"bob jones\"; path=/; secure');\n $url = 'https://service.example.com/lookup/?action=search&query=username';\n $this->object->storeCookies($url, $headers);\n\n // Ensure that only the SID cookie not available to non https URLs\n $cookies = $this->object->getCookies('http://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayNotHasKey('person', $cookies);\n\n // Ensure that the SID cookie is avalailable to https urls.\n $cookies = $this->object->getCookies('https://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayHasKey('person', $cookies);\n $this->assertEquals('bob jones', $cookies['person']);\n }", "public function testDownloadCertificateImage()\n {\n }", "#[ArrayShape([\n 'name' => 'string',\n 'subject' => 'string',\n 'hash' => 'string',\n 'issuer' => 'string',\n 'version' => 'int',\n 'serialNumber' => 'string',\n 'serialNumberHex' => 'string',\n 'validFrom' => 'string',\n 'validTo' => 'string',\n 'validFrom_time_t' => 'int',\n 'validTo_time_t' => 'int',\n 'alias' => 'string',\n 'signatureTypeSN' => 'string',\n 'signatureTypeLN' => 'string',\n 'signatureTypeNID' => 'int',\n 'purposes' => 'array',\n 'extensions' => 'array'\n])]\nfunction openssl_x509_parse(\n #[LanguageLevelTypeAware([\"8.0\" => \"OpenSSLCertificate|string\"], default: \"resource|string\")] $certificate,\n #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] bool $shortname,\n #[PhpStormStubsElementAvailable(from: '7.1')] bool $short_names = true\n): array|false {}", "public function testGetAll(): void\n {\n $delivery_services = DeliveryService::getAll();\n\n $this->assertIsArray($delivery_services);\n\n $this->assertEquals(1, $delivery_services[0]['id']);\n $this->assertEquals(\n 'Другая (отслеживание и смена статуса производятся вручную)',\n $delivery_services[0]['name']\n );\n $this->assertEquals('default', $delivery_services[0]['slug']);\n }", "private function testOfCert($company_id){\n\n $company = $this->companies->findOrFail($company_id);\n $cert_dir = public_path() . '/uploads/certs/' . $company_id;\n $crypto = new CryptographyService($cert_dir . '/private.key', $cert_dir . '/public.pub');\n $configuration = new Configuration($company->dic, '1', '420', new EvidenceEnvironment(EvidenceEnvironment::PLAYGROUND), false);\n $client = new Client($crypto, $configuration, new GuzzleSoapClientDriver(new \\GuzzleHttp\\Client()));\n\n $receipt = new Receipt(\n true,\n null,\n '4/20/2420',\n new \\DateTimeImmutable('now'),\n 100\n );\n\n try {\n $response = $client->send($receipt);\n return 1;\n } catch (\\SlevomatEET\\FailedRequestException $e) {\n return 0;\n } catch (\\SlevomatEET\\InvalidResponseReceivedException $e) {\n return 0;\n }\n }", "public function index()\n {\n $certificates = ServCertificate::orderby('id' , 'DESC')->paginate(10);\n return view('service_cert.index' , compact('certificates'));\n }", "function certificateapi_get_hosts() {\n global $CFG, $DB;\n return $DB->get_records_sql('SELECT\n h.id,\n h.ip_address,\n h.wwwroot,\n h.fullname,\n h.last_connect_time,\n h.clientid,\n h.public_key,\n h.public_key_validfrom,\n h.public_key_expires,\n h.permissions\n FROM\n {certificateapi_host} AS h' );\n}", "public function testCollectionTicketsAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testCreateSimple() {\n $category = factory(CertificateCategory::class)->states('does_not_expire')->create();\n $person = factory(Person::class)->create();\n\n $certificate = $category->certificates()->create([\n 'person_id' => $person->id,\n ]);\n\n $this->assertTrue($certificate->is_valid);\n\n $this->assertEquals($person->id, $certificate->person_id);\n $this->assertEquals($category->id, $certificate->category_id);\n $this->assertEquals(null, $certificate->examination_at);\n $this->assertEquals(null, $certificate->valid_at);\n $this->assertEquals(null, $certificate->expires_at);\n $this->assertEquals(null, $certificate->remarks);\n\n $this->assertDatabaseHas('certificates',[\n 'id' => $certificate->id,\n 'person_id' => $person->id,\n 'category_id' => $category->id,\n 'examination_at' => null,\n 'passed' => true,\n 'valid_at' => null,\n 'expired_at' => null,\n 'remarks' => null\n ]);\n\n $this->assertCount(1, Certificate::valid()->get());\n }", "public function allCredentialDescriptors(): array;", "public function index()\n {\n $data = Certificate::all();\n return view('backend.certificates.index', compact('data'));\n }", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function index()\n {\n $certificates = Certificate::all();\n\n return view('dashboard.certificate.index', compact('certificates'));\n }", "public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "public function testUpdateCertificate()\n {\n }", "function getMyCoursesValidate(){\n\t\t\n\t\tif(@$this->major != \"\" && @$this->institution != \"\" && @$this->id != \"\"){\n\t\t\t$this->basics->getMyCourses($this->sanitize($this->institution), $this->sanitize($this->major), $this->sanitize($this->id) );\n\t\t}else{\n\t\t\t$respArray = $this->makeResponse(\"ERROR\",\" The Major and Institution and Id are required! \", \"doSecureAuth();\");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function no_items() {\n\t\t_e( 'No certificates avalaible.', 'sp' );\n\t}", "public function testValidGetAll() {\n\t\t//create a new organization, and insert into the database\n\t\t$organization = new Organization(null, $this->VALID_ADDRESS1, $this->VALID_ADDRESS2, $this->VALID_CITY, $this->VALID_DESCRIPTION,\n\t\t\t\t$this->VALID_HOURS, $this->VALID_NAME, $this->VALID_PHONE, $this->VALID_STATE, $this->VALID_TYPE, $this->VALID_ZIP);\n\t\t$organization->insert($this->getPDO());\n\n\t\t//send the get request to the API\n\t\t$response = $this->guzzle->get('https://bootcamp-coders.cnm.edu/~bbrown52/bread-basket/public_html/php/api/organization', [\n\t\t\t\t'headers' => ['X-XSRF-TOKEN' => $this->token]\n\t\t]);\n\n\t\t//ensure the response was sent, and the api returned a positive status\n\t\t$this->assertSame($response->getStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$retrievedOrg = json_decode($body);\n\t\t$this->assertSame(200, $retrievedOrg->status);\n\n\t\t//ensure the response returned a non-empty array\n\t\t$this->assertGreaterThan(0, sizeof($retrievedOrg->data));\n\t}", "public function testUnlinkCustomersFromCertificate()\n {\n }", "public function addCertifications($team, array $certifications = []);", "public function testMissingCertificateRequest()\n {\n\n $this->post('api/decodeCertificateRequest', [])\n ->seeJsonEquals(\n [\n 'error' => [\n 'message' => '422 Unprocessable Entity',\n 'errors' => [\n 'certificateRequest' => [\n 'The certificate request field is required.'\n ]\n ],\n 'status_code' => 422\n ]\n ]\n\n );\n }", "public function test_GetAllCareers_RequestApi_ReturnsAllCareers()\n {\n $result = $this->json('GET', '/api/careers');\n $decodedResult = json_decode($result->getContent());\n $resultSize = sizeof($decodedResult->data);\n $expectedSize = count(Career::all());\n $this->assertTrue($resultSize == $expectedSize);\n }", "public function testConvertCertToPem()\n {\n $class = new \\ReflectionClass(JWKFetcher::class);\n $method = $class->getMethod('convertCertToPem');\n $method->setAccessible(true);\n\n $test_string_1 = '';\n for ($i = 1; $i <= 64; $i++) {\n $test_string_1 .= 'a';\n }\n\n $test_string_2 = '';\n for ($i = 1; $i <= 64; $i++) {\n $test_string_2 .= 'b';\n }\n\n $returned_pem = $method->invoke(new JWKFetcher(), $test_string_1.$test_string_2);\n $pem_parts = explode( PHP_EOL, $returned_pem );\n $this->assertEquals( 5, count($pem_parts) );\n $this->assertEquals( '-----BEGIN CERTIFICATE-----', $pem_parts[0] );\n $this->assertEquals( $test_string_1, $pem_parts[1] );\n $this->assertEquals( $test_string_2, $pem_parts[2] );\n $this->assertEquals( '-----END CERTIFICATE-----', $pem_parts[3] );\n }", "public function getIterator(): ArrayIterator\n {\n return new ArrayIterator($this->certs);\n }", "public function testAll(): void\n {\n $all = $this->files->all();\n\n foreach (['', 'connection_2', 'connection_3'] as $key_name) {\n $this->assertArrayHasKey($key_name, $all);\n }\n\n $this->assertEquals('2000_01_01_000001_simple_sql_data.sql', $all[''][0]);\n $this->assertEquals('2000_01_01_000002_simple_sql_data_tarball.sql.gz', $all[''][1]);\n\n $this->assertEquals('2000_01_01_000010_simple_sql_data.sql', $all['connection_2'][0]);\n\n $this->assertEquals('2000_01_01_000020_simple_sql_data.sql', $all['connection_3'][0]);\n }", "function init_ssl() {\n\t\t// We *must* have entropy. Otherwise there's no point to crypto.\n\t\tif (!EventUtil::sslRandPoll()) {\n\t\t\texit(\"EventUtil::sslRandPoll failed\\n\");\n\t\t}\n\n\t\t$local_cert = $this->cert;\n\t\t$local_pk = $this->pkey;\n\t\t$cafile = $this->cafile;\n\t\t$capath = $this->capath;\n\n\t\tif (!file_exists($local_cert) || !file_exists($local_pk)) {\n\t\t\techo \"Couldn't read $local_cert or $local_pk file. To generate a key\\n\",\n\t\t\t\t\"and self-signed certificate, run:\\n\",\n\t\t\t\t\" openssl genrsa -out $local_pk 2048\\n\",\n\t\t\t\t\" openssl req -new -key $local_pk -out cert.req\\n\",\n\t\t\t\t\" openssl x509 -req -days 365 -in cert.req -signkey $local_pk -out $local_cert\\n\";\n\n\t\t\treturn FALSE;\n\t\t}\n\t\t$options = [\n\t\t\tEventSslContext::OPT_LOCAL_CERT => $local_cert,\n\t\t\tEventSslContext::OPT_LOCAL_PK => $local_pk,\n\t\t\tEventSslContext::OPT_VERIFY_PEER => true,\n\t\t\tEventSslContext::OPT_VERIFY_DEPTH => 10,\n\t\t\tEventSslContext::OPT_ALLOW_SELF_SIGNED => true,\n\t\t\tEventSslContext::OPT_REQUIRE_CLIENT_CERT => true,\n\t\t];\n\n\t\tif ($cafile) {\n\t\t\t$options[EventSslContext::OPT_CA_FILE] = $cafile;\n\t\t}\n\n\t\tif ($capath) {\n\t\t\t$options[EventSslContext::OPT_CA_PATH] = $capath;\n\t\t}\n\n\t\t$ctx = new EventSslContext(EventSslContext::SSLv3_SERVER_METHOD, $options);\n\n\t\treturn $ctx;\n\t}", "public function testAll()\n {\n $this->assertEquals(['foo' => 'bar'], $this->container->all());\n }", "public static function testGetAllEN() {\n\n echo '<pre>'; var_dump(HTTPStatusCode::getAll()); echo '</pre>';\n }", "public function testGetCreditcardofallcompanyAdmin()\n {\n $client = static::createClient();\n $client->request('GET', '/api/creditcardsofallcompany', [], [], ['HTTP_CONTENT_TYPE' => 'application/json','HTTP_AUTH-TOKEN' => 'keyAdmin']);\n $response = $client->getResponse();\n $content = $response->getContent();\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertJson($content);\n $arrayContent = json_decode($content, true);\n $this->assertCount(9, $arrayContent);\n }", "function Inscription_Certificates_All_Where()\n {\n $type=$this->CGI_GET(\"Type\");\n $where=$this->UnitEventWhere\n (\n array\n (\n \"Type\" => $this->Certificate_Type,\n )\n );\n\n return $where;\n }" ]
[ "0.7290187", "0.6669539", "0.6589994", "0.658423", "0.64943856", "0.6416734", "0.6405434", "0.623988", "0.6226413", "0.6202075", "0.6123818", "0.6084846", "0.5951623", "0.5885574", "0.58084613", "0.574898", "0.57323813", "0.5713105", "0.5651595", "0.5637328", "0.55828965", "0.55767655", "0.55595565", "0.5558012", "0.5556852", "0.55441636", "0.5507718", "0.546793", "0.5433426", "0.54248315", "0.54215246", "0.5391765", "0.5356566", "0.53454316", "0.53312063", "0.5328087", "0.53226084", "0.5269878", "0.5242969", "0.52385706", "0.52096826", "0.51947236", "0.5192857", "0.5189526", "0.51861167", "0.5180176", "0.51771355", "0.51610297", "0.5149578", "0.5149338", "0.5142307", "0.5130402", "0.51187485", "0.51160014", "0.5111192", "0.5109716", "0.50953007", "0.5083499", "0.5077704", "0.50741273", "0.50493354", "0.5039766", "0.5036776", "0.50229645", "0.5016947", "0.50151986", "0.5008048", "0.50080353", "0.50041735", "0.500226", "0.49988514", "0.49771032", "0.49730968", "0.4965921", "0.49488372", "0.49339724", "0.4931262", "0.49230328", "0.49189746", "0.491513", "0.49149668", "0.4907829", "0.48982906", "0.48980808", "0.4890682", "0.48813286", "0.48800406", "0.4876438", "0.48691118", "0.486561", "0.4865427", "0.48607507", "0.48559216", "0.48453698", "0.48250967", "0.48165825", "0.4815773", "0.4812259", "0.48083624", "0.47912532" ]
0.62651974
7
put your code here
public function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('comments')->delete(); \App\comment::create(array( "post_id" => 1, "user_id" => 2, "first_name" => "Nate", "class_id" => 1, "teacher" => 2, "comment" => "Test 1", "teacher_comment" => true, )); \App\comment::create(array( "post_id" => 2, "user_id" => 2, "first_name" => "Nate", "class_id" => 2, "teacher" => 2, "comment" => "Test 2", "teacher_comment" => true, )); $this->command->info('Comment table seeded!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"admin@admin.com\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => 'prosales@researchmobile.co',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => 'movil@researchmobile.co',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => 'qwerty@gmail.com',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => 'pkw@pkw.com',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }", "public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }" ]
[ "0.80138505", "0.79804975", "0.7977927", "0.7954003", "0.7951511", "0.79507065", "0.79449123", "0.794312", "0.7938865", "0.79372203", "0.79340154", "0.7892169", "0.7881411", "0.7879766", "0.78787434", "0.7875771", "0.7870809", "0.7870481", "0.7852045", "0.7851101", "0.784159", "0.78346395", "0.7827439", "0.7818506", "0.78085804", "0.7803168", "0.7803112", "0.7800874", "0.78000623", "0.77964896", "0.7790986", "0.77893186", "0.7786942", "0.7779508", "0.77773196", "0.7766297", "0.7762858", "0.77619725", "0.7761802", "0.77617735", "0.7760563", "0.77588934", "0.7757106", "0.77538526", "0.7750399", "0.7749764", "0.77460176", "0.7729847", "0.77295387", "0.77283424", "0.7717115", "0.7715115", "0.77147174", "0.77134794", "0.7713354", "0.7712908", "0.77113235", "0.7711319", "0.77109134", "0.7710318", "0.77056116", "0.770521", "0.77040505", "0.7704028", "0.7702745", "0.7702163", "0.77015257", "0.7699154", "0.76988846", "0.7698059", "0.76972497", "0.76941127", "0.7692912", "0.76910675", "0.7690705", "0.7687825", "0.7687763", "0.76870334", "0.76862305", "0.7684728", "0.76843387", "0.7680029", "0.76790416", "0.7678002", "0.76777124", "0.76734155", "0.7670605", "0.7669205", "0.7668748", "0.766868", "0.7666607", "0.76631796", "0.7662515", "0.7661419", "0.76591927", "0.7656439", "0.7654022", "0.76532", "0.76526594", "0.7652528", "0.765247" ]
0.0
-1
Example middleware invokable class
public function __invoke(Request $request, RequestHandler $handler): Response { $arrDatos = $request->getParsedBody(); $user = new User(); $user->email = $arrDatos['email']??"0"; $user->tipo_id = $arrDatos['tipo']??"0"; $user->clave = $arrDatos['clave']??"0"; $user->nombre = $arrDatos['nombre']??"0"; $user->legajo = $arrDatos['legajo']??"0"; if ($user->email != "0" && $user->tipo_id != "0" && $user->clave != "0" && $user->nombre != "0" && $user->legajo) { if(Funciones::datosEspecificos3(strtolower($user->tipo_id),"1","2","3")) { if($user->legajo >999 && $user->legajo<2001) { $objeto = User::where('email',$arrDatos['email'])->get(); $leg = User::where('legajo',$arrDatos['legajo'])->get(); if($objeto == "[]") { if($leg == "[]") { $user->clave = password_hash($arrDatos['clave'],PASSWORD_DEFAULT); $request = $request->withAttribute("user",$user); $resp = new Response(); $response = $handler->handle($request); $existingContent = (string) $response->getBody(); $resp->getBody()->write($existingContent); return $resp; } else { $resp = new Response(); $resp->getBody()->write(json_encode(array("Error" => "Legajo Existente"))); return $resp; } } else { $resp = new Response(); $resp->getBody()->write(json_encode(array("Error" => "Email Existente"))); return $resp; } } else { $resp = new Response(); $resp->getBody()->write(json_encode(array("Error" => "Se puede ingresar un legajo entre 1000 y 2000"))); return $resp; } } else { $resp = new Response(); $resp->getBody()->write(json_encode(array("Error" => "Solo es valido el tipo 1, 2 o 3"))); return $resp; } } else { $resp = new Response(); $resp->getBody()->write(json_encode(array("Error" => "Datos insuficientes"))); return $resp; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get(): Middleware;", "public function getMiddleware();", "public function middleware()\n {\n // TODO: Implement middleware() method.\n }", "private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function middleware($middleware, array $options = []);", "public function middlewares()\n {\n }", "public function handle(Request $request, Closure $next);", "public function middleware($middlewareDefinition): self;", "public function __construct() {\n\t\t$this->middleware(function ($request, $next) {\n\t\t\t$route = $request->route()->getName();\n\t\t\t$action = @explode('.', $route)[1];\n\n\t\t\t$actions = ['index', 'show', 'edit', 'update', 'destroy', 'grant-rights'];\n\t\t\t$forbidd = [];\n\n\t\t\t$user = \\Auth::user();\n\t\t\tswitch (true) {\n\t\t\t\tcase !$user: {\n\t\t\t\t\t$forbidd = array_diff($actions, ['show']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase !$user->isModerator(): {\n\t\t\t\t\t$forbidd = array_diff($actions, ['show', 'edit', 'update']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (in_array($action, $forbidd)) {\n\t\t\t\treturn $this->forbiddenResponse();\n\t\t\t}\n\n\t\t\treturn $next($request);\n\t\t});\n\t}", "public function handle($request, $next);", "public function __construct()\n {\n $middlewareGroup = new MiddlewareGroup();\n $middlewareGroup->user();\n $middlewareGroup->handle();\n }", "public function middleware($name){\n\n $middlewares = [\n 'auth' => 'Middleware\\Authentication'\n ];\n\n $middleware = new $middlewares[$name]();\n $middleware->handle();\n }", "private function setupMiddleware()\n {\n $this->getSlim()->add(new Model\\Middleware( $this ));\n }", "public function invoke()\n {\n $privateKey = md5(microtime(true));\n $publicKey = md5(microtime());\n $nonce = rand();\n $time = time();\n $signature = md5(\"{$privateKey}{$nonce}{$time}{$publicKey}\");\n\n $token = new Token($publicKey, $signature, $nonce, $time);\n\n $provider = $this->getMockBuilder('\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\KeyProviderInterface')->getMock();\n $provider->method('findPrivateKey')->willReturn($privateKey);\n\n $extractor = $this->getMockBuilder(\n '\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\TokenExtractorInterface'\n )->getMock();\n $extractor->method('extract')->willReturn($token);\n\n $validator = $this->getMockBuilder(\n '\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\TokenValidatorInterface'\n )->getMock();\n $validator->method('validate')->willReturn(true);\n\n $container = new ArrayObject();\n\n $middleware = new Middleware($provider, $extractor, $validator, $container);\n\n $headers = [\n 'X-Hmac-Auth' => [\"{$publicKey}:{$signature}:{$nonce}:{$time}\"],\n ];\n\n $next = function ($request, $response) {\n return $response;\n };\n\n $psr7Request = new ServerRequest([], [], 'http://localhost', 'GET', 'php://input', $headers);\n\n $middleware($psr7Request, new Response(), $next);\n\n $this->assertSame($privateKey, $container['privateKey']);\n }", "protected function callMiddleware()\n {\n if (count($this->middleware) > 0) {\n foreach ($this->middleware as $middleware) {\n $controller = new $middleware;\n call_user_func_array([$controller, 'handle'], []);\n }\n }\n }", "public function express()\n {\n }", "abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);", "public function __invoke(Request $request): Response;", "public function __construct()\n {\n $this->middleware('auth:api');\n $this->middleware(\"VerifyRankToken:$this->USER_LEVEL_3\", [\n 'only' => ['permanentDestroy','batchPermanentDestroy']\n ]);\n }", "public function testRouteMiddleware()\n {\n $callable1 = function () {};\n $callable2 = function () {};\n //Case A\n $r1 = new \\Slim\\Route('/foo', function () {});\n $r1->setMiddleware($callable1);\n $mw = $r1->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case B\n $r1->setMiddleware($callable2);\n $mw = $r1->getMiddleware();\n $this->assertEquals(2, count($mw));\n //Case C\n $r2 = new \\Slim\\Route('/foo', function () {});\n $r2->setMiddleware(array($callable1, $callable2));\n $mw = $r2->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(2, count($mw));\n //Case D\n $r3 = new \\Slim\\Route('/foo', function () {});\n $r3->setMiddleware(array($this, 'callableTestFunction'));\n $mw = $r3->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case E\n try {\n $r3->setMiddleware('sdjfsoi788');\n $this->fail('Did not catch InvalidArgumentException when setting invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n //Case F\n try {\n $r3->setMiddleware(array($callable1, $callable2, 'sdjfsoi788'));\n $this->fail('Did not catch InvalidArgumentException when setting an array with one invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n }", "abstract public function apply(Request $request, Response $response, Closure $next);", "public function __construct()\n {\n $this->middleware(\"acl:admin|moderator\");\n }", "public function __construct()\n {\t \n\t $this->middleware('admin'); \n }", "public function __construct()\n {\n $this -> middleware('auth');\n $this -> middleware('check_block');\n }", "public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }", "public function testMiddlewarePasses()\n {\n $authorizationLine = 'Basic ' . base64_encode('foo:bar');\n\n $request = new Request();\n $request->headers->add([\n 'Authorization' => $authorizationLine,\n ]);\n\n $middleware = new WebhookAuthenticationMiddleware('foo', 'bar');\n $this->assertTrue($middleware->handle($request, function () {\n return true;\n }));\n }", "public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }", "public function __construct()\n {\n $this->middleware('doccumethome');\n\n }", "public function RouteRequest ();", "public function __construct(){\n $this-> middleware('auth:admin');\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "function serve(array $routes, string $reqmethod, string $reqpath, ...$args): callable {\n\n $action = null;\n $params = null;\n $mwares = null;\n\n # test method + path against action method + expression\n foreach ($routes as [$actmethod, $regexp, $handlers]) {\n if ($reqmethod === $actmethod && preg_match($regexp, $reqpath, $caps)) {\n # action is last in the handlers chain\n $action = array_pop($handlers);\n $params = array_slice($caps, 1);\n $mwares = $handlers;\n break;\n }\n }\n\n # no matching route, 404\n if (empty($action)) {\n return call_user_func(_404(), ...$args);\n }\n\n # if we have params, run them through bindings\n $bindings = stash(DISPATCH_BINDINGS_KEY) ?? [];\n if (count($params) && count($bindings)) {\n foreach ($params as $key => $val) {\n $params[$key] = isset($bindings[$key])\n ? call_user_func($bindings[$key], $params[$key], ...$args)\n : $params[$key];\n }\n }\n\n # wrap action as last midware chain link\n $next = function () use ($action, $params, $args) {\n return empty($params)\n ? $action(...$args)\n : $action($params, ...$args);\n };\n\n # prepend matching global middleware into middleware chain\n $globalmwares = array_reverse(stash(DISPATCH_MIDDLEWARE_KEY) ?? []);\n foreach ($globalmwares as $middleware) {\n $pattern = array_shift($middleware);\n if (preg_match($pattern, $reqpath)) {\n array_unshift($mwares, ...$middleware);\n }\n }\n\n # build midware chain, from last to first, if any\n foreach (array_reverse($mwares) as $middleware) {\n $next = function () use ($middleware, $next, $params, $args) {\n return empty($params)\n ? $middleware($next, ...$args)\n : $middleware($next, $params, ...$args);\n };\n }\n\n # trigger middleware chain + handlers\n return $next();\n}", "public function __invoke(Request $request)\n {\n \n }", "public function handle($request, Closure $next, ...$level)\n {\n\n if (Auth::check()) {\n\n if (!empty($level)) {\n\n $whoIs = $this->meWithRole(Auth::user()->id,$level);\n\n if (!$whoIs) {\n\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n\n }\n\n\n }else {\n\n return response()->json([\"code\"=>500,\"msg\"=>\"Wrong Route Configuration\"],500);\n\n }\n\n $response = $next($request);\n\n return $response;\n\n }else {\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n }\n\n\n // Post-Middleware Action\n\n }", "public function __construct()\n {\n \t$this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('ifadmin');\n }", "public function __construct()\n { \n $this->middleware('admin');\n }", "public function __construct() {\n\t\t$this -> middleware('inventory');\n\t}", "public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next);", "public function call()\n {\n // Get the reference to the application\n $app = $this->app;\n\n // Get the application request without trailing slashes \n $requesturi = ltrim($app->request->getPathInfo(), '/');\n\n if($requesturi != 'unauthorized') {\n // Check if the user is authorized to execute this request\n if(!Security::isUserAuthorized($requesturi)) {\n $app->redirect('/unauthorized');\n }\n }\n\n // Run the inner middleware and application\n $this->next->call();\n }", "protected function handler ($SVC) {}", "public function __construct() {\n $this->middleware('admin');\n $this->middleware('acl:privilege_add', ['only' => ['create', 'store']]);\n $this->middleware('acl:privilege_edit', ['only' => ['edit', 'update']]);\n $this->middleware('acl:privilege_delete', ['only' => ['destroy']]);\n $this->middleware('acl:privilege_list', ['only' => ['index']]);\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}", "public function handle($request, Closure $next)\n {\n\n// if(!$this->checkSignature($request)){\n// return response('Unauthorized.', 401);\n// }\n return $next($request);\n }", "public function __construct(){\n\n $this->middleware('admin');\n \n }", "public function __construct(){\n // $this->middleware('admin', ['except' => ['delete','trash','restore','permanentDelete']]);\n\n $this->middleware('author', ['only' => ['create','store','edit','update']]);\n $this->middleware('admin', ['only' => ['delete','trash','restore','permanentDelete']]);\n }", "public function __construct()\n {\n $this->middleware(Authenticate::class);\n }", "public function __construct()\n {\n $this->middleware('role:api');\n }", "public function __construct() {\n $this->middleware('admin');\n $this->middleware('acl:user_add', ['only' => ['create', 'store']]);\n $this->middleware('acl:user_edit', ['only' => ['edit', 'update']]);\n $this->middleware('acl:user_delete', ['only' => ['destroy']]);\n $this->middleware('acl:user_list', ['only' => ['index']]);\n }", "public function handle($request, Closure $next, $guard = null)\n {\n\n $company = (new Temp())->getCompanyDefault();\n $slug = ($company->exists) ? $company->metaWithQuery->slug : '';\n\n $user = Auth::user();\n $this->controller = strtolower(Utility::controllerName(true));\n $this->model = $company->getOnlyActiveWithSandboxesBySlugAndUser($slug, $user->getKey());\n $this->editableModel = new Model();\n $this->policy = Member::class;\n $this->slug = $slug;\n $this->module = Utility::module();\n $this->route = Utility::routeName();\n $this->rights = Utility::rightsDefault();\n\n $struc = $this->getStruc();\n\n if(!$this->model->exists){\n return Utility::httpExceptionHandler(404);\n }\n\n $request->member_module_controller = $this->controller;\n $request->member_module_module = $this->module;\n $request->member_module_policy = $this->policy;\n $request->member_module_slug = $this->slug;\n $request->member_module_model = $this->model;\n $request->member_module_model_editable = $this->editableModel;\n\n if(method_exists($this, $this->module)){\n\n $struc = array_merge($struc, call_user_func(array($this, $this->module), $request, $guard));\n\n if($struc['model'] instanceof Model || $struc['model'] instanceof MongoDB){\n if(!$struc['model']->exists){\n return Utility::httpExceptionHandler(404);\n }\n $this->editableModel = $struc['model'];\n $request->member_module_model_editable = $this->editableModel;\n }\n\n if(!$struc['flag']){\n return Utility::httpExceptionHandler(403);\n }\n \n }else{\n\n return Utility::httpExceptionHandler(404);\n\n }\n\n return $next($request);\n\n }", "public function getExceptionHandler(): MiddlewareInterface;", "public function __construct(){\n $this->middleware('role:super-admin|moderator')->only('index');\n }", "public function __invoke(RequestInterface $request, ResponseInterface $response, Callable $next)\n {\n $headers = getallheaders();\n // getServerParams();\n $headersFromSlim = $request->getHeader('Authorization');\n\n $jwt = $request->getHeaders();\n echo $jwt['HTTP_AUTHORIZATION'][0];\n //$token = JWT::decode(['HTTP_AUTHORIZATION'][0], getenv('SECRET_KEY_JWT'), array('HS256'));\n//echo '<br>';\n//var_dump($token);\ndie();\n // return $next($request, $response);\n }", "public function __construct()\n {\n $this->middleware('auth:api', ['only' => ['store', 'like', 'dislike']]);\n }", "public function getThrowableHandler(): MiddlewareInterface;", "public static function middleware($middleware,$callback){\n $parent_middleware = static::$middleware;\n static::$middleware .= '|' .trim($middleware,'|');\n if(is_callable($callback)){\n call_user_func($callback);\n }else {\n throw new BadFunctionCallException(\"provide valid callback\");\n\n }\n static::$middleware = $parent_middleware;\n }", "public function __construct()\n {\n //$this->middleware('auth');\n $this->middleware('auth-admin');\n $this->middleware('signed')->only('verify');\n $this->middleware('throttle:6,1')->only('verify', 'resend');\n }", "public function handle(Request $request);", "public function __construct() {\n\t\t$this->middleware('admin');\n\t}", "public function __construct()\n {\n $this->middleware(\n ['auth:api','admin'],\n ['except' => ['index','show']]\n );\n }", "public function __construct()\n {\n $this->middlewere('api.auth', ['except'=>['index','show']]);\n }", "function __invoke(Request $req, Response $res): Response {\n //\n // api/users[/{user_id}]\n //\n // where the part in square brackets is\n // optional.\n if( null !== $req->getAttribute('user_id') ) {\n // api/users/{user_id}\n return $this->userHandler($req,$res);\n } else {\n // api/users\n return $this->userCollectionHandler($req,$res);\n }\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function testSuccessfulMiddleware()\n {\n $model = factory(Server::class)->make();\n $subuser = factory(Subuser::class)->make([\n 'server_id' => $model->id,\n ]);\n $this->setRequestAttribute('server', $model);\n\n $this->request->shouldReceive('route->parameter')->with('subuser', 0)->once()->andReturn('abc123');\n $this->hashids->shouldReceive('decodeFirst')->with('abc123', 0)->once()->andReturn($subuser->id);\n $this->repository->shouldReceive('find')->with($subuser->id)->once()->andReturn($subuser);\n\n $this->request->shouldReceive('method')->withNoArgs()->once()->andReturn('GET');\n\n $this->getMiddleware()->handle($this->request, $this->getClosureAssertions());\n $this->assertRequestHasAttribute('subuser');\n $this->assertRequestAttributeEquals($subuser, 'subuser');\n }", "public function __construct()\n {\n $this->middleware(\"login\");\n }", "public function __construct()\n {\n $this->middleware('App\\Http\\Middleware\\StaffMiddleware');\n }", "public function __construct()\n {\n $this->middleware('checkauth', ['only' => ['getUser', 'setname', 'setemail', 'setpassword']]);\n// $this->middleware('checkuser', ['only' => ['setname', 'setemail', 'setpassword']]);\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('role');\n // $this->middleware('log')->only('index');\n // $this->middleware('subscribed')->except('store'); \n }", "public function handle($request, Closure $next)\n {\n\n\n echo \"<h4>\" . \"touched the moddle ware\" .\"</h4>\";\n\n // if(1){\n // // return \"interupted\";\n // return view('test.index');\n // }\n\n return $next($request);\n }", "function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n \n if ($auth_line = $request->getHeaderLine('Authorization')) {\n if (preg_match(\"#^Bearer (.+)$#\", $auth_line, $p)) {\n $token = $p[1];\n \n // is it a valid token?\n $jwt = new JWT();\n $id = $jwt->parseToken($token);\n \n container()->set('authenticated_user_identity', $id); // authenticate user\n \n }\n }\n \n if (is_null(current_authenticated_user_id())) {\n $response = $response->withStatus(403);\n \n return $response;\n }\n \n $response = $next($request, $response);\n \n return $response;\n }", "public function __construct()\n{\n $this->middleware('auth'); //only the authenticated user have access to the methods below. unauthenticated users will not have any access to these methods.\n $this->middleware('role:doctor'); //can add more authorisation to view the page e.g doctor\n}", "public function initMiddleware(App $app);", "public function handle($request);", "public function handle(Request $request, Closure $next)\n {\n echo 'the middle ware called';\n if($request->all()) {\n echo 'Message from middleware:You have something in request';\n }\n else {\n echo 'Message from middleware:your request is empty';\n }\n return $next($request);\n }", "public function sampleMiddleware($request, $response, $next)\n {\n return $response;\n }", "public function __construct()\n {\n $this->middleware('auth:api')->only('resend');\n $this->middleware('signed')->only('verify');\n $this->middleware('throttle:6,1')->only('verify', 'resend');\n }", "public function handle($request, Closure $next)\n {\n //znaci 1. napravimo midleware preko php artisan make:midleware\n //2. napravimo ovaj uslov ovde\n // 3. registrujemo midleware u Kernel.php fajlu\n //4. odemo u web.php i vezemo middleware('admin'); metod za user/admin rutu na kraju - bolje ne (ne radi u oba pravca)\n // ili!: u UsersControleru napravimo konstruktor i stavimo middleware u njega\n // public function __construct(){ \n // $this->middleware('admin');\n // }\n\n // ! Proverimo da li autentifikovani user ima access za odredjenu rutu\n //ako nema, vratimo ga odakle je dosao\n if(Auth::user()->admin){\n \n return $next($request);\n\n } else{\n \n Session::flash('info', 'You do not have permissions to acces!');\n\n return redirect()->back();\n }\n\n \n }", "function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }", "public function handle($request, Closure $next){\n\t\t//get users from the requested token\n\t\ttry {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n return response()->json(['token_expired'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\t\t\n\t\t//get controller from route\n\t\t$currentAction = \\Route::currentRouteAction();\n\t\t\n\t\t//explode the route above into method and controller\n\t\tlist($controller, $method) = explode('@', $currentAction);\n\n\t\t//replace the redundant information\n\t\t$controller = preg_replace('/.*\\\\\\/', '', $controller);\t\n\t\t\n\t\t//check if the requested controller and user's group id are matched\n\t\t$permissionID\t=\tDB::select(\"select permissions.id from permissions, controllers \n\t\t\t\t\t\t\t\t\t\twhere permissions.groupid = ?\n\t\t\t\t\t\t\t\t\t\tand permissions.controllerid = controllers.id\n\t\t\t\t\t\t\t\t\t\tand controllers.name = ?\" \n\t\t\t\t\t\t\t\t\t\t,\t[(int)$user->groupid , $controller]\n\t\t\t\t\t\t\t\t\t); \n\t\t//if nothing found, terminate the request\n\t\tif($permissionID == NULL){\n\t\t\t$returnArray\t=\tarray(\t\"result\"\t=>\tfalse,\n\t\t\t\t\t\t\t\t\t\t\"reason\"\t=>\t\"Permission denied\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\treturn response()->json($returnArray , 400);\t\t\t\n\t\t}\n\t\t\n return $next($request);\n }", "protected static function middleware()\n {\n foreach (self::fetch('http/middleware') as $file) {\n Bus::need($file);\n }\n\n Middleware::ini();\n }", "function run() {\n global $url;\n session_start();\n\n if (class_exists('AppHelper')) {\n $url = AppHelper::validate_and_authorize($url);\n } else {\n error_log ('this app has no AppHandler defined, hence no secutiy ');\n }\n\n # Parse our 3 part URL\n # Format: controller[/action[.type][/query_string]] \n # Example: login/get/3\n # Example: login/listall.json\n list($controller, $action, $content_type, $query_string) = parse_rest_url($url);\n\n $controller = ucwords($controller).'Controller';\n $dispatch = new $controller($action, $content_type);\n\n if ((int)method_exists($controller, $action)) {\n call_user_func_array(array($dispatch,$action),array($query_string));\n } else {\n AppHelper::not_found($dispatch, $url); \n }\n}", "public function __construct()\n {\n $this->middleware('permisos:GET.496E646963|POST.369646E694|PUT.369646E694|DELETE.369646E694');\n }", "public function __construct()\n {\n $this->middleware(backpack_middleware());\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function getMiddlewares();", "public function __construct() \n {\n $this->middleware('auth', ['only' => [\n 'sendmessage',\n 'reportuser',\n 'reportcorporate',\n 'reportcar',\n 'reportpart',\n 'addcorporate',\n 'pusherauthenticate',\n 'iscorpuser',\n 'hascorpuserrole',\n 'addcorporateform',\n 'addcorporate',\n ]]);\n\n $this->middleware('corpuser', ['only' => [\n 'corporatedashboard',\n 'corporatemembers',\n 'corporatesettings',\n ]]);\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin') || $adminUser->hasRole('sub-admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }" ]
[ "0.72244614", "0.71935344", "0.70709306", "0.6746728", "0.66919494", "0.6510601", "0.6387525", "0.63849556", "0.63401264", "0.6336634", "0.6306557", "0.6207183", "0.619368", "0.6193426", "0.61835295", "0.6145894", "0.6142988", "0.6067079", "0.6032965", "0.5985332", "0.5973016", "0.59547204", "0.59539187", "0.5938541", "0.59066564", "0.58991486", "0.589546", "0.5879869", "0.58707243", "0.58643365", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.58520395", "0.58347005", "0.58259684", "0.5814249", "0.58013755", "0.57950574", "0.5781578", "0.5778038", "0.5771951", "0.57709116", "0.57557523", "0.57544583", "0.5747593", "0.574292", "0.57402134", "0.57307744", "0.57302177", "0.5726061", "0.5710801", "0.57098496", "0.57059175", "0.57032526", "0.5698907", "0.5697927", "0.56956065", "0.5693719", "0.5692601", "0.56918186", "0.5690646", "0.568532", "0.5675317", "0.5673458", "0.56671524", "0.56671524", "0.56671524", "0.56643236", "0.5651285", "0.56504655", "0.56500226", "0.5649687", "0.56478447", "0.564422", "0.5641653", "0.5640773", "0.56398845", "0.56389666", "0.56384075", "0.56350386", "0.56349325", "0.563249", "0.56293696", "0.56238294", "0.56206405", "0.5615671", "0.5613487", "0.56087667", "0.56086046", "0.56072515", "0.56021" ]
0.0
-1
Get services of portfolio
public function getServices($id): Collection { $p = $this->findPortfolio($id); return $p ? $p->services : new Collection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $portfolios = Portfolio::all();\n return $portfolios;\n }", "function get_services() {\n $args = [\n 'post_type' => 'newstride_services',\n 'posts_per_page' => -1,\n ];\n\n return new WP_Query( $args );\n}", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "public function getServices();", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "public function show()\n {\n $is_active = [1];\n $portfolio = (new PortfolioPerformanceService())->PortfolioData($is_active, []);\n\n return $portfolio;\n }", "public function services()\n {\n $navbar = NavBar::first();\n $servicehead = ServiceHead::first();\n $featurehead = FeatureHead::first();\n $testimonial = TestimonialHead::first();\n $servicebody = ServiceBody::all();\n $featurebody = FeatureBody::all();\n $testimonials = Testimonial::all();\n\n return view('pages.home.services' , compact('servicehead' , 'featurehead' , 'servicebody' , 'navbar' , 'featurebody' , 'testimonial' , 'testimonials'));\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function getServices() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_client', $user->id)\n\t\t\t\t->where('services_orders.status', '!=', 6)\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\t\t\n return ServicesResource::collection(Services::all());\n }", "public function listsServicesGet()\r\n {\r\n $response = Services::with('regimen')->get();\r\n return response()->json($response,200);\r\n }", "public function portfolios()\n {\n return $this->hasMany(Portfolio::class);\n }", "public function portfolios()\n {\n return $this->hasManyThrough(Portfolio::class, Profile::class);\n }", "public function getServices(): array;", "public function services(): ServicesContract;", "public function getServices(Request $request)\n {\n $company = Auth::user()->company;\n $result = $company->corpFinServices->find($request->get('id'));\n return response($result);\n\n }", "function rv_portfolio() {\r\n\t\treturn RV_Portfolio::get_instance();\r\n\t}", "function getServices() {\n $sql = 'SELECT * FROM services';\n\n $results = mysqli_query($GLOBALS['con'], $sql);\n\n if (mysqli_num_rows($results) > 0) {\n return $results;\n }\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $company = Auth::user()->company;\n $services = CorpFinService::where('company_id', $company->id)->paginate(10);//$company->corpFinServices;\n return view('CorpFIN.panel.view_service', ['company'=>$company, 'services' => $services]);\n }", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "public function services(){\n $data = array(\n 'title' => 'Services',\n 'services' => ['Tellen', 'Quality', 'Habitat']\n );\n return view('pages.services')->with($data);\n }", "public function services()\n {\n \t\t//$services = $data->get_services();\n \t\t//dd($cities->ZA);\n \t\t$services = KitApi::get_services();\n \t\treturn view('services', compact('services'));\n }", "public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function list()\n {\n $portfolios= Portfolio::all();\n return view('pages.portfolios.list', compact('portfolios'));\n }", "public static function all()\n\t{\n\t\t$portfolios = ORM::factory('portfolio')->where('deleted', '=', '')->find_all();\n\n\t\treturn $portfolios;\n\n\t}", "public function getServices()\n {\n $services = OurService::select('id','title','slug','description','image')\n ->where('status','=',\\DB::raw(1))\n ->take(4)\n ->get();\n if($services->count()) {\n return $services;\n }\n\n return false;\n }", "public function index()\n\t{\n\n//\t\t$selected = $this->getSelectedServices();\n//\n//\t\t$services = [];\n//\t\t$service_cats = ServiceCategories::where('parent_id', 0)->with('childs.services')->get();\n//\n//\t\t$service_cats->each(function ($categoryData) use (&$services, $selected) {\n//\t\t\t$sub_result = [];\n//\t\t\t$categoryData->childs()->each(function ($subCatData) use (&$sub_result, $selected) {\n//\t\t\t\t$sub_result[$subCatData->name] = [\n//\t\t\t\t\t'is_extra' => !!$subCatData->is_extra,\n//\t\t\t\t\t'name' => $subCatData->name,\n//\t\t\t\t\t'data' => []\n//\t\t\t\t];\n//\n//\t\t\t\t$t = [];\n//\t\t\t\t$subCatData->services()->each(function ($serviceData) use ($subCatData, &$sub_result, $selected) {\n//\t\t\t\t\t$sub_result[$subCatData->name]['data'][] = [\n//\t\t\t\t\t\t'id' => (string)$serviceData->id,\n//\t\t\t\t\t\t'name' => $serviceData->name,\n//\t\t\t\t\t\t'limit' => $serviceData->limit,\n//\t\t\t\t\t\t'prices_number' => $serviceData->prices_number,\n//\t\t\t\t\t\t'sub' => $serviceData->subs()->get(),\n//\t\t\t\t\t\t'my_price' => collect($selected->where('id', $serviceData->id)->first())->only(['pivot'])->first()\n//\t\t\t\t\t];\n//\t\t\t\t});\n//\n//\t\t\t});\n//\t\t\t$services[] = [\n//\t\t\t\t'id' => (string)$categoryData->id,\n//\t\t\t\t'text' => $categoryData->name,\n//\t\t\t\t'additional' => $sub_result\n//\t\t\t];\n//\t\t});\n\n\t\t$services = $this->loadServicesData();\n\n\t\treturn view('admin.services.index', compact('services'));\n\n\t}", "public function findServices(): array;", "public function index()\n {\n return view('Portfolio.index')->with('portfolios',Portfolio::all());\n }", "public function getProjects();", "public function getServicesCourier() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_courier', $user->id)\n\t\t\t\t->whereIn('services_orders.status', array(\"2\",\"3\"))\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\n return Service::all();\n }", "public function index()\n {\n \t$services = Service::all()\n \t\t->pluck('name','id')\n \t\t;\n \n \t$serviceRequests = ServiceRequest::where('progress','PENDING')\n ->with('basicData')\n ->with('service')\n ->get()\n ;\n // dump($serviceRequests);die;\n $pendingPlates = array();\n $firstPlate = null;\n foreach($serviceRequests as $serviceRequest) {\n if($serviceRequest->basicData) {\n if(!$firstPlate){\n $firstPlate = $serviceRequest->basicData->plate;\n }\n $pendingPlates[$serviceRequest->basicData->plate] = $serviceRequest->basicData->plate;\n }\n }\n \n // $firstRequests = ServiceRequest::where('progress','PENDING')\n // ->where('basicData.plate',$firstPlate)\n // ->pluck('service.name','service.id')\n // ;\n // dump($serviceRequests);die;\n \n return view('pages.frontend.index')\n \t->with('services',$services)\n ->with('pendingPlates',$pendingPlates)\n \t;\n }", "public function index()\n\t{\n\t\t$this->our_services();\n\t}", "public function getServices()\n\t{\n\t\t$senddata= array();\n\t\t$finalsenddata= array();\n\t\t$services = Contactuspage::get()->toArray();\n\t\tforeach($services as $key=>$service)\n\t\t{\n\t\t\t$senddata['id'] \t\t\t= $service['id'];\n\t\t\t$senddata['title'] \t\t\t= $service['title'];\n\t\t\t$senddata['content'] \t\t= $service['content'];\n\t\t\tarray_push($finalsenddata,$senddata);\n\t\t}\n\t\t$siteSettings = SiteSettings::find(1)->toArray();\n\t\t$data['status'] = 1;\n\t\t$data['msg'] = 'Successfull.';\n\t\t$data['heading_text'] = $siteSettings['service_header'];\n\t\t$data['data'] = $finalsenddata;\n\t\techo json_encode($data);\n\t}", "public function services()\n {\n return $this->belongsToMany(Service::class)\n ->withPivot(['price', 'discount_price', 'laundry_price']);\n }", "function getPortfolio($rows = null, $page = 0, $limit_uris = false, $sort='date', $published_only=true)\n\t{\n\t\t$qStr = \"SELECT p.*, GROUP_CONCAT(t.name SEPARATOR ', ') AS tools\n\t\t\t\tFROM portfolio p\n\t\t\t\t\tLEFT JOIN portfolio_tools pt ON p.id=pt.portfolio_id\n\t\t\t\t\tLEFT JOIN tools t ON pt.tool_id=t.id\";\n\t\t\n\t\tif ($limit_uris || $published_only) {\n\t\t\t$qStr .= \" WHERE \";\n\t\t\t$onedone = false;\n\t\t\t\n\t\t\tif ($limit_uris) {\n\t\t\t\t$qStr .= \" (p.uri!='' OR p.uri IS NOT NULL)\";\n\t\t\t\t$onedone = true;\n\t\t\t}\n\t\t\t\n\t\t\tif ($published_only) {\n\t\t\t\t$qStr .= $onedone ? ' AND ' : '';\n\t\t\t\t$qStr .= \" p.published=1\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$qStr .= \" GROUP BY p.id\";\n\t\t$qStr .= \" ORDER BY p.time DESC\";\n\t\t\n\t\tif (!is_null($rows)) {\n\t\t\t$page = intval($page);\n\t\t\t$page = $page <= 1 ? 0 : $page - 1;\n\t\t\t\n\t\t\t$qStr .= \" LIMIT \".intval($page).\", \".intval($rows);\n\t\t}\n\t\t\n\t\t$q = $this->db->query($qStr);\n\t\t\n\t\tif ($q->num_rows() > 0)\n\t\t\treturn array('success'=>true, 'items'=>$q->result_array());\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"No items found\");\n\t}", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public static function select_all_our_services()\n {\n $query = new Query;\n $services = $query->select(['core_products.*','core_product_categories.category_name','core_product_sub_categories.sub_category_name', 'core_product_models.model_name','core_product_categories.metric AS metric','core_product_images.*'])\n ->from('core_products')\n ->leftJoin('core_product_categories', 'core_product_categories.category_id=core_products.category_id')\n ->leftJoin('core_product_sub_categories', 'core_product_sub_categories.sub_category_id=core_products.sub_category_id')\n ->leftJoin('core_product_models', 'core_product_models.model_id=core_products.model_id')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id')\n ->orderBy(['core_products.product_id' => SORT_DESC])\n ->groupBy('core_products.product_id')\n ->where(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->all();\n return $services;\n }", "protected function getServices()\n {\n return $this->services;\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function index()\n {\n\n return view('smmpro::services.index', [\n 'services' => Service::orderBy('created_at', 'desc')->get()\n ]);\n }", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function get()\n {\n // 27 para medimas \n // 17 para ecoopsos \n $queryString = '{\"MaxResults\":0,\"MatchAll\":true,\"IPSIDs\":[],\"SiteID\":null,\"EPSID\":17,\"Regime\":null}';\n return $this->performRequest('GET', '/service/ContractService.svc/contract?', $queryString);\n }", "public function index()\n {\n $services = Service::select('id', 'name', 'price')->paginate(10);\n return view('adminlte.services.index', ['data' => $services]);\n }", "public function index()\n {\n $services = services::all();\n return view('widegts::services.index',compact('services'));\n }", "public function index()\n {\n return ServiceResource::collection(Service::all());\n }", "private function getServiceSearchData( $text, $isHtmlReturn = true ) {\n\t\t$list = '';\n\t\t$services = Service::where( \"title\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"subtitle\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"short_description\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"description\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"features\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"extra\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->paginate( config( \"constant.smPagination\" ) );\n\t\tif ( $isHtmlReturn ) {\n\t\t\tif ( count( $services ) > 0 ) {\n\t\t\t\tforeach ( $services as $service ) {\n\t\t\t\t\t$list .= '<a class=\"list-group-item\" target=\"_blank\" href=\"' . url( 'services/' . $service->slug ) . '\">';\n\t\t\t\t\tif ( $service->image != '' ) {\n\t\t\t\t\t\t$list .= '<img src=\"' . SM::sm_get_the_src( $service->image, 80, 80 ) . '\" alt=\"' . $service->title . '\">';\n\t\t\t\t\t}\n\t\t\t\t\t$list .= $service->title;\n\t\t\t\t\t$list .= '</a>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $list;\n\t\t} else {\n\t\t\treturn $services;\n\t\t}\n\t}", "public function getServices() {\n $services = Service::active()->get()->toArray();\n $outputArray = array();\n if ($services) {\n foreach ($services as $key => $value) {\n $begin = new DateTime($value['start_date']);\n $end = new DateTime($value['end_date']);\n if ($value['service_type'] == 'daily') {\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#605ca8\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n if ($value['service_type'] == 'weekly') {\n\n $schedule = Schedule::where('service_id', $value['id'])->get()->toArray();\n\n $weekNumber = array();\n for ($i = 0; $i < count($schedule); $i++) {\n $weekNumber[] = $schedule[$i]['week_number'];\n }\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n if (in_array($dt->format(\"w\"), $weekNumber)) {\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#f012be\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n\n if ($value['service_type'] == 'monthly') {\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#00a65a\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n\n if ($value['service_type'] == 'yearly') {\n $interval = DateInterval::createFromDateString('1 year');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"orange\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n }\n// echo \"<pre>\";\n// print_r($outputArray);\n// echo \"</pre>\";\n echo json_encode($outputArray);\n }", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public function services()\n {\n $comptes = compte::all();\n return view('pages.services')->with('comptes',$comptes);//->with($data);\n }", "public function index()\n {\n $profileId = isset(auth()->user()->profile) ? auth()->user()->profile->id : 0;\n $portfolios = Portfolio::where('profile_id', $profileId)->orderBy('created_at', 'desc')->paginate(8);\n return view('admin.portfolio.index', compact('portfolios'));\n }", "public function myservices_get()\n {\n\n $em = $this->doctrine->em;\n\n $user = $this->getCurrentUser();\n if($user){\n $relacion = $user->getServices()->toArray();\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"data\"] = array();\n /** @var \\Entities\\Service $service */\n foreach ($relacion as $service) {\n $service->loadRelatedData($user, null, site_url());\n $service->loadRelatedUserData($user);\n $result[\"data\"][] = $service;\n }\n $result[\"data\"] = $relacion;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }else{\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"error\"] = \"debe autenticarse\";\n $this->set_response($result, REST_Controller::HTTP_UNAUTHORIZED);\n }\n }", "public function index()\n {\n \n $all_servive = Services::all();\n return view('all_service')->with('services', $all_servive);\n }", "public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }", "public function getOurServices()\n {\n $data = HomeController::getPage('our-services');\n return view('our_services')->with(['data' => $data]);\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }", "public function index()\n {\n return $this->service->all();\n }", "public function index()\n {\n $Services = Service::all();\n return view('pagesystem.Service.index', compact('Services'));\n }", "function get_services($username) {\n\t\t$conn = db_connect();\n\t\t$result = $conn->query(\"select id,photo,service_name from services\");\n\t\tif (!$result)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//create an array of the services\n\t\t$url_array = array();\n\t\tfor ($count = 1; $row = $result->fetch_row(); ++$count) {\n\t\t\t$url_array[$count][0] = $row[0];\n\t\t\t$url_array[$count][1] = $row[1];\n\t\t\t$url_array[$count][2] = $row[2];\t\n\t\t}\n\t\treturn $url_array;\n\t}", "public static function getServices($user=null) {\n\t\tif ($user!=null)\t$portlist=$user->getRol()->getServices();\n\t\telse \t\t\t\t\t$portlist=$this->getDoctrine()->getRepository(Service::class)->findAll();\n\t\t$data=array(\"total\"=>count($portlist),\"rows\"=>array());\n\t\tforeach($portlist as $port) {\n\t\t\t$row=array(\"id\"=>$port->getId(), \"port\"=>$port->getPort(), \"name\"=>$port->getName());\n\t\t\t$data[\"rows\"][]=$row;\n\t\t}\n\t\treturn $data;\n\t}", "public function index()\n {\n $services = Service::all();\n\n $transformedData = \\Fractal::collection($services, new ServiceTransformer())->toArray();\n\n return $this->responder->respond($transformedData);\n }", "public function get_trending_services()\n {\n if (isGuest()) {\n // only get national\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.LocationScopeID = 1\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n } else {\n $userID = current_user();\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n JOIN UserAccountInformation ua ON (\n ua.id = {$userID} AND (\n (ss.LocationScopeID = 1) OR\n (ss.RegionalID = ua.RegionalID AND ss.LocationScopeID = 2) OR \n (ss.ProvincialID = ua.ProvincialID AND ss.LocationScopeID = 3) OR\n (ss.MunicipalityCityID = ua.MunicipalityCityID AND (ss.LocationScopeID = 4 OR ss.LocationScopeID = 5)) OR\n (ss.BarangayID = ua.BarangayID AND ss.LocationScopeID = 6)\n )\n )\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n }\n\n $results = $this->db->query($sql)->result_array();\n if (count($results)) {\n response_json(array(\n 'status' => true,\n 'data' => $results\n ));\n } else {\n response_json(array(\n 'status' => false,\n 'message' => 'No service found.'\n ));\n }\n }", "public function our_services(){\n $all_services = Service::all();\n return view('front_end.pages_frontend.our_services',compact('all_services'));\n }", "public function index()\r\n\t{\r\n\t\t$services = Service::all();\r\n\r\n\t\treturn View::make('services.index')\r\n\t\t\t->with('services', $services);\r\n\t}", "function get_servicios_web_ofrecidos()\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\titem as servicio_web,\n\t\t\t\tnombre\n\t\t\tFROM apex_item\n\t\t\tWHERE\n\t\t\t\tproyecto = '{$this->get_id()}'\n\t\t\t\tAND solicitud_tipo = 'servicio_web'\n\t\t\tORDER BY item;\n\t\t\";\n\t\treturn $this->get_db(true)->consultar($sql);\n\t}", "public function getPortfolioOptions() {\n\t\treturn array(\n \"Urban Design Portfolio\" => \"Urban Design Portfolio\",\n \"Architecture Portfolio\" => \"Architecture Portfolio\",\n \"Landscape Architecture Portfolio\" => \"Landscape Architecture Portfolio\",\n );\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function getProjects()\n {\n }", "public function all_service_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_service WHERE publication_status = 1 ORDER BY service_id DESC LIMIT 6\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function index(Request $request)\n {\n if($request->has('company_id'))\n { \n $allServices = Services::pluck('title', 'id')->toArray();\n \n $companyServices = $this->repository->model->where('company_id', $request->get('company_id'))->get();\n\n if(isset($companyServices))\n {\n $itemsOutput = $this->companyservicesTransformer->transformCompanyWithServices($companyServices, $allServices);\n\n return $this->successResponse($itemsOutput);\n }\n }\n\n return $this->setStatusCode(400)->failureResponse([\n 'message' => 'Unable to find Services!'\n ], 'No Services Found !');\n }", "public static function get_managed_solr_services() {\n\n\t\t$result = [];\n\n\t\t$result['elastic'] = [\n\t\t\tself::MANAGED_SOLR_SERVICE_SEARCH_ENGINE => WPSOLR_AbstractSearchClient::ENGINE_ELASTICSEARCH,\n\t\t\tself::MANAGED_SOLR_SERVICE_LABEL => 'Elasticsearch',\n\t\t\tself::MANAGED_SOLR_SERVICE_HOME_PAGE => 'http://www.gotosolr.com/en',\n\t\t\tself::MANAGED_SOLR_SERVICE_API_PATH => 'https://api.gotosolr.com/v1/partners/24b7729e-02dc-47d1-9c15-f1310098f93f',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_ORDER_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/71bc4b32-be17-4012-b4e9-299d47d7f86d/order-solr-index/eafe62fb-1ee1-4a64-ac33-b2b7b045feb0',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_GOOGLE_RECAPTCHA_TOKEN_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/71bc4b32-be17-4012-b4e9-299d47d7f86d/google-recaptcha-token',\n\t\t\tself::MANAGED_SOLR_SERVICE_ORDERS_URLS => [],\n\t\t];\n\n\t\t$result['gotosolr'] = [\n\t\t\tself::MANAGED_SOLR_SERVICE_SEARCH_ENGINE => WPSOLR_AbstractSearchClient::ENGINE_SOLR,\n\t\t\tself::MANAGED_SOLR_SERVICE_LABEL => 'Solr',\n\t\t\tself::MANAGED_SOLR_SERVICE_HOME_PAGE => 'http://www.gotosolr.com/en',\n\t\t\tself::MANAGED_SOLR_SERVICE_API_PATH => 'https://api.gotosolr.com/v1/partners/24b7729e-02dc-47d1-9c15-f1310098f93f',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_ORDER_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/f8622320-5a3b-48cf-a331-f52459c46573/order-solr-index/8037888b-501a-4200-9fb0-b4266434b161',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_GOOGLE_RECAPTCHA_TOKEN_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/f8622320-5a3b-48cf-a331-f52459c46573/google-recaptcha-token',\n\t\t\tself::MANAGED_SOLR_SERVICE_ORDERS_URLS => [\n\t\t\t\t[\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_BUTTON_LABEL => 'Extend the trial with a Monthly Plan',\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_TEXT => 'Monthly plan',\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_LINK => 'https://secure.avangate.com/order/checkout.php?PRODS=4653966&QTY=1&CART=1&CARD=1',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\t$result = apply_filters( WPSOLR_Events::WPSOLR_FILTER_ENV_MANAGED_SERVICES, $result );\n\n\t\treturn $result;\n\t}", "public function getList()\n {\n $service = list_services::all();\n return view('page.services',compact('service'));\n }", "public function getServices() {\n\n return $this->services;\n\n }", "public function index()\n {\n $portfolio=Portfolio::orderBy('id','DESC')->paginate(10);\n return view('backend.portfolio.index')->with('portfolios',$portfolio);\n }", "public function index()\n {\n $services = Service::with('ship')->get();\n \n return view('service.index', compact('services'));\n }", "public function index()\n {\n return $this->service->list();\n }", "public function getCasinoServices()\n {\n $query = \"SELECT ServiceID, ServiceName, Code, UserMode\n FROM ref_services WHERE ServiceID IN (8,9,10,11,12)\n AND Status = 1\";\n \n $command = $this->_connection->createCommand($query);\n $result = $command->queryRow();\n return $result;\n }", "public function index()\n\t{\n\t\t$services = $this->service->all();\n\n\t\treturn View::make('services.index', compact('services'));\n\t}", "public function index()\n {\n $portfolios = Portfolio::paginate(15);\n\n return view('admin.portfolio.index', compact('portfolios'));\n }", "public function get_projects() {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'projects',\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "function get_all_portfolios($connection, $id)\n{\n try {\n $sql = \"select companies.name, portfolio.symbol, portfolio.amount from portfolio inner join companies on portfolio.symbol = companies.symbol where portfolio.userid = ?\";\n $result = runQuery($connection, $sql, array($id));\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }", "public function index()\n {\n $services = Service::paginate(10);\n return view('admin.service.index')->withServices($services);\n }", "public function index()\n {\n $services = Services::OrderBy('sequence')->get();\n\n return view('services.list', ['services' => $services]);\n }", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "public function index()\n {\n try{\n return $this->successResponse(new AbstractCollection($this->services->getAll()));\n }catch(\\Exception $e){\n return $this->errorResponse($e->getMessage(), $e->getCode());\n }\n }", "public function services(){\n $results = DB::select('select * from services');\n return view('frontend.services')->with(['results'=>$results]);\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function index()\n {\n $dokterService = DokterService::with('dokter','profile','service')->get();\n \n $dokterServiceCount = DokterService::with('dokter','profile','service')->count(); \n\n\n return response([\n 'success' => true,\n 'message' => 'List Semua Dokter Service',\n 'count' => $dokterServiceCount,\n 'data' => $dokterService\n ], 200);\n }", "public function index()\n {\n $portfolios = Portfolio::latest()->get();\n return view('admin.portfolio.index',compact('portfolios'));\n }" ]
[ "0.6663378", "0.63943243", "0.63803375", "0.6346682", "0.6263889", "0.6236916", "0.6229605", "0.6225765", "0.61956257", "0.61586547", "0.6149168", "0.61291474", "0.61225456", "0.6086034", "0.6050953", "0.60479957", "0.60306686", "0.6021754", "0.60182136", "0.5993075", "0.5950791", "0.59300363", "0.59063566", "0.59044373", "0.5898462", "0.5896963", "0.5874321", "0.5871596", "0.5866577", "0.58580536", "0.58572245", "0.5838546", "0.58138", "0.5805734", "0.5800315", "0.5798978", "0.5793183", "0.57927203", "0.57870334", "0.57828075", "0.57777613", "0.5772928", "0.57670695", "0.57461005", "0.57434946", "0.5739478", "0.5736648", "0.5736648", "0.5736648", "0.57232237", "0.5721816", "0.5702983", "0.5700894", "0.56870866", "0.56789917", "0.56788224", "0.5673746", "0.56672823", "0.5660468", "0.5658652", "0.5657586", "0.5646934", "0.56424993", "0.56424993", "0.5641928", "0.56284285", "0.5627731", "0.5626625", "0.5617653", "0.5609318", "0.560351", "0.5602394", "0.5591219", "0.55903107", "0.5585738", "0.55728126", "0.5570695", "0.55702823", "0.5566553", "0.5565327", "0.5562185", "0.55614877", "0.5555392", "0.5554742", "0.55476934", "0.55469155", "0.5544329", "0.55423474", "0.5531561", "0.5527927", "0.5517088", "0.55116135", "0.54939157", "0.5493881", "0.54914737", "0.5491366", "0.5483071", "0.5482249", "0.54794574", "0.5469965" ]
0.6733292
0
Get services of portfolio
public function getOffers($id, $opts = []): Collection { $p = $this->findPortfolio($id); if (!$p) { return new Collection(); } if ($opts['on_main'] ?? false) { return $p->offers()->where('on_main', '=', 1)->orderBy('position_on_main')->get(); } else { return $p->offers()->orderBy('position')->get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServices($id): Collection\n {\n $p = $this->findPortfolio($id);\n return $p ? $p->services : new Collection();\n }", "public function index()\n {\n $portfolios = Portfolio::all();\n return $portfolios;\n }", "function get_services() {\n $args = [\n 'post_type' => 'newstride_services',\n 'posts_per_page' => -1,\n ];\n\n return new WP_Query( $args );\n}", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "public function getServices();", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "public function show()\n {\n $is_active = [1];\n $portfolio = (new PortfolioPerformanceService())->PortfolioData($is_active, []);\n\n return $portfolio;\n }", "public function services()\n {\n $navbar = NavBar::first();\n $servicehead = ServiceHead::first();\n $featurehead = FeatureHead::first();\n $testimonial = TestimonialHead::first();\n $servicebody = ServiceBody::all();\n $featurebody = FeatureBody::all();\n $testimonials = Testimonial::all();\n\n return view('pages.home.services' , compact('servicehead' , 'featurehead' , 'servicebody' , 'navbar' , 'featurebody' , 'testimonial' , 'testimonials'));\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function getServices() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_client', $user->id)\n\t\t\t\t->where('services_orders.status', '!=', 6)\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\t\t\n return ServicesResource::collection(Services::all());\n }", "public function listsServicesGet()\r\n {\r\n $response = Services::with('regimen')->get();\r\n return response()->json($response,200);\r\n }", "public function portfolios()\n {\n return $this->hasMany(Portfolio::class);\n }", "public function portfolios()\n {\n return $this->hasManyThrough(Portfolio::class, Profile::class);\n }", "public function getServices(): array;", "public function services(): ServicesContract;", "public function getServices(Request $request)\n {\n $company = Auth::user()->company;\n $result = $company->corpFinServices->find($request->get('id'));\n return response($result);\n\n }", "function rv_portfolio() {\r\n\t\treturn RV_Portfolio::get_instance();\r\n\t}", "function getServices() {\n $sql = 'SELECT * FROM services';\n\n $results = mysqli_query($GLOBALS['con'], $sql);\n\n if (mysqli_num_rows($results) > 0) {\n return $results;\n }\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $company = Auth::user()->company;\n $services = CorpFinService::where('company_id', $company->id)->paginate(10);//$company->corpFinServices;\n return view('CorpFIN.panel.view_service', ['company'=>$company, 'services' => $services]);\n }", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "public function services(){\n $data = array(\n 'title' => 'Services',\n 'services' => ['Tellen', 'Quality', 'Habitat']\n );\n return view('pages.services')->with($data);\n }", "public function services()\n {\n \t\t//$services = $data->get_services();\n \t\t//dd($cities->ZA);\n \t\t$services = KitApi::get_services();\n \t\treturn view('services', compact('services'));\n }", "public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function list()\n {\n $portfolios= Portfolio::all();\n return view('pages.portfolios.list', compact('portfolios'));\n }", "public static function all()\n\t{\n\t\t$portfolios = ORM::factory('portfolio')->where('deleted', '=', '')->find_all();\n\n\t\treturn $portfolios;\n\n\t}", "public function getServices()\n {\n $services = OurService::select('id','title','slug','description','image')\n ->where('status','=',\\DB::raw(1))\n ->take(4)\n ->get();\n if($services->count()) {\n return $services;\n }\n\n return false;\n }", "public function index()\n\t{\n\n//\t\t$selected = $this->getSelectedServices();\n//\n//\t\t$services = [];\n//\t\t$service_cats = ServiceCategories::where('parent_id', 0)->with('childs.services')->get();\n//\n//\t\t$service_cats->each(function ($categoryData) use (&$services, $selected) {\n//\t\t\t$sub_result = [];\n//\t\t\t$categoryData->childs()->each(function ($subCatData) use (&$sub_result, $selected) {\n//\t\t\t\t$sub_result[$subCatData->name] = [\n//\t\t\t\t\t'is_extra' => !!$subCatData->is_extra,\n//\t\t\t\t\t'name' => $subCatData->name,\n//\t\t\t\t\t'data' => []\n//\t\t\t\t];\n//\n//\t\t\t\t$t = [];\n//\t\t\t\t$subCatData->services()->each(function ($serviceData) use ($subCatData, &$sub_result, $selected) {\n//\t\t\t\t\t$sub_result[$subCatData->name]['data'][] = [\n//\t\t\t\t\t\t'id' => (string)$serviceData->id,\n//\t\t\t\t\t\t'name' => $serviceData->name,\n//\t\t\t\t\t\t'limit' => $serviceData->limit,\n//\t\t\t\t\t\t'prices_number' => $serviceData->prices_number,\n//\t\t\t\t\t\t'sub' => $serviceData->subs()->get(),\n//\t\t\t\t\t\t'my_price' => collect($selected->where('id', $serviceData->id)->first())->only(['pivot'])->first()\n//\t\t\t\t\t];\n//\t\t\t\t});\n//\n//\t\t\t});\n//\t\t\t$services[] = [\n//\t\t\t\t'id' => (string)$categoryData->id,\n//\t\t\t\t'text' => $categoryData->name,\n//\t\t\t\t'additional' => $sub_result\n//\t\t\t];\n//\t\t});\n\n\t\t$services = $this->loadServicesData();\n\n\t\treturn view('admin.services.index', compact('services'));\n\n\t}", "public function findServices(): array;", "public function index()\n {\n return view('Portfolio.index')->with('portfolios',Portfolio::all());\n }", "public function getProjects();", "public function getServicesCourier() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_courier', $user->id)\n\t\t\t\t->whereIn('services_orders.status', array(\"2\",\"3\"))\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function index()\n {\n return Service::all();\n }", "public function index()\n {\n \t$services = Service::all()\n \t\t->pluck('name','id')\n \t\t;\n \n \t$serviceRequests = ServiceRequest::where('progress','PENDING')\n ->with('basicData')\n ->with('service')\n ->get()\n ;\n // dump($serviceRequests);die;\n $pendingPlates = array();\n $firstPlate = null;\n foreach($serviceRequests as $serviceRequest) {\n if($serviceRequest->basicData) {\n if(!$firstPlate){\n $firstPlate = $serviceRequest->basicData->plate;\n }\n $pendingPlates[$serviceRequest->basicData->plate] = $serviceRequest->basicData->plate;\n }\n }\n \n // $firstRequests = ServiceRequest::where('progress','PENDING')\n // ->where('basicData.plate',$firstPlate)\n // ->pluck('service.name','service.id')\n // ;\n // dump($serviceRequests);die;\n \n return view('pages.frontend.index')\n \t->with('services',$services)\n ->with('pendingPlates',$pendingPlates)\n \t;\n }", "public function index()\n\t{\n\t\t$this->our_services();\n\t}", "public function getServices()\n\t{\n\t\t$senddata= array();\n\t\t$finalsenddata= array();\n\t\t$services = Contactuspage::get()->toArray();\n\t\tforeach($services as $key=>$service)\n\t\t{\n\t\t\t$senddata['id'] \t\t\t= $service['id'];\n\t\t\t$senddata['title'] \t\t\t= $service['title'];\n\t\t\t$senddata['content'] \t\t= $service['content'];\n\t\t\tarray_push($finalsenddata,$senddata);\n\t\t}\n\t\t$siteSettings = SiteSettings::find(1)->toArray();\n\t\t$data['status'] = 1;\n\t\t$data['msg'] = 'Successfull.';\n\t\t$data['heading_text'] = $siteSettings['service_header'];\n\t\t$data['data'] = $finalsenddata;\n\t\techo json_encode($data);\n\t}", "public function services()\n {\n return $this->belongsToMany(Service::class)\n ->withPivot(['price', 'discount_price', 'laundry_price']);\n }", "function getPortfolio($rows = null, $page = 0, $limit_uris = false, $sort='date', $published_only=true)\n\t{\n\t\t$qStr = \"SELECT p.*, GROUP_CONCAT(t.name SEPARATOR ', ') AS tools\n\t\t\t\tFROM portfolio p\n\t\t\t\t\tLEFT JOIN portfolio_tools pt ON p.id=pt.portfolio_id\n\t\t\t\t\tLEFT JOIN tools t ON pt.tool_id=t.id\";\n\t\t\n\t\tif ($limit_uris || $published_only) {\n\t\t\t$qStr .= \" WHERE \";\n\t\t\t$onedone = false;\n\t\t\t\n\t\t\tif ($limit_uris) {\n\t\t\t\t$qStr .= \" (p.uri!='' OR p.uri IS NOT NULL)\";\n\t\t\t\t$onedone = true;\n\t\t\t}\n\t\t\t\n\t\t\tif ($published_only) {\n\t\t\t\t$qStr .= $onedone ? ' AND ' : '';\n\t\t\t\t$qStr .= \" p.published=1\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$qStr .= \" GROUP BY p.id\";\n\t\t$qStr .= \" ORDER BY p.time DESC\";\n\t\t\n\t\tif (!is_null($rows)) {\n\t\t\t$page = intval($page);\n\t\t\t$page = $page <= 1 ? 0 : $page - 1;\n\t\t\t\n\t\t\t$qStr .= \" LIMIT \".intval($page).\", \".intval($rows);\n\t\t}\n\t\t\n\t\t$q = $this->db->query($qStr);\n\t\t\n\t\tif ($q->num_rows() > 0)\n\t\t\treturn array('success'=>true, 'items'=>$q->result_array());\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"No items found\");\n\t}", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public static function select_all_our_services()\n {\n $query = new Query;\n $services = $query->select(['core_products.*','core_product_categories.category_name','core_product_sub_categories.sub_category_name', 'core_product_models.model_name','core_product_categories.metric AS metric','core_product_images.*'])\n ->from('core_products')\n ->leftJoin('core_product_categories', 'core_product_categories.category_id=core_products.category_id')\n ->leftJoin('core_product_sub_categories', 'core_product_sub_categories.sub_category_id=core_products.sub_category_id')\n ->leftJoin('core_product_models', 'core_product_models.model_id=core_products.model_id')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id')\n ->orderBy(['core_products.product_id' => SORT_DESC])\n ->groupBy('core_products.product_id')\n ->where(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->all();\n return $services;\n }", "protected function getServices()\n {\n return $this->services;\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function index()\n {\n\n return view('smmpro::services.index', [\n 'services' => Service::orderBy('created_at', 'desc')->get()\n ]);\n }", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function index()\n {\n $services = Service::select('id', 'name', 'price')->paginate(10);\n return view('adminlte.services.index', ['data' => $services]);\n }", "public function get()\n {\n // 27 para medimas \n // 17 para ecoopsos \n $queryString = '{\"MaxResults\":0,\"MatchAll\":true,\"IPSIDs\":[],\"SiteID\":null,\"EPSID\":17,\"Regime\":null}';\n return $this->performRequest('GET', '/service/ContractService.svc/contract?', $queryString);\n }", "public function index()\n {\n $services = services::all();\n return view('widegts::services.index',compact('services'));\n }", "public function index()\n {\n return ServiceResource::collection(Service::all());\n }", "private function getServiceSearchData( $text, $isHtmlReturn = true ) {\n\t\t$list = '';\n\t\t$services = Service::where( \"title\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"subtitle\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"short_description\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"description\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"features\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->orWhere( \"extra\", \"like\", \"%\" . $text . \"%\" )\n\t\t ->paginate( config( \"constant.smPagination\" ) );\n\t\tif ( $isHtmlReturn ) {\n\t\t\tif ( count( $services ) > 0 ) {\n\t\t\t\tforeach ( $services as $service ) {\n\t\t\t\t\t$list .= '<a class=\"list-group-item\" target=\"_blank\" href=\"' . url( 'services/' . $service->slug ) . '\">';\n\t\t\t\t\tif ( $service->image != '' ) {\n\t\t\t\t\t\t$list .= '<img src=\"' . SM::sm_get_the_src( $service->image, 80, 80 ) . '\" alt=\"' . $service->title . '\">';\n\t\t\t\t\t}\n\t\t\t\t\t$list .= $service->title;\n\t\t\t\t\t$list .= '</a>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $list;\n\t\t} else {\n\t\t\treturn $services;\n\t\t}\n\t}", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public function getServices() {\n $services = Service::active()->get()->toArray();\n $outputArray = array();\n if ($services) {\n foreach ($services as $key => $value) {\n $begin = new DateTime($value['start_date']);\n $end = new DateTime($value['end_date']);\n if ($value['service_type'] == 'daily') {\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#605ca8\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n if ($value['service_type'] == 'weekly') {\n\n $schedule = Schedule::where('service_id', $value['id'])->get()->toArray();\n\n $weekNumber = array();\n for ($i = 0; $i < count($schedule); $i++) {\n $weekNumber[] = $schedule[$i]['week_number'];\n }\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n if (in_array($dt->format(\"w\"), $weekNumber)) {\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#f012be\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n\n if ($value['service_type'] == 'monthly') {\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#00a65a\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n\n if ($value['service_type'] == 'yearly') {\n $interval = DateInterval::createFromDateString('1 year');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"orange\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n }\n// echo \"<pre>\";\n// print_r($outputArray);\n// echo \"</pre>\";\n echo json_encode($outputArray);\n }", "public function services()\n {\n $comptes = compte::all();\n return view('pages.services')->with('comptes',$comptes);//->with($data);\n }", "public function index()\n {\n $profileId = isset(auth()->user()->profile) ? auth()->user()->profile->id : 0;\n $portfolios = Portfolio::where('profile_id', $profileId)->orderBy('created_at', 'desc')->paginate(8);\n return view('admin.portfolio.index', compact('portfolios'));\n }", "public function myservices_get()\n {\n\n $em = $this->doctrine->em;\n\n $user = $this->getCurrentUser();\n if($user){\n $relacion = $user->getServices()->toArray();\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"data\"] = array();\n /** @var \\Entities\\Service $service */\n foreach ($relacion as $service) {\n $service->loadRelatedData($user, null, site_url());\n $service->loadRelatedUserData($user);\n $result[\"data\"][] = $service;\n }\n $result[\"data\"] = $relacion;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }else{\n $result[\"desc\"] = \"Listado de los servicios creados por el usuario\";\n $result[\"error\"] = \"debe autenticarse\";\n $this->set_response($result, REST_Controller::HTTP_UNAUTHORIZED);\n }\n }", "public function index()\n {\n \n $all_servive = Services::all();\n return view('all_service')->with('services', $all_servive);\n }", "public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }", "public function getOurServices()\n {\n $data = HomeController::getPage('our-services');\n return view('our_services')->with(['data' => $data]);\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }", "public function index()\n {\n $Services = Service::all();\n return view('pagesystem.Service.index', compact('Services'));\n }", "public function index()\n {\n return $this->service->all();\n }", "function get_services($username) {\n\t\t$conn = db_connect();\n\t\t$result = $conn->query(\"select id,photo,service_name from services\");\n\t\tif (!$result)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//create an array of the services\n\t\t$url_array = array();\n\t\tfor ($count = 1; $row = $result->fetch_row(); ++$count) {\n\t\t\t$url_array[$count][0] = $row[0];\n\t\t\t$url_array[$count][1] = $row[1];\n\t\t\t$url_array[$count][2] = $row[2];\t\n\t\t}\n\t\treturn $url_array;\n\t}", "public static function getServices($user=null) {\n\t\tif ($user!=null)\t$portlist=$user->getRol()->getServices();\n\t\telse \t\t\t\t\t$portlist=$this->getDoctrine()->getRepository(Service::class)->findAll();\n\t\t$data=array(\"total\"=>count($portlist),\"rows\"=>array());\n\t\tforeach($portlist as $port) {\n\t\t\t$row=array(\"id\"=>$port->getId(), \"port\"=>$port->getPort(), \"name\"=>$port->getName());\n\t\t\t$data[\"rows\"][]=$row;\n\t\t}\n\t\treturn $data;\n\t}", "public function index()\n {\n $services = Service::all();\n\n $transformedData = \\Fractal::collection($services, new ServiceTransformer())->toArray();\n\n return $this->responder->respond($transformedData);\n }", "public function get_trending_services()\n {\n if (isGuest()) {\n // only get national\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.LocationScopeID = 1\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n } else {\n $userID = current_user();\n $sql = \"SELECT ss.id,ss.Code,ss.Name,COUNT(sa.id) AS Applications FROM Service_Services ss\n JOIN UserAccountInformation ua ON (\n ua.id = {$userID} AND (\n (ss.LocationScopeID = 1) OR\n (ss.RegionalID = ua.RegionalID AND ss.LocationScopeID = 2) OR \n (ss.ProvincialID = ua.ProvincialID AND ss.LocationScopeID = 3) OR\n (ss.MunicipalityCityID = ua.MunicipalityCityID AND (ss.LocationScopeID = 4 OR ss.LocationScopeID = 5)) OR\n (ss.BarangayID = ua.BarangayID AND ss.LocationScopeID = 6)\n )\n )\n LEFT OUTER JOIN Service_Applications sa ON sa.ServiceID = ss.id\n WHERE ss.deletedAt IS NULL\n AND ss.Status = 1\n AND ss.InOrganization = 0\n GROUP BY ss.id\n ORDER BY Applications DESC\n LIMIT 10\";\n }\n\n $results = $this->db->query($sql)->result_array();\n if (count($results)) {\n response_json(array(\n 'status' => true,\n 'data' => $results\n ));\n } else {\n response_json(array(\n 'status' => false,\n 'message' => 'No service found.'\n ));\n }\n }", "public function our_services(){\n $all_services = Service::all();\n return view('front_end.pages_frontend.our_services',compact('all_services'));\n }", "public function index()\r\n\t{\r\n\t\t$services = Service::all();\r\n\r\n\t\treturn View::make('services.index')\r\n\t\t\t->with('services', $services);\r\n\t}", "function get_servicios_web_ofrecidos()\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\titem as servicio_web,\n\t\t\t\tnombre\n\t\t\tFROM apex_item\n\t\t\tWHERE\n\t\t\t\tproyecto = '{$this->get_id()}'\n\t\t\t\tAND solicitud_tipo = 'servicio_web'\n\t\t\tORDER BY item;\n\t\t\";\n\t\treturn $this->get_db(true)->consultar($sql);\n\t}", "public function getPortfolioOptions() {\n\t\treturn array(\n \"Urban Design Portfolio\" => \"Urban Design Portfolio\",\n \"Architecture Portfolio\" => \"Architecture Portfolio\",\n \"Landscape Architecture Portfolio\" => \"Landscape Architecture Portfolio\",\n );\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function all_service_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_service WHERE publication_status = 1 ORDER BY service_id DESC LIMIT 6\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function getProjects()\n {\n }", "public function index(Request $request)\n {\n if($request->has('company_id'))\n { \n $allServices = Services::pluck('title', 'id')->toArray();\n \n $companyServices = $this->repository->model->where('company_id', $request->get('company_id'))->get();\n\n if(isset($companyServices))\n {\n $itemsOutput = $this->companyservicesTransformer->transformCompanyWithServices($companyServices, $allServices);\n\n return $this->successResponse($itemsOutput);\n }\n }\n\n return $this->setStatusCode(400)->failureResponse([\n 'message' => 'Unable to find Services!'\n ], 'No Services Found !');\n }", "public static function get_managed_solr_services() {\n\n\t\t$result = [];\n\n\t\t$result['elastic'] = [\n\t\t\tself::MANAGED_SOLR_SERVICE_SEARCH_ENGINE => WPSOLR_AbstractSearchClient::ENGINE_ELASTICSEARCH,\n\t\t\tself::MANAGED_SOLR_SERVICE_LABEL => 'Elasticsearch',\n\t\t\tself::MANAGED_SOLR_SERVICE_HOME_PAGE => 'http://www.gotosolr.com/en',\n\t\t\tself::MANAGED_SOLR_SERVICE_API_PATH => 'https://api.gotosolr.com/v1/partners/24b7729e-02dc-47d1-9c15-f1310098f93f',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_ORDER_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/71bc4b32-be17-4012-b4e9-299d47d7f86d/order-solr-index/eafe62fb-1ee1-4a64-ac33-b2b7b045feb0',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_GOOGLE_RECAPTCHA_TOKEN_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/71bc4b32-be17-4012-b4e9-299d47d7f86d/google-recaptcha-token',\n\t\t\tself::MANAGED_SOLR_SERVICE_ORDERS_URLS => [],\n\t\t];\n\n\t\t$result['gotosolr'] = [\n\t\t\tself::MANAGED_SOLR_SERVICE_SEARCH_ENGINE => WPSOLR_AbstractSearchClient::ENGINE_SOLR,\n\t\t\tself::MANAGED_SOLR_SERVICE_LABEL => 'Solr',\n\t\t\tself::MANAGED_SOLR_SERVICE_HOME_PAGE => 'http://www.gotosolr.com/en',\n\t\t\tself::MANAGED_SOLR_SERVICE_API_PATH => 'https://api.gotosolr.com/v1/partners/24b7729e-02dc-47d1-9c15-f1310098f93f',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_ORDER_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/f8622320-5a3b-48cf-a331-f52459c46573/order-solr-index/8037888b-501a-4200-9fb0-b4266434b161',\n\t\t\tself::MANAGED_SOLR_SERVICE_CHANNEL_GOOGLE_RECAPTCHA_TOKEN_URL => 'https://api.gotosolr.com/v1/providers/8c25d2d6-54ae-4ff6-a478-e2c03f1e08a4/accounts/24b7729e-02dc-47d1-9c15-f1310098f93f/addons/f8622320-5a3b-48cf-a331-f52459c46573/google-recaptcha-token',\n\t\t\tself::MANAGED_SOLR_SERVICE_ORDERS_URLS => [\n\t\t\t\t[\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_BUTTON_LABEL => 'Extend the trial with a Monthly Plan',\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_TEXT => 'Monthly plan',\n\t\t\t\t\tself::MANAGED_SOLR_SERVICE_ORDER_URL_LINK => 'https://secure.avangate.com/order/checkout.php?PRODS=4653966&QTY=1&CART=1&CARD=1',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\t$result = apply_filters( WPSOLR_Events::WPSOLR_FILTER_ENV_MANAGED_SERVICES, $result );\n\n\t\treturn $result;\n\t}", "public function getList()\n {\n $service = list_services::all();\n return view('page.services',compact('service'));\n }", "public function getServices() {\n\n return $this->services;\n\n }", "public function index()\n {\n $services = Service::with('ship')->get();\n \n return view('service.index', compact('services'));\n }", "public function index()\n {\n $portfolio=Portfolio::orderBy('id','DESC')->paginate(10);\n return view('backend.portfolio.index')->with('portfolios',$portfolio);\n }", "public function index()\n {\n return $this->service->list();\n }", "public function getCasinoServices()\n {\n $query = \"SELECT ServiceID, ServiceName, Code, UserMode\n FROM ref_services WHERE ServiceID IN (8,9,10,11,12)\n AND Status = 1\";\n \n $command = $this->_connection->createCommand($query);\n $result = $command->queryRow();\n return $result;\n }", "public function index()\n\t{\n\t\t$services = $this->service->all();\n\n\t\treturn View::make('services.index', compact('services'));\n\t}", "public function index()\n {\n $portfolios = Portfolio::paginate(15);\n\n return view('admin.portfolio.index', compact('portfolios'));\n }", "public function get_projects() {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'projects',\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "function get_all_portfolios($connection, $id)\n{\n try {\n $sql = \"select companies.name, portfolio.symbol, portfolio.amount from portfolio inner join companies on portfolio.symbol = companies.symbol where portfolio.userid = ?\";\n $result = runQuery($connection, $sql, array($id));\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }", "public function index()\n {\n $services = Services::OrderBy('sequence')->get();\n\n return view('services.list', ['services' => $services]);\n }", "public function index()\n {\n $services = Service::paginate(10);\n return view('admin.service.index')->withServices($services);\n }", "public function index()\n {\n try{\n return $this->successResponse(new AbstractCollection($this->services->getAll()));\n }catch(\\Exception $e){\n return $this->errorResponse($e->getMessage(), $e->getCode());\n }\n }", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "public function services(){\n $results = DB::select('select * from services');\n return view('frontend.services')->with(['results'=>$results]);\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function index()\n {\n $dokterService = DokterService::with('dokter','profile','service')->get();\n \n $dokterServiceCount = DokterService::with('dokter','profile','service')->count(); \n\n\n return response([\n 'success' => true,\n 'message' => 'List Semua Dokter Service',\n 'count' => $dokterServiceCount,\n 'data' => $dokterService\n ], 200);\n }", "public function index()\n {\n $portfolios = Portfolio::latest()->get();\n return view('admin.portfolio.index',compact('portfolios'));\n }" ]
[ "0.67343265", "0.66632485", "0.63946223", "0.63810533", "0.63475645", "0.62655604", "0.623724", "0.6228836", "0.6226604", "0.6197099", "0.6159382", "0.6149497", "0.61299074", "0.612249", "0.60856485", "0.60518104", "0.6048856", "0.6031884", "0.60197073", "0.60193104", "0.5993524", "0.59510726", "0.593152", "0.59075147", "0.5905358", "0.5900078", "0.58976686", "0.58746004", "0.5871944", "0.58670247", "0.58584964", "0.5858154", "0.58386075", "0.581299", "0.58062315", "0.5800761", "0.5799068", "0.5793981", "0.57935834", "0.57875305", "0.5782223", "0.5779068", "0.5773478", "0.57678694", "0.5747333", "0.57445735", "0.5740993", "0.5737598", "0.5737598", "0.5737598", "0.5723093", "0.57229614", "0.5704177", "0.57012516", "0.5687542", "0.56793994", "0.56793225", "0.56743413", "0.5667327", "0.5660589", "0.56593627", "0.5658287", "0.5647381", "0.5643431", "0.5643431", "0.5643094", "0.5629086", "0.5628355", "0.56264704", "0.5618967", "0.5609418", "0.56042373", "0.5603419", "0.559224", "0.55904555", "0.5585191", "0.5574639", "0.5570615", "0.55695355", "0.5567018", "0.5565644", "0.5562987", "0.55624306", "0.55555606", "0.5555069", "0.5547917", "0.5547656", "0.5545429", "0.55427", "0.55311704", "0.55282617", "0.5518278", "0.5511668", "0.54949754", "0.54948956", "0.54912895", "0.5490145", "0.5484062", "0.5482509", "0.5479809", "0.54701793" ]
0.0
-1
Get testimonials of portfolio
public function getTestimonials($id): Collection { $p = $this->findPortfolio($id); return $p ? $p->testimonials : new Collection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTestimonials($NumberOfTestimonial) {\n\t\tglobal $post;\n\t\t$args = array(\n\t\t\t'post_type' => 'testimonials',\n\t\t\t'showposts' => $NumberOfTestimonial,\n\t\t\t);\n\n\t\t$tlistings = new WP_Query( $args );\n\n\t\tif ( $tlistings->have_posts() ) {\n\t\t\techo '<ul class=\"widget_testimonials\">';\n\n\t\t\twhile ( $tlistings->have_posts() ) {\n\t\t\t\t$tlistings->the_post();\n // get current value\n $current_author_name = get_post_meta( $post->ID, '_testimonial_author_name', true );\n $current_author_title = get_post_meta( $post->ID, '_testimonial_author_title', true );\n $current_author_company = get_post_meta( $post->ID, '_testimonial_author_company', true );\n $current_author_location = get_post_meta( $post->ID, '_testimonial_author_location', true );\n\t\t\t\techo '<li>';\n\t\t\t\techo '<blockquote>' . get_the_excerpt(). '</blockquote>';\n echo '<h4>' . $current_author_name. '</strong></h4>';\n echo '<p>' . $current_author_title. ', ' . $current_author_company. ', ' . $current_author_location. '</p>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\n add_action('wp_footer','upward_spiral_sidebar_testimonials_config');\n\t\t}\n\t\telse {\n\t\t\techo '<p>No Testimonial yet</p>';\n\n\t\t}\n\n\t\t//* NOW WE NEED TO RESET WP POST DATA\n\t\twp_reset_postdata();\n\n\t// END OF getTestimonials\n\t}", "function gymchamps_testimonials_list() { ?>\n\n <!-- --- hello from queries.php --- -->\n <ul class=\"testimonials-list\">\n\n <?php \n // method for querying the data from \"Testimonials\" post type in gym_post_types.php in Plugins folder\n $args = array(\n // if 'posts_type' = queried from blogs = HEADACHE\n 'post_type' => 'testimonials', // testimonial name located at gym_post_type.php\n 'posts_per_page' => 10\n );\n\n $testimonials = new WP_Query($args);\n while( $testimonials->have_posts() ): $testimonials->the_post(); ?>\n \n\n <li class=\"testimonial text-center\">\n <blockquote>\n <?php the_content(); ?>\n </blockquote>\n\n <footer class=\"testimonial-footer\">\n <?php the_post_thumbnail('thumbnail'); ?>\n <p><?php the_title(); ?></p>\n </footer>\n </li>\n\n <?php endwhile; wp_reset_postdata(); ?>\n </ul>\n\n<?php }", "public function index()\n {\n $testimonials = Testimonial::latest()->get();\n return $testimonials;\n }", "public function getTestimonial(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$testimonials = Testimonial::where('status', '=', 1)->take(10)->get();\n\t\t\n\t\treturn response($testimonials);\n\t}", "public function testimonials()\n {\n return $this->hasMany('App\\Modules\\Models\\Testimonial');\n }", "public function testimonials()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Testimonials')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/testimonials');\n }", "function query_testimonials() {\r\n\t\r\n\t// global $query;\r\n\t$args = array(\r\n\t 'post_type' => 'post',\r\n\t'category_name' => 'testimonial',\r\n\t 'order' => 'ASC'\r\n\t);\r\n\tquery_posts($args);\t\r\n}", "function testimonials()\n {\n $setGetModuleID = filter_input(INPUT_GET, 'moduleID');\n $setPostModuleID = filter_input(INPUT_POST, 'moduleID');\n $localAction = null;\n if (isset($setPostModuleID)) {\n $localAction = $setPostModuleID;\n } elseif (isset($setGetModuleID)) {\n $localAction = urldecode($setGetModuleID);\n }\n\n Switch (strtoupper($localAction)) {\n case \"ACTIVATEMODULE\" :\n activeModule();\n break;\n case \"DEACTIVATEMODULE\" :\n deactivateModule();\n break;\n default :\n $this->listTestimonials();\n }\n }", "function testimonials_shortcode(){\n\n global $post;\n $args = array(\n 'post_type' =>'testimonials',\n 'numberposts' => '-1',\n );\n $testimonials = get_posts($args);\n\n $count=0;\n foreach($testimonials as $post) : setup_postdata($post);\n $count++;\n\n $output = '<div class=\"testimonial-item one-third';\n \tif($count == '3') { echo 'column-last'; } \n $output .= '\"><div class=\"testimonial\">' .get_the_content(). '</div><!-- /testimonial -->';\n $output .= '<div class=\"testimonial-author\">' .get_the_title(). '</div></div><!-- /testimonial-item -->';\n if($count == '3') { \n \t$output .= '<div class=\"clear\"></div>'; \n $count=0; \n } \n endforeach; \n wp_reset_postdata();\n\n return $output;\n }", "function ariana_services_get_html($data){\n\t$args = array(\n\t\t\"post_type\" => \"ariana-services\",\n\t\t\"order\" => \"ASC\",\n\t\t\"orderby\" => \"menu_order\",\n\t\t\"numberposts\" => -1\n\t);\n\n\tif( isset( $data['rand'] ) && $data['rand'] == true ) {\n\t\t$args['orderby'] = 'rand';\n\t}\n\tif( isset( $data['max'] ) ) {\n\t\t$args['numberposts'] = (int) $data['max'];\n\t}\n if( isset( $data['mode'] ) ) {\n\t\t$theme_mode = $data['mode'];\n\t}else{\n $theme_mode = 'default';\n }\n\n\t//getting all testimonials\n\t$posts = get_posts($args);\n\n\t\tforeach($posts as $post){\n\t\t\t//getting thumb image\n\t\t\t$url_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium');\n\t\t\t$img_markup = '';\n\t\t\tif (!empty($url_thumb)){\n\t\t\t\t$img_markup = '<img src=\"' . $url_thumb[0] . '\" alt=\"' . $post->post_title . '\" class=\"img-responsive\">';\n\t\t\t}else{\n\t\t\t\t$img_markup = '<img src=\"' . ARIANA_WIDGETS_ASSETS_DIR . 'img/post-default.png\" alt=\"' . $post->post_title . '\" class=\"img-responsive\">';\n\t\t\t}\n\n if ( $theme_mode == 'carousel' ):\n echo '<div class=\"item\">';\n echo '<div class=\"item-image\">';\n echo $img_markup;\n echo '</div><!-- end item-image -->';\n echo '<div class=\"item-desc\">';\n echo '<h4><a href=\"' . get_the_permalink($post->ID) . '\" title=\"' . $post->post_title . '\">' . $post->post_title . '</a></h4>';\n // echo '<p>Starting from $50.00</p>';\n echo '</div><!-- end item-desc -->';\n echo '</div><!-- end item -->';\n elseif ( $theme_mode == 'homebox' ):\n\t\t\t\t$post_home_subtitle = get_post_meta( $post->ID, 'post_home_subtitle', true );\n\t\t\t\techo '<div class=\"col-md-3 col-sm-12\">';\n\t\t\t\techo \t\t'<div class=\"item mb-30\">';\n echo \t'<div class=\"item-image\">';\n\t\t\t\techo \t\t\t\t'<a href=\"' . get_the_permalink($post->ID) . '\" title=\"' . $post->post_title . '\">';\n echo \t\t$img_markup;\n\t\t\t\techo \t\t\t\t'</a>';\n echo \t'</div><!-- end item-image -->';\n echo \t'<div class=\"item-desc\">';\n echo \t'<h4><a href=\"' . get_the_permalink($post->ID) . '\" title=\"' . $post->post_title . '\">' . $post->post_title . '</a></h4>';\n echo \t( $post_home_subtitle != '' ) ? '<p>' . $post_home_subtitle . '</p>' : '';\n echo \t'</div><!-- end item-desc -->';\n echo \t\t'</div><!-- end item -->';\n\t\t\t\techo '</div><!-- end col -->';\n\t\t\telse:\n\t\t\t\t$post_home_subtitle = get_post_meta( $post->ID, 'post_home_subtitle', true );\n echo '<div class=\"col-md-3 col-sm-6\">';\n echo '<div class=\"item\">';\n echo '<div class=\"item-image\">';\n echo $img_markup;\n echo '<span class=\"item-icon\"><a href=\"' . get_the_permalink( $post->ID ) . '\"><i class=\"fa fa-link\"></i></a></span>';\n echo '</div><!-- end item-image -->';\n echo '<div class=\"item-desc text-center\">';\n echo '<h4><a href=\"' . get_the_permalink( $post->ID ) . '\" title=\"' . $post->post_title . '\">' . $post->post_title . '</a></h4>';\n echo ( $post_home_subtitle != '' ) ? '<h5><a href=\"' . get_the_permalink( $post->ID ) . '\" title=\"' . $post->post_title . '\">' . $post_home_subtitle . '</a></h5>' : '';\n // echo '<p>' . $post->post_excerpt . '</p>';\n echo '</div><!-- end service-desc -->';\n echo '</div><!-- end seo-item -->';\n echo '</div><!-- end col -->';\n endif;\n\n\t\t}\n}", "public function index()\n {\n save_resource_url();\n\n return $this->view('titan::testimonials.index')->with('items', Testimonial::all());\n }", "function testimonial_shortcode( $atts ) {\n\textract( shortcode_atts( array(\n\t\t'posts_per_page' => '1',\n\t\t'orderby' => 'none',\n\t\t'testimonial_id' => '',\n\t\t'owlc_opts' => '',\n\t), $atts ) );\n\n\treturn get_testimonial( $posts_per_page, $orderby, $testimonial_id, $owlc_opts);\n}", "public function viewTestimonial() {\n $data = $this->common_model->commonFunction();\n $data['arr_tetimonials'] = $this->common_model->getRecords('mst_testimonial', '', array('status' => 'Active'), array('updated_date', 'desc'));\n $this->load->view('front/testimonial', $data);\n }", "public function testimonial(){\n\tif ($this->session->userdata('logged_in')){\n\t\t$data['title'] = 'Testimonial';\n\t\t$data['testimonialsList'] = $this->common_model->get_all('fr_testimonial', '');\n\t\t$this->set_layout('testimonial/testimonial_list',$data);\n\t}else{\n\t\t$this->load->view('site/login');\n\t}\n}", "function testimonial_init()\r\r\n{\r\r\n\tregister_post_type(\r\r\n\t\t'testimonial',\r\r\n\t\tarray(\r\r\n\t\t\t'labels' => array(\r\r\n\t\t\t\t'name' => 'Testimonials',\r\r\n\t\t\t\t'singular_name' => 'Testimonial',\r\r\n\t\t\t\t'add_new_item' => 'Add new Testimonial',\r\r\n\t\t\t\t'new_item_name' => 'New Testimonial',\r\r\n\t\t\t\t'parent_item' => 'Parent Testimonial',\r\r\n\t\t\t\t'search_items' => 'Search Testimonials',\r\r\n\t\t\t\t'update_item' => 'Update Testimonial',\r\r\n\t\t\t\t'add_or_remote_items' => 'Add or remove Testimonials'\r\r\n\t\t\t\t),\r\r\n\t\t\t'public' => true,\r\r\n\t\t\t'capability_type' => 'post',\t// TODO: Customize at site level, replace \"post\" with \"testimonial\"\r\r\n\t\t\t'hierarchical' => false,\r\r\n\t\t\t'rewrite' => false,\t\t// FH:NOTE:JRB:20110728 -- disabled rewrite for older version of wordpress; shouldn't be necessary anyway\r\r\n\t\t\t'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'thumbnail')\r\r\n\t\t)\r\r\n\t);\r\r\n\r\r\n\tregister_capabilities_testimonials('testimonial');\r\r\n\r\r\n\tif(function_exists(\"slt_cf_register_box\"))\r\r\n\t{\r\r\n\t\tslt_cf_register_box(array(\r\r\n\t\t\t'type' => 'post',\r\r\n\t\t\t'id' => 'sltcf_testimonials',\r\r\n\t\t\t'title' => 'Testimonial Details',\r\r\n\t\t\t'fields' => array(\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'name' => 'attribution',\r\r\n\t\t\t\t\t'label' => 'Attribution',\r\r\n\t\t\t\t\t'description' => 'Who is the testimony \"attributed to?\"',\r\r\n\t\t\t\t\t'scope' => array('testimonial'),\r\r\n\t\t\t\t\t'type' => 'text'\r\r\n\t\t\t\t),\t\t\t\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'name' => 'attribution_location',\r\r\n\t\t\t\t\t'label' => 'Location',\r\r\n\t\t\t\t\t'description' => 'Location of person giving testimony',\r\r\n\t\t\t\t\t'scope' => array('testimonial'),\r\r\n\t\t\t\t\t'type' => 'text'\r\r\n\t\t\t\t)\r\r\n\t\t\t)\r\r\n\t\t));\r\r\n\r\r\n\t\tslt_cf_register_box(array(\r\r\n\t\t\t'type' => 'post',\r\r\n\t\t\t'id' => 'sltcf_testimonial_selection',\r\r\n\t\t\t'title' => 'Testimonial Selection',\r\r\n\t\t\t'description' => 'Allows for post- or page-level override of default \"random\" behavior.',\r\r\n\t\t\t'fields' => array(\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'name' => 'testimonial_override',\r\r\n\t\t\t\t\t'label' => 'Testimonial Selection',\r\r\n\t\t\t\t\t'description' => 'Allows for selection of a specific testimonial (default is random)',\r\r\n\t\t\t\t\t'scope' => array(\"page\"),\t// NOTE: This might need to be modified per-site\r\r\n\t\t\t\t\t'type' => 'select',\r\r\n\t\t\t\t\t'options_type' => 'posts',\r\r\n\t\t\t\t\t'options_query' => array(\r\r\n\t\t\t\t\t\t'post_type' => 'testimonial',\r\r\n\t\t\t\t\t\t'post_status' => 'publish',\r\r\n\t\t\t\t\t\t'posts_per_page' => -1,\r\r\n\t\t\t\t\t\t'orderby' => 'title',\r\r\n\t\t\t\t\t\t'order' => 'ASC'\r\r\n\t\t\t\t\t)\r\r\n\t\t\t\t),\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'name' => 'testimonial_negate',\r\r\n\t\t\t\t\t'label' => 'Hide Testimonials',\r\r\n\t\t\t\t\t'description' => 'Set if this page should not display any testimonials in widgets (default is to hide testimonial)',\r\r\n\t\t\t\t\t'scope' => array(\"page\"),\t// NOTE: This might need to be modified per-site\r\r\n\t\t\t\t\t'type' => 'checkbox',\r\r\n\t\t\t\t\t'default' => 1\r\r\n\t\t\t\t),\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t'name' => 'testimonial_inherit',\r\r\n\t\t\t\t\t'label' => 'Enumerate using inheritance',\r\r\n\t\t\t\t\t'description' => 'When rendering testimonials, look at parent for overrides',\r\r\n\t\t\t\t\t'scope' => array(\"page\"),\t// NOTE: This might need to be modified per-site\r\r\n\t\t\t\t\t'type' => 'checkbox'\r\r\n\t\t\t\t)\r\r\n\r\r\n\t\t\t)\r\r\n\t\t));\r\r\n\t}\r\r\n\telse\r\r\n\t{\r\r\n\t\tadd_action('admin_notices', 'testimonial_admin_notice_sltcf_dependency');\r\r\n\t}\r\r\n}", "function Testimonial1($imgs,$texts,$headings,$links,$bShow=true) {\n if($bShow) {\n $imgs=explode(\"|\",$imgs);\n $texts=explode(\"|\",$texts);\n $headings=explode(\"|\",$headings);\n $links=explode(\"|\",$links);\n ?>\n <section class=\"fdb-block\">\n <div class=\"container\">\n <div class=\"row text-center justify-content-center\">\n <div class=\"col-lg-8\">\n <?php echo \"<h2>\".$headings[0].\"</h2>\";\n echo \"<p class=\\\"text-h3\\\">\".$texts[0].\"</p>\"; ?>\n <div class=\"mt-5 justify-content-center\">\n <?php echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[0].\"\\\" height=\\\"30\\\">\";\n echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[1].\"\\\" height=\\\"30\\\">\";\n echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[2].\"\\\" height=\\\"30\\\">\";\n echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[3].\"\\\" height=\\\"30\\\">\";\n echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[4].\"\\\" height=\\\"30\\\">\";\n echo \"<img alt=\\\"image\\\" class=\\\"ml-3 mr-3 mb-2 mt-2\\\" src=\\\"\".$imgs[5].\"\\\" height=\\\"30\\\">\"; ?>\n </div>\n </div>\n </div>\n </div>\n </section>\n <?php\n } \n $params=[0=>6,1=>1,2=>1,3=>0];\n return $params;\n }", "function vc_testimonials( $atts, $content = null ) {\n\textract( shortcode_atts( array(\n\t\t'testimonial_groups' => '',\n\t\t'text_color' => '#647886',\n\t\t'job_color' => '',\n\t\t'name_color' => '',\n\t\t'line_color' => ''\n\t), $atts ) );\n\twp_enqueue_style( 'webuild-royalslider' );\n\twp_enqueue_script( 'webuild-royalslider' );\n\tif ( $testimonial_groups ) {\n\t\t$group = get_term( $testimonial_groups, 'testimonials-categories' );\n\t}\n\t$args = array(\n\t\t'post_type' => 'pro_testimonials',\n\t\t'posts_per_page' => - 1,\n\t);\n\tif ( $group ) {\n\t\t$args['tax_query'] = array(\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'testimonials-categories',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => $group->slug\n\t\t\t)\n\t\t);\n\t}\n\t$specific_id = rand( 1000, 10000 );\n\t$loop = new WP_Query( $args );\n\t$output = '';\n\t$output .= '<div class=\"royalSlider testimonialSlider specific_' . $specific_id . '\">';\n\tforeach ( $loop->posts as $members ) {\n\t\t#GET CUSTOM INFO ON STAFF\n\t\t$extra_info = get_post_custom( $members->ID );\n\t\t$output .= '<div class=\"pro-testimonial-content\">';\n\t\t$output .= '<div class=\"pro-testimonial-avatar\">';\n\t\t$attachment_image_src = wp_get_attachment_image_src( get_post_thumbnail_id( $members->ID ), 'full' );\n\t\t$output .= '<img src=\"' . esc_url($attachment_image_src[0]) . '\" alt=\"' . $members->post_title . '\"/>';\n\t\t$output .= '<span class=\"testimonial-misc\"></span>';\n\t\t$output .= '</div>';\n\t\t$output .= '<div class=\"pro-testimonial-text\" style=\"color:' . $text_color . '\">' . $members->post_content . '</div>';\n\t\t$output .= '<a class=\"pro-testimonial-author\" href=\"' . $extra_info[\"external_link\"][0] . '\"><h5 style=\"color:' . $name_color . '\">' . $members->post_title . '</h5><p style=\"clear:both;color:' . $job_color . '\">' . $extra_info[\"job_reference\"][0] . '</p>';\n\t\t$output .= '</a>';\n\t\t$output .= '</div>';\n\t}\n\t$output .= '</div>';\n\t$style = '<style>.specific_' . $specific_id . ' .pro-testimonial-text:after{background-color:' . $line_color . ' !important;}</style>';\n\twebuild_add_inline_style( $style );\n\n\treturn $output;\n}", "public function show(Testimonial $testimonial)\n {\n //\n }", "public function show(Testimonial $testimonial)\n {\n //\n }", "protected function createFactoryTestimonial()\n {\n return factory(Testimonial::class)->create();\n }", "public function getfeaturedCities(){\n\t\t $featuredTestimonial = array();\n\t\t $tData = $this->find('all',array('conditions'=>array('CmsCity.is_display'=>1),\n\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('CmsCity.*'),\n\t\t\t\t\t\t\t\t));\n\t\t if(isset($tData) && !empty($tData)){\n\t\t\t\tforeach($tData as $key=>$testiData){\n\t\t\t\t\tif(isset($testiData['CmsCity']['image']))\n\t\t\t\t\t\t$testiData['CmsCity']['image'] = (!empty($testiData['CmsCity']['image'])) ? Router::url('/'.CMS_IMAGE_URL.$testiData['CmsCity']['image'],true) : \"\";\n\t\t\t\t\t$featuredTestimonial[] = $testiData;\n\t\t\t\t}\t\n\t\t\t}\n\t\treturn $featuredTestimonial;\t\n\t}", "function htheme_testimonial_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_testimonials($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "public function index()\n {\n $testimonial=Testimonial::orderBy('id', 'DESC')->get();\n return $testimonial;\n }", "function get_testimonial( $posts_per_page, $orderby ) {\n\t$args = array(\n\t\t'posts_per_page' => $posts_per_page,\n\t\t'post_type' => 'testimonials',\n\t\t'orderby' => $orderby\n\t);\n\n//The options argument pulls the option of grabing each specific colour that's indicated in the select field.\n\t$options = get_option( 'hundope_settings' );\n\t\n//We decided to do an inline style. If we were to do the style in a css stylesheet, the change for colours would not physically show up on the front end of our site. \n\t$query = new WP_Query( $args );\n\t$testimonials = '';\n\tif ( $query->have_posts() ) {\n\t\twhile ( $query->have_posts() ) : $query->the_post();\n\t\t$post_id = get_the_ID();\n\t\t$testimonials .= '<aside class=\"testimonial\">';\n\t\t//The code below calls the options variable to indicate the colour in the select field and apply it towards our testimonial quote icon.\n\t\t$testimonials .= '<span class=\"quote\"><i class=\"fa fa-comments\" style=\"color:' . $options['hundope_select_field'] . ';\"></i></span>';\n\t\t$testimonials .= '<div class=\"entry-content\">';\n\t\t//The code below calls our options variable to get the colour indicated in the select field and apply it onto the text.\n\t\t$testimonials .= '<p class=\"testimonial-text\" style=\"color:' . $options['hundope_select_field'] . ';\" >' . get_the_content() . '</p>';\n\t\t$testimonials .= '<p class=\"testimonial-name\"></p>';\n\t\t$testimonials .= '</div>';\n\t\t$testimonials .= '</aside>';\n\t\tendwhile;\n\t\twp_reset_postdata();\n\t\t\n\t}\n\n\treturn $testimonials;\n}", "public function index()\n {\n $data = Testimonial::all();\n return view('admin.testimonials.testimonials')->with('testimonials',$data);\n }", "public function testimonialsDetail()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Testimonials')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/testimonials_detail');\n }", "public function index()\n {\n $opinion = Testimonials::all();\n return view('admin.Testimonials.view', compact('opinion'));\n }", "public function show(testimonial $testimonial)\n {\n //\n }", "public function show(testimonial $testimonial)\n {\n //\n }", "public function GetTestimonial(Testimonial $id)\n {\n $aTestimonial = Testimonial::all();\n return view('admin::templates.testimonial.testimonial', compact('id', 'aTestimonial'));\n }", "public function testimonial_cpt ()\n\t{\n\t\t$labels = array(\n\t\t\t'name' => 'Testimonials',\n\t\t\t'singular_name' => 'Testimonial'\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'menu_icon' => 'dashicons-testimonial',\n\t\t\t'exclude_from_search' => true,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'supports' => array( 'title', 'editor' ),\n 'show_in_rest' => true\n\t\t);\n\t\tregister_post_type ( 'testimonial', $args );\n\t}", "public function index()\n {\n $data = new Testimonial;\n $testimonials = $data::orderBy('id', 'desc')->get();\n return view('admin.testimonial', ['testimonials' => $testimonials]);\n }", "public function get_title() {\n return 'Testimonial Carousel';\n }", "public function index()\n {\n $testimonials = Testimonial::all();\n return view('admin.testimonials.index',compact('testimonials'));\n }", "function mpcth_vc_get_testimonial_callback() {\r\n\tif(!empty($_GET['id'])) {\r\n\t\t$testimonial = get_post($_GET['id']);\r\n\t\t$company = get_post_meta($testimonial->ID, 'company', true);\r\n\t\t$company = !empty($company) ? ', ' . $company : '';\r\n\r\n\t\t$attrs = array(\r\n\t\t\t'title' => __('Testimonial', 'mpcth') . ' - ' . $testimonial->post_title . $company,\r\n\t\t\t'content' => implode(' ', array_slice(explode(' ', $testimonial->post_content), 0, 20)) . ' (...)'\r\n\t\t);\r\n\r\n\t\techo json_encode($attrs);\r\n\t} else {\r\n\t\techo json_encode(array('error' => 'Invalid ID'));\r\n\t}\r\n\t\r\n\tdie();\r\n}", "public function index()\n {\n $testimonial=Testimonial::orderBy('id','DESC')->paginate(10);\n return view('backend.testimonial.index')->with('testimonials',$testimonial);\n }", "public function executeTestimonials(sfWebRequest $request) {\n $this->testimonials = Doctrine_Core::getTable('Testimonial')->getTestimonials();\n }", "public function index()\n {\n //\n $testimonials = $this->testimonial->orderBy('created_at', 'asc')->get();\n\n return view('backend.testimonial.index', compact('testimonials'));\n }", "public function index()\n {\n $testimonials=Testimonial::testimonial_index();\n return view('admin.testimonial.index',compact('testimonials'));\n }", "public function content_testimonial(Request $request){\n $content_testimonial = DB::table('mod_testimonials')->orderBy('id','desc')->paginate(100);\n return view('admin.content_manager.content_testimonial',compact('content_testimonial'));\n }", "public function show(Testimonial $testimonial)\n {\n return $this->view('titan::testimonials.show')->with('item', $testimonial);\n }", "function vdtestim_style_preview () {\n\n\t$vdtestim_options = get_option( 'vdtestim_global_settings' );\n\t$vdtestim_style_options = get_option( 'vdtestim_style_settings' );\n\t$default_gravatar_url = $vdtestim_options['default_gravatar_url'];\n\n\t$slide_testimonials = $vdtestim_style_options['slide'];\n\t$num_testimonials = $vdtestim_style_options['num_testimonials'];\n\t\n\t?>\n\n\n\t<div id=\"testimonials\" class=\"<?php if ( $slide_testimonials === 'yes' ) echo \"slider\" ?> testimonials\">\n\n\n\n\t\t<?php\n\n\n\n\t\t\t// WP_Query arguments\n\t\t\t$args = array (\n\t\t\t\t'post_type' => 'testimonials',\n\t\t\t\t'posts_per_page' => $num_testimonials\n\t\t\t);\n\n\t\t\t// The Query\n\t\t\t$query = new WP_Query( $args );\n\n\t\t\t// The Loop\n\t\t\t$i = 0;\n\t\t\tif ( $query->have_posts() ) {\n\t\t\t\twhile ( $query->have_posts() ) {\n\t\t\t\t\t$query->the_post();\n\n\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"testimonial <?php if ( $slide_testimonials == 'yes' ) { echo 'slide'; } else { echo 'no-slide'; } if ($i === $num_testimonials -1 ) { echo ' last'; } ?> \">\n\n\t\t\t\t\t\t<?php\n\n\n\t\t\t\t\t\t$vdtestim_company = get_post_meta( get_the_id(), 'vdtestim_company', true );\n\t\t\t\t\t\t$vdtestim_website = get_post_meta( get_the_id(), 'vdtestim_website', true );\n\t\t\t\t\t\t$vdtestim_position = get_post_meta( get_the_id(), 'vdtestim_position', true );\n\t\t\t\t\t\t$vdtestim_email = get_post_meta( get_the_id(), 'vdtestim_email', true );\n\t\t\t\t\t\t$vdtestim_wpautop = get_post_meta( get_the_id(), 'vdtestim_testimonial', true );\n\t\t\t\t\t\t$vdtestim_text = wpautop( $vdtestim_wpautop );\n\t\t\t\t\t\t$size = 50;\n\t\t\t\t\t\t$default = plugins_url( 'vertusdl-testimonials/images/defaultavatar-green.png' );\n\t\t\t\t\t\t$grav_url = \"http://www.gravatar.com/avatar/\" . md5( strtolower( trim( $vdtestim_email ) ) ) . \"?d=\" . urlencode( $default_gravatar_url ) . \"&s=\" . $size;\n\n\t\t\t\t\t\t// To Do - Change gravatar default back to pluginurl in production!!!!!!!!\n\n\t\t\t\t\t\t?>\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t<blockquote><p><?php echo vdtestim_shorten_testimonial( $vdtestim_text ); ?>\n\t\t\t\t\t\t<a href=\"<?php echo get_permalink(); ?>\">Read More</a></p></blockquote>\n\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<img src=\"<?php echo $grav_url; ?>\" alt=\"\" height=\"50\" width=\"50\"/>\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">by: </span><span class=\"testimonials-name\"><?php the_title(); ?></span><br />\n\t\t\t\t\t\t\t<span class=\"testimonials-before\">from: </span><a href=\"<?php echo $vdtestim_website; ?>\" target=\"_blank\" rel=\"nofollow\" title=\"Link to <?php echo $vdtestim_company;?> Website.\"><span class=\"testimonials-company\"><?php echo $vdtestim_company; ?></span></a>\n\t\t\t\t\t\t</p>\t\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php\n\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t} \n\t\t?>\n\n\t\t<?php if ( $slide_testimonials == 'yes' ) { ?>\n\n\t\t\t<div class=\"slider_controls\">\n\t\t <div class=\"prev testimonial_slide\" data-target=\"prev\" >&lsaquo;</div>\n\t\t <div class=\"next testimonial_slide\" data-target=\"next\" >&rsaquo;</div>\n\t\t <ul class=\"pager_list\"></ul>\n\t\t </div>\n\n\t\t<?php } ?> \n\n\t</div>\n\n\n\t<?php\n}", "public function index()\n {\n $testimonials = Testimonial::latest()->get();\n return view('dashboard.testimonials.index', compact('testimonials'));\n }", "function rsm_sc_testimonial_list($atts) {\n\n\t\n\tob_start();\n\trsm_get_template( 'rsm-testimonial-list.php' );\n\treturn ob_get_clean();\n\n}", "public function feature_quotes() {\r\n\t$query = \\Drupal::entityQuery('node')\r\n ->condition('status', 1)\r\n ->condition('type', 'bc_testimonial') \r\n ->condition('field_feature_quote',1, '=') \r\n ->pager(10);\r\n $nids = $query->execute();\r\n $slider = '<li>';\r\n\tforeach ($nids as $nid) {\r\n\t\t$node = \\Drupal\\node\\Entity\\Node::load($nid);\r\n\t\t$body = $node->body->value;\r\n\t\t$title = $node->title->value;\r\n\t\t$avatar = $node->get('field_bc_testimonial_avatar')->entity->getFileUri();\r\n\t\tif ($wrapper = \\Drupal::service('stream_wrapper_manager')->getViaUri($avatar)) {\r\n\t\t\t$avatar = $wrapper->getExternalUrl();\r\n\t\t}\r\n\t\t$slider.= '<div class=\"bc_main_quote\">\r\n\t\t<div class=\"bc_title_quote\">'.$title.'</div>\r\n\t\t<div class=\"bc_body_quote\">'.$body.'</div>\r\n\t\t<div class=\"bc_image_quote\"><img src=\"'.$avatar.'\"></div>\r\n\t\t</div>';\r\n\t} \r\n\t$slider.= '</li>';\r\n $build = [\r\n '#markup' => $slider,\r\n ];\r\n return $build;\r\n }", "function pt_reg_testimonials(){\n\t\t\t$labels = array(\n\t\t\t\t'name' => __( 'Testimonials', 'ptlg' ),\n\t\t\t\t'singular_name' => __( 'Testimonial', 'ptlg' ),\n\t\t\t\t'add_new' => __( 'Add New', 'ptlg' ),\n\t\t\t\t'add_new_item' => __( 'Add New Testimonial', 'ptlg' ),\n\t\t\t\t'edit_item' => __( 'Edit Testimonial', 'ptlg' ),\n\t\t\t\t'new_item' => __( 'New Testimonial', 'ptlg' ),\n\t\t\t\t'all_items' => __( 'All Testimonial', 'ptlg' ),\n\t\t\t\t'view_item' => __( 'View Testimonial', 'ptlg' ),\n\t\t\t\t'search_items' => __( 'Search Testimonial', 'ptlg' ),\n\t\t\t\t'not_found' => __( 'No Testimonial Found', 'ptlg' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Testimonial Found in the Trash', 'ptlg' ), \n\t\t\t\t'menu_name' => __( 'Pretty Testimonial' )\n\t\t\t);\n\t\t\t\n\t\t\t$args = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'description' => __( 'Pretty Testimonials', 'ptlg' ),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array('slug' => 'testimonials', 'with_front' => true),\n\t\t\t\t'query_var' => true\n\t\t\t);\n\t\t\t\n\t\t\tregister_post_type( 'testimonials', $args );\n\t\t\tflush_rewrite_rules( false );\t\n\t\t}", "public function index()\n {\n $testimonial=testimonial::all();\n return View('admin.testimonial_index',compact('testimonial'));\n }", "public function showcases()\n {\n return $this->morphedByMany(Portfolio::class, 'taggable', 'taxonomy_relationships')->withTimestamps();\n }", "function _portfolio_carousel( $options )\n\t{\n\t\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\n\t\twp_reset_query();\n\t\tglobal $post;\n\n\t\t\n\t\t$posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4'; // how many posts\n\n\t\t$query = array(\n\t\t\t'post_type' => 'portfolio',\n\t\t\t'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,\n\t\t\t'posts_per_page' => $posts_per_page,\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'project_category',\n\t\t\t\t\t'field' => 'id',\n\t\t\t\t\t'terms' => $options['portfolio_categories']\n\t\t\t\t)\n\t\t\t),\n\t\t\t'showposts' => $options['ports_per_page_visible']\n\t\t);\n\n\n\n\n\t\t// Start the query\n\t\tquery_posts( $query );\n\t\t$i = 1;\n\n\t\t?>\n\t\t\t\t\t\t<div class=\"span12\">\n\t\t\t\t\t\t\t<div class=\"row hg-portfolio-carousel\">\n\n\t\t\t\t\t\t\t<?php if ( have_posts() ): while ( have_posts() ): the_post(); \n\t\t\t\t\t\t\t\t// Get post meta information\n\t\t\t\t\t\t\t\t$post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);\n\t\t\t\t\t\t\t\t$post_meta_fields = maybe_unserialize( $post_meta_fields );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t\t\t\t<div class=\"ptcontent\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"title\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\"><span class=\"name\"><?php the_title(); ?></span></a>\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t\t<div class=\"pt-cat-desc\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tif ( preg_match('/<!--more(.*?)?-->/', $post->post_content) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tthe_content('');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tthe_excerpt();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</div><!-- end item desc -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"itemLinks\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $post_meta_fields['sp_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span><a href=\"'.$post_meta_fields['sp_link']['url'].'\" target=\"'.$post_meta_fields['sp_link']['target'].'\" >'.__(\"Live Preview: \",THEMENAME).'<strong>'.$post_meta_fields['sp_link']['url'].'</strong></a></span>';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"seemore\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\" ><?php _e('See more &rarr;',THEMENAME);?></a>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div><!-- end item links -->\n\t\t\t\t\t\t\t\t\t</div><!-- end item content -->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t\t\t\t<div class=\"ptcarousel\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"controls\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"prev\"><span class=\"icon-chevron-left icon-white\"></span></a>\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"next\"><span class=\"icon-chevron-right icon-white\"></span></a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<ul class=\"ptcarousel1\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $post_meta_fields['port_media'] ) && is_array( $post_meta_fields['port_media'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $post_meta_fields['port_media'] as $media ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// COMBINED\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( !empty ( $media['port_media_image_comb'] ) && !empty ( $media['port_media_video_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$media['port_media_video_comb'].'\" rel=\"prettyPhoto\" data-type=\"image\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $media['port_media_image_comb'] , $size['width'],$size['height'] , true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"'.get_the_title().'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</a>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IMAGE\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telseif ( !empty ( $media['port_media_image_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$media['port_media_image_comb'].'\" data-type=\"image\" rel=\"prettyPhoto\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '', $media['port_media_image_comb'] , $size['width'],$size['height'] , true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" alt=\"'.get_the_title().'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</a>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// VIDEO\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telseif ( !empty ( $media['port_media_video_comb'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<li>';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$size = zn_get_size( 'eight' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo get_video_from_link( $media['port_media_video_comb'] , '' , $size['width'] , $size['height'] );\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div><!-- end ptcarousel -->\n\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif ( $i % $options['ports_per_page_visible'] != 0 ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"span12\"><hr class=\"bs-docs-separator\"></div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t?>\n\n\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</div><!-- end portfolio layout -->\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\techo '<div class=\"span12\" >';\n\t\t\t\t\t\t\t\t\tzn_pagination(); \n\t\t\t\t\t\t\t\t\twp_reset_query();\n\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t<?php\n\n\t}", "function testimonials() {\n register_post_type( 'testimonials',\n array(\n 'labels' => array(\n 'name' => 'Testimonials',\n 'singular_name' => 'Testimonial',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Testimonial',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit Testimonial',\n 'new_item' => 'New Testimonial',\n 'view' => 'View',\n 'view_item' => 'View Testimonial',\n 'search_items' => 'Search Testimonials',\n 'not_found' => 'No Testimonials found',\n 'not_found_in_trash' => 'No Testimonials found in Trash',\n ),\n 'exclude_from_search' => true,\n 'public' => true,\n 'menu_position' => 30,\n 'supports' => array( 'title', 'editor'),\n 'has_archive' => false\n )\n );\n}", "public function index()\n {\n $user = Auth::user();\n $testimonial = Testimonial::get();\n return view('frontend.pages.users.mytestimonial',compact('testimonial','user'));\n }", "function rv_portfolio() {\r\n\t\treturn RV_Portfolio::get_instance();\r\n\t}", "public function index()\n {\n $portfolios = Portfolio::all();\n return $portfolios;\n }", "function axiom_testimonial_init() \n{\n $labels = array(\n 'name' => __('Testimonials' , 'default'),\n 'singular_name' => __('Testimonial' , 'default'),\n 'add_new' => _x('Add New', 'Testimonials labels', 'default'),\n 'all_items' => __('All Testimonials' , 'default'),\n 'add_new_item' => __('Add New Testimonial' , 'default'),\n 'edit_item' => __('Edit Testimonial' , 'default'),\n 'new_item' => __('New Testimonial' , 'default'),\n 'view_item' => __('View Testimonial' , 'default'),\n 'search_items' => __('Search Testimonials' , 'default'),\n 'not_found' => __('No Testimonials found' , 'default'),\n 'not_found_in_trash'=> __('No Testimonials found in Trash', 'default'), \n 'parent_item_colon' => ''\n );\n \n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable'=> true,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => _x( 'testimonial', \n 'Testimonial main slug (“slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. )', \n 'default'),\n 'with_front'=> true),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 36,\n 'supports' => array('title','editor','excerpt','thumbnail', 'page-attributes')\n ); \n register_post_type( 'testimonial',$args);\n}", "public function listTestimonial() {\n if (!$this->common_model->isLoggedIn()) {\n redirect(base_url() . \"backend/login\");\n }\n /* Getting Common data */\n $data = $this->common_model->commonFunction();\n\n /* checking user has privilige for the Manage Testimonial */\n if ($data['user_account']['role_id'] != 1) {\n /* checking user has privilege to access the manage testimonial */\n $user_account = $this->session->userdata('user_account');\n /* getting user Privileges from the session array */\n $user_priviliges = unserialize($user_account['user_privileges']);\n if (!in_array(1, $user_priviliges)) {\n /* setting session for displaying notiication message. */\n $this->session->set_userdata(\"msg\", \"<span class='error'>You doesn't have priviliges to manage testimonial!</span>\");\n redirect(base_url() . \"backend/home\");\n }\n }\n\n if (count($_POST) > 0) {\n if (isset($_POST['btn_delete_all'])) {\n /* getting all ides selected */\n $arr_tetstimonal_ids = $this->input->post('checkbox');\n if (count($arr_tetstimonal_ids) > 0) {\n /* deleting the testimonial from the backend */\n $this->common_model->deleteRows($arr_tetstimonal_ids, \"mst_testimonial\", \"testimonial_id\");\n $this->session->set_userdata(\"msg\", \"<span class='success'>Testimonial deleted successfully!</span>\");\n }\n }\n }\n $data['title'] = \"Manage Testimonial\";\n /* getting all testimonail with descending order */\n $data['arr_tetimonials'] = $this->common_model->getRecords('mst_testimonial', '', '', array('added_date', 'desc'));\n $this->load->view('backend/testimonial/list', $data);\n }", "public function get_portfolio_feedback();", "function TS_VCSC_Testimonials_Codestar() {\r\n\t\tglobal $pagenow;\t\t\r\n\t\t$screen \t\t\t\t\t\t\t\t= TS_VCSC_GetCurrentPostType();\r\n\t\t$prefixA \t\t\t\t\t\t\t\t= 'ts_vcsc_testimonial_basic_';\r\n\t\t\r\n\t\t// Migration of Old Metadata for Existing Posts\r\n\t\tif (($screen == 'ts_testimonials') && ($pagenow == 'post.php')) {\r\n\t\t\t$metaOld\t\t\t\t\t\t= array('ts_vcsc_testimonial_basic_author', 'ts_vcsc_testimonial_basic_position');\r\n\t\t\t$metaSwitch\t\t\t\t\t\t= array();\r\n\t\t\t$metaGallery\t\t\t\t\t= array();\r\n\t\t\t$metaImage\t\t\t\t\t\t= array();\r\n\t\t\tif (function_exists('TS_VCSC_Codestar_Migrate_Routine')){\r\n\t\t\t\tTS_VCSC_Codestar_Migrate_Routine(get_the_ID(), 'ts_testimonials', $metaOld, $metaSwitch, $metaGallery, $metaImage, 'ts_vcsc_testimonial_basic', 0, 'ts_vcsc_testimonial_migrated', false, false, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Configure Metabox - Testimonials\r\n\t\tif (($screen == 'ts_testimonials') && ($pagenow == 'post-new.php' || $pagenow == 'post.php')) {\r\n\r\n if (class_exists('CSF')) { \r\n \r\n $prefix_page_opts = 'ts_vcsc_custompost_migrated';\r\n \r\n CSF::createMetabox($prefix_page_opts, array(\r\n 'title' => 'Testimonial Migration',\r\n 'post_type' => 'ts_testimonials',\r\n 'theme' => 'dark',\r\n 'priority' => 'default',\r\n 'context' => 'side',\r\n 'show_restore' => false,\r\n )); \r\n CSF::createSection($prefix_page_opts, array(\r\n 'title' => 'Testimonial Migration',\r\n 'icon' => 'fa fa-check-square-o',\r\n 'fields' => array(\r\n array(\r\n 'id'\t\t => 'ts_vcsc_testimonial_migrated',\r\n 'type' \t => 'inputhidden',\r\n 'title'\t\t => 'Migration Success:',\r\n 'default' \t => 'true',\r\n ),\r\n )\r\n ));\r\n \r\n $prefix_page_opts = 'ts_vcsc_testimonial_basic';\r\n\r\n CSF::createMetabox($prefix_page_opts, array(\r\n 'title' => 'Testimonial Information',\r\n 'post_type' => 'ts_testimonials',\r\n 'theme' => 'dark',\r\n 'priority' => 'high',\r\n 'context' => 'normal',\r\n 'show_restore' => false,\r\n ));\r\n CSF::createSection($prefix_page_opts, array(\r\n 'title' => 'Testimonial Information',\r\n 'icon' => 'fa fa-quote-right',\r\n 'fields' => array(\r\n array(\r\n 'type' \t => 'subheading',\r\n 'content' \t => 'Add some additional information for the testimonial or quote, such as the name of the author.',\r\n ),\r\n array(\r\n 'id' \t => $prefixA . 'author',\r\n 'type' \t => 'text',\r\n 'title' \t => 'Author Name:',\r\n 'help' \t\t => 'Enter the name of the person this tesimonial or quote is attributed to.',\r\n ),\r\n array(\r\n 'id' \t => $prefixA . 'position',\r\n 'type' \t => 'text',\r\n 'title' \t => 'Note:',\r\n 'help' \t\t => 'Enter a note (i.e. company, position, etc.) about the person this tesimonial or quote is attributed to.',\r\n ),\r\n )\r\n ));\r\n } \r\n\t\t}\r\n\t}", "public function is_own_portfolio();", "function projects_list( $request ) {\n\n\n $args = $request->get_query_params();\n\n$project_args = array(\n 'post_type' => 'project',\n 'post_status' => 'publish',\n 'posts_per_page' => 3 \n );\n\n $standard_params = array(\n 'order',\n 'orderby',\n 'author',\n 'paged',\n 'page',\n 'nopaging',\n 'posts_per_page',\n 's',\n );\n\n\n foreach ( $standard_params as $standard_param ) {\n if ( isset( $args[ $standard_param ] ) && ! empty( $args[ $standard_param ] ) ) {\n $project_args[ $standard_param ] = $args[ $standard_param ];\n }\n }\n\n \n $the_query = new WP_Query( $project_args );\n\n\n $return = array(\n 'total' => (int) $the_query->found_posts,\n 'count' => (int) $the_query->post_count,\n 'pages' => (int) $the_query->max_num_pages,\n 'posts_per_page' => (int) $project_args['posts_per_page'],\n 'query_args' => $project_args,\n 'featured' => empty($args) ? get_slider_projects() : '',\n 'project' => array(),\n );\n\n\n if ( $the_query->have_posts() ):\n\n $i = 0;\n\n while ( $the_query->have_posts() ):\n $the_query->the_post();\n\n $title = get_the_title();\n $body = get_the_content();\n \n $size = !empty($project_args['s']) ? 'medium' : 'thumbnail';\n $thumbnail = get_post_thumbnail_id( get_the_ID());\n if ( empty( $thumbnail ) ) {\n $thumbnail = false;\n } else {\n $thumbnail = wp_get_attachment_image_src( $thumbnail, $size );\n if ( is_array( $thumbnail ) ) {\n $thumbnail = array(\n 'src' => $thumbnail[0],\n 'width' => $thumbnail[1],\n 'height' => $thumbnail[2],\n );\n }\n }\n\n \n $date = get_the_date();\n\n $fields = get_fields(get_the_ID());\n $comments_query = new WP_Comment_Query;\n\n foreach( $fields as $k => $v){\n \n $comments = $comments_query->query(['post_id' => get_the_ID(), 'status' => 'approve', 'post_type' => 'project']);\n \n $return['project'][$i]['id'] = get_the_ID(); \n $return['project'][$i]['comments'] = count($comments); \n $return['project'][$i]['title'] = $title; \n $return['project'][$i]['body'] = $body; \n $return['project'][$i]['created'] = $date; \n $return['project'][$i]['thumbnail'] = $thumbnail; \n\n $return['project'][$i][$k] = get_field($k, get_the_ID());\n\n }\n\n $i ++;\n \n endwhile;\n \n wp_reset_postdata();\n \n endif;\n\n$response = new WP_REST_Response( $return );\n$response->header( 'Access-Control-Allow-Origin', apply_filters( 'access_control_allow_origin', '*' ) );\n$response->header( 'Cache-Control', 'max-age=' . apply_filters( 'api_max_age', WEEK_IN_SECONDS ) );\nreturn $response;\n\n}", "function mattu_portfolio_items_shortcode() {\n\t$loop = new WP_Query(\n\t\tarray(\n\t\t\t'post_type' => 'portfolio',\n\t\t\t'orderby' => 'date',\n\t\t\t'order' => 'ASC',\n\t\t\t'posts_per_page' => -1, // -1 shows all \n\t\t)\n\t);\n\n\t/* Check if any portfolio items were returned. */\n\tif ( $loop->have_posts() ) {\n\n\t\t/* Open an unordered list. */\n\t\t$output = '<ul class=\"portfolio-items\">';\n\n\t\t/* Loop through the portfolio items (The Loop). */\n\t\twhile ( $loop->have_posts() ) {\n\n\t\t\t$loop->the_post();\n\n\t\t\t/* Display the portfolio item title. */\n\t\t\t$output .= the_title(\n\t\t\t\t'<li><a href=\"' . get_permalink() . '\">',\n\t\t\t\t'</a></li>',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\t\n\t\t}\n\n\t\t/* Close the unordered list. */\n\t\t$output .= '</ul>';\n\t}\n\n\t/* If no portfolio items were found. */\n\telse {\n\t\t$output = '<p>No Projects have been published.';\n\t}\n\n\t/* Return the portfolio items list. */\n\treturn $output;\n}", "public function show(Portfolio $portfolio)\n {\n //\n }", "function hook_testimonial($vars) {\n\t// single\n\t$result = mysql_query(\"SELECT * FROM `mod_venon_testimonial_post` WHERE `status` = 1 order by RAND() LIMIT 1\");\n\t$data = mysql_fetch_array($result);\n\t\n\t$testimonial['testimonial']['single']['name'] = $data['name'];\n\t$testimonial['testimonial']['single']['message'] = $data['message'];\n\t$testimonial['testimonial']['single']['date'] = fromMySQLDate($data['date']);\n\t$testimonial['testimonial']['single']['time'] = fromMySQLDate($data['date'],$data['date']);\n\t\n\t// multiple\n\t$result = mysql_query(\"SELECT * FROM `mod_venon_testimonial_post` WHERE `status` = 1 order by RAND() LIMIT 5\");\n\t$i=1;\n\twhile($data = mysql_fetch_array($result)){\n\t\t$testimonial['testimonial']['multiple'][$i]['name'] = $data['name'];\n\t\t$testimonial['testimonial']['multiple'][$i]['message'] = $data['message'];\n\t\t$testimonial['testimonial']['multiple'][$i]['date'] = fromMySQLDate($data['date']);\n\t\t$testimonial['testimonial']['multiple'][$i]['time'] = fromMySQLDate($data['date'],$data['date']);\n\t\t\n\t\t$i = $i+1;\n\t}\n\n\treturn $testimonial;\n}", "function register_cpt_Testimonial() {\n\n $labels = array(\n 'name' => _x( 'Testimonials', 'Testimonial' ),\n 'singular_name' => _x( 'Testimonial', 'Testimonial' ),\n 'add_new' => _x( 'Add New', 'Testimonial' ),\n 'add_new_item' => _x( 'Add New Testimonial', 'Testimonial' ),\n 'edit_item' => _x( 'Edit Testimonial', 'Testimonial' ),\n 'new_item' => _x( 'New Testimonial', 'Testimonial' ),\n 'view_item' => _x( 'View Testimonial', 'Testimonial' ),\n 'search_items' => _x( 'Search Testimonials', 'Testimonial' ),\n 'not_found' => _x( 'No Testimonials found', 'Testimonial' ),\n 'not_found_in_trash' => _x( 'No Testimonials found in Trash', 'Testimonial' ),\n 'parent_item_colon' => _x( 'Parent Testimonial:', 'Testimonial' ),\n 'menu_name' => _x( 'Testimonials', 'Testimonial' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'description' => 'Customer Testimonials',\n 'supports' => array( 'title'),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-editor-quote',\n 'show_in_nav_menus' => true,\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'has_archive' => false,\n 'query_var' => true,\n 'can_export' => true,\n 'rewrite' => true,\n 'capability_type' => 'post'\n );\n\n register_post_type( 'Testimonial', $args );\n}", "function testimonials_post_type() {\n\t$labels = array(\n\t\t'name' => 'Testimonials',\n\t\t'singular_name' => 'Testimonial',\n\t\t'add_new_item' => 'Add New Testimonial',\n\t\t'add_new' => 'Add New Testimonial',\n\t\t'edit_item' => 'Edit Testimonial',\n\t\t'new_item' => 'New Testimonial',\n\t\t'view_item' => 'View Testimonial',\n\t\t'search_items' => 'Search Testimonials',\n\t\t'not_found' => 'No Testimonials found',\n\t\t'not_found_in_trash' => 'No Testimonials found in the trash',\n\t);\n\n/*\n*'dashicons-testimonial' menu icon retrieved from WordPress.org.\n*The register_post_type function registers the labels of the plugin as well as other items such as the location of the plugin and editable sections.\n*The register_meta_box_cb registers the boxes in which the information/data can be viewed for each testimonial on the back-end of WordPress.\n*/\n\tregister_post_type( 'testimonials', array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => true,\n\t\t'show_ui' => true,\n\t\t'rewrite' => true,\n\t\t'query_var' => true,\n\t\t'menu_icon' => 'dashicons-testimonial',\n\t\t'capability_type' => 'post',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => 10,\n\t\t'supports' => array( 'editor', 'title' ),\n\t\t'register_meta_box_cb' => 'testimonials_meta_boxes',\n\t) );\n}", "function pexeto_show_carousel( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'title' => '',\r\n\t\t\t\t\t'cat' => '-1',\r\n\t\t\t\t\t'orderby' => 'date',\r\n\t\t\t\t\t'order' => 'DESC',\r\n\t\t\t\t\t'maxnum' => '-1'\r\n\t\t\t\t), $atts ) );\r\n\t\t$html='';\r\n\r\n\t\t$args = array(\r\n\t\t\t'post_type'=>PEXETO_PORTFOLIO_POST_TYPE,\r\n\t\t\t'orderby'=>$orderby,\r\n\t\t\t'order'=>$order,\r\n\t\t\t'posts_per_page'=>$maxnum\r\n\t\t);\r\n\r\n\t\tif ( $cat!='-1' ) {\r\n\t\t\t$args[PEXETO_PORTFOLIO_TAXONOMY]=get_term_by( 'id', $cat, PEXETO_PORTFOLIO_TAXONOMY )->slug;\r\n\t\t}\r\n\r\n\r\n\t\t$car_posts = get_posts( $args );\r\n\r\n\t\t$html = pexeto_build_portfolio_carousel_html( $car_posts, $title );\r\n\r\n\t\treturn $html;\r\n\t}", "function display_testimonial()\n {\n $this ->db-> select('*');\n $this ->db-> from('tbl_testimonial');\n $this ->db-> where('testimonial_type',1);\n $this->db->where('testimonial_delete_status',0);\n $this->db->order_by('testimonial_id', 'desc');\n $query = $this->db->get();\n return $query->result() ;\n }", "public function indexAction()\r\n {\r\n \t/* \r\n\t\t$testimonial_id = $this->getRequest()->getParam('id');\r\n\r\n \t\tif($testimonial_id != null && $testimonial_id != '')\t{\r\n\t\t\t$testimonial = Mage::getModel('testimonial/testimonial')->load($testimonial_id)->getData();\r\n\t\t} else {\r\n\t\t\t$testimonial = null;\r\n\t\t}\t\r\n\t\t*/\r\n\t\t\r\n\t\t /*\r\n \t * If no param we load a the last created item\r\n \t */ \r\n \t/*\r\n \tif($testimonial == null) {\r\n\t\t\t$resource = Mage::getSingleton('core/resource');\r\n\t\t\t$read= $resource->getConnection('core_read');\r\n\t\t\t$testimonialTable = $resource->getTableName('testimonial');\r\n\t\t\t\r\n\t\t\t$select = $read->select()\r\n\t\t\t ->from($testimonialTable,array('testimonial_id','title','content','status'))\r\n\t\t\t ->where('status',1)\r\n\t\t\t ->order('created_time DESC') ;\r\n\t\t\t \r\n\t\t\t$testimonial = $read->fetchRow($select);\r\n\t\t}\r\n\t\tMage::register('testimonial', $testimonial);\r\n\t\t*/\r\n\r\n\t\t\t\r\n\t\t$this->loadLayout(); \r\n\t\t$this->renderLayout();\r\n }", "public function actionPortfolio()\n {\n $searchModel = new PostSearchPortfolio();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('portfolio/index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getPortfolioAds()\n\t{\n\t\t$portfolio = null;\n\t\t\n\t\t$query = \"SELECT id, name, tags, year_begin, description, images FROM `portfolio` ORDER BY RAND() LIMIT \"\n\t\t\t. P_ADS_COUNT;\n\t\t$result = $this->db->query($query);\n\t\t\t\n\t\twhile($row = $result->fetch_assoc())\n\t\t{\n\t\t\t$portfolio[$row['id']]['name'] = $row['name'];\n\t\t\t$portfolio[$row['id']]['tags'] = $row['tags'];\n\t\t\t$portfolio[$row['id']]['year_begin'] = $row['year_begin'];\n\t\t\t$images = json_decode($row['images'], true);\n\t\t\tif(!$images)\n\t\t\t\t$portfolio[$row['id']]['image'] = null;\n\t\t\telse\n\t\t\t\t$portfolio[$row['id']]['image'] = getThumbFileName($images[0]);\n\t\t\t$descriptions = json_decode($row['description'], true);\n\t\t\t$portfolio[$row['id']]['description'] = $descriptions[$this->lang];\n\t\t}\n\t\t\n\t\treturn $portfolio;\n\t}", "public function index()\n\t{\n\n $this->data['pageTitle'] = 'Testimonial';\n $this->data['dashboard'] = '';\n $this->data['pages'] = 'active';\n $this->data['Settings'] = '';\n return view('admin.testimonial.viewtestimonial', $this->data);\n\t}", "public function show(Testimonial $testimonial)\n {\n return view('admin.testimonials.show', ['testimonial' => $testimonial]);\n }", "public function show()\n {\n $is_active = [1];\n $portfolio = (new PortfolioPerformanceService())->PortfolioData($is_active, []);\n\n return $portfolio;\n }", "public static function get_projects()\n {\n \tif( UserRoleController::isStudent() )\n \t{\n \t\t$current_user = wp_get_current_user();\n \t\t$author = $current_user->ID ;\n \t}\n \telse\n \t{\n\t\t\t$author = null ;\n \t}\n\n \treturn get_posts( array(\n \t\t'author' => $author,\n \t\t'post_type' => ProjectCustomTypeCreator::CPT,\n \t\t'numberposts' => 100,\n \t\t'orderby' => 'date',\n \t\t'order' => 'DESC',\n \t\t'post_status' => 'any',\n \t\t//'category' => 0,\n \t\t//'include' => array(),\n \t\t//'exclude' => array(),\n \t\t//'meta_key' => '',\n \t\t//'meta_value' =>'',\n \t\t//'suppress_filters' => true\n \t));\n }", "public function add_testimonials()\n {\n\n $cols = \"`desc`,`name`,`job`,`image`\";\n\n $this->obj->all_data->testimonials->set_image($this->upload(\"testimonials\"));\n $value =\n \"'\" . $this->obj->all_data->testimonials->get_desc() . \"',\n '\" . $this->obj->all_data->testimonials->get_name() . \"',\n '\" . $this->obj->all_data->testimonials->get_job() . \"',\n '\" . $this->obj->all_data->testimonials->get_image() . \"'\n\n \";\n\n\n $insert = $this->obj->insert(\"testimonials\", $cols, $value);\n return $insert;\n }", "function dt_sc_fw_tm_wrapper($attrs, $content = null) {\n\t\textract ( shortcode_atts ( array (\n\t\t\t'title' => '',\n\t\t\t'class' => ''\n\t\t), $attrs ) );\n\t\t\n\t\tpreg_match_all( '/\\[dt_sc_tm_carousel_item (.*?)\\](.*?)\\[\\/dt_sc_tm_carousel_item\\]/', $content, $matches);\n\t\t# $matches[1] = testimonial attrs\n\t\t# $matches[2] = testimonial content\n\n\t\t# To get attributes\n\t\t$authors = array();\t\t\n\t\tforeach( $matches[1] as $a ) {\n\t\t\tarray_push( $authors , shortcode_parse_atts($a) );\n\t\t}\n\t\t\n\t\t$out = '<div class=\"dt-sc-special-testimonial-container '.$class.'\">';\n\t\t\n\t\t$out .= '<div class=\"wpb_column vc_column_container vc_col-sm-6 dt-sc-skin-highlight extend-bg-fullwidth-left extend-bg-color-skin\">';\n\t\t$out .= '\t<div class=\"vc_column-inner\">';\n\t\t$out .= '\t\t<div class=\"wpb_wrapper\">';\n\t\t$out .= '\t\t\t<div class=\"alignright\">';\n\t\t$out .= \t\t\t\t!empty($title) ? '<h2>'.$title.'</h2>' : '';\n\t\t$out .= '\t\t\t\t<div class=\"dt-sc-hr-invisible-xsmall\"> </div>';\n\t\t$out .= '\t\t\t\t<div class=\"dt-sc-clear\"></div>';\n\t\t$out .= '\t\t\t\t<div class=\"dt-sc-testimonial-special-wrapper\">';\n\t\t$out .= '\t\t\t\t\t<ul class=\"dt-sc-testimonial-special\">';\n\t\t\t\t\t\t\tforeach( $matches[2] as $key => $content ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$name = isset( $authors[$key]['name'] ) ? $authors[$key]['name'] : '';\n\t\t\t\t\t\t\t\t$role = isset( $authors[$key]['role'] ) ? '<small>'.$authors[$key]['role'].'</small>' : '';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$out .= '<li class=\"dt-sc-testimonial-wrapper\">';\n\t\t\t\t\t\t\t\t$out .= '\t<div class=\"dt-sc-testimonial special-testimonial-carousel\">';\n\t\t\t\t\t\t\t\t$out .= '\t\t<div class=\"dt-sc-testimonial-quote\"><blockquote><q>'.$content.'</q></blockquote></div>';\n\t\t\t\t\t\t\t\t$out .= '\t\t<div class=\"dt-sc-testimonial-author\">';\n\t\t\t\t\t\t\t\t$out .=\t'\t\t\t<cite>'.$name.$role.'</cite>';\n\t\t\t\t\t\t\t\t$out .= '\t\t</div>';\n\t\t\t\t\t\t\t\t$out .= '\t</div>';\n\t\t\t\t\t\t\t\t$out .= '</li>';\n\t\t\t\t\t\t\t}\n\t\t$out .= '\t\t\t</ul>';\n\t\t$out .= '\t\t\t\t</div>';\t\t\n\t\t$out .= '\t\t\t</div>';\n\t\t$out .= '\t\t</div>';\n\t\t$out .= '\t</div>';\n\t\t$out .= '</div>';\n\n\t\t$out .= '<div class=\"wpb_column vc_column_container vc_col-sm-6\">';\n\t\t$out .= '\t<div class=\"vc_column-inner\">';\n\t\t$out .= '\t\t<div class=\"wpb_wrapper\">';\n\t\t$out .= '\t\t\t<ul class=\"dt-sc-testimonial-images\">';\n\t\t\t\t\t\t\t\tforeach( $matches[1] as $attributes ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$a = shortcode_parse_atts($attributes);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$image = wpb_getImageBySize( array( 'attach_id' => $a['image'], 'thumb_size' => 'full' ));\n\t\t\t\t\t\t\t\t\t$image = $image['thumbnail'];\n\t\t\t\t\t\t\t\t\t$image = !empty( $image ) ? $image : '<img src=\"http://place-hold.it/320x340\"/>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$out .= '<li><div><a href=\"\">'.$image.'</a></div></li>';\n\t\t\t\t\t\t\t\t}\n\t\t$out .= '\t\t\t</ul>';\n\t\t$out .= '\t\t</div>';\n\t\t$out .= '\t</div>';\n\t\t$out .= '</div>';\n\t\t\n\t\t$out .= '</div>';\n\t\t\n\t\treturn $out;\t\t\n\t}", "function post_type_testimonials() {\nregister_post_type(\n 'testimonial', \n array( 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => false,\n 'has_archive' => true, \n 'can_export' => true,\n 'hierarchical' => false,\n 'menu_icon' => get_stylesheet_directory_uri() . '/images/testimonial.png',\n 'labels'=>array(\n 'name' => _x('Testimonials', 'post type general name'),\n 'singular_name' => _x('Testimonial', 'post type singular name'),\n 'add_new' => _x('Add New', 'Testimonial'),\n 'add_new_item' => __('Add New Testimonial'),\n 'edit_item' => __('Edit Testimonials'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_items' => __('Search Testimonials'),\n 'not_found' => __('No Testimonials found'),\n 'not_found_in_trash' => __('No Testimonials found in Trash'), \n 'menu_name' => _x( 'Testimonials', 'testimonial' ),\n 'parent_item_colon' => ''\n ),\t\t\t\t\t\t\t \n 'show_ui' => true,\n 'show_in_menu' => true, \n 'show_in_nav_menus' => true,\n 'menu_position'=>5,\n 'query_var' => true,\n 'rewrite' => true,\n 'rewrite' => array( 'slug' => 'testimonials', 'with_front' => FALSE,),\n 'capability_type' => 'post',\n 'register_meta_box_cb' => 'add_testimonials_metabox',\n 'supports' => array(\n 'title',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n 'comments',\n 'author',\n 'editor'\n )\n ) \n );\n}", "static function get_portfolio_by_id($id){\n\t\treturn self::$db->where('id',$id)->get('portfolio')->row();\n\t}", "function gf_testimonials_cpt() {\n\nregister_post_type( 'testimonials',\n array(\n 'labels' => array(\n 'name' => __( 'Testimonials' ),\n 'singular_name' => __( 'Testimonial' ),\t\t\n\t\t'add_new' => _x( 'Add New', 'Testimonial' ),\n\t\t'add_new_item' => __( 'Add New Testimonial' ),\n\t\t'edit_item' => __( 'Edit Testimonial' ),\n\t\t'new_item' => __( 'New Testimonial' ),\n\t\t'view_item' => __( 'View Testimonials' ),\n\t\t'search_items' => __( 'Search Testimonials' ),\n\t\t'not_found' => __( 'No Testimonials found' ),\n\t\t'not_found_in_trash' => __( 'Testimonials found in Trash' ),\n\t\t'parent_item_colon' => ''\n\t\t\n ),\n 'public' => true,\n\t 'supports' => array('title', 'editor', 'thumbnail'),\n\t 'menu_icon' => GF_TESTIMONIALS_PLUGIN_URL .'assets/images/icon-testimonials.png',\n\t 'query_var' => true,\n\t 'rewrite' => array( 'slug' => 'testimonials' ),\n )\n );\n}", "public function __construct() {\n\n $this->post_type = 'testimonials';\n\t\t\n\t\t// Register this cpt\n // First parameter should be an array with Singular, Plural, and Registered name\n parent::__construct(\n \n \tarray(\n\t\t\t\t__( 'Testimonial', '_s' ), // Singular\n\t\t\t\t__( 'Testimonials', '_s' ), // Plural\n\t\t\t\t$this->post_type // Registered name/slug\n\t\t\t),\n\t\t\tarray( \n\t\t\t\t'public' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'show_ui' \t\t\t => true,\n\t\t\t\t'show_in_menu' \t\t => true,\n\t\t\t\t'show_in_nav_menus' => false,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t//'rewrite' => array('slug'=> 'feature-Testimonials' ),\n\t\t\t\t'supports' => array( 'title', 'thumbnail', 'editor', 'revisions', 'page-attributes' ),\n\t\t\t\t )\n\n );\n\t\t\n\t\t//add_filter('pre_get_posts', array( $this, 'query_filter' ) );\n\t\t\n }", "function theme_nt_landium_section_testimonial( $atts, $content = null ) {\r\n extract( shortcode_atts(array(\r\n\t\"section_id\"\t\t=> '',\r\n\t\"heading_display\"\t=> '',\r\n\t\"section_heading\"\t=> '',\r\n\t\"section_desc\"\t\t=> '',\r\n\t\"testistyle\"\t\t=> '',\r\n\t\"testiloop\"\t\t\t=> '',\r\n\t\"testi_img\"\t\t\t=> '',\r\n\t\"testi_quote\"\t\t=> '',\r\n\t\"testi_name\"\t\t=> '',\r\n\t\"testi_job\"\t\t\t=> '',\r\n\t\"sectionbgcss\"\t\t=> '',\r\n\t//custom style\r\n\t\"customstyle\"\t\t=> '',\r\n\t\"currentitem\"\t\t=> '',\r\n\t\"animation\"\t\t\t=> '',\r\n\t\"size\"\t\t\t\t=> '',\r\n\t\"lineh\"\t\t\t\t=> '',\r\n\t\"weight\"\t\t\t=> '',\r\n\t\"color\"\t\t\t\t=> '',\r\n\t\"position\"\t\t\t=> '',\r\n\t\"bgcolor\"\t\t\t=> '',\r\n\t\"padtop\"\t\t\t=> '',\r\n\t\"padright\"\t\t\t=> '',\r\n\t\"padbottom\"\t\t\t=> '',\r\n\t\"padleft\"\t\t\t=> '',\r\n\t\"brdtop\"\t\t\t=> '',\r\n\t\"brdright\"\t\t\t=> '',\r\n\t\"brdbottom\"\t\t\t=> '',\r\n\t\"brdleft\"\t\t\t=> '',\r\n\t\"borderstyl\"\t\t=> '',\r\n\t\"bordercolor\"\t\t=> '',\r\n\t\"borderradius\"\t\t=> '',\r\n\t), $atts) );\r\n\r\n\t$sectionbg_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $sectionbgcss, ' ' ), $atts );\r\n\t$id = ($section_id != '') ? 'id=\"'. esc_attr($section_id) . '\"' : '';\r\n\t$testi_loop = (array) vc_param_group_parse_atts($testiloop);\r\n\r\n\t$custom_style = (array) vc_param_group_parse_atts($customstyle);\r\n\tforeach ( $custom_style as $styl ) {\r\n\t\tif ( !empty( $styl ) ){\r\n\t\t\t$currentitem= ( !empty( $styl['currentitem'] ) ) ? $styl['currentitem'] : '';\r\n\t\t\t$size \t\t= ( !empty( $styl['size'] ) ) ? $styl['size'] : '';\r\n\t\t\t$weight \t= ( !empty( $styl['weight'] ) ) ? $styl['weight'] : '';\r\n\t\t\t$lineh \t\t= ( !empty( $styl['lineh'] ) ) ? $styl['lineh'] : '';\r\n\t\t\t$color \t\t= ( !empty( $styl['color'] ) ) ? $styl['color'] : '';\r\n\t\t\t$position \t= ( !empty( $styl['position'] ) ) ? $styl['position'] : '';\r\n\t\t\t$fstyle \t= ( !empty( $styl['fstyle'] ) ) ? $styl['fstyle'] : '';\r\n\t\t\t$bgcolor \t= ( !empty( $styl['bgcolor'] ) ) ? $styl['bgcolor'] : '';\r\n\t\t\t$padtop \t= ( !empty( $styl['padtop'] ) ) ? ' padding-top:'.$styl['padtop'].';' : '';\r\n\t\t\t$padright \t= ( !empty( $styl['padright'] ) ) ? ' padding-right:'.$styl['padright'].';' : '';\r\n\t\t\t$padbottom \t= ( !empty( $styl['padbottom'] ) ) ? ' padding-bottom:'.$styl['padbottom'].';' : '';\r\n\t\t\t$padleft \t= ( !empty( $styl['padleft'] ) ) ? ' padding-left:'.$styl['padleft'].';' : '';\r\n\t\t\t$padding \t= ( $padtop || $padright || $padbottom || $padleft ) ? $padtop.$padright.$padbottom.$padleft : '';\r\n\t\t\t$brdtop \t= ( !empty( $styl['brdtop'] ) ) ? ' border-top:'.$styl['brdtop'].';' : '';\r\n\t\t\t$brdright \t= ( !empty( $styl['brdright'] ) ) ? ' border-right:'.$styl['brdright'].';' : '';\r\n\t\t\t$brdbottom \t= ( !empty( $styl['brdbottom'] ) ) ? ' border-bottom:'.$styl['brdbottom'].';' : '';\r\n\t\t\t$brdleft \t= ( !empty( $styl['brdleft'] ) ) ? ' border-left:'.$styl['brdleft'].';' : '';\r\n\t\t\t$border \t= ( $brdtop || $brdright || $brdbottom || $brdleft ) ? $brdtop.$brdright.$brdbottom.$brdleft : '';\r\n\t\t\t$borderstyl = ( !empty( $styl['borderstyl'] ) ) ? $styl['borderstyl'] : '';\r\n\t\t\t$bordercolor= ( !empty( $styl['bordercolor'] ) ) ? $styl['bordercolor'] : '';\r\n\t\t\t$borderradius= ( !empty( $styl['borderradius'] ) ) ? $styl['borderradius'] : '';\r\n\r\n\t\t\tif ( $currentitem == '1' ){\r\n\t\t\t\t$current1 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation1 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '2' ){\r\n\t\t\t\t$current2 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation2 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '3' ){\r\n\t\t\t\t$current3 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t}elseif ( $currentitem == '4' ){\r\n\t\t\t\t$current4 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t}elseif ( $currentitem == '5' ){\r\n\t\t\t\t$current5 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t}else{\r\n\t\t\t\t$current1 = $current2 = $current3 = $current4 = $current5 = $animation1 = $animation2 = '';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t$out = '';\r\n\r\n\r\n\t\t\t$out .= '<!-- start section -->';\r\n\t\t\t$out .= '<a '.$id.' class=\"ancor\"></a>';\r\n\t\t\t$out .= '<section class=\"section section--background-base-light'.esc_attr( $sectionbg_css ).'\">';\r\n\t\t\t\t$out .= '<div class=\"container\">';\r\n\t\t\t\t$headingdisplay = $heading_display ? $heading_display : 'show';\r\n\t\t\t\t$testi_style = $testistyle ? $testistyle : '1';\r\n\t\t\t\tif ( $headingdisplay !='hide' ) {\r\n\t\t\t\t\t$out .= '<div class=\"section-heading section-heading--center\">';\r\n\t\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<h2 class=\"title h1'.$animation1.'\"'.$current1.'>'.landium_sanitize_data( $section_heading ).'</h2>'; }\r\n\t\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<p class=\"sec-desc'.$animation2.'\"'.$current2.'>'.landium_sanitize_data( $section_desc ).'</p>'; }\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t}\r\n\t\t\t\t\t$out .= '<div class=\"feedback feedback--slider feedback--style-'.esc_attr( $testi_style ).' feedback-slider--style-'.esc_attr( $testi_style ).'\">';\r\n\t\t\t\t\t\t$out .= '<div class=\"feedback__inner owl-carousel owl-theme\">';\r\n\r\n\t\t\t\t\t\tforeach ( $testi_loop as $testi ) {\r\n\t\t\t\t\t\t\t$out .= '<!-- start item -->';\r\n\t\t\t\t\t\t\t$out .= '<article class=\"feedback__item\">';\r\n\t\t\t\t\t\t\tif ( isset( $testi['testi_quote'] ) !='' ){\r\n\t\t\t\t\t\t\t\t$out .= '<div class=\"feedback__text\">';\r\n\t\t\t\t\t\t\t\t\t$out .= '<p'.$current3.'>'.$testi['testi_quote'].'</p>';\r\n\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$out .= '<div class=\"feedback__author\">';\r\n\t\t\t\t\t\t\t\tif ( isset( $testi['testi_img'] ) !='' ){\r\n\t\t\t\t\t\t\t\t\t$testiimg = wp_get_attachment_url( $testi['testi_img'],'full' );\r\n\t\t\t\t\t\t\t\t\t$out .= '<img class=\"circled\" src=\"'.esc_url( $testiimg ).'\" height=\"75\" width=\"75\" alt=\"demo\" />';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( isset( $testi['testi_name'] ) !='' ){$out .= '<h3 class=\"name\"'.$current4.'>'.$testi['testi_name'].'</h3>'; }\r\n\t\t\t\t\t\t\t\t\tif ( isset( $testi['testi_job'] ) !='' ){$out .= '<h5 class=\"position\"'.$current5.'>'.$testi['testi_job'].'</h5>'; }\r\n\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t$out .= '</article>';\r\n\t\t\t\t\t\t\t$out .= '<!-- end item -->';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t$out .= '</div>';\r\n\t\t\t$out .= '</section>';\r\n\t\t\t$out .= '<!-- end section -->';\r\n\r\n\treturn $out;\r\n}", "function pt_show_blc_front()\n\t\t{\n\t\t\t$options = get_option( 'pt_settings' );\n\t\t\t$args = array(\n\t\t\t\t'post_type' => 'testimonials',\n\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'orderby' => 'date',\n\t\t\t\t'order' => 'DESC'\n\t\t\t);\n\t\t\t$the_query = new WP_Query( $args );\n\n\t\t\t$autoplay = ( (int) $options['pt_checkbox_field_autoplay'] == 1 ) ? 'true' : 'false';\n\t\t\t$speed = $options['pt_text_field_speed'];\n\t\t\t$color = $options['pt_text_field_color'];\n\t\t\t$pausesl = ( (int) $options['pt_checkbox_field_pause'] == 1 ) ? 'true' : 'false';\n\t\t\t$model = $options['pt_select_field_model'];\n\n\t\t\tif( $model == 1 )\n\t\t\t{\n\t\t\t\t$data = '<style type=\"text/css\">\n\t\t\t\t\t\t\t.tem-helper-right{\n\t\t\t\t\t\t\t\tbackground-color: '.$color.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t#model1 .arrow_box{\n\t\t\t\t\t\t\t\tbackground: '.$color.';\n\t\t\t\t\t\t \tborder: 4px solid '.$color.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t#model1 .arrow_box:after,#model1 .arrow_box:before{\n\t\t\t\t\t\t\t\tborder-right-color: '.$color.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</style>\n\t\t\t\t\t\t<div class=\"tem-bloc-testimonial\" id=\"model1\">\n\t\t\t\t\t\t\t<div class=\"tem-items\">\n\t\t\t\t\t\t\t\t<div class=\"tem-helper-right\">\n\t\t\t\t\t\t\t\t\t<p class=\"tem-txt\">“</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"arrow_box\"></div>\n\t\t\t\t\t\t\t\t<div class=\"tem-slick\">\n\t\t\t\t\t\t';\n\t\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t\t$the_query->the_post();\n\t\t\t\t\t$data.= '<div class=\"tem-single-item\">\n\t\t\t\t\t\t\t\t\t<div class=\"tem-col-6 tem-img\">\n\t\t\t\t\t\t\t\t\t\t<h2 class=\"tem-tit\">'.__( \"Testimonials\", \"ptlg\" ).'</h2>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t'.get_the_post_thumbnail( get_the_ID(), array('class'=>'img-responsive')).'\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<h4>'.get_the_title().'</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>'.get_post_meta( get_the_ID(), '_job', true ).'</p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"tem-col-6 tem-infos\">\n\t\t\t\t\t\t\t\t\t\t<p class=\"tem-desc\">'.get_the_content().'</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t\t$data.= '</div></div></div>\n\t\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t\tvar $play = '.$autoplay.';\n\t\t\t\t\t\t\t\tvar $pause = '.$pausesl.';\n\t\t\t\t\t\t\t\tjQuery(\"#model1 .tem-slick\").slick({\n\t\t\t\t\t\t\t dots: true,\n\t\t\t\t\t\t\t infinite: true,\n\t\t\t\t\t\t\t fade: true,\n\t\t\t\t\t\t\t speed: 500,\n\t\t\t\t\t\t\t cssEase: \"linear\",\n\t\t\t\t\t\t\t adaptiveHeight: true,\n\t\t\t\t\t\t\t autoplay: '.$autoplay.',\n\t\t\t\t\t\t\t pauseOnHover : '.$pausesl.',\n\t\t\t\t\t\t\t autoplaySpeed: '.$speed.'\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t}\n\t\t\telse if( $model == 2 )\n\t\t\t{\n\t\t\t\t$data .= '<style type=\"text/css\">\n\t\t\t\t\t\t\t#model2 .tem-infos .poste{\n\t\t\t\t\t\t\t\tcolor: '.$color.'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t#model2 .tem-tit:after{\n\t\t\t\t\t\t\t\tbackground-color: '.$color.'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</style>\n\t\t\t\t\t\t<div class=\"tem-bloc-testimonial\" id=\"model2\">\n\t\t\t\t\t\t<div class=\"tem-items\">\n\t\t\t\t\t\t\t<h2 class=\"tem-tit\">'.__( \"They say about us\", \"ptlg\" ).'</h2>\n\t\t\t\t\t\t\t<div class=\"tem-slick\">\n\t\t\t\t\t\t';\n\t\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t\t$the_query->the_post();\n\t\t\t\t\t$data.= '<div class=\"tem-single-item\">\n\t\t\t\t\t\t\t\t<div class=\"tem-img\">\n\t\t\t\t\t\t\t\t\t'.get_the_post_thumbnail( get_the_ID(), array('class'=>'img-responsive')).'\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"tem-infos\">\n\t\t\t\t\t\t\t\t\t<p>'.strip_tags(get_the_content()).'</p>\n\t\t\t\t\t\t\t\t\t<h4>'.get_the_title().'</h4>\n\t\t\t\t\t\t\t\t\t<p class=\"poste\">'.get_post_meta( get_the_ID(), '_job', true ).'</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t\t$data.= '</div></div></div>';\n\t\t\t}\n\t\t\telse if( $model == 3 )\n\t\t\t{\n\t\t\t\t$data .= '<style type=\"text/css\">\n\t\t\t\t\t\t\t#model3 .tem-single-item, #model3 .tem-tit:after{\n\t\t\t\t\t\t\t\tbackground-color: '.$color.'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</style>\n\t\t\t\t\t\t<div class=\"tem-bloc-testimonial\" id=\"model3\">\n\t\t\t\t\t\t<div class=\"tem-items\">\n\t\t\t\t\t\t\t<h2 class=\"tem-tit\">'.__( \"Comments from our clients\", \"ptlg\" ).'</h2>\n\t\t\t\t\t\t\t<div class=\"tem-slick\">\n\t\t\t\t\t\t';\n\t\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t\t$the_query->the_post();\n\t\t\t\t\t$data.= '<div class=\"tem-single-item\">\n\t\t\t\t\t\t\t\t<div class=\"tem-img\">\n\t\t\t\t\t\t\t\t\t'.get_the_post_thumbnail( get_the_ID(), array('class'=>'img-responsive')).'\n\t\t\t\t\t\t\t\t\t<h4>'.get_the_title().'</h4>\n\t\t\t\t\t\t\t\t\t<p class=\"poste\">'.get_post_meta( get_the_ID(), '_job', true ).'</p>\n\t\t\t\t\t\t\t\t\t<p>'.strip_tags(get_the_content()).'</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t\t$data.= '</div></div></div>\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\tvar $play = '.$autoplay.';\n\t\t\t\t\t\t\tvar $pause = '.$pausesl.';\n\t\t\t\t\t\t\tjQuery(\"#model3 .tem-slick\").slick({\n\t\t\t\t\t\t dots: false,\n\t\t\t\t\t\t infinite: true,\n\t\t\t\t\t\t speed: 500,\n\t\t\t\t\t\t cssEase: \"linear\",\n\t\t\t\t\t\t adaptiveHeight: true,\n\t\t\t\t\t\t autoplay: $play,\n\t\t\t\t\t\t pauseOnHover : $pause,\n\t\t\t\t\t\t autoplaySpeed: '.$speed.',\n\t\t\t\t\t\t slidesToShow: 3,\n\t\t\t\t\t\t \t slidesToScroll: 1,\n\t\t\t\t\t\t responsive: [\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t breakpoint: 1024,\n\t\t\t\t\t\t\t settings: {\n\t\t\t\t\t\t\t slidesToShow: 3,\n\t\t\t\t\t\t\t slidesToScroll: 1,\n\t\t\t\t\t\t\t infinite: true,\n\t\t\t\t\t\t\t dots: true\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t breakpoint: 600,\n\t\t\t\t\t\t\t settings: {\n\t\t\t\t\t\t\t slidesToShow: 2,\n\t\t\t\t\t\t\t slidesToScroll: 1\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t breakpoint: 420,\n\t\t\t\t\t\t\t settings: {\n\t\t\t\t\t\t\t slidesToShow: 1,\n\t\t\t\t\t\t\t slidesToScroll: 1\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t });\n\t\t\t\t\t\t</script>\n\t\t\t\t';\n\t\t\t}\n\t\t\telse if( $model == 4 )\n\t\t\t{\n\t\t\t\t$data .= '<style type=\"text/css\">\n\t\t\t\t\t\t\t#model4 .tem-img h4,#model4 .slick-prev::before,#model4 .slick-next::before,#model4 .slick-dots li.slick-active button::before,#model4 .slick-dots li button::before,#model4 .tem-tit{\n\t\t\t\t\t\t\t\tcolor: '.$color.'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t#model4 .tem-tit:after{\n\t\t\t\t\t\t\t\tbackground-color: '.$color.'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</style>\n\t\t\t\t\t\t<div class=\"tem-bloc-testimonial\" id=\"model4\">\n\t\t\t\t\t\t<div class=\"tem-items\">\n\t\t\t\t\t\t\t<!--<h2 class=\"tem-tit\">'.__( \"What they say?\", \"ptlg\" ).'</h2>-->\n\t\t\t\t\t\t\t<div class=\"tem-slick\">\n\t\t\t\t\t\t';\n\t\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t\t$the_query->the_post();\n\t\t\t\t\t$data.= '<div class=\"tem-single-item\">\n\t\t\t\t\t\t\t\t<div class=\"tem-img\">\n\t\t\t\t\t\t\t\t\t<div class=\"tem-bl-img\">\n\t\t\t\t\t\t\t\t\t\t'.get_the_post_thumbnail( get_the_ID(), array('class'=>'img-responsive')).'\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"tem-infos\">\t\n\t\t\t\t\t\t\t\t\t\t<h4>'.get_the_title().'</h4>\n\t\t\t\t\t\t\t\t\t\t<p class=\"poste\">'.get_post_meta( get_the_ID(), '_job', true ).'</p>\n\t\t\t\t\t\t\t\t\t\t<p>'.strip_tags(get_the_content()).'</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t\t$data.= '</div></div></div>\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\tvar $play = '.$autoplay.';\n\t\t\t\t\t\t\tvar $pause = '.$pausesl.';\n\t\t\t\t\t\t\tjQuery(\"#model4 .tem-slick\").slick({\n\t\t\t\t\t\t\t dots: true,\n\t\t\t\t\t\t\t infinite: true,\n\t\t\t\t\t\t\t speed: 500,\n\t\t\t\t\t\t\t cssEase: \"linear\",\n\t\t\t\t\t\t\t adaptiveHeight: true,\n\t\t\t\t\t\t\t autoplay: $play,\n\t\t\t\t\t\t\t fade : true,\n\t\t\t\t\t\t\t pauseOnHover : '.$pausesl.',\n\t\t\t\t\t\t\t autoplaySpeed: '.$speed.'\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t</script>\n\t\t\t\t';\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "public function getContests($orderby);", "public function get_name()\n {\n return 'bandq_testimonial';\n }", "function wpt_testimonials_init(){\n\tregister_setting('wpt_testimonial_options','wpt_effect');\n\tregister_setting('wpt_testimonial_options','wpt_speed');\n\tregister_setting('wpt_testimonial_options','wpt_sortby');\t\n\tregister_setting('wpt_testimonial_options','wpt_orderby');\n\tregister_setting('wpt_testimonial_options','wpt_viewall');\n\tregister_setting('wpt_testimonial_options','wpt_content_limit');\n\tregister_setting('wpt_testimonial_options','wpt_viewall_page');\n}", "public function destroy(Testimonial $testimonial)\n {\n //\n }", "function jlt_testimonials_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Testimonials', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Testimonial', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Testimonials', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Testimonial', 'text_domain' ),\n\t\t'archives' => __( 'Testimonial Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Testimonial Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Testimonials', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Testimonial', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Testimonial', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Testimonial', 'text_domain' ),\n\t\t'update_item' => __( 'Update Testimonial', 'text_domain' ),\n\t\t'view_item' => __( 'View Testimonial', 'text_domain' ),\n\t\t'view_items' => __( 'View Testimonials', 'text_domain' ),\n\t\t'search_items' => __( 'Search Testimonials', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into testimonial', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this testimonial', 'text_domain' ),\n\t\t'items_list' => __( 'Testimonials list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Testimonials list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter testimonials list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Testimonial', 'text_domain' ),\n\t\t'description' => __( 'Client testimonials', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'revisions', 'custom-fields', ),\n\t\t'taxonomies' => array( ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-quote',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\t\t\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'testimonial', $args );\n\n}", "function grve_print_recent_portfolio_items() {\n\n\t$exclude_ids = array( get_the_ID() );\n\t$args = array(\n\t\t'post_type' => 'portfolio',\n\t\t'post_status'=>'publish',\n\t\t'post__not_in' => $exclude_ids ,\n\t\t'posts_per_page' => 3,\n\t\t'paged' => 1,\n\t);\n\n\n\t$query = new WP_Query( $args );\n\n\tif ( $query->have_posts() && $query->found_posts > 1 ) {\n?>\n\t<div class=\"grve-related-post\">\n\t\t<h5 class=\"grve-related-title\"><?php _e( 'Recent Entries', GRVE_THEME_TRANSLATE ); ?></h5>\n\t\t<ul>\n\n<?php\n\n\t\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t\techo '<li>';\n\t\t\tget_template_part( 'templates/portfolio', 'recent' );\n\t\t\techo '</li>';\n\t\tendwhile;\n\t\telse :\n\t\tendif;\n?>\n\t\t</ul>\n\t</div>\n<?php\n\t\twp_reset_postdata();\n\t}\n}", "function showTestimonialStyleContentThumbnail($detailsURL, $previewBase, $imageBase, $thumbnailInfo) {\n\t$image = $thumbnailInfo->filename;\n\t$thumbnailURL = $previewBase ? \"$previewBase/$image\" : $image;\n\t$imageURL = $imageBase ? \"$imageBase/$image\" : $image;\n\t$customer = $thumbnailInfo->name;\n\t$store = getPropertyValue($thumbnailInfo, 'store');\n\t$fullAddress = array($thumbnailInfo->address, $thumbnailInfo->city, $thumbnailInfo->state, $thumbnailInfo->zip);\n\t$address = join(' ', $fullAddress);\n?>\n\t<div id=\"container76\" class=\"coupcontainer reset-15 col-xs-12 col-md-10 col-lg-10 couppicr panel panel-default\" style=\"margin-bottom:20px;padding-bottom:10px;\">\n\t\t<table width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td valign=\"top\" width=\"60%\">\n\t\t\t\t\t<a href=\"<?=$detailsURL?>\" title=\"<?=$customer?> - <?=$store?>\">\n\t\t\t\t\t\t<?=$customer?>\n\t\t\t\t\t</a>\n\t\t\t\t\t<br />\n \t\t\t\t<small class=\"coupaddress\" style=\"color:gray\">\n\t\t\t\t\t\t<?=$address?>\n\t\t\t\t\t</small>\n\t\t\t\t\t<br />\n \t\t\t\t<?=$thumbnailInfo->testimonial?>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"6%\"></td>\n\t\t\t\t<td width=\"33%\" valign=\"top\">\n\t\t\t\t\t<a href=\"<?=$detailsURL?>\" title=\"<?=$customer?>\" class=\"screenshot\" rel=\"<?=$thumbnailURL?>\">\n\t\t\t\t\t\t<img src=\"<?=$imageURL?>\" alt=\"<?=$customer?>\" class=\"img-responsive\" align=\"right\"> \n\t\t\t\t\t</a>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n </div>\n<?php\n}", "public function read($slug_portfolio)\n {\n\n $this->db->select('*');\n $this->db->from('tb_portfolio');\n $this->db->join('tb_user', 'tb_user.id_user = tb_portfolio.id_user', 'left');\n $this->db->join('tb_client', 'tb_client.id_client = tb_portfolio.id_client', 'left');\n $this->db->join('tb_layanan', 'tb_layanan.judul_layanan = tb_portfolio.nama_layanan', 'left');\n $this->db->where('slug_portfolio', $slug_portfolio);\n return $this->db->get()->row();\n }", "function getPortfolio($rows = null, $page = 0, $limit_uris = false, $sort='date', $published_only=true)\n\t{\n\t\t$qStr = \"SELECT p.*, GROUP_CONCAT(t.name SEPARATOR ', ') AS tools\n\t\t\t\tFROM portfolio p\n\t\t\t\t\tLEFT JOIN portfolio_tools pt ON p.id=pt.portfolio_id\n\t\t\t\t\tLEFT JOIN tools t ON pt.tool_id=t.id\";\n\t\t\n\t\tif ($limit_uris || $published_only) {\n\t\t\t$qStr .= \" WHERE \";\n\t\t\t$onedone = false;\n\t\t\t\n\t\t\tif ($limit_uris) {\n\t\t\t\t$qStr .= \" (p.uri!='' OR p.uri IS NOT NULL)\";\n\t\t\t\t$onedone = true;\n\t\t\t}\n\t\t\t\n\t\t\tif ($published_only) {\n\t\t\t\t$qStr .= $onedone ? ' AND ' : '';\n\t\t\t\t$qStr .= \" p.published=1\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$qStr .= \" GROUP BY p.id\";\n\t\t$qStr .= \" ORDER BY p.time DESC\";\n\t\t\n\t\tif (!is_null($rows)) {\n\t\t\t$page = intval($page);\n\t\t\t$page = $page <= 1 ? 0 : $page - 1;\n\t\t\t\n\t\t\t$qStr .= \" LIMIT \".intval($page).\", \".intval($rows);\n\t\t}\n\t\t\n\t\t$q = $this->db->query($qStr);\n\t\t\n\t\tif ($q->num_rows() > 0)\n\t\t\treturn array('success'=>true, 'items'=>$q->result_array());\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"No items found\");\n\t}", "public function index()\n {\n $prices = Price::where('on_homepage', true)->get();\n\n $canDo = Service::where('on_homepage', true)->get();\n\n $portfolio = Portfolio::latest()->take(8)->get();\n\n $testimonials = Testimonial::latest()->take(10)->get();\n\n $blogs = BlogPost::latest()->take(3)->get();\n\n $ourPros = [\n [\n 'title' => 'Fast to develop',\n 'description' => 'We are fast. We can build CMS WordPress website up to 3-5 days. Just choose a template. If you need complex website with framework, we can build it up to 20-30 days.',\n 'img' => 'https://www.flaticon.com/svg/static/icons/svg/1046/1046460.svg',\n\n ],\n\n [\n 'title' => 'Good price',\n 'description' => 'Only transparent prices. Get a quote, pay and wait. No additional fee. Don\\'t hesitate to ask about time to develop',\n 'img' => 'https://www.flaticon.com/svg/static/icons/svg/1046/1046460.svg',\n\n ],\n\n [\n 'title' => 'Pay before or pay after',\n 'description' => 'Register or login. Fill the info and required fields, get a quote, milestones and pay after.',\n 'img' => 'https://www.flaticon.com/svg/static/icons/svg/1046/1046460.svg',\n\n ],\n\n [\n 'title' => 'Discount for next time',\n 'description' => 'One project is done. Need one else? Need to edit project, update or extend? - Get a special discount from us up to 50%.',\n 'img' => 'https://www.flaticon.com/svg/static/icons/svg/1046/1046460.svg',\n\n ],\n ];\n\n return view('homepage', compact('testimonials', 'portfolio', 'canDo', 'ourPros', 'prices', 'blogs'));\n }", "public function get_name() {\n return 'ts-testimonial-carousel';\n }", "public function index()\n {\n $profileId = isset(auth()->user()->profile) ? auth()->user()->profile->id : 0;\n $portfolios = Portfolio::where('profile_id', $profileId)->orderBy('created_at', 'desc')->paginate(8);\n return view('admin.portfolio.index', compact('portfolios'));\n }", "function _testimonial_slider($options)\n\t{\n\t\t\n\t\t$element_size = zn_get_size( $options['_sizer'] );\n\t\t\n\t\t$new_size = $element_size['sizer'];\n\t\t\n\t\tif ( !empty ( $options['tf_title'] ) || !empty ( $options['tf_desc'] ) ) {\n\t\t\tpreg_match('|\\d+|', $element_size['sizer'] , $new_size);\n\t\t\t$new_size = $new_size[0]-3;\n\t\t\t$new_size = 'span'.$new_size;\n\t\t\t\n\t\t\techo '<div class=\"span3 testimonials_fader\">';\n\t\t\t\n\t\t\t\tif ( !empty ( $options['tf_title'] ) ) {\n\t\t\t\t\techo '<h3 class=\"m_title\">'.$options['tf_title'].'</h3>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty ( $options['tf_desc'] ) ) {\n\t\t\t\t\techo '<p>'.$options['tf_desc'].'</p>';\n\t\t\t\t}\n\t\t\t\n\t\t\techo '</div>';\n\n\t\t}\n\t\t\n\t\techo '<div class=\"'.$new_size.' testimonials_fader\">';\n\t\t\techo '<ul id=\"testimonials_fader\" class=\"fixclear\">';\n\t\t\t\tforeach ( $options['testimonials_single'] as $test ) {\n\t\t\t\t\techo '<li>';\n\t\t\t\t\t\n\t\t\t\t\t\techo '<blockquote>'.$test['tf_single_test'].'</blockquote>';\n\t\t\t\t\t\techo '<h6>'.$test['tf_single_author'].'</h6>';\n\t\t\t\t\t\n\t\t\t\t\techo '</li>';\n\t\t\t\t}\n\t\techo '</div>';\n\t\techo '</ul>';\n\n\t}", "function cv_get_project_data(WP_REST_Request $request){\n\t$posts = get_posts(array( 'post_type'=>'cv_project', 'numberposts'=>-1 ));\n\t$data = array( 'projects'=>[], 'links'=>[] );\n\tforeach( $posts as $post){\n\t\t$proj = [ \n\t\t\t'id'=> $post->ID, \n\t\t\t'title'=>$post->post_title,\n\t\t\t'url'=>get_permalink($post->ID),\n\t\t\t'tags'=>[]\n\t\t];\n\t\t# set dates if they exist\n\t\tif(($start = get_post_meta($post->ID, \"start\", true)) != '' ){\n\t\t\t$proj['start'] = $start; \n\t\t}\n\t\tif(($end = get_post_meta($post->ID, \"end\", true)) != '' ){ \n\t\t\t$proj['end'] = $end; \n\t\t}\n\t\t# set tags if they exist\n\t\tforeach( wp_get_post_terms($post->ID,'cv_tag') as $tag){\n\t\t\t$proj['tags'][] = $tag->slug;\n\t\t}\n\t\t$data['projects'][] = $proj;\n\t\t# add a link for causal relationships if any\n\t\t$caused = get_post_meta($post->ID,'caused');\n\t\tif( count($caused) > 0 ){\n\t\t\t# add a link for each caused project\n\t\t\tforeach($caused as $idString){\n\t\t\t\t$data['links'][] = [\n\t\t\t\t\t'source'=>$post->ID, 'target'=>(int)$idString, 'type'=>'causal'\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\t# add a link for a parent relationship if any\n\t\tif( $post->post_parent != 0 ){\n\t\t\t$data['links'][] = [\n\t\t\t\t'source'=>$post->ID, 'target'=>$post->post_parent,\n\t\t\t\t'type'=>'constitutive'\n\t\t\t];\n\t\t}\n\t\t$data['tags'] = get_terms(['taxonomy'=>'cv_tag']);\n\t\tshuffle($data['tags']);\n\t}\n\treturn $data;\n}", "function testimonials_columns( $column, $post_id ) {\n\tswitch ( $column ) {\n\t\tcase 'testimonial':\n\t\t\tthe_excerpt();\n\t\t\tbreak;\n\t}\n}", "function sp_portfolio_sc( $atts ) {\n\n\t\t$atts = extract( shortcode_atts( array(\n\t\t\t'columns' => 'one-fourth',\n\t\t\t'limit' => -1,\n\t\t\t'categories' => ''\n\t\t), $atts ) );\n\n\t\tglobal $post;\n\t\t$output = '';\n\t\t$last_project = 1;\n\n\t\t$args = array('post_type' => 'portfolio',\n\t\t\t\t\t 'posts_per_page' => esc_attr( $limit ),\n\t\t\t\t\t 'order' => 'DESC',\n\t\t\t\t\t 'orderby' => 'date',\n\t\t\t\t\t 'post_status' => 'publish'\n\t\t\t\t );\n\t\t\n\t\tif( $categories ) {\n\t\t\n\t\t\t$categories = explode( ',', $categories );\n\t\t\t\n\t\t\tforeach ( $categories as $i => $category ) {\n\t\t\t\t\n\t\t\t\t$category_slugs[$i] .= get_term( $category, 'portfolio-categories' )->slug;\n\n\t\t\t}\n\t\t\t\n\t\t\t$categories = implode( ',', $category_slugs );\n\t\t\t\n\t\t\t$args = array_merge( $args, array( 'portfolio-categories' => esc_attr( $categories ) ) );\n\t\t\n\t\t}\n\t\t\t\n\t\tquery_posts( $args );\n\n\t\tif( have_posts() ) :\n\n\t\t\t$output .= '<section id=\"portfolio-items\" class=\"clearfix\">';\n\n\t\t\t$lightbox_class = null;\n\n\n\t\t\twhile ( have_posts() ) : the_post();\n\n\t\t\t\t// Remove any old data\n\t\t\t\t$data_categories = null;\n\t\t\t\t$category_names = null;\n\n\t\t\t\t$categories = get_the_terms( $post->ID, 'portfolio-categories' );\n\n\t\t\t\tif( $categories ) {\n\n\t\t\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data_categories .= $category->slug . ' ';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$category_names .= $category->slug . ' / ';\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($last_project % esc_attr( $limit )) == 0) \n\t\t\t\t\t$last_class = 'last';\n\n\t\t\t\t$post_thumbnail_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-' . esc_attr( $columns ) );\n\t\t\t\t$post_thumbnail_data = sp_get_the_post_thumbnail_data( $post->ID );\n\t\t\t\t$permalink = $post_thumbnail_data['src'];\n\n\t\t\t\t$output .= '<article class=\"' . esc_attr( $columns ) . ' ' . $last_class . '\" data-categories=\"' . trim( $data_categories ) . '\">';\n\t\t\t\t\t\n\t\t\t\t\tif( $post_thumbnail_img ) {\n\t\t\t\t\t\t$output .= '<a href=\"' . $permalink . '\" title=\"' . get_the_title() . '\"' . $lightbox_class . '>';\n\t\t\t\t\t\t$output .= '<img src=\"' . $post_thumbnail_img[0] . '\" alt=\"' . $post_thumbnail_data['alt'] . '\" title=\"' . $post_thumbnail_data['title'] . '\" class=\"' . $post_thumbnail_data['class'] . '\">';\n\t\t\t\t\t\t$output .= '</a>';\n\t\t\t\t\t}\n\n\t\t\t\t$output .= '<a href=\"' . get_permalink() . '\" class=\"project-meta\">';\n\t\t\t\t$output .= '<h5 class=\"title\">' . get_the_title() . '</h5>';\n\t\t\t\t$output .= '<span class=\"categories\">' . substr( trim( $category_names ), 0, -2 ) . '</span>';\n\t\t\t\t$output .= '</a>';\n\t\t\t\t$output .= '</article><!-- end project -->';\n\t\t\t\t\n\t\t\t\t$last_project++;\n\t\t\t\t\n\t\t\tendwhile;\n\t\t\twp_reset_query();\n\t\t\t\n\t\t\t$output .= '</section><!-- end #portfolio-items -->';\n\n\t\tendif;\n\n\t\treturn $output;\n\n\t}", "function display_vdo_testimonial()\n {\n $this ->db-> select('*');\n $this ->db-> from('tbl_testimonial');\n $this ->db-> where('testimonial_type',2);\n $this->db->where('testimonial_delete_status',0);\n $this->db->order_by('testimonial_id', 'desc');\n $query = $this->db->get();\n return $query->result() ;\n }", "function pm_portfolio_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t\t'number_of_portfolio'\t=> '',\n\t\t\t'class'\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm_portfolio';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row items' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t\t<div id=\"portfolio\" class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n\t\t\t<div class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t\t\t\t<div class=\"twelve columns\">\n\t\t\t\t\t<div id=\"portfolio-wrapper\" class=\"bgrid-fourth s-bgrid-third mob-bgrid-half group\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\t//start wp query..\n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t\t'post_type'\t\t\t=> 'portfolio',\n\t\t\t\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t\t\t\t'order'\t\t\t\t=> 'DESC',\n\t\t\t\t\t\t\t'posts_per_page'\t=> $number_of_portfolio\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$data = new WP_Query( $args );\n\t\t\t\t\t\t//Check post\n\t\t\t\t\t\tif( $data->have_posts() ) :\n\t\t\t\t\t\t\t//startloop here..\n\t\t\t\t\t\t\twhile( $data->have_posts() ) : $data->the_post();\n\n\t\t\t\t\t\t\t$term_list = wp_get_post_terms( get_the_ID(), 'field' ); \n\t\t\t\t\t\t\tglobal $post;\n\t\t\t\t $image = wp_prepare_attachment_for_js( get_post_thumbnail_id( $post->ID ) );\n\t\t\t\t $image_alt = ( !empty( $image['alt'] ) ) ? 'alt=\"' . esc_attr( $image['alt'] ) . '\"' : 'alt=\"' .get_the_title() . '\"';\n\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"bgrid item\">\n\t\t\t\t\t\t\t<div class=\"item-wrap\">\n\t\t\t\t\t\t\t\t<a href=\"<?php the_permalink(); ?>\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php esc_url( the_post_thumbnail_url('portfolio-small-thum') ); ?>\" alt=\"<?php echo esc_attr( $image_alt ); ?>\">\n\t\t\t\t\t\t\t\t\t<div class=\"overlay\"></div> \n\t\t\t\t\t\t\t\t\t<div class=\"portfolio-item-meta\">\n\t\t\t\t\t\t\t\t\t\t<h5><?php echo the_title(); ?></h5>\n\t\t\t\t\t\t\t\t\t\t<p><?php foreach ($term_list as $sterm) { echo $sterm->name.' '; } ?></p>\n\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div> <!-- /item -->\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tendwhile;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div> <!-- /portfolio-wrapper -->\n\t\t\t\t</div> <!-- /twelve -->\n\t\t\t</div> <!-- /row --> \n\t\t</div> <!-- /Portfolio -->\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "public function index(Request $request)\n {\n return view('admin.testimonials.index', ['testimonials' => Testimonial::sortable(['title' => 'asc'])->paginate()]);\n }" ]
[ "0.7607753", "0.69797486", "0.6908805", "0.6846747", "0.6818133", "0.680136", "0.6704991", "0.66253704", "0.65806574", "0.6355476", "0.6314432", "0.63120407", "0.63067037", "0.6249454", "0.6241973", "0.6217754", "0.6210295", "0.62008655", "0.62008655", "0.61962426", "0.6175938", "0.61629105", "0.61602044", "0.6149641", "0.6111365", "0.60746074", "0.6056266", "0.6049412", "0.6049412", "0.60417914", "0.60237795", "0.59879816", "0.5981708", "0.588863", "0.5880922", "0.58724093", "0.58360887", "0.57845634", "0.576271", "0.5746304", "0.5743247", "0.5739455", "0.56985366", "0.5696365", "0.5673339", "0.56360936", "0.5634975", "0.5619109", "0.56163454", "0.5591517", "0.55913", "0.5570988", "0.5568341", "0.5544193", "0.5537302", "0.5467143", "0.54638326", "0.54538286", "0.5445123", "0.54427737", "0.54238206", "0.5404381", "0.5379226", "0.5349537", "0.5347773", "0.5317137", "0.5310377", "0.5296718", "0.52874345", "0.5284191", "0.52834195", "0.5269569", "0.52673286", "0.5248252", "0.524816", "0.5244491", "0.52442104", "0.5213422", "0.5201889", "0.52000445", "0.5199468", "0.517158", "0.51669675", "0.5145136", "0.51447606", "0.51146317", "0.51125467", "0.51123756", "0.51075315", "0.5091269", "0.5078103", "0.50654745", "0.50498503", "0.50474674", "0.5043954", "0.50395733", "0.5039082", "0.5035734", "0.5035052", "0.50331503" ]
0.724841
1
Get media of collection
public function getCollectionMedia($id): Collection { $c = $this->findCollection($id); return $this->prepareCollection(($c ? $this->updateRemoteUrls($c->media) : new Collection())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMedia()\n {\n return $this->media;\n }", "public function media()\n {\n return $this->related(Media::class);\n }", "public function getMedia(): MediaList\n {\n return $this->media;\n }", "public function get_media()\n {\n }", "public function getMedia()\n {\n if (! isset($this->media)) {\n $this->media = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getMediaQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->media;\n }", "public function media()\n {\n return $this->morphToMany(Media::class, 'mediable');\n }", "public function media() {\n return CommonSenseApiMedia::instance($this, 'CommonSenseApiMedia');\n }", "public function media();", "public function media() {\n return $this->morphMany(Media::class, 'owner');\n }", "public function getMedia()\n {\n return $this->hasOne(SocialMedias::className(), ['ID' => 'MediaID']);\n }", "function get_all_media() {\n\t\treturn $this->mediaFiles;\n\t}", "public function media()\n {\n return $this->morphToMany(Media::class, 'entity', 'entity_media')\n ->withPivot(['id', 'zone'])\n ->withTimestamps();\n }", "public function thumbnail()\n {\n return $this->media->where('id', $this->thumbnail_id)->first();\n }", "private function getMediaDirectory()\n {\n return $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);\n }", "public function getMediaItem($id);", "public function thumbnail()\n\t{\n\t\treturn $this->media()->where('id', $this->thumbnail_id)->first();\n\t}", "public function getMedia()\n {\n return $this->hasMany(Media::className(), ['apps_countries_id' => 'id']);\n }", "public function getMediaPath()\n {\n // should return an array\n $query = $this->query()\n ->join('media_handlers', 'media_handlers.model_id', '=', 'anggota.id')\n ->where('media_handlers.model_id', '=', $this->id)\n ->where('media_handlers.model_name', '=', $this->const_ModelName)\n ->where('media_handlers.deleted_at', '=', null)\n ->get();\n\n // return single object instead of an array\n if (count($query) != 0) {\n // Add new sub attribute about preview and\n $item = $query[0];\n $item->imageUrl = $this->getUrlPath($item->path);\n $item->thumbnail = $this->getThumbnailUrlPath($item->path);\n $item->preview = $this->getPreviewUrlPath($item->path);\n return $item;\n }\n\n return null;\n }", "public function getGallery()\n {\n return $this->morphMany(Media::class, 'mediable', ['type' => Media::TYPE_GALLERY], 'mediable', 'media_id');\n }", "public function getAvatarMedia(): ?Media\n {\n return $this->getFirstMedia(self::MEDIA_AVATARS_COLLECTION);\n }", "public function getMediaUrl()\n {\n return $this->_mediaurl;\n }", "function get_mediaImages()\n\t\t{\n\t\t\t$query = $this -> db -> get('MediaSlider');\n\n\n\t\t\treturn $query->result();\n\t\t}", "public function attachments()\n {\n return $this->belongsToMany(Media::class);\n }", "public function index()\n {\n return SocialMediaResource::collection(SocialMedia::all()->sortBy('sequence'));\n }", "public function index($mimeType = null)\n {\n $collections = MediaCollection::withCount('files')->get();\n\n return MediaCollectionResource::collection($collections);\n }", "public function getMediaFile()\n {\n return $this->mediaFile;\n }", "public function image()\n {\n if (isset($this->object->entities->media) && ! empty($this->object->entities->media)) {\n return $this->object->entities->media[0]->media_url;\n }\n }", "public function getMedia($aid) {\n\t\t$this->Media->recursive = -1;\n\t\treturn $this->Media->find('all', array('conditions' => array('Media.model' => 'album' , 'Media.model_id' => Sanitize::clean(intval($aid)))));\n\t}", "public function getMediaRelationship() {\n return $this->hasOne('App\\FixtureMedia', 'fixture_id', 'id');\n }", "public function getListingsMedia()\n {\n if (!$this->_listingsMedia instanceof Service\\ListingsMedia) {\n $this->setListingsMedia(\n new Service\\ListingsMedia());\n }\n\n return $this->_listingsMedia;\n }", "public function current(): Media\n {\n return Media::fromObject(\n $this->cloudMediaGalleryFactory->getHttpClient(),\n $this->getFromOffset($this->currentOffset)\n );\n }", "private function loadMedia(MediaLibraryModelInterface $model, $collectionName)\n {\n if ($this->mediaIsPreloaded($model)) {\n\n $media = $model->media->filter(function ($mediaItem) use ($collectionName) {\n return $mediaItem->collection_name == $collectionName;\n })->sortBy(function ($media) {\n return $media->order_column;\n })->values();\n\n return $media;\n }\n\n $media = $model->media()\n ->where('collection_name', $collectionName)\n ->orderBy('order_column')->get();\n\n return $media;\n }", "function fetch_media_library_image() {\n $post_id = $this->extract_post_id_from_class();\n\n if ( $post_id ) {\n $wp_image_post = get_post($post_id);\n\n if ( $wp_image_post ) {\n $media_image = new MediaLibraryImage($wp_image_post);\n return $media_image;\n }\n }\n\n // Rifle through post's media images looking for match.\n foreach ( $this->post->media_images as $media_image ) {\n // If embed_id is found in image src, we have a match.\n if ( strpos($this->src, $media_image->embed_id) !== false ) {\n return $media_image;\n }\n }\n\n // If returned by this point, not found.\n return null;\n }", "public function getMediaObjectByFilename($filename) {\n // TODO: make method private again\n $query = \"//collection/media-object/filename[text() = '$filename']/..\";\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n return $result->item(0);\n }", "function getMedia( $query )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/media.json\",$query);\n return $this->createResponse($result,'search Media MetaData','Search Criteria');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getMediaPage()\n {\n return $this->hasOne(MediaLinks::className(), ['ID' => 'MediaPageID']);\n }", "public function registerMediaCollections() {\n $this->addMediaCollection('image')->singleFile();\n }", "function getRelatedMediaById ( $id )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/media/{$id}/relatedMedia.json\");\n return $this->createResponse($result,'get Media Alternate Images','Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function Media()\n {\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CA begin\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CA end\n }", "public function getMedia(string $collectionName = 'default', $filters = []): Collection\n {\n return $this->spatieGetMedia(Str::before($collectionName, '::'), $filters);\n }", "public function id($id)\n\t{\n\t\treturn $this->media($id);\n\t}", "public function getMediaPath()\n {\n // should return an array of media handlers\n $query = $this->query()\n ->join('media_handlers', 'media_handlers.model_id', '=', 'upcoming_prokers.id')\n ->where('media_handlers.model_id', '=', $this->id)\n ->where('media_handlers.model_name', '=', $this->const_ModelName)\n ->where('media_handlers.deleted_at', '=', null)\n ->get();\n if (count($query) != 0) {\n // Add new sub attribute about preview and\n $item = $query[0];\n $item->imageUrl = $this->getUrlPath($item->path);\n $item->thumbnail = $this->getThumbnailUrlPath($item->path);\n $item->preview = $this->getPreviewUrlPath($item->path);\n return $item;\n }\n\n return null;\n }", "public function registerMediaCollections()\n {\n $this->addMediaCollection('image')->singleFile();\n }", "public static function mediaObject(&$mediaObject, $attachment) {\n\n //Allowed media objects\n $types = \\Library\\Config::getParam(\"allowed-types\", array(), \"attachments\");\n\n //1.Load the collection!\n if(!is_object($attachment)&&is_a($attachment,'Platform\\Entity')):\n $thisModel = new Self;\n $attachment = $thisModel->loadObjectByURI($attachment);\n endif;\n\n //If the media object is not a collection! skip it\n $objectTypeshaystack = array(\"attachment\");\n\n if (!in_array($attachment->getObjectType(), $objectTypeshaystack))\n return; //Nothing to do here if we can't deal with it!\n\n $attachmentObject = new MediaLink();\n //2.Get all the elements in the collection, limit 5 if more than 5\n //3.Trigger their timeline display\n $mediaObjectURI = $attachment->getObjectURI();\n\n $attachmentObject::set(\"objectType\", \"attachment\");\n $attachmentObject::set(\"uri\", $attachment->getObjectURI());\n\n //Now lets populate our collection with Items\n //@TODO Will probably need to query for objectType of items in collection?\n //@TODO Also this will help in removing objects from collections that have previously been deleted\n $attachmentObjectURL = !empty($mediaObjectURI) ? \"/system/object/{$mediaObjectURI}\" : \"http://placeskull.com/100/100/999999\";\n $attachmentObject->set(\"url\", $attachmentObjectURL);\n $attachmentObject->set(\"uri\", $mediaObjectURI);\n\n //AttachmentTypes\n //$mediaType = $attachment->getPropertyValue(\"attachment_type\");\n\n $attachmentObject->set(\"name\", $attachment->getPropertyValue(\"attachment_name\"));\n $attachmentObject->set(\"type\", $attachment->getPropertyValue(\"attachment_type\"));\n $attachmentObject->set(\"height\", null);\n $attachmentObject->set(\"width\", null);\n\n //echo $mediaObjectURI;\n //Now set the collection Object as the media Object\n $mediaObject = $attachmentObject;\n\n return true;\n }", "function getMediaById ( $id )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/media/{$id}.json\");\n return $this->createResponse($result,'get MetaData','Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getMediaFolders(){\n return MediaFolder::all();\n\t\t\n }", "public function getMediaMapper()\n {\n return $this->mediaMapper;\n }", "public function getOne($id)\n {\n return $this->get('sonata.media.manager.media')->findOneBy(array(\n 'id' => $id,\n 'providerName' => 'sonata.media.provider.custom'\n ));\n }", "public function test_can_fetch_media()\n {\n $response = $this->get('v1/media');\n $response\n ->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]);\n }", "public function getMediaId();", "function get_attached_media($type, $post = 0)\n {\n }", "public function getMediaFile()\n {\n return $this->readOneof(1);\n }", "public function getMediaItemResults()\n {\n return $this->media_item_results;\n }", "public function medias()\n\t{\n\t\treturn $this->hasMany('App\\PropertyImages');\n\t}", "public function getMediaConfig()\n {\n if (array_key_exists(\"mediaConfig\", $this->_propDict)) {\n if (is_a($this->_propDict[\"mediaConfig\"], \"\\Beta\\Microsoft\\Graph\\Model\\MediaConfig\") || is_null($this->_propDict[\"mediaConfig\"])) {\n return $this->_propDict[\"mediaConfig\"];\n } else {\n $this->_propDict[\"mediaConfig\"] = new MediaConfig($this->_propDict[\"mediaConfig\"]);\n return $this->_propDict[\"mediaConfig\"];\n }\n }\n return null;\n }", "public function getMediaId()\n {\n return $this->media->getId();\n }", "function get_media_by_tag($args='')\n\t{\n\t\tglobal $post;\n\t\t\n\t\t$r = wp_parse_args( $args, $defaults );\n\t\tif (!isset($r['post_parent']))\n\t\t{\n\t\t\tif ($post)\n\t\t\t\t$r['post_parent'] = $post->ID;\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\t\n\t\treturn $this->get_attachments_by_media_tags($args);\n\t}", "public function social_media()\n {\n return $this->belongsToMany('App/SocialMedia', 'eventmanager_social', 'social_media_id', 'social_media_id');\n }", "public function index()\n {\n return view('medialibrary::media');\n }", "public function registerMediaCollections(): void\n {\n $this->addMediaCollection('default');\n $this->addMediaCollection('cv');\n //->useFallbackUrl('/url/to/default')\n //->singleFile()\n\n }", "public function get($name, $optParams = array())\n {\n $params = array('name' => $name);\n $params = array_merge($params, $optParams);\n return $this->call('get', array($params), \"Google_Service_MyBusiness_MediaItem\");\n }", "public function getCronMedia()\n { \n try\n { \n $supportedMimetypeList = Config::get('olapicmedia.supportedMimetypeList');\n $getDetails = Media::join('olapic_media_mappings','olapic_media_mappings.media_id','=','media.id')\n ->join('looks','looks.id', '=', 'media.model_id')\n ->where('olapic_media_mappings.status','=','new')\n ->where('olapic_media_mappings.type','=','upload')\n ->whereNull('media.manipulations')\n ->whereIn('media.mime_type', $supportedMimetypeList)\n ->select(\n 'olapic_media_mappings.id as mappingid',\n 'media.*',\n 'looks.id as folder_id',\n 'looks.user_id',\n 'looks.description',\n 'looks.products')\n ->get(); \n }catch (\\Exception $e) {\n $getDetails = array();\n Log::error($e->getMessage());\n }\n\n return $getDetails; \n }", "public function getTransportMedia()\n {\n return $this->hasOne(MsTransportMedia::className(), ['id' => 'transport_media_id']);\n }", "public function getSource()\n {\n return 'media';\n }", "public function index()\n {\n $images = Media::get();\n return view('backend.ecommerce.media')->with(compact('images'));\n }", "public function registerMediaCollections()\n {\n parent::registerMediaCollections();\n $this->addMediaCollection('illustrations')\n ->singleFile()\n ->acceptsMimeTypes(['image/jpeg', 'image/png'])\n ->registerMediaConversions(function (Media $media = null) {\n $this->addMediaConversion('cover')\n ->fit(Manipulations::FIT_CROP, 1140, 500)\n ->withResponsiveImages()\n ->keepOriginalImageFormat();\n $this->addMediaConversion('card')\n ->fit(Manipulations::FIT_CROP, 350, 250)\n ->keepOriginalImageFormat();\n });\n }", "function getMediaByCampaignId ( $id )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/campaigns/{$id}/media.json\");\n return $this->createResponse($result,'get MetaData','Campaign Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getPopularMedia()\n {\n $endpointUrl = sprintf($this->_endpointUrls['media_popular'], $this->getAccessToken());\n $this->_initHttpClient($endpointUrl);\n $response = $this->_getHttpClientResponse();\n return $this->parseJson($response);\n }", "public function getPhotoAttribute()\n {\n return $this->fetchFirstMedia()->file_url ?? \"\";\n }", "public function getMediaUrl() {\r\n\t\treturn $this->_storeManager->getStore()->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA);\r\n\t}", "public function photo()\n {\n \treturn $this->article->photos->first();\n }", "public function getMediaGalleryImages()\n {\n if(!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {\n $images = new Varien_Data_Collection();\n foreach ($this->getMediaGallery('images') as $image) {\n if ($image['disabled']) {\n continue;\n }\n $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);\n $image['id'] = isset($image['value_id']) ? $image['value_id'] : null;\n $image['path'] = $this->getMediaConfig()->getMediaPath($image['file']);\n $images->addItem(new Varien_Object($image));\n }\n $this->setData('media_gallery_images', $images);\n }\n\n return $this->getData('media_gallery_images');\n }", "private static function media()\n {\n $files = ['QR'];\n $folder = static::$root.'Media'.'/';\n\n self::call($files, $folder);\n }", "public static function image() {\n return new Media_Image();\n }", "function popularMedia() {\n \t\n \t$popular_media_request_url = sprintf($this->api_urls['media_popular'], $this->access_token);\n \t\n \treturn $this->__apiCall($popular_media_request_url);\n \t\n }", "public function getSrcMediaImage()\n {\n return $this->_designerHelper->getSrcMediaImage();\n }", "public function registerMediaCollections()\n {\n $this->addMediaCollection('vendor_kit')->singleFile();\n $this->addMediaCollection('banner');\n }", "public function getMediaFolder($id){\n return MediaFolder::find($id);\n\t\t\n }", "function get_media_item($attachment_id, $args = \\null)\n {\n }", "function getPopularMedia($ig_client_id)\n {\n \n \t$popular_media_request_url = 'https://api.instagram.com/v1/media/popular?client_id=' . $ig_client_id;\n \t\n \treturn $this->__apiCall($popular_media_request_url);\n \n }", "public function getMediaElement(): MediaElement\n {\n $this->checkLoaded();\n\n return $this->getContainer()->make(MediaElement::class, ['db_row' => $this->media_element()->fetch()]);\n }", "public function getMediaFiles()\n {\n if ($this->_aMediaFiles === null) {\n $aMediaFiles = $this->getProduct()->getMediaUrls();\n $this->_aMediaFiles = count($aMediaFiles) ? $aMediaFiles : false;\n }\n\n return $this->_aMediaFiles;\n }", "public static function file() {\n return new Media_File();\n }", "public function getGallery()\n {\n return $this->getItems()->getItems()->andWhere(['type' => 'gallery']);\n\n }", "public function getMediaQuery();", "public function social_media()\n {\n return $this->belongsToMany('App/SocialMedia', 'booking_social', 'social_media_id', 'social_media_id');\n }", "function getMedia($media_id) {\n \t\n \t$media_request_url = sprintf($this->api_urls['media'], $media_id, $this->access_token);\n \t\n \treturn $this->__apiCall($media_request_url);\n \t\n }", "function getMediaByTagId ( $id )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/tags/{$id}/media.json\");\n return $this->createResponse($result,'get MetaData','Tag Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function test_can_fetch_a_media()\n { \n $data =$this->mediaDataHelper(); \n $response = $this->postJson('v1/media', $data);\n \n $media = Media::first();\n $response = $this->get('v1/media/'.$media->id);\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "public function findMediaBy(array $criteria);", "public function media($media)\n\t{\n\t\tif(is_numeric($media)) {\n\t\t\t$this->id = $media;\n\t\t\t$media = wp_get_attachment_url($media);\n\t\t}\n\n $wpUploadDir = wp_upload_dir();\n\n\n\t\tif(current_theme_supports('soil-relative-urls')) {\n\t\t\t$relMediaPath = str_replace(home_url(), '', $wpUploadDir['baseurl']);\n $this->mediaFilePath = $wpUploadDir['basedir'];\n\t\t\t$this->mediaFilePath.= str_replace($relMediaPath, '', $media);\n\t\t} else {\n\t\t $this->mediaFilePath = str_replace($wpUploadDir['baseurl'], $wpUploadDir['basedir'], $media);\n }\n\n\t\tif(!$this->mediaFilePath) return false;\n\n $this->imageName = basename($this->mediaFilePath);\n \n\t\treturn $this;\n\t}", "public function getMediaEntryType();", "function publishMedia ( $params )\n {\n /// syndication will always return metadata for one content item\n /// if publishing a collection, we get single collection item, which contains a list of any sub-items also generated\n try\n {\n $type_path = strtolower($params['mediaType']);\n // dirty pluralization\n if( !in_array($type_path,array('socialmedia','audio')) && substr($type_path,-1)!='s' ) {\n $type_path .= 's';\n }\n\n $result = $this->apiCall('post',\"{$this->api['syndication_url']}/resources/media/$type_path\",$params,'json','json');\n\n return $this->createResponse($result,'Publish');\n\n\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function createMedia();", "function getAllMedia() \n\t\t{\n\t\t\t\n\t\t\ttry{\n\n\t\t\t\t$query = $this->_db->prepare( \"SELECT * FROM media ORDER BY media_date DESC\" );\n\n\t\t\t\t$query->execute();\n\n\t\t\t\t$data = $query->fetchAll();\n\t\t\t\t\n\t\t\t\treturn $data;\n\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\t\t\t\n\t\t}", "private function getMediaRepository()\n {\n if ($this->mediaRepository === null) {\n $this->mediaRepository = Shopware()->Models()->getRepository(Media::class);\n }\n\n return $this->mediaRepository;\n }", "public function get_media_item($params, $extra_info = null, $raw = false) {\n\t\t$error = $this->_validate_capabilities(array('upload_files', 'edit_posts'));\n\t\tif (!empty($error)) return $error;\n\n\t\t// Raw means that we need to return the result without wrapping it\n\t\t// with the \"$this->_response\" function which indicates that the call\n\t\t// was done locally (within the class) and not directly from UpdraftCentral.\n\t\tif ($raw && is_object($params) && isset($params->ID)) {\n\t\t\t$media = $params;\n\t\t} elseif (is_array($params) && !empty($params['id'])) {\n\t\t\t$media = get_post($params['id']);\n\t\t}\n\n\t\tif (!function_exists('get_post_mime_types')) {\n\t\t\tglobal $updraftplus;\n\t\t\t// For a much later version of WP the \"get_post_mime_types\" is located\n\t\t\t// in a different folder. So, we make sure that we have it loaded before\n\t\t\t// actually using it.\n\t\t\tif (version_compare($updraftplus->get_wordpress_version(), '3.5', '>=')) {\n\t\t\t\trequire_once(ABSPATH.WPINC.'/post.php');\n\t\t\t} else {\n\t\t\t\t// For WP 3.4, the \"get_post_mime_types\" is located in the location provided below.\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/post.php');\n\t\t\t}\n\t\t}\n\n\t\tif (!function_exists('wp_image_editor')) {\n\t\t\trequire_once(ABSPATH.'wp-admin/includes/image-edit.php');\n\t\t}\n\n\t\tif (!function_exists('get_media_item')) {\n\t\t\trequire_once(ABSPATH.'wp-admin/includes/template.php');\n\t\t\trequire_once(ABSPATH.'wp-admin/includes/media.php');\n\t\t}\n\n\n\t\tif ($media) {\n\t\t\t$thumb = wp_get_attachment_image_src($media->ID, 'thumbnail', true);\n\t\t\tif (!empty($thumb)) $media->thumb_url = $thumb[0];\n\n\t\t\t$media->url = wp_get_attachment_url($media->ID);\n\t\t\t$media->parent_post_title = get_the_title($media->post_parent);\n\t\t\t$media->author = get_the_author_meta('display_name', $media->post_author);\n\t\t\t$media->filename = basename($media->url);\n\t\t\t$media->date = date('Y/m/d', strtotime($media->post_date));\n\t\t\t$media->upload_date = mysql2date(get_option('date_format'), $media->post_date);\n\n\t\t\t$media->filesize = 0;\n\t\t\t$file = get_attached_file($media->ID);\n\t\t\tif (!empty($file) && file_exists($file)) {\n\t\t\t\t$media->filesize = size_format(filesize($file));\n\t\t\t}\n\t\t\t\n\t\t\t$media->nonce = wp_create_nonce('image_editor-'.$media->ID);\n\t\t\tif (false !== strpos($media->post_mime_type, 'image/')) {\n\t\t\t\t$meta = wp_get_attachment_metadata($media->ID);\n\n\t\t\t\t$thumb = image_get_intermediate_size($media->ID, 'thumbnail');\n\t\t\t\t$sub_sizes = isset($meta['sizes']) && is_array($meta['sizes']);\n\n\t\t\t\t// Pulling details\n\t\t\t\t$sizer = 1;\n\t\t\t\tif (isset($meta['width'], $meta['height'])) {\n\t\t\t\t\t$big = max($meta['width'], $meta['height']);\n\t\t\t\t\t$sizer = $big > 400 ? 400 / $big : 1;\n\t\t\t\t}\n\n\t\t\t\t$constrained_dims = array();\n\t\t\t\tif ($thumb && $sub_sizes) {\n\t\t\t\t\t$constrained_dims = wp_constrain_dimensions($thumb['width'], $thumb['height'], 160, 120);\n\t\t\t\t}\n\n\t\t\t\t$rotate_supported = false;\n\t\t\t\tif (function_exists('imagerotate') || wp_image_editor_supports(array('mime_type' => get_post_mime_type($media->ID), 'methods' => array('rotate')))) {\n\t\t\t\t\t$rotate_supported = true;\n\t\t\t\t}\n\n\t\t\t\t// Check for alternative text if present\n\t\t\t\t$alt = get_post_meta($media->ID, '_wp_attachment_image_alt', true);\n\t\t\t\t$media->alt = !empty($alt) ? $alt : '';\n\n\t\t\t\t// Check whether edited images are restorable\n\t\t\t\t$backup_sizes = get_post_meta($media->ID, '_wp_attachment_backup_sizes', true);\n\t\t\t\t$can_restore = !empty($backup_sizes) && isset($backup_sizes['full-orig']) && basename($meta['file']) != $backup_sizes['full-orig']['file'];\n\n\t\t\t\t$image_edit_overwrite = (!defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE) ? 0 : 1;\n\t\t\t\t$media->misc = array(\n\t\t\t\t\t'sizer' => $sizer,\n\t\t\t\t\t'rand' => rand(1, 99999),\n\t\t\t\t\t'constrained_dims' => $constrained_dims,\n\t\t\t\t\t'rotate_supported' => (int) $rotate_supported,\n\t\t\t\t\t'thumb' => $thumb,\n\t\t\t\t\t'meta' => $meta,\n\t\t\t\t\t'alt_text' => $alt,\n\t\t\t\t\t'can_restore' => $can_restore,\n\t\t\t\t\t'image_edit_overwrite' => $image_edit_overwrite\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $raw ? $media : $this->_response(array('item' => $media));\n\t}", "public function getMediaFiles($page=null, $per_page=null){\n return MediaFile::all($page, $per_page);\n\t\t\n }", "public function getMediaUploaders()\n {\n return \\Response::json(['error' => false, 'data' => []]);\n }", "public function getThumb(MediaInterface $media);" ]
[ "0.778517", "0.77207565", "0.74223006", "0.7405672", "0.73945373", "0.72959775", "0.7254182", "0.7247659", "0.7243948", "0.7216397", "0.7056103", "0.7025652", "0.6760322", "0.67529345", "0.6733868", "0.67283964", "0.67233145", "0.66669685", "0.6597817", "0.6577608", "0.65687096", "0.65476346", "0.65461695", "0.6531628", "0.65231407", "0.6514293", "0.65009", "0.64821386", "0.64683217", "0.64333934", "0.6422222", "0.6375863", "0.6374738", "0.6361172", "0.6352512", "0.6350822", "0.6287993", "0.628721", "0.62569344", "0.6253958", "0.6247167", "0.62378454", "0.6217811", "0.6195265", "0.6183514", "0.6176902", "0.61644685", "0.61610144", "0.6150766", "0.6131738", "0.6131554", "0.6100423", "0.60828334", "0.6055273", "0.60477", "0.6041668", "0.6011577", "0.6004539", "0.60012364", "0.600113", "0.59995127", "0.5997093", "0.5996712", "0.59920406", "0.5980177", "0.5968331", "0.5967142", "0.5959432", "0.59560215", "0.59536004", "0.59513724", "0.59513247", "0.59472066", "0.59364706", "0.5934761", "0.5892949", "0.58855486", "0.58808726", "0.58780545", "0.58742607", "0.5864169", "0.58624744", "0.5856596", "0.5854286", "0.58432317", "0.58194155", "0.58158886", "0.58120793", "0.5790548", "0.5781048", "0.57750005", "0.5768258", "0.5753049", "0.57516974", "0.5751193", "0.5749993", "0.57459164", "0.5744483", "0.5733981", "0.5732394" ]
0.6936589
12
Normalizes an object into a set of arrays/scalars.
public function normalize($object, $format = null, array $context = array()) { return array( '@id' => $object->getId(), '@type' => 'AbstractStep', 'name' => $object->getName(), 'summary' => $object->getSummary(), 'dateStart' => $this->normalizer->normalize($object->getDateStart(), $format, array(DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s')), 'dateEnd' => $this->normalizer->normalize($object->getDateEnd(), $format, array(DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s')), 'price' => $object->getPrice(), 'currency' => $object->getCurrency(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function normalizeData() : array;", "function object_to_array( $input ) {\n\tif ( is_scalar( $input ) ) {\n\t\treturn $input;\n\t}\n\t\n\treturn array_map( '\\your\\space\\object_to_array', (array) $input );\n}", "public function denormalize(array $data);", "public function objectToArray($object): static;", "public function flatten(): Set;", "static function convert(){\n\t\tif(is_object($x) && method_exists($x, '__toArray')){\n\t\t\treturn $x->__toArray();\n\t\t}\n\t\treturn (array)$x;\n\t}", "function object_to_array($data)\r\n{\r\n if (is_array($data) || is_object($data))\r\n {\r\n $result = array();\r\n foreach ($data as $key => $value)\r\n {\r\n $result[$key] = object_to_array($value);\r\n }\r\n return $result;\r\n }\r\n return $data;\r\n}", "private function _normalizeData($data)\n\t{\n\t\t$ret = array();\n\t\tforeach($data as $key=>$val)\n\t\t{\n\t\t\tif($val instanceof \\Framework\\Interfaces\\IModelDataType)\n\t\t\t\t$val = $this->_driver->convertModelDataTypeToNativeDataType($val);\n\t\t\telseif(is_array($val))\n\t\t\t\t$val = $this->_normalizeData($val);\n\n\t\t\t//Set value\n\t\t\t$ret[$key] = $val;\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function toArray(): array\n {\n // Collects a list of usable Attributes from the Value Object.\n $fields = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n\n // Converts all objects into primitives.\n return $this->convertIntoPrimitiveValues($fields);\n }", "function toArray($object);", "public function intoArrays()\n {\n return self::arraysOf($this);\n }", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "function object_to_array($data) {\n\tif(is_array($data) || (is_object($data) && $data instanceof stdClass))\n\t\treturn array_map('object_to_array', (array) $data);\n\telse\n\t\treturn $data;\n}", "public function toArray() {\n $vars = get_object_vars($this);\n unset(\n $vars['rawdata'], \n $vars['inputFilter'],\n $vars['__initializer__'], \n $vars['__cloner__'], \n $vars['__isInitialized__']\n );\n foreach($vars as $key =>$val){\n if(is_object($val))\n $vars[$key] = $val->toArray();\n }\n return $vars;\n }", "function toArray();", "public function asVectors() : array\n {\n return array_map([Vector::class, 'quick'], $this->a);\n }", "function object_to_array2($object)\r\n{\r\n\tif (! is_object($object) AND ! is_array($object))\r\n\t{\r\n\t\treturn $object;\r\n\t}\r\n\tif (is_object($object))\r\n\t{\r\n\t\t$object = get_object_vars($object);\r\n\t}\r\n\treturn array_map('object_to_array2', $object);\r\n}", "public function objectToArray()\n {\n return get_object_vars($this);\n }", "public function toArray(): iterable;", "function toArray() ;", "function toArray() ;", "public function normalizeModelProducts() : array\n {\n\n // Init empty array\n $return = [];\n\n // Loop on every Model's products\n foreach ($this->getProducts() as $product) {\n\n // Store ProductSubresource in new $return index\n $return[] = $product->normalizeProductCollection(true, false, false, false);\n }\n\n return $return;\n }", "protected function normalize() {}", "function object_to_array($var) {\n $result = array();\n $references = array();\n\n // loop over elements/properties\n foreach ($var as $key => $value) {\n // recursively convert objects\n if (is_object($value) || is_array($value)) {\n // but prevent cycles\n if (!in_array($value, $references)) {\n $result[$key] = object_to_array($value);\n $references[] = $value;\n }\n } else {\n // simple values are untouched\n $result[$key] = $value;\n }\n }\n return $result;\n}", "protected static function object_to_array($data, $once=false){\n\n\t if (is_array($data) || is_object($data)){\n\n\t $result = array();\n\t foreach ($data as $key => &$value){\n\n\t \tif($once){\n\n\t \t\t$result[$key] = $value;\n\n\t \t}else{\n\n\t \t\t$result[$key] = static::object_to_array($value);\n\t \t}\n\n\t \tunset($key, $value);\n\t }\n\n\t return $result;\n\t }\n\n\t return $data;\n\t}", "function acf_unarray($val)\n{\n}", "private function sanitize_memberships_array( $object ) {\n $m = [ ];\n\n foreach ( $object as $o ) {\n if ( isset( $o->groupId ) ) {\n $m[] = $o->groupId;\n }\n }\n\n return $m;\n }", "public function toArray()\n {\n return $this->transform();\n }", "public function normalize(): self;", "function object_to_array($object)\n {\n if (is_object($object)) {\n $object = get_object_vars($object);\n }\n\n return is_array($object) ? array_map(__FUNCTION__, $object) : $object;\n }", "function objectToArray( $object )\n {\n if( !is_object( $object ) && !is_array( $object ) )\n return $object;\n if( is_object( $object ) )\n $object = get_object_vars( $object );\n return array_map( null, $object );\n }", "public function toArray(): array\n {\n return array_filter((array) get_object_vars($this), static function ($val) {\n return ! is_null($val);\n });\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "abstract protected function _normalizeIterable($iterable);", "abstract protected function toArray();", "public function toArray()\n {\n $vars = get_object_vars($this);\n $vars['type'] = $this->getType();\n\n $queries = array();\n foreach ($vars as $k => $v) {\n if ($v !== null) {\n $values = is_array($v) ? $v : array(':'=>$v);\n foreach ($values as $matcher=>$value) {\n $queries[] = $k . $matcher . $value;\n }\n }\n }\n return $queries;\n }", "public function sanitize($data) {\n $sanitized = array();\n foreach ( $data as $key => $val ) {\n if ( !is_array($val) ) {\n if ( isset($this->_sanitizers[$key]) ) {\n $sanitized[$key] = Data::sanitize($val, $this->_sanitizers[$key]);\n }\n } else {\n foreach ( $val as $id => $obj ) {\n $sanitized[$key][$id] = $obj->sanitize();\n }\n }\n }\n return $sanitized;\n }", "public function allFlattened(): array;", "public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "public function toArray(): array\n {\n $this->update();\n\n // Copied from DataObjectToArrayTrait. Do not modify here !!!\n $toArray = function($object) use (&$toArray) {\n $result = [];\n $vars = get_object_vars($object);\n foreach ($vars as $name => $value) {\n if ($name !== 'internalDataObjectData') {\n $reflectionProperty = new \\ReflectionProperty($object, $name);\n if ($reflectionProperty->isPublic()) {\n $result[$name] = null;\n }\n }\n }\n if (isset($object->internalDataObjectData)) {\n foreach ($object->internalDataObjectData as $name => $value) {\n $result[substr($name, 1)] = null;\n }\n }\n ksort($result);\n foreach ($result as $name => $null) {\n $value = $object instanceof \\ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);\n if (is_object($value)) {\n if (method_exists($value, 'toArray')) {\n $result[$name] = $value->toArray();\n } else {\n if ($value instanceof \\DateTime) {\n $result[$name] = $value->format('c');\n } else {\n $propertyVars = $toArray($value);\n foreach ($propertyVars as $propertyVarName => $propertyVarValue) {\n if (is_object($propertyVarValue)) {\n $propertyVars[$propertyVarName] = $toArray($propertyVarValue);\n }\n }\n $result[$name] = $propertyVars;\n }\n }\n } else {\n $result[$name] = $value;\n }\n }\n return $result;\n };\n\n $result = [];\n foreach ($this->data as $index => $object) {\n $object = $this->updateValueIfNeeded($this->data, $index);\n if (method_exists($object, 'toArray')) {\n $result[] = $object->toArray();\n } else {\n $result[] = $toArray($object);\n }\n }\n return $result;\n }", "public function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function objectIntoArray ($object,&$array) {\n $oarray = get_object_vars($object);\n while(list($key,$val)=each($oarray)) {\n $array[$key] = $val;\n }\n}", "function objectToArray ($object) {\n\n\t if(!is_object($object) && !is_array($object))\n\t return $object;\n\n\t return array_map('objectToArray', (array) $object);\n\t}", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function normalize($object, $format = null, array $context = array())\n {\n $reflectionObject = new \\ReflectionObject($object);\n $reflectionMethods = $reflectionObject->getMethods(\\ReflectionMethod::IS_PUBLIC);\n\n $attributes = array();\n foreach ($reflectionMethods as $method) {\n if ($this->isGetMethod($method)) {\n $attributeName = lcfirst(substr($method->name, 3));//we sub the set or get\n\n if (in_array($attributeName, $this->ignoredAttributes)) {\n continue;\n }\n\n $attributeValue = $method->invoke($object);\n\n if (array_key_exists($attributeName, $this->callbacks)) {\n $attributeValue = call_user_func($this->callbacks[$attributeName], $attributeValue);\n }\n if (null !== $attributeValue && !is_scalar($attributeValue)) {\n if (get_class($attributeValue) == 'Doctrine\\ORM\\PersistentCollection') {\n //memorize the list of persistent collections\n $attributeValues = $attributeValue;\n\n $attributeValue = array();\n foreach ($attributeValues as $obj) {\n $attributeReflectionObject = new \\ReflectionObject($obj);\n\n $identifiers = $this->doctrine->getManager()->getMetadataFactory()->getMetadataFor($attributeReflectionObject->getName())->getIdentifier();\n //the ids to add\n $tempAttribute = array();\n\n foreach ($identifiers as $identifier) {\n $attribute = call_user_func(array($obj, 'get'.ucfirst($identifier)));\n //the attribute is itself an object\n if (is_object($attribute)) {\n //we look for the ids\n $attributeIdentifierReflectionObject = new \\ReflectionObject($attribute);\n $attributeIdentifiers = $this->doctrine->getManager()->getMetadataFactory()->getMetadataFor($attributeIdentifierReflectionObject->getName())->getIdentifier();\n\n foreach ($attributeIdentifiers as $index => $attributeIdentifier) {\n $attributeIdentifierAttribute = call_user_func(array($attribute, 'get'.ucfirst($attributeIdentifier)));//@todo use reflection to know the identifier\n //we add each of the ids\n $tempAttribute[$identifier] = $attributeIdentifierAttribute;\n }\n } else {\n //we memorise the array of ids\n $tempAttribute[$identifier] = $attribute;\n }\n }\n //we add the id to the array of the attribute\n $attributeValue[] = $tempAttribute;\n }\n } else {\n $attributeValue = $attributeValue->getId();//@todo use reflection to know the identifier\n }\n }\n $attributes[$attributeName] = $attributeValue;\n }\n }\n\n return $attributes;\n }", "public function toArray() {\n return get_object_vars($this);\n }", "private static function normalize($data)\n {\n $normalized = array();\n foreach ($data as $key => $value) {\n if (in_array($key, self::$documentInfoFields)) {\n $normalized['Info'][$key] = $value;\n } elseif (is_array($value)) {\n if (!isset($normalized[$key])) {\n $normalized[$key] = array();\n }\n $normalized[$key] = array_merge($normalized[$key], $value);\n }\n }\n return $normalized;\n }", "public function getAttributes(): array\n {\n // Collects a list of usable Attributes from the Value Object.\n $fields = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n\n foreach ($fields as $name => $value) {\n if ($value instanceof AbstractValueObject || $value instanceof EntityCollection) {\n unset($fields[$name]);\n }\n }\n\n // Converts all objects into primitives.\n return $this->convertIntoPrimitiveValues($fields);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray()\n {\n return get_object_vars($this);\n }", "public function getTransformedArray( ) {\n return \\IndustryTransformer::transform($this->prepareIndustryGreedyData());\n }", "public function toArray()\n {\n return get_object_vars($this);\n }", "public function toArray()\n {\n return get_object_vars($this);\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function normalize()\n {\n }", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}" ]
[ "0.6282444", "0.58716184", "0.5775662", "0.5763172", "0.5716234", "0.5628652", "0.5599674", "0.55402863", "0.553382", "0.5501453", "0.54745", "0.5467152", "0.54426306", "0.5439753", "0.5380246", "0.5372329", "0.536507", "0.5303716", "0.5273312", "0.526237", "0.526237", "0.5252283", "0.5227181", "0.52249444", "0.52208567", "0.5213154", "0.51867443", "0.51776904", "0.5176236", "0.5162974", "0.5159018", "0.5157412", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.5137232", "0.51114064", "0.5101522", "0.50937545", "0.5093178", "0.5089292", "0.50890636", "0.507672", "0.507672", "0.507672", "0.507672", "0.507672", "0.5071013", "0.5055466", "0.5043819", "0.50407374", "0.50363815", "0.50363815", "0.50358397", "0.5034039", "0.50277436", "0.50247127", "0.5022671", "0.50212306", "0.50169426", "0.50151384", "0.50151384", "0.5011846", "0.50012785", "0.49980718" ]
0.0
-1
Perform the action on the given models.
public function handle(ActionFields $fields, Collection $models) { $user = Auth::user(); if ($models->count() > 1) { return Action::danger("每次最多修复一部作品,您选中了{$models->count()}部作品"); } foreach ($models as $model) { if ($movie = Movie::find($model->id)) { // 求片被修复 // $movie->status == Movie::ERROR && if ($fields->fixed) { // 发个通知给求片者 $users = $movie->findUsers; foreach ($users as $user) { if ($user) { // 通知求片的用户 $user->notify(new BreezeNotification(currentUser(), $movie->id, 'movies', '已修复', $movie->cover, $movie->name, '修复了影片')); //还是一个个修改吧,虽然慢了点。。。 $user->pivot->update(['report_status' => MovieUser::FIXED]); } } } $movie->status = $fields->fixed ? Movie::PLAY_FIXED : Movie::ERROR; // 获取求片修复提供的 name, url $name = $fields->name; $url = $fields->url; // 更新 剧集信息 MovieRepo::updateSeries($movie, $name, $url); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function processModels($action)\n {\n // Check for multilingual support\n $locales = $this->getLocales();\n\n // Process all provided models\n foreach ($this->getModelArgument() as $model) {\n if ($model = $this->validateModel(\"{$this->models}\\\\{$model}\")) {\n\n // Get model instance\n $instance = new $model();\n\n // Perform action\n if (empty($locales) === false && method_exists($instance, 'getLocalizedSearchableId')) {\n\n // Process each locale using the by locale macro\n foreach ($locales as $locale) {\n\n $this->line(\"\\nIndexing locale: <info>{$locale}</info>\");\n\n $this->$action(\n $instance->byLocale($locale),\n $model\n );\n }\n }\n else {\n $this->$action($instance, $model);\n }\n }\n }\n }", "public function update($models): void\n {\n if ($models->isEmpty()) {\n return;\n }\n\n $index = $models->first()->searchableAs();\n\n if ($this->usesSoftDelete($models->first()) && $this->softDelete) {\n $models->each->pushSoftDeleteMetadata();\n }\n\n $objects = $models->map(function ($model) {\n if (empty($searchableData = $model->toSearchableArray())) {\n return;\n }\n\n return array_merge(\n $searchableData,\n $model->scoutMetadata(),\n ['objectID' => $model->getScoutKey()],\n );\n })->filter()->values();\n\n if (! empty($objects)) {\n $this->openSearch->bulkUpdate($index, $objects);\n }\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n $urlToParserSender = new SendUrlToParser();\n foreach ($models as $model) {\n /** @var MarkedItem $model */\n if (!filter_var($model->link, FILTER_VALIDATE_URL)) {\n continue;\n }\n $url = $model->link;\n\n $urlToParserSender->send($url, $model->lang);\n $model->is_analyzed = true;\n $model->save();\n }\n }", "public function apply(array $models) {\n\t\tif ($this->isEmpty()) {\n\t\t\treturn $models;\n\t\t}\n\t\t$models = array_filter($models, array($this, 'checkModelAllowed'));\n\t\treturn $models;\n\t}", "public function handle(ActionFields $fields, Collection $models)\n {\n foreach ($models as $app) {\n try {\n Artisan::call('app:wp:search-replace', [\n 'search' => $fields->search,\n 'replace' => $fields->replace,\n '--app' => $app->name,\n '--nova-batch-id' => $this->batchId,\n '--disable-tty' => true\n ]);\n } catch (Exception $e) {\n $this->markAsFailed($app, $e->getMessage());\n }\n }\n }", "public function apply($model);", "public function handle(ActionFields $fields, Collection $models)\n {\n\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n\n foreach ($models as $model) {\n\n $data = DB::table('confirmations')->where('id',$model->id)->first();\n\n $modeldata = json_decode($data->data); //json string to associative array\n\n if ($modeldata->name == 'Update') {\n $newmodel = $modeldata->model_type::find($modeldata->model_id);\n }else{\n $newmodel = new $modeldata->model_type;\n }\n\n \n\n $chagesdataobj = $modeldata->changes;\n\n $changedataarr = json_decode(json_encode($chagesdataobj), true); //object to associative array\n\n\n //echo \"<pre>\"; print_r($chagesdata); die;\n\n foreach ($changedataarr as $key => $value) {\n $newmodel->$key = $changedataarr[$key];\n }\n\n $newmodel->save();\n //$data = DB::table('confirmations')->where('id',$model->id)->first();\n\n // $modeldata = $model->data;\n\n // $newmodel = $modeldata->model_type::find($modeldata->model_id);\n\n // $chagesdata = json_decode($newmodel->changes,true);\n\n // foreach ($chagesdata as $key => $value) {\n // $newmodel->$key = $chagesdata[$key];\n // }\n\n // $newmodel->save();\n\n //echo \"<pre>\"; print_r($model); die;\n\n\n // $data = DB::table('action_events')->where('model_type',$model)->where('model_id',$model->id)->get()->last();\n\n // $changes = json_decode($data->changes);\n\n // $newmodel = $data->model_type::find($data->model_id);\n\n // $newmodel->title = $changes->title;\n\n // $newmodel->save();\n\n\n $model->is_checked = 1;\n\n $model->save();\n\n return Action::message('Confirmed');\n }\n\n }", "public function callAfterMaking($models)\n {\n $this->callAfter($this->afterMaking, $models);\n }", "public function apply(array $models) {\n\t\treturn array_filter($models, array($this, 'checkModelAllowed'));\n\t}", "public function update($models)\n {\n if ($models->isEmpty()) {\n return;\n }\n\n $query = $this->client->createUpdate();\n\n $models->each(function ($model) use (&$query) {\n $attrs = array_filter($model->toSearchableArray(), function ($value) {\n return !\\is_null($value);\n });\n\n // Make sure there is an ID in the array,\n // otherwise we will create duplicates all the time.\n if (!\\array_key_exists('id', $attrs)) {\n $attrs['id'] = $model->getScoutKey();\n }\n\n // Add model class to attributes for flushing.\n $attrs['_class'] = \\get_class($model);\n\n $document = $query->createDocument($attrs);\n $query->addDocument($document);\n });\n\n $query->addCommit();\n\n $endpoint = $models->first()->searchableAs();\n $this->client->update($query, $endpoint);\n }", "public function actions(){\n $params = func_get_args();\n\n //This should be our trade object\n $tradeObject = $params[0];\n\n $this->orders = $tradeObject->getOrders();\n\n\n foreach($this->collection as $order){\n // if we cant find our order in open orders then trigger an action\n if(!$this->orderIsOpen($order->getCurrentOrderID()))\n call_user_func_array(array($order, \"action\"), $params);\n }\n\n // Merge completed orders into one order\n // there is no good reason for this other than \n // the fact that I felt like doing it. :D\n $this->mergeCompleted();\n\n\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n foreach ($models as $model) {\n $model->update([\n 'price' => $fields->get('price'),\n 'price_desc' => $fields->get('price_desc'),\n 'status' => Development::PRICED\n ]);\n }\n }", "public function perform()\n {\n foreach ($this->actions as $action) {\n $action->perform();\n }\n }", "private function _load_models()\r\n {\r\n foreach ($this->models as $model)\r\n {\r\n $this->load->model($this->_model_name($model), $model);\r\n }\r\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n //将选中的集合加入推荐列表\n foreach ($models as $collection) {\n if ($collection->sort_rank > 0) {\n $collection->update(['sort_rank' => 0]);\n } else {\n $collection->update(['sort_rank' => AppCollection::RECOMMEND_COLLECTION]);\n }\n }\n return Action::message('推荐成功');\n }", "protected function execute()\n {\n // Clean the utilistion index.\n DUtilisationRecord::cleanDatabase();\n // Determine objects that are searchable.\n $models = DModel::search()\n ->removeDefaultFilters();\n // Track progress of task execution.\n $totalObjects = $models->getCount();\n $currentObject = 0;\n foreach ($models as $model) {\n /* @var $model DModel */\n try {\n $event = new DOnSave();\n $event->setFieldValue('dispatcher', $model);\n DUtilisationRecord::index($event);\n $model->free();\n // Catch and report any exception to allow processing to continue.\n } catch (Exception $exception) {\n DErrorHandler::logException($exception);\n }\n // Update progress of task execution.\n ++$currentObject;\n $this->updateProgress($currentObject, $totalObjects);\n }\n }", "public static function events($models, $events = array(), $options = array()) {\n\t\t$logmodel = '\\\\'.get_called_class();\n\t\tif (empty($events)) {\n\t\t\t$events = array('create','update','delete');\n\t\t}\n\t\tif (in_array('save',$events)) {\n\t\t\tforeach ($events as $i => $v) {\n\t\t\t\tif ($v == 'save') {\n\t\t\t\t\tunset($events[$i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$events[] = 'create';\n\t\t\t$events[] = 'update';\n\t\t}\n\t\tforeach ($models as $model) {\n\t\t\tforeach ($events as $event) {\n\t\t\t\t$filter = $event;\n\t\t\t\tif ($event == 'create' || $event == 'update') {\n\t\t\t\t\t$filter = 'save';\n\t\t\t\t\tif ($event == 'create' && in_array('update', $events)) {\n\t\t\t\t\t\tcontinue; // so save filter is only added once.\n\t\t\t\t\t}\n\t\t\t\t} elseif($event == 'read') {\n\t\t\t\t\t$filter = 'find';\n\t\t\t\t}\n\n\t\t\t\t$model::applyFilter($filter, function($self, $params, $chain) use ($logmodel, $events) {\n\t\t\t\t\t$filteredMethod = $chain->method();\n\t\t\t\t\t$action = (isset($params['record']->id)) ? 'update' : 'create';\n\t\t\t\t\t$result = $chain->next($self, $params, $chain);\n\t\t\t\t\tswitch ($filteredMethod) {\n\t\t\t\t\t\tcase 'find' :\n\t\t\t\t\t\t\tif ($params['type'] != 'first') {\n\t\t\t\t\t\t\t\treturn $result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$action = 'read';\n\t\t\t\t\t\t\tif ($result) {\n\t\t\t\t\t\t\t\t$pk = $result->id;\n\t\t\t\t\t\t\t\t$title = $result->{$self::meta('title')};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'save' :\n\t\t\t\t\t\t\tif (!in_array($action, $events)) {\n\t\t\t\t\t\t\t\treturn $result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$pk = $params['record']->id;\n\t\t\t\t\t\t\t$title = $params['record']->{$self::meta('title')};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$action = $filteredMethod;\n\t\t\t\t\t\t\t$pk = $params['record']->id;\n\t\t\t\t\t\t\t$title = $params['record']->{$self::meta('title')};\n\t\t\t\t\t}\n\t\t\t\t\tif ($result) {\n\t\t\t\t\t\t$logData = array(\n\t\t\t\t\t\t\t'model' => $self::invokeMethod('_name'),\n\t\t\t\t\t\t\t'action' => $action,\n\t\t\t\t\t\t\t'pk' => $pk,\n\t\t\t\t\t\t\t'title' => $title\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$logmodel::create($logData)->save();\n\t\t\t\t\t}\n\t\t\t\t\treturn $result;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "public function performMultipleAction(){\r\n\t\tif(Request::ajax()){\r\n\t\t\t$actionType = ((Input::get('type'))) ? Input::get('type') : '';\r\n\t\t\tif(!empty($actionType) && !empty(Input::get('ids'))){\r\n\t\t\t\tif($actionType\t==\t'active'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->update(array('status' => ACTIVE));\r\n\t\t\t\t}\r\n\t\t\t\telseif($actionType\t==\t'inactive'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->update(array('status' => 0));\r\n\t\t\t\t}\r\n\t\t\t\telseif($actionType\t==\t'delete'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->delete();\r\n\t\t\t\t}\r\n\t\t\t\tSession::flash('success', trans(\"messages.global.action_performed_message\")); \r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function _load_models()\n {\n foreach ($this->models as $model)\n {\n $this->load->model($this->_model_name($model), $model);\n }\n }", "public function run()\n {\n $path = app_path() . \"/Entities\";\n $permissions = ['all', 'view', 'create', 'edit', 'delete'];\n foreach ($this->getModels($path) as $key1 => $model) {\n foreach ($permissions as $key2 => $permission) {\n Permission::findOrCreate($model . '-' . $permission, 'Api');\n }\n }\n\n }", "function execute()\n {\n $this->OldModel = $this->getOldModelToUse();\n $this->OldModel->cacheQueries = false;\n $this->OldModel->cacheSQL = false;\n $this->NewModel = $this->getNewModelToUse();\n $this->NewModel->cacheQueries = false;\n $this->NewModel->cacheSQL = false;\n \n $tableMap = $this->getTableMap();\n debug($tableMap);\n if (!$tableMap)\n {\n $this->print_instructions();\n exit();\n }\n\n foreach ($tableMap as $table => $data)\n {\n if (!$this->specialProcessing($table, $data))\n {\n $this->import($table, $data);\n }\n }\n }", "public function callAfterCreating($models)\n {\n $this->callAfter($this->afterCreating, $models);\n }", "protected function uses(array $models)\n {\n $this->container->get('loader')->loadModels($this, $models);\n }", "public function run()\n {\n // $companies = \\SAAS\\Domain\\Company\\Models\\Company::limit(2)->get();\n\n // $companies->each(function ($u) {\n // $u->projects()->saveMany(factory(\\SAAS\\Domain\\Project\\Models\\Project::class, 5)->make());\n // });\n\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n foreach ($models as $model) {\n $model->markAsSolved();\n }\n\n return Action::message('İşlem gerçekleştirildi');\n }", "public function run($IDs)\n {\n $model = $this->findCurrentModels($IDs);\n if ($this->checkAccess) {\n call_user_func($this->checkAccess, $this->id, $model);\n }\n\n return $model;\n }", "public function testModels()\n {\n foreach(array('PushMessage', 'PushMessageIos', 'PushMessageAndroid', 'PushProject', 'PushAction', 'PushLocation', 'PushDevice') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }", "public function update($models)\n {\n // reset keys, with php artisan scout:import \"Syscover\\...\" command get a object with objects\n // need call to values method to change object to array\n $models = $models->values();\n\n $this->setProperties($models);\n\n if (Storage::exists($this->fileRoute))\n {\n // transform json to collection\n $data = collect(json_decode(Storage::get($this->fileRoute), true));\n\n foreach ($models as $model)\n {\n $match = false;\n\n foreach ($data as $key => $item)\n {\n if (\n (isset($model['ix']) && $item['ix'] === $model->ix) ||\n (isset($model['id']) && $item['id'] === $model->id)\n )\n {\n $match = true;\n $data[$key] = $model->toSearchableArray();\n }\n }\n\n if(!$match) $data->push($model->toSearchableArray());\n }\n }\n else\n {\n $data = $models->map(function($model) {\n return $model->toSearchableArray();\n });\n }\n\n Storage::disk('local')->put($this->fileRoute, $data);\n }", "public function apply($model)\n {\n foreach ($this->filters() as $name => $value) {\n $method = $this->map()[$name];\n\n $model->{$method}($this->sanitize($name, $value));\n }\n }", "public function run()\n {\n\n $actions = ['create', 'read', 'update', 'delete'];\n $excluded = ['Technology.php', 'Deliverable.php', 'ChangeStage.php'];\n\n $path = app_path('Models');\n $results = scandir($path);\n\n for ($i = 2; $i<count($results); $i++){\n if (!in_array($results[$i], $excluded)) {\n for ($a = 0; $a < count($actions); $a++) {\n Permission::firstOrCreate([\n 'name' => $actions[$a] . \"-\" . strtolower(Str::plural(substr($results[$i], 0, -4))),\n 'guard_name' => 'web'\n ]);\n }\n }\n }\n\n }", "public function executeActions(){\n\t\tif(!isset($this->request['do'])) return;\n\t\t\n\t\tif(!is_array($this->request['do'])){\n\t\t\t$this->request['do'] = array($this->request['do']);\n\t\t}\n\t\t\n\t\tforeach($this->request['do'] as $action){\n\t\t\t$this->action_response = array();\n\t\t\t$method = \"action_\" . $action;\n\t\t\tif(method_exists($this, $method)){\n\t\t\t\t$player_id = null;\n\t\t\t\t$game_id = null;\n\t\t\t\tif(is_object($this->session->me)) $player_id = $this->session->me->getID();\n\t\t\t\tif(is_object($this->game)) $game_id = $this->game->getID();\n\t\t\t\t$sql = new SqlManager();\n\t\t\t\t$new = array( \"action_date\" => date(\"Y-m-d H:i:s\", time()), \"action_name\" => $action, \"action_game\" => $game_id, \"action_player\" => $player_id );\n\t\t\t\t$sql->insert(\"action\", $new);\n\t\t\t\t$this->action_response[$action] = $this->$method($sql->getLastInsertID());\n\t\t\t}\n\t\t}\n\t}", "public function handle(ActionFields $fields, Collection $models)\n {\n foreach ($models as $model) {\n $model->status_id = $fields->id;\n $model->save();\n }\n return Action::message('Selected status was changed!');\n }", "function _ci_assign_to_models()\n {\n if (count($this->_ci_models) == 0)\n {\n return;\n }\n\n $CI =& get_instance();\n foreach ($this->_ci_models as $model)\n {\n $CI->$model->_assign_libraries();\n }\n }", "function run() {\n $this->model->run();\n }", "public function bulk_actions(){\n\t\t$this->autoRender = false;\n\t\t$this->layout = false;\n\t\t\n\t\tif(!$this->_checkSession()){\n\t\t\t$this->Session->setFlash(__(\"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Acess Denied!</div>\"), 'flash_custom');\n\t\t\t$this->redirect(array('action'=>'login'));\n\t\t}\n\t\t\n\t\tif(!$this->request->is('post')){\n\t\t\tdie(\"Access denied!\");\n\t\t}\n\t\t$process_action = $this->request->data['process_action'];\n\t\t$process_model = $this->request->data['process_model'];\n\t\t\n\t\tswitch($process_action){\n\t\t\tcase 'delete':\n\t\t\t\t\t\tif(isset($this->request->data['item_id']) && !empty($this->request->data['item_id'])){\n\t\t\t\t\t\t\tforeach($this->request->data['item_id'] as $item_id){\n\t\t\t\t\t\t\t\t$this->$process_model->id = $item_id;\n\t\t\t\t\t\t\t\t$this->$process_model->delete();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->Session->setFlash(__('<div class=\"alert alert-success\" role=\"alert\">Records deleted successfully!</div>'), 'flash_custom');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t\n\t\t}\n\t\t\t\n\t\t$this->redirect($this->referer());\n\t}", "function include_model($models) {\n $models = explode(',', str_replace(' ', '', $models));\n \n foreach ($models as $model) {\n $model_name = strtolower(ApplicationModel::filename_to_modelname($model));\n if (empty(Application::$models->$model_name)) {\n echo \"Warning: include_model: Model $model_name not found\";\n continue;\n }\n Application::$models->$model_name->load();\n }\n}", "protected function afterActionDone($models)\n {\n return true;\n }", "public function executeModelAction(): void\n {\n $this->action = $this->executeModelActionLoad($this->action);\n\n $this->vp->set(function () {\n $this->jsSetButtonsState($this->loader, $this->step);\n $this->jsSetListState($this->loader, $this->step);\n $this->runSteps();\n });\n }", "public function run()\n {\n $items = $this->getData();\n foreach ($items as $item) {\n $permission_model = PermissionModel::find($item['id']);\n if (!isset($permission_model)) {\n $permission_model = new PermissionModel();\n $permission_model->id = $item['id'];\n }\n $permission_model->name = $item['name'];\n $permission_model->code = $item['code'];\n $permission_model->save();\n }\n }", "public function run()\n {\n \t\tDB::table('models')->insert($models);\n }", "public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminJobModel->bulkAction();\r\n }", "public function update($models)\n {\n $index = new Index($this->RedisClientInterface, $models->first()->searchableAs());\n\n $models\n ->map(function ($model) {\n $array = $model->toSearchableArray();\n if (empty($array)) {\n return;\n }\n return array_merge(['id' => $model->getKey()], $array);\n })\n ->filter()\n ->values()\n ->each(function ($item) use ($index) {\n $index->add($item);\n });\n }", "public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->bulkAction();\r\n }", "public function testModels()\n {\n foreach(array('TextPageCategory') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }", "public function delete($models)\n {\n if ($models->isEmpty()) {\n return;\n }\n\n $ids = $models->map(function ($model) {\n return $model->getScoutKey();\n });\n\n $query = $this->client->createUpdate();\n $query->addDeleteByIds($ids->toArray());\n $query->addCommit();\n\n $endpoint = $models->first()->searchableAs();\n $this->client->update($query, $endpoint);\n }", "public function run()\n {\n $app_1_attraction = factory(\\App\\Models\\Attraction::class, 5)->create(\n [\n 'app_id' => 1\n ]\n );\n\n foreach ($app_1_attraction as $attraction) {\n $general_info = factory(\\App\\Models\\GeneralInfo::class)->create();\n $attraction->generalInformation()->save($general_info);\n $workingHours = factory(\\App\\Models\\WorkingHours::class)->create();\n $attraction->workingHours()->save($workingHours);\n $review = factory(\\App\\Models\\Review::class)->create();\n $attraction->reviews()->save($review);\n }\n\n $app_2_attraction = factory(\\App\\Models\\Attraction::class, 5)->create(\n [\n 'app_id' => 2\n ]\n );\n\n foreach ($app_2_attraction as $attraction) {\n $general_info = factory(\\App\\Models\\GeneralInfo::class)->create();\n $attraction->generalInformation()->save($general_info);\n $workingHours = factory(\\App\\Models\\WorkingHours::class)->create();\n $attraction->workingHours()->save($workingHours);\n $review = factory(\\App\\Models\\Review::class)->create();\n $attraction->reviews()->save($review);\n }\n }", "public function execute($ids)\n {\n $this->smartCollectionsHelper->createSmartCollections();\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n if (count($models) > 1) {\n return Action::danger('This action can only be run on one model at a time.');\n }\n\n if (config('passport.personal_access_client.id') === null\n || config('passport.personal_access_client.secret') === null) {\n return Action::danger(\n 'Passport personal access client ID and/or secret environment variables not set. '.\n 'Make sure they are set and try again.'\n );\n }\n\n $user = $models[0];\n\n $token = $user->createToken($fields->name)->accessToken;\n\n Session::flash('pat_user_name', $user->name);\n Session::flash('pat_plain_token', $token);\n\n return Action::redirect(route('oauth2.pat.created'));\n }", "public function process_bulk_action() \n\t{\n\t\t$action = $this->current_action();\n\t\t\n\t\tif ( $action and array_key_exists( $action, $this->bulkActions ) )\n\t\t{\n\t\t\t$class = $this->activeRecordClass;\n\t\t\tforeach( $_POST[ 'item' ] as $item_id )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$item = $class::load( $item_id );\n\t\t\t\t\tif ( is_callable( array( $item, $action ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcall_user_func( array( $item, $action ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch( \\Exception $e ) { }\n\t\t\t}\n\t\t}\n\t}", "private function loadModels()\n {\n $this->use = ( ! isset($this->use)) ? [$this->class] : $this->use;\n\n if ($this->use) {\n foreach ($this->use as $model) {\n self::load('model', $model);\n }\n }\n }", "public function delete($models)\n {\n if ($models->isEmpty()) {\n return;\n }\n\n $index = $models->first()->searchableAs();\n\n $keys = $models instanceof RemoveableScoutCollection\n ? $models->pluck($models->first()->getUnqualifiedScoutKeyName())\n : $models->map->getScoutKey();\n\n $this->openSearch->bulkDelete($index, $keys);\n }", "public function run()\n {\n foreach ($this->cityList as $city) {\n $input = [\n 'id' => $city->id,\n 'title' => $city->title,\n 'district' => $city->district\n ];\n City::create($input);\n }\n\n foreach ($this->areaList as $area) {\n $input = [\n 'id' => $area->id,\n 'city_id' => $area->city_id,\n 'title' => $area->title,\n 'zip' => $area->zip\n ];\n Area::create($input);\n }\n }", "public function execute($ids)\n {\n $this->executeByLabelIds($ids);\n }", "public function run()\r\n {\r\n $services = App\\service::all();\r\n\r\n foreach ($services as $service)\r\n {\r\n $service->stylists()->save(\\App\\service::find(1));\r\n $service->stylists()->save(\\App\\service::find(2));\r\n $service->stylists()->save(\\App\\service::find(3));\r\n }\r\n\r\n }", "public function run()\n {\n $emailsSales = ['marc@go-aos.io', 'thibault@go-aos.io', 'cyrille@go-aos.io', 'corentin@go-aos.io', 'baptiste@go-aos.io', 'yahia@go-aos.io', 'nathan@go-aos.io'];\n\n foreach ($emailsSales as $emailSales) {\n $user = \\App\\Models\\User::where('email', '=', $emailSales)->first();\n $sales = new \\App\\Models\\Sales;\n $sales->assignUser($user);\n }\n\n }", "function admin_bulk_action(){\n\t\t\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\tif(isset($this->data['Model']['id']) && count($this->data['Model']['id'])>0 && isset($this->data['Model']['action'])){\n\t\t\t\n\t\t\t$infected_records = array();\n\t\t\tforeach($this->data['Model']['id'] as $ids){\n\t\t\t\t$infected_records[] = DECRYPT_DATA($ids);\n\t\t\t}\n\t\t\t$model_name = $this->data['Model']['model_name'];\n\t\t\t$action = $this->data['Model']['action'];\n\t\t\tApp::import(\"Model\",$model_name);\n\t\t\t$this->$model_name = new $model_name();\n\t\t\tif($action == 0){//Activate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'1'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t $this->Session->setFlash(RECORD_ACTIVATED, 'message/green');\n\t\t\t}\n\t\t\telse if($action == 1){//Inactivate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'0'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t $this->Session->setFlash(RECORD_DEACTIVATED, 'message/green');\n\t\t\t}else if($action == 2){//Delete selected records\n\t\t\t\t\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_deleted\"=>\"'1'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t if($model_name == \"Vendor\"){\n\t\t\t\tApp::import(\"Model\",\"Product\");\n\t\t\t\t$this->Product = new Product();\n\t\t\t\t$this->Product->updateAll(array(\"Product.is_deleted\"=>\"'1'\"),array(\"Product.vendor_id\"=>$infected_records));\n\t\t\t\tApp::import(\"Model\",\"Coupon\");\n\t\t\t\t$this->Coupon = new Coupon();\n\t\t\t\t$this->Coupon->updateAll(array(\"Coupon.is_deleted\"=>\"'1'\"),array(\"Coupon.vendor_id\"=>$infected_records));\n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t $this->Session->setFlash(RECORD_DELETED, 'message/green');\n\t\t\t}\n\t\t\t$this->redirect($this->referer());exit();\t\n\t\t}\n\t}", "public function run()\n {\n $model = new Male();\n $model->name = \"Model 1\";\n $model->dateOfBirth = \"17/12/1991\";\n $model->height = 1.80;\n $model->national = \"Viet Nam\";\n $model->description = \"Hottest guy with muscle body and white skin\";\n $model->job = \"Model and actor\";\n $model->image = \"vietnam.jpg\";\n $model->viewCount = \"0\";\n $model->save();\n\n $model = new Male();\n $model->name = \"Model 2\";\n $model->dateOfBirth = \"20/2/1990\";\n $model->height = 1.85;\n $model->national = \"Korean\";\n $model->description = \"Park Hae-jin (Korean: 박해진, born May 1, 1983) is a South Korean actor. He is best known for his supporting roles in dramas My Love from the Star (2013) and Doctor Stranger (2014), and his leading roles in Bad Guys (2014), Cheese in the Trap (2016) and Man to Man (2017).\";\n $model->job = \"Model and businessmen\";\n $model->image = \"korean.jpg\";\n $model->viewCount = \"0\";\n $model->save();\n\n $model = new Male();\n $model->name = \"Model 3\";\n $model->dateOfBirth = \"30/5/1995\";\n $model->height = 1.90;\n $model->national = \"England\";\n $model->description = \"Gentleman with a mystic beauty\";\n $model->job = \"Model\";\n $model->image = \"england.jpg\";\n $model->viewCount = \"0\";\n $model->save();\n\n $model = new Male();\n $model->name = \"Model 4\";\n $model->dateOfBirth = \"09/08/1989\";\n $model->height = 1.87;\n $model->national = \"China\";\n $model->description = \"Hotest guy <3\";\n $model->job = \"Model and actor\";\n $model->image = \"china.jpg\";\n $model->viewCount = \"0\";\n $model->save();\n }", "public function run()\n {\n $products = resolve(App\\Product::class)->all();\n $users = resolve(App\\User::class)->all();\n foreach ($users as $user) {\n $user->products()->saveMany($products->random(2));\n }\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n //\n\n $itemArrays = $fields -> item;\n $newArray = json_decode($itemArrays);\n\n foreach ($models as $model){\n foreach ($newArray as $getItem){\n\n $itemArray = $getItem->items;\n\n foreach ($itemArray as $item) {\n\n //if serial number bang null thi se ko add vao array\n $serialInputArray = [];\n if($item -> serialNumber != \"\"){\n array_push($serialInputArray, $item->serialNumber );\n }\n\n $newItem = Item::where('serialNumber', $item -> serialNumber)->first();\n if($newItem && $newItem->stockStatus == false){\n $newItem->stockStatus = true;\n $newItem->sale_order_id = null;\n $newItem->save();\n\n $updateSaleOrderModelType = \\App\\Models\\SaleOrderItem::where('id', $getItem -> id)->first();\n\n if($updateSaleOrderModelType){\n $updateSaleOrderModelType -> qty = $updateSaleOrderModelType -> qty + count($serialInputArray);\n $updateSaleOrderModelType -> shipped -= count($serialInputArray);\n $updateSaleOrderModelType -> save();\n }\n\n }\n }\n }\n }\n\n\n\n\n\n\n// $newArrays = [];\n//\n// $myArrs = explode(',', $fields->item);\n//\n// foreach ($models as $model) {\n// $sale_orders = SaleOrderModelType::where('sale_order_id', $model->id)->get();\n// $counting = count($myArrs);\n//\n// foreach ($myArrs as $myArr) {\n// $removeTrim = trim($myArr);\n//\n// if (!in_array($removeTrim, $newArrays)) {\n// array_push($newArrays, $removeTrim);\n//\n//\n// $items = Item::where('serialNumber', $removeTrim)->first();\n//\n// if ($items) {\n// $items -> stockStatus = true;\n// $items -> sale_order_id = null;\n// $items -> save();\n//\n// }\n// }\n//\n// }\n//\n// if($sale_orders){\n// foreach ($sale_orders as $sale_order){\n//\n// if($sale_order && $sale_order -> shipped > 0 && $sale_order -> shipped <= $counting ){\n// $sale_order -> qty += $sale_order -> shipped;\n// $counting -= $sale_order -> shipped;\n// $sale_order -> shipped = 0;\n// $sale_order -> save();\n// if($counting == 0){\n// return Action::message('Success');\n// }\n//\n// }elseif ($sale_order && $sale_order -> shipped > 0 && $sale_order -> shipped > $counting ){\n// $sale_order -> qty += $counting;\n// $sale_order -> shipped -= $counting;\n// $counting = 0;\n// $sale_order -> save();\n// if($counting == 0){\n// return Action::message('Success');\n// }\n// }\n// $counting -> save();\n//\n// }\n//\n// }\n//\n//\n// }\n }", "public function run()\n {\n Model::unguard();\n\n // Create categories\n foreach ($this->categories as $name => $color) {\n $category = Category::firstOrNew(['name' => $name]);\n $category->color = $color;\n $category->save();\n }\n\n // Create priorities\n $this->call(BasicPriorities::class);\n\n // Create statuses\n $this->call(BasicStatuses::class);\n }", "public function run()\n {\n $this->call(specialites::class);\n $this->call(cancers::class);\n $this->call(organes::class);\n $this->call(wilayas::class);\n $this->call(dairas::class);\n $this->call(communes::class);\n $this->call(employes::class);\n $this->call(permissions::class);\n $this->call(roles::class);\n $this->call(users::class);\n }", "public function models();", "public function run()\n {\n \t$expertise = ['Aerobics','Yoga','Meditation','Gym Instructor','Dietician','Nutritionist','Personal Trainer'];\n \tforeach ($expertise as $expert)\n \t{\n $record = \\App\\Models\\Expertise::where(['title' => ucfirst($expert)])->first();\n if(!$record)\n {\n $record = new \\App\\Models\\Expertise();\n }\n \t\t$record->title = ucfirst($expert);\n \t\t$record->created_by = '1';\n \t\t$record->updated_by = '1';\n \t\t$record->save();\n \t}\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n foreach ($models as $playlist) {\n if (! $playlist->publish()) {\n return Action::danger('Could not publish playlist, you must add at least one video!');\n }\n }\n\n\n return Action::message('Playlist(s) published!');\n }", "public function run(SS_List $objs)\n {\n }", "private function loadRelatedModels(Collection $models) {\n\t\t\t/** @var Model $model */\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->loadRelatedModels($this->request->getInclude());\n\t\t\t}\n\t\t}", "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "abstract protected function prepareModels();", "public function setModels($models)\n {\n $this->_models = $models;\n }", "public function setModels($models)\n {\n $this->_models = $models;\n }", "private function performActions()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->performActionList();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->errorsNonFatal[htmlspecialcharsEx($e->getCode())] = htmlspecialcharsEx($e->getMessage());\n\t\t}\n\t}", "public function run()\n {\n \n $data=[\n ['id'=>1,'tag'=>\"blood need\"],\n ['id'=>2,'tag'=>\"accident\"],\n ['id'=>3,'tag'=>\"helmet\"],\n ['id'=>4,'tag'=>\"blood want\"],\n ['id'=>5,'tag'=>\"two wheel accident\"],\n ['id'=>6,'tag'=>\"four wheel accident\"],\n \n ];\n foreach ($data as $instence) \n {\n $object=new mastermodel;\n $object->tag=$instence['tag'];\n \n $object->save();\n }\n\n \n \n }", "public function run()\n {\n foreach (User::all() as $user) {\n foreach (Post::all() as $post) {\n Like::factory()->forPost($post->id)->forUser($user->id)->create();\n }\n\n foreach (Comment::All() as $comment) {\n Like::factory()->forComment($comment->id)->forUser($user->id)->create();\n }\n }\n }", "abstract public function run(SS_List $objs): HTTPResponse;", "protected function executeAction() {\r\n\t\t$this->objectAction->validateAction();\r\n\t\t$this->objectAction->executeAction();\r\n\t\t\r\n\t\t$this->handleResult();\r\n\t}", "public function run()\n {\n $data = collect([\n (object)[\n 'name' => 'Администратор',\n 'slug' => 'admin',\n ],\n (object)[\n 'name' => 'Финансист',\n 'slug' => 'financier',\n ],\n (object)[\n 'name' => 'Снабженец',\n 'slug' => 'supplier',\n ],\n (object)[\n 'name' => 'Закупщик',\n 'slug' => 'buyer',\n ],\n ]);\n\n $data->each(function ($item) {\n $model = new Model();\n $model->name = $item->name;\n $model->slug = $item->slug;\n\n $model->save();\n });\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n \\App\\Models\\Customer::factory(10)->create();\n \\App\\Models\\Supplier::factory(10)->create();\n\n foreach ($this->measurements as $measurement)\n {\n \\App\\Models\\Measurement::create($measurement);\n }\n foreach ($this->products as $product)\n {\n \\App\\Models\\Product::create($product);\n }\n }", "public function populateModels()\n {\n }", "public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}", "public function run()\n {\n User::all()->each(function($user){\n $user->todos()->saveMany(\n Todo::factory()->count(10)->make()\n )->each(function($todo){\n $todo->tasks()->saveMany(\n TodoTask::factory()->count(10)->make() \n );\n });\n });\n }", "public function run()\n {\n $this->call([\n TableUPMSAdmin::class,\n TableUPMSCityCountry::class,\n TableUPMSRoadmap::class,\n TableUPMSPrograms::class,\n TableUPMSSchools::class,\n TableUPMSStudents::class,\n TableUPMSTeachers::class,\n TableUPMSExams::class\n ]);\n }", "public function run()\n {\n //\n $areas = Area::all();\n $status = Status::all();\n foreach ($areas as $area) {\n $machines = Machine::factory(random_int(1,20))->create(['area_id'=>$area->id]);\n foreach ($machines as $machine){\n \n $machine->statuses()->attach($status->random()->id,['date_changed'=>now(),'condition'=>'2']);\n // Photo::factory(2)->create(['photoable_id' => $machine->id,'photoable_type'=>'App\\Models\\External\\Machine']);\n $motors = Motor::factory(10)->create(['machine_id'=>$machine->id]);\n }\n }\n \n }", "public function run()\n {\n \t$attractions = Attraction::where('type', 'museum')->get();\n \tforeach ($attractions as $attraction) {\n \t\t$attraction->routes()->sync([1]);\n \t}\n\n \t$attractions = Attraction::where('type', 'sport')->get();\n \tforeach ($attractions as $attraction) {\n \t\t$attraction->routes()->sync([3]);\n \t}\n\n \t$attractions = Attraction::where('type', 'architecture / art')->get();\n \tforeach ($attractions as $attraction) {\n \t\t$attraction->routes()->sync([2]);\n \t}\n\n \t$attractions = Attraction::where('type', 'market')->get();\n \tforeach ($attractions as $attraction) {\n \t\t$attraction->routes()->sync([4]);\n \t}\n\n }", "private function iterate_actions( $when ) {\n\t\t// general\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item\", $this );\n\n\t\t// type\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_type_{$this->get_type()}\", $this );\n\n\t\t// object type\n\t\tif ( isset( $this->item['data']['post_type'] ) ) {\n\t\t\t$object_type = $this->item['data']['post_type'];\n\n\t\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_type_{$object_type}\", $this );\n\t\t}\n\n\t\t// item\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_{$this->get_id()}\", $this );\n\t}", "public function run(): void\n {\n foreach (Social::getSocials() as $social) {\n $model = Social::firstOrNew($social);\n $model->save();\n }\n }", "public function run()\n {\n $rol = new ModelsRol();\n $rol->id = 1;\n $rol->nombre_rol = \"Admin\";\n $rol->estado =\"Activo\";\n $rol->save();\n $rol = new ModelsRol();\n $rol->id = 2;\n $rol->nombre_rol = \"docente\";\n $rol->estado =\"Activo\";\n $rol->save();\n $rol = new ModelsRol();\n $rol->id = 3;\n $rol->nombre_rol = \"estudiante\";\n $rol->estado =\"Activo\";\n $rol->save();\n $rol = new ModelsRol();\n $rol->id = 4;\n $rol->nombre_rol = \"acudiente\";\n $rol->estado =\"Activo\";\n $rol->save();\n }", "function mass_edit() {\n \tif ($this->getControllerName() == 'people') {\n $this->mass_edit_objects = Users::findByIds($this->request->post('selected_item_ids'), STATE_ARCHIVED, $this->logged_user->getMinVisibility());\n } // if\n\n parent::mass_edit();\n }", "public function actionBatchDelete() {\n if (($ids = Yii::$app->request->post('ids')) !== null) {\n $models = $this->findModelAll($ids);\n foreach ($models as $model) {\n $model->delete();\n }\n return $this->redirect(['index']);\n } else {\n throw new HttpException(400);\n }\n }", "public function\n\t\tdo_actions()\n\t{\n\t}", "protected function _getRelatedRecords($modelName, $method, $arguments) {}", "public function run()\n {\n $identities = Identity::whereDoesntHave('user', function ($user) {\n $user->where('username', 'admin');\n })->get();\n\n foreach ($identities as $identity) {\n $identity->member()->save(factory(App\\Models\\Member::class)->make());\n }\n }", "public function run()\n {\n Model::unguard();\n\n if(Permission::all()->count() > 0)\n return;\n\n $permissions = [\n [\n 'model' => 'user',\n 'name' => 'show_own',\n 'label' => null\n ],\n [\n 'model' => 'user',\n 'name' => 'show',\n 'label' => null\n ],\n [\n 'model' => 'user',\n 'name' => 'edit_own',\n 'label' => null\n ],\n [\n 'model' => 'user',\n 'name' => 'edit',\n 'label' => null\n ],\n [\n 'model' => 'user',\n 'name' => 'delete_own',\n 'label' => null\n ],\n [\n 'model' => 'user',\n 'name' => 'delete',\n 'label' => null\n ],\n [\n 'model' => null,\n 'name' => 'administrate',\n 'label' => 'Administrate stuff'\n ]\n ];\n\n foreach ($permissions as $permission) {\n Permission::create($permission);\n }\n\n\n Model::reguard();\n }", "public function run()\n {\n $students = SmStudent::where('active_status', 1)->get();\n foreach ($students as $student) {\n $fees_types = SmFeesType::where('active_status', 1)->get();\n foreach ($fees_types as $fees_type) {\n $store = new SmFeesPayment();\n $store->student_id = $student->id;\n $store->fees_type_id = $fees_type->id;\n $store->fees_discount_id = 1;\n $store->discount_month = date('m');\n $store->discount_amount = 100;\n $store->fine = 50;\n $store->amount = 250;\n $store->payment_mode = \"C\";\n $store->save();\n\n }\n }\n }", "public function actionBatchUpdate() {\n// assuming each item is of model class 'Item'\n $items = $this->getItemsToUpdate();\n if (Model::loadMultiple($items, Yii::$app->request->post()) &&\n Model::validateMultiple($items)) {\n $count = 0;\n foreach ($items as $item) {\n// populate and save records for each model\n if ($item->save()) {\n// do something here after saving\n $count++;\n }\n }\n Yii::$app->session->setFlash('success', \"Processed {$count} records successfully.\");\n return $this->redirect(['index']); // redirect to your next desired page\n } else {\n return $this->render('update', [\n 'items' => $items,\n ]);\n }\n }", "protected function _execute(array $params)\n {\n $this->importFromSearch();\n }", "public function run()\n {\n // even is food, odd is drink\n $products = ['Popcorn', 'Cocacola', 'Chicken', 'Mirinda', 'Potato','7up'];\n $listUrl = ['/storage/images/corn.png', '/storage/images/pepsi.jpg'];\n\n foreach($products as $key=>$product) {\n $model = new Product();\n $model->reference = 'PRO' . Str::random(6);\n $model->name = $product;\n $model->description = Str::random(100);\n $image = new Image();\n if ($key % 2 == 0) {\n $model->price = rand(43, 52) . '000';\n $model->type = Product::FASTFOOD;\n $image->url = $listUrl[0];\n } else {\n $model->price = rand(20, 25) . '000';\n $model->type = Product::SOFTDRINK;\n $image->url = $listUrl[1];\n }\n $model->status = 1;\n $model->save();\n $model->images()->save($image);\n }\n }", "public function execute () {\n $input = [\n 'active' => [0,1]\n ];\n $categories = $this->_api_client->get('/category', $input);\n\n // set returned value to the view\n $this->set('categories', $categories);\n\n // get products using the API\n $input = [\n 'active' => [0,1]\n ];\n $products = $this->_api_client->get('/product', $input);\n\n // set returned value to the view\n $this->set('products', $products);\n }", "public function actionIndex()\n\t{\n\n\t\t$this->redirect($this->createUrl('/checks'));\n\n\n\t\t$models = array();\n $models1 = array();\n\n if(!empty($_POST['Task']))\n {\n foreach($_POST['Task'] as $taskData){\n $model = new ExpectedProducts();\n $model->setAttributes($taskData);\n if($model->validate())\n $models[] = $model;\n }\n }\n\n else{\n $models[] = new ExpectedProducts();\n $models1[] = new InvoicesProducts();\n }\n\n $model=new ProvidersInvoices;\n $clients=new Clients;\n $providers=new Providers;\n\n $this->render('index', array(\n 'models' => $models,\n 'models1' => $models1,\n 'model' => $model,\n 'clients' => $clients,\n 'providers' => $providers,\n ));\n\t}" ]
[ "0.6674411", "0.65084416", "0.6326152", "0.6247351", "0.624139", "0.62125236", "0.61403656", "0.6126487", "0.61153924", "0.6113193", "0.6102642", "0.60788846", "0.59760165", "0.59220964", "0.58599764", "0.58367", "0.5815978", "0.57914895", "0.57807183", "0.5763794", "0.57600313", "0.5741303", "0.56980836", "0.5659774", "0.56371737", "0.5624363", "0.5601941", "0.55814004", "0.5580655", "0.55660886", "0.55611944", "0.5543797", "0.5523729", "0.55158675", "0.5513291", "0.549877", "0.54858863", "0.54587287", "0.5458405", "0.5453125", "0.5425012", "0.53962666", "0.5387733", "0.5377452", "0.53665626", "0.5356957", "0.53487355", "0.5330316", "0.5327474", "0.5324494", "0.5320275", "0.5309311", "0.52940995", "0.52759284", "0.52694535", "0.5269143", "0.52641594", "0.52594703", "0.5243898", "0.52358663", "0.5234948", "0.52256894", "0.52109236", "0.520645", "0.51986086", "0.5196233", "0.51938975", "0.51912475", "0.5189892", "0.51870257", "0.51870257", "0.51841736", "0.5170031", "0.5167737", "0.5160645", "0.5155281", "0.51545346", "0.5151605", "0.5150276", "0.51462626", "0.5145654", "0.51365954", "0.51293314", "0.5124496", "0.5119059", "0.5109494", "0.509364", "0.509176", "0.5086947", "0.508417", "0.50736", "0.50694907", "0.5068994", "0.5068537", "0.50581694", "0.50540423", "0.50523496", "0.5051419", "0.50434154", "0.5043054" ]
0.6048573
12
Get the fields available on the action.
public function fields() { $series = []; for ($i = 1; $i <= 110; $i++) { $name = "第${i}集"; $series[$name] = $name; } return [ Select::make('剧集', 'name') ->options($series) ->withMeta([ 'value' => '第1集', 'extraAttributes' => [ 'placeholder' => '第几集...'], ]), Text::make("播放地址", 'url', )->withMeta(['extraAttributes' => [ 'placeholder' => '目前仅支持m3u8播放地址'], ]), Select::make("是否完成求片处理", 'fixed')->options([ 0 => '否', 1 => '是', ]) ->withMeta(['value' => 0]) ->displayUsingLabels(), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_actions_data() {\n\t\t$actions_data = $this->get_meta( 'actions' );\n\t\treturn is_array( $actions_data ) ? array_map( [ $this, 'format_action_fields' ], $actions_data ) : [];\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public static function get_fields()\n {\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "function fields()\n\t{\n\t\treturn $this->_fields;\n\t}", "public function fields()\r\n {\r\n return $this->fields;\r\n }", "public function fields() {\n return $this->fields;\n }", "public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}", "public function fields()\n {\n return $this->fields;\n }", "public function fields()\n {\n return $this->fields;\n }", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "function getFields();", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function get_fields() {\n\t\treturn $this->fields;\n\t}", "public function get_fields() {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "public function fields() {\n // The fields are passed to the constructor for this plugin.\n return $this->fields;\n }", "public static function getFields(){\n\t\treturn self::$fields;\n\t}", "public function getFields()\n {\n return $this->getForm()->getFields();\n }", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "protected function getFields()\n {\n return array(\n 'user_id',\n 'name',\n 'oauth_user_id',\n 'username',\n 'pic_url',\n 'oauth_provider',\n 'token',\n 'secret'\n );\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }", "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "public static function getFields() {\n return self::$fields;\n }", "public function getFields()\n {\n return $this->fillable;\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields()\n {\n return $this->_fields;\n }", "public function getFields()\n {\n return $this->_fields;\n }", "public function getFields()\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}", "public function getAdditionalFields()\n {\n return $this->postRequest('GetAdditionalFields');\n }", "public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}", "public function getAllFields()\n {\n return $this->fields;\n }", "public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function fields(){\n\t\treturn array();\n\t}", "abstract protected function getFields();", "abstract public function getFields();", "abstract public function getFields();", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "public function getAllFields();", "protected function getFieldsFromShowItem() {}", "public function action_allowed_fields() {\n return array();\n }", "public function fields()\n {\n return [ \n ];\n }", "public function &getFields();", "protected function getFields()\n {\n return $this->Fields;\n }", "public function getFields()\n {\n return $this->content->getFields();\n }", "public function fetch_fields() {}", "public static function available_fields()\n {\n return self::$available_fields;\n }", "public function listFields()\n\t{\n\t\treturn array('id' => 'ID', 'title' => 'Title', 'estimated' => 'Estimated', 'status' => 'Status', 'getPercentageComplete' => 'Percentage Complete');\n\t}", "public function getFields()\n {\n return $this->arr_defined_fields;\n }", "public function getFields(){\n\t\treturn $this->Fields;\n\t}", "public function getFields()\n\t{\n\t\treturn [];\n\t}", "abstract public function fields(AdminRequest $request);", "public function getFormFields()\n {\n return $this->form->getFields();\n }", "protected function getQuickUpdateFields(){\n\t\t/** @var CI $this */\n\t\t$support_list = $this->supportCRUDList();\n\t\t$fields = $support_list[CI::OP_QUICK_UPDATE]['fields'];\n\t\tif(!$fields){\n\t\t\treturn array();\n\t\t}\n\n\t\tif(in_array('*', $fields)){\n\t\t\t/** @var Model $model */\n\t\t\t$model = $this->getModelClass();\n\t\t\t$ins = $model::meta();\n\t\t\t$fields = $ins->getAllPropertiesKey();\n\t\t}\n\t\treturn $fields;\n\t}", "public function getIncomingFields() {}", "public function & getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields() {\n return $this->program->getFields();\n }", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getFields() {\r\n\t\tif($this->_fields === null) {\r\n\t\t\t$this->_fields = $this->activeDataProvider->model->attributeNames();\r\n\t\t}\r\n\t\treturn $this->_fields;\r\n\t}", "public function &getFields() { return $this->fields; }", "protected function getActionInformation(Action $action) {\n return [\n $action->getPattern(),\n $action->getName(),\n $action->getMethod(),\n $action->group->getName() . ', ' . $action->group->getPattern(),\n Formatter::shortArray($action->getMiddleware()),\n $action->getUses(),\n Formatter::boolean($action->register),\n Formatter::boolean($action->useSmoothState)\n ];\n }", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'memberId', 'operation',\n 'operationAt' => function($model) {\n return MongodbUtil::MongoDate2String($model->operationAt);\n },\n 'createdAt' => function($model) {\n return MongodbUtil::MongoDate2String($model->createdAt);\n }\n ]\n );\n }", "public function getFields()\n {\n $fields = $this->getRequest()->get('fields');\n\n return (null != $fields) ? \\explode(',', $fields) : null;\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }" ]
[ "0.71501637", "0.71031564", "0.71031564", "0.71031564", "0.70227754", "0.70227754", "0.70227754", "0.70227754", "0.70227754", "0.70227754", "0.69821787", "0.6877059", "0.6877059", "0.6877059", "0.6877059", "0.6877059", "0.6874227", "0.686774", "0.68648744", "0.68214047", "0.68182", "0.68182", "0.6816797", "0.6813719", "0.6813719", "0.6812975", "0.67974615", "0.6786629", "0.67851806", "0.67394567", "0.67394567", "0.6728217", "0.6721718", "0.6719293", "0.6712977", "0.6707828", "0.67019236", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66941935", "0.66656715", "0.6661851", "0.6661851", "0.6660408", "0.6655201", "0.6645057", "0.66392255", "0.66378564", "0.66378564", "0.6634616", "0.6634616", "0.6628848", "0.6618111", "0.66172516", "0.6614304", "0.66082186", "0.65977365", "0.65977365", "0.65951455", "0.6595009", "0.65896016", "0.65896016", "0.658499", "0.65601677", "0.65580887", "0.65575534", "0.6545249", "0.653951", "0.65339136", "0.65234566", "0.6506022", "0.6484974", "0.64834815", "0.64569163", "0.6447259", "0.64419925", "0.64404535", "0.6430868", "0.64266884", "0.6420159", "0.6405207", "0.64043033", "0.6398863", "0.6398737", "0.6388628", "0.63796073", "0.6376521", "0.6375431", "0.6371429", "0.6371429", "0.6371429", "0.6371429", "0.6371429" ]
0.0
-1
Display a listing of the resource.
public function index() { $visitors = Visitor::all(); return view('visitors.index', compact('visitors')); }
{ "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->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "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 ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "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.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('visitors.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('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.7593198", "0.7593198", "0.75881755", "0.75787884", "0.7570936", "0.74992913", "0.7436037", "0.7431172", "0.7386512", "0.7351077", "0.7337819", "0.73100585", "0.7295612", "0.72803086", "0.7272473", "0.72422874", "0.7229479", "0.7224403", "0.7184453", "0.7177193", "0.7173551", "0.71482", "0.71424824", "0.7141885", "0.7135663", "0.7126202", "0.7121413", "0.7113729", "0.7113729", "0.7113729", "0.7110717", "0.7092118", "0.7083616", "0.7080794", "0.7078082", "0.70561296", "0.70561296", "0.7054459", "0.703925", "0.70373696", "0.70346737", "0.70324355", "0.70287114", "0.7025425", "0.7025232", "0.7018496", "0.7016745", "0.7002774", "0.70019513", "0.69991785", "0.69942427", "0.69936013", "0.69929653", "0.6988009", "0.69856364", "0.6965122", "0.6964889", "0.6955187", "0.69511235", "0.69497", "0.6947041", "0.69432163", "0.6940678", "0.6939846", "0.6936846", "0.6936846", "0.6936506", "0.6933589", "0.69309", "0.69273484", "0.6925485", "0.6921386", "0.6917649", "0.6913987", "0.6910826", "0.6909406", "0.69085246", "0.6907409", "0.69021183", "0.6900961", "0.68997645", "0.68991655", "0.6894049", "0.68920606", "0.6892033", "0.6891114", "0.6890811", "0.6890811", "0.6887868", "0.6887327", "0.68854356", "0.688366", "0.68805534", "0.68766564", "0.68753666", "0.6872474", "0.68717086", "0.6869974", "0.6869806", "0.6868809", "0.68685615" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $dataPr = array( 'name' => $request->name, 'address' => $request->address, 'age' => $request->age ); $insertId = Visitor::create($dataPr)->id; $rowCount = count(request()->input('division_id')); $dataCh = array(); for($i = 0; $i < $rowCount; $i++) { $dataCh[] = array( 'visitor_id' => $insertId, 'division_id' => request()->input('division_id')[$i], 'place' => request()->input('place')[$i], 'from_date' => date('Y-m-d', strtotime(request()->input('from_date')[$i])), 'to_date' => date('Y-m-d', strtotime(request()->input('to_date')[$i])), 'durations' => request()->input('durations')[$i], ); } Detail::insert($dataCh); return redirect('visitors'); }
{ "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());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "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.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show(Visitor $visitor) { // }
{ "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);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Visitor $visitor) { // }
{ "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 $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "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.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Visitor $visitor) { // }
{ "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 ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update($request, $id);", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update($id, $input);", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.74238616", "0.7062842", "0.7057816", "0.6897868", "0.65820867", "0.64505464", "0.6347915", "0.62114644", "0.6145006", "0.61231726", "0.6115922", "0.6100021", "0.6089019", "0.60542375", "0.60187906", "0.6008231", "0.5974106", "0.5944986", "0.59397626", "0.59393746", "0.58937186", "0.58607864", "0.5853811", "0.5853811", "0.58521867", "0.5815276", "0.58061725", "0.57518756", "0.57518756", "0.5736318", "0.57246256", "0.5715636", "0.5696208", "0.5691033", "0.5687788", "0.56692934", "0.56556624", "0.5652178", "0.56494987", "0.5636202", "0.56355816", "0.5632871", "0.563206", "0.56291884", "0.5621382", "0.56087434", "0.5602465", "0.55928403", "0.55825645", "0.55821884", "0.5581833", "0.5576869", "0.55712104", "0.5568173", "0.55648434", "0.5562885", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.5560537", "0.55592597", "0.5556131", "0.5555849", "0.5555397", "0.5553912", "0.55530137", "0.5543831", "0.55430055", "0.5540152", "0.5539437", "0.55359006", "0.5535772", "0.5534487", "0.552458", "0.5518245", "0.5515452", "0.55145514", "0.5509227", "0.55079365", "0.55065364", "0.55039924", "0.5501616", "0.5500345", "0.5499738", "0.54980725", "0.5496017", "0.5496017", "0.5494488", "0.5494334", "0.54936594", "0.54934716", "0.5491019", "0.54835314", "0.54795796", "0.5479442", "0.5478275", "0.54646415", "0.54637444", "0.5461914", "0.54562414" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Visitor $visitor) { // }
{ "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 $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\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.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get the registered name of the component.
protected static function getFacadeAccessor() { return 'Limelight\Limelight'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponentName()\n {\n return $this->_componentName;\n }", "public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $component->getStudlyName();\n }", "public function get_component_name() {\n return $this->plugintype.'_'.$this->pluginname;\n }", "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('pluginname', constants::M_COMPONENT);\n }\n }", "public function getComponentName(): string;", "public function get_component() : string\n {\n return $this->component;\n }", "protected function getComponentName(): string {\n if ($this->isPageTemplate()) {\n return \"{$this->layout}-{$this->post->post_type}\";\n }\n\n if (str_contains($this->componentId, '-')) {\n return implode('', \\__::chain($this->componentId)\n ->split('-')\n ->map(fn ($string) => \\__::capitalize($string))\n ->value());\n }\n\n return \\__::chain($this->componentId)\n ->camelCase()\n ->capitalize()\n ->value();\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getName()\n\t{\n\t\treturn isset($this->_name) ? $this->_name : spl_object_hash($this);\n\t}", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "protected static function _getName()\n {\n return isset(static::$_name) ? static::$_name : get_called_class();\n }", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public static function getName(): string\n {\n return static::$name;\n }", "function getComponentName()\n {\n $p = get_class($this);\n\n $reflector = new ReflectionClass($p);\n $path = dirname($reflector->getFileName());\n\n $component = str_replace(BW_PATH_COMPONENTS . DS, '', $path);\n $component = str_replace(DS . 'models', '', $component);\n\n if (bwFolder::is(BW_PATH_COMPONENTS . DS . $component)) {\n return $component;\n } else {\n return NULL;\n }\n }", "public function getName() {\n return ($this->isInit()) ? $this->name : null;\n }", "function getName() {\n return $this->instance->getName();\n }", "public function name() : string\n {\n return call_user_func([get_called_class(), 'resolveName']);\n }", "public static function name()\n {\n return isset(static::$name) ? static::$name : self::getClassShortName();\n }", "public function get_registered_component( $name );", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n {\n return $this->str_name;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName(): string\n {\n return $this->getIdentifier()->getName();\n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function get_name() {\n\n\t\treturn $this->name;\n\t}", "public static function getName();", "public function getName()\n {\n return implode(',', $this->components['CN']);\n }", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "static public function getName(): string\n {\n return static::$name;\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }", "public function get_name() {\n return get_string('pluginname', 'forumngtype_' . $this->get_id());\n }", "public function getName()\n {\n switch ($this->queriedContext) {\n case $this->i8n('context-keyword'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-keyword') . ' : ' . $this->getInput('q');\n break;\n case $this->i8n('context-group'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-group') . ' : ' . $this->getKey('group');\n break;\n case $this->i8n('context-talk'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-talk') . ' : ' . $this->getTalkTitle();\n break;\n default: // Return default value\n return static::NAME;\n }\n }", "public function getName(): string {\n\t\t\treturn $this->name;\n\t\t}", "public function get_component_name() {\n return 'user';\n }", "function getName () {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function name() {\n\t\treturn $this->name;\n\t}", "public function getName(): string\n {\n\t\treturn $this->name;\n\t}", "public function getName ()\n {\n return $this->getLabel();\n }", "public function getName() {\n $path = explode('\\\\', get_class($this->object[\"data\"]));\n return array_pop($path);\n }", "public function getName() {\n return self::NAME;\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "public function getName () {\n\t\treturn $this->name;\n\t}", "public function getName()\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "public function getName() {\n\t\treturn ($this->name);\n\t}", "public function getName()\n {\n return $this->getConfig ( 'name' );\n }", "public function getName(): string {\n return $this->name;\n }", "public function getName() {\n\t\treturn $this->_name;\n\t}", "public function getName() {\n\t\treturn $this->_name;\n\t}", "public function get_name(): string\n {\n return $this->name;\n }", "function getName() {\n\t\treturn $this->name;\n\t}", "public function getName()\n {\n return $this->getValue('name');\n }", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function getName() {\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}" ]
[ "0.8144999", "0.8105198", "0.7984469", "0.7875379", "0.76221573", "0.7146062", "0.71018887", "0.7054535", "0.7054535", "0.7054535", "0.7054535", "0.7054535", "0.7054535", "0.7054535", "0.70389396", "0.7020578", "0.69871014", "0.69871014", "0.69871014", "0.6984662", "0.6965308", "0.6965308", "0.6965153", "0.6939458", "0.69135886", "0.6897038", "0.6895798", "0.6858495", "0.68499863", "0.68114185", "0.68114185", "0.6787367", "0.67747396", "0.6774556", "0.6754806", "0.6754806", "0.6754806", "0.67522323", "0.67409956", "0.6710468", "0.67060375", "0.6702095", "0.67006946", "0.6690484", "0.66849583", "0.6682384", "0.6682384", "0.6678626", "0.6676747", "0.66686296", "0.6668427", "0.6660664", "0.66602176", "0.66602176", "0.66602176", "0.66602176", "0.66601545", "0.66592634", "0.6658334", "0.66555184", "0.6651583", "0.6639647", "0.66334534", "0.6628474", "0.6627747", "0.66204613", "0.66177297", "0.66176677", "0.66176677", "0.6610386", "0.6607321", "0.6604337", "0.66043085", "0.66025144", "0.66025144", "0.66025144", "0.66025144", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.65962607", "0.6596127", "0.6596127" ]
0.0
-1
Dump the passed variables.
function p() { $bt = debug_backtrace(); $caller = array_shift($bt); echo str_replace(base_path() . '/' , '', $caller['file']), ':', $caller['line']; array_map(function ($n, $x) { echo '<fieldset class="debug"> <legend>' . ($n) . '</legend>'; (new Dumper)->dump($x); echo '</fieldset>'; }, range(1, func_num_args()), func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dump($variable) {}", "public function debugDumpParams() {\n }", "function dump() {\n\t\t$vars = get_object_vars( $this );\n\t\techo '<pre style=\"text-align:left\">';\n\t\tforeach( $vars as $name => $value ) {\n\t\t\techo $name.': '.$value.\"\\n\";\n\t\t}\n\t\techo '</pre>';\n\t}", "public function debugDumpParams()\n {\n }", "public function dump() {\n @var_dump($this->get, $this->post, $this->server, $this->files);\n }", "function dump($var, $name='') {\r\n}", "function varInfo(...$vars)\n {\n return (new VarDump(...$vars))->toString();\n }", "public function dump();", "public function dump();", "public function dump() {}", "abstract function doDump();", "function xdump(...$vars)\n {\n screens()->runtime()->addNl(\n (new VarDump(...$vars))\n ->toString()\n )->emit();\n }", "function paramDump() {\n $spec = Terminus::getRunner()->getConfigurator()->getSpec();\n $this->output()->outputDump($spec);\n }", "public static function debug()\r\n {\r\n if (func_num_args() === 0)\r\n return;\r\n\r\n // Get all passed variables\r\n $variables = func_get_args();\r\n\r\n $output = array();\r\n foreach ($variables as $var)\r\n {\r\n $output[] = Core::_dump($var, 1024);\r\n }\r\n\r\n echo '<pre class=\"debug\">'.implode(\"\\n\", $output).'</pre>';\r\n }", "public function getDumpVars()\r\n\t{\r\n\t\treturn $this->_dumpVars;\r\n\t}", "public static function var_dumpp()\n {\n echo \"<pre>\";\n if(func_num_args()>0)\n foreach(func_get_args() as $argv)\n {\n var_dump($argv);\n }\n echo \"</pre>\";\n\n }", "function dumpvar($mixed)\n\t\t{\n\t\t\t$this->vardump($mixed);\n\t\t}", "public function writeDump(){\n \n $args = func_get_args();\n if( empty($args) ) return;\n ob_start();\n foreach( $args as $arg ){\n var_dump($arg);\n }\n $output = ob_get_contents();\n ob_end_clean();\n \n $this->write($output);\n \n }", "function dd(){\n $args = func_get_args();\n ob_start();\n echo '<pre>';\n foreach($args as $vars){\n if(is_bool($vars) || is_null($vars))\n var_dump($vars);\n else\n echo htmlspecialchars(print_r($vars, true), ENT_QUOTES);\n echo PHP_EOL;\n }\n echo '</pre>';\n \n $ctx = ob_get_contents();\n ob_end_clean();\n \n echo $ctx;\n die;\n}", "function dump($var)\n {\n util::dump($var);\n }", "function dd($vars) {\n\tvar_dump($vars);\n\tdie();\n}", "public static function debug()\n\t{\n\t\tif (func_num_args() === 0)\n\t\t\treturn;\n\n\t\t// Get all passed variables\n\t\t$variables = func_get_args();\n\n\t\t$output = array();\n\t\tforeach ($variables as $var)\n\t\t{\n\t\t\t$type = gettype($var);\n\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t\tcase 'null':\n\t\t\t\t\t$var = 'NULL';\n\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\n\t\t\t\t\t$var = $var ? 'TRUE' : 'FALSE';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$var = htmlspecialchars(print_r($var, TRUE), NULL, self::$charset, TRUE);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$output[] = '<pre>('.$type.') '.$var.'</pre>';\n\t\t}\n\n\t\treturn implode(\"\\n\", $output);\n\t}", "function dump($variable)\n {\n echo '<pre>';\n print_r($variable);\n }", "function varDump($object) {\n\t\techo \"<pre>\";\n\t\tprint_r($object);\n\t\techo \"</pre>\";\n\t}", "public static function dump()\n\t{\n\t\techo nl2br(print_r(self::$data));\n\t}", "function scaffold_dump() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\tprintf(\"<pre>\\n%s\\n</pre>\\n\", print_r($arg, true));\n\t}\n}", "public static function dump()\n {\n array_map(\n function ($x) {\n (new Dumper)->dump($x);\n },\n func_get_args()\n );\n }", "function dump()\n {\n $arguments = func_get_args();\n require (\"dump.php\");\n exit;\n }", "function dump($var) {\n\t\t\techo '<pre>';\n\t\t\tvar_dump($var);\n\t\t\techo '</pre>';\n\t\t}", "public function dump($die = false);", "public static function dump()\n {\n $html = \"\";\n\n foreach( func_get_args() as $value )\n {\n $html .= \"<div style=\\\"background: #ffc; margin: 20px; padding: 20px;\\\"> \\n\";\n $html .= \" <pre> \\n\";\n $html .= \" \" . print_r( $value, true ) .\" \\n\";\n $html .= \" </pre> \\n\";\n $html .= \"</div> \\n\";\n }\n echo trim( $html );\n exit;\n }", "function dumpvar($mixed)\n\t\t{\n\t\t\treturn $this->vardump($mixed);\n\t\t}", "function dump(array $options = array()) {\n\n }", "function xdd(...$vars)\n {\n screens()->runtime()->addNl(\n (new VarDump(...$vars))\n ->toString()\n )->emit();\n die(0);\n }", "function dump2(&$variable, $info = false) {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n\n echo '<pre style=\"\n font: 9pt sans-serif;\n text-align: left;\n margin: 25px;\n display: block;\n background: white;\n color: black;\n border:1px solid #ccc;\n padding:5px;\n margin: 25px;\n font-size: 11px;\n line-height: 14px;\n \">';\n\n $info = ($info) ? $info : '$' . $variable_name;\n echo '<b style=\"color:red;\">' . $info . ':</b><br>';\n do_dump($variable, '$' . $variable_name);\n echo '<b style=\"color:red;\">End ' . $info . '</b></pre>';\n}", "function dump($arg){\r\n echo \"<pre>\";\r\n print_r($arg);\r\n echo \"</pre>\";\r\n}", "function dd()\n {\n if (! Sage::enabled()) {\n return '';\n }\n\n $_ = func_get_args();\n call_user_func_array(array('Sage', 'dump'), $_);\n die;\n }", "function atk_var_dump($a, $d=\"\")\n{\n\tob_start();\n\tvar_dump($a);\n\t$data = ob_get_contents();\n\tatkdebug(\"vardump: \".($d!=\"\"?$d.\" = \":\"\").\"<pre>\".$data.\"</pre>\");\n\tob_end_clean();\n}", "function varDumpToString ($var) {\n echo __FUNCTION__ . \"\\n\";\n ob_start();\n var_dump($var);\n $result = ob_get_clean();\n return $result;\n}", "function dumpX($var)\n{\n dump($var);\n exit;\n}", "function dump($var)\n{\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n}", "public function dump()\n {\n var_dump($this); exit;\n }", "public function dump() {\n var_dump ($this->tblAttr, $this->theadAttr, $this->tbodyAttr, $this->thData, $this->tdData);\n }", "function dump($mixed = null)\n{\n echo '<pre>';\n var_dump($mixed);\n echo '</pre>';\n}", "public static function ddump($variable) {\r\n\t\tif(Debug::enabled()) {\r\n\t\t\tif(func_num_args() >= 1) {\r\n\t\t\t\techo \"<pre>\";\r\n\t\t\t\t$args = func_get_args();\r\n\t\t\t\t\r\n\t\t\t\t$count = count($args);\r\n\t\t\t\tfor($x = 0; $x < $count; $x++) {\r\n\t\t\t\t\tvar_dump($args[$x]);\r\n\t\t\t\t}\r\n\t\t\t\techo Debug::getBackTrace('', 1, 'fdumped in');\r\n\t\t\t\techo \"\\n\\n\";\r\n\t\t\t\techo \"</pre>\"; \r\n\t\t\t}\r\n\t\t}\r\n\t\texit(-1);\r\n\t}", "function dump($var)\n{\n var_dump($var);\n return $var;\n}", "public static function vdump($variable) {\r\n\t\t$dump = '';\r\n\t\tif(Debug::enabled()) {\r\n\t\t\tif(func_num_args() >= 1) {\r\n\t\t\t\tob_start();\r\n\t\t\t\techo \"<pre>\";\r\n\t\t\t\t$args = func_get_args();\r\n\t\t\t\t\r\n\t\t\t\t$count = count($args);\r\n\t\t\t\tfor($x = 0; $x < $count; $x++) {\r\n\t\t\t\t\tvar_dump($variable);\r\n\t\t\t\t}\r\n\t\t\t\techo Debug::getBackTrace('', 1, 'fdumped in');\r\n\t\t\t\techo \"\\n\\n\";\r\n\t\t\t\techo \"</pre>\"; \r\n\t\t\t\t$dump = ob_get_clean();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $dump;\r\n\t}", "private function vardump($var_name = NULL){\r\n\t\tif (isset($var_name)) {\r\n\t\t\t$scope = $GLOBALS[$var_name];\r\n\r\n\t\t\t$this->info($var_name . ' : ' . trim(var_export($scope,true)) . PHP_EOL\r\n\t\t\t$this->info(\"-----------------------------------\");\r\n\t\t}\r\n\t}", "public function dump()\r\n {\r\n return get_object_vars($this);\r\n }", "public function debugDumpParams()\n {\n return $this->stmt->debugDumpParams();\n }", "public static function dump($var) {\n self::$dumped .= print_r($var, TRUE) . \"<br><br>\";\n self::$dumped = htmlspecialchars(self::$dumped);\n }", "public function dump_vars($vars)\n\t{\n\t\t$this->last_selector = null;\n\t\t$args = array();\n\t\tforeach (func_get_args() as $index => $func)\n\t\t{\n\t\t\tif ($func instanceof PheryResponse || $func instanceof PheryFunction)\n\t\t\t{\n\t\t\t\t$args[$index] = array($this->typecast($func, true, true));\n\t\t\t}\n\t\t\telseif (is_object($func))\n\t\t\t{\n\t\t\t\t$args[$index] = array(get_object_vars($func));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$args[$index] = array($func);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->cmd(6, $args);\n\t}", "public function dump(DumperContextInterface $context);", "function dump($var)\n{\n echo '<br /><pre>';\n var_dump($var);\n echo'</pre><hr />';\n}", "function debug(...$vars)\n{\n if($vars) {\n var_dump(...$vars);\n }\n exit;\n}", "function do_dump(&$var, $var_name = NULL, $indent = NULL, $reference = NULL)\n{\n\t$do_dump_indent = \"<span style='color:#eeeeee;'>|</span> &nbsp;&nbsp; \";\n\t$reference = $reference.$var_name;\n\t$keyvar = 'the_do_dump_recursion_protection_scheme'; $keyname = 'referenced_object_name';\n\n\tif (is_array($var) && isset($var[$keyvar]))\n\t{\n\t\t$real_var = &$var[$keyvar];\n\t\t$real_name = &$var[$keyname];\n\t\t$type = ucfirst(gettype($real_var));\n\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span> = <span style='color:#e87800;'>&amp;$real_name</span><br>\";\n\t}\n\telse\n\t{\n\t\t$var = array($keyvar => $var, $keyname => $reference);\n\t\t$avar = &$var[$keyvar];\n\n\t\t$type = ucfirst(gettype($avar));\n\t\tif($type == \"String\") $type_color = \"<span style='color:green'>\";\n\t\telseif($type == \"Integer\") $type_color = \"<span style='color:red'>\";\n\t\telseif($type == \"Double\"){ $type_color = \"<span style='color:#0099c5'>\"; $type = \"Float\"; }\n\t\telseif($type == \"Boolean\") $type_color = \"<span style='color:#92008d'>\";\n\t\telseif($type == \"NULL\") $type_color = \"<span style='color:black'>\";\n\n\t\tif(is_array($avar))\n\t\t{\n\t\t\t$count = count($avar);\n\t\t\techo \"$indent\" . ($var_name ? \"$var_name => \":\"\") . \"<span style='color:#a2a2a2'>$type ($count)</span><br>$indent(<br>\";\n\t\t\t$keys = array_keys($avar);\n\t\t\tforeach($keys as $name)\n\t\t\t{\n\t\t\t\t$value = &$avar[$name];\n\t\t\t\tdo_dump($value, \"['$name']\", $indent.$do_dump_indent, $reference);\n\t\t\t}\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_object($avar))\n\t\t{\n\t\t\techo \"$indent$var_name <span style='color:#a2a2a2'>$type</span><br>$indent(<br>\";\n\t\t\tforeach($avar as $name=>$value) do_dump($value, \"$name\", $indent.$do_dump_indent, $reference);\n\t\t\techo \"$indent)<br>\";\n\t\t}\n\t\telseif(is_int($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_string($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\\\"$avar\\\"</span><br>\";\n\t\telseif(is_float($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color$avar</span><br>\";\n\t\telseif(is_bool($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $type_color\".($avar == 1 ? \"TRUE\":\"FALSE\").\"</span><br>\";\n\t\telseif(is_null($avar)) echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> {$type_color}NULL</span><br>\";\n\t\telse echo \"$indent$var_name = <span style='color:#a2a2a2'>$type(\".strlen($avar).\")</span> $avar<br>\";\n\n\t\t$var = $var[$keyvar];\n\t}\n}", "private function print() {\n\t\tvar_dump($this->getParams());\n\t}", "private function dump($data){\n var_dump($data);\n }", "function robm_dump() {\r\n echo '<pre style=\"border:1px solid #000; padding:5px; margin:5px; max-height:150px; overflow:auto;\" id=\"' . md5(serialize($object)) . '\">';\r\n $i = 0; $args = func_get_args();\r\n foreach ( (array) $args as $object ) {\r\n if ( $i == 0 && count($args) > 1 && is_string($object) )\r\n echo \"<h3>$object</h3>\";\r\n var_dump($object);\r\n $i++;\r\n }\r\n echo '</pre>';\r\n }", "function debug_var(...$values) { // \"...\" permet de regroupers tous les paramètres en un tableau ($values)\n var_dump(...$values); // \"...\" permet ici l'inverse, il split le tableau pour tout remonter au même niveau. équivalent de var_dump($values[0], $values[1], $values[2]);\n die(); // Stop le rendu PHP ici. Plus rien ne s'exécutera et le resultat est directement retourné à l'utilisateur\n}", "function sdump($var)\n{\n ob_start();\n var_dump($var);\n $out = ob_get_contents();\n ob_end_clean();\n return $out;\n}", "function debug($var): void\n {\n call_user_func('dump', $var);\n }", "function vardump($mixed='')\n\t\t{\n\n\t\t\t// Start outup buffering\n\t\t\tob_start();\n\n\t\t\techo \"<p><table><tr><td bgcolor=ffffff><blockquote><font color=000090>\";\n\t\t\techo \"<pre><font face=arial>\";\n\n\t\t\tif ( ! $this->vardump_called )\n\t\t\t{\n\t\t\t\techo \"<font color=800080><b>ezSQL</b> (v\".EZSQL_VERSION.\") <b>Variable Dump..</b></font>\\n\\n\";\n\t\t\t}\n\n\t\t\t$var_type = gettype ($mixed);\n\t\t\tprint_r(($mixed?$mixed:\"<font color=red>No Value / False</font>\"));\n\t\t\techo \"\\n\\n<b>Type:</b> \" . ucfirst($var_type) . \"\\n\";\n\t\t\techo \"<b>Last Query</b> [$this->num_queries]<b>:</b> \".($this->last_query?$this->last_query:\"NULL\").\"\\n\";\n\t\t\techo \"<b>Last Function Call:</b> \" . ($this->func_call?$this->func_call:\"None\").\"\\n\";\n\t\t\techo \"<b>Last Rows Returned:</b> \".count($this->last_result).\"\\n\";\n\t\t\techo \"</font></pre></font></blockquote></td></tr></table>\".$this->donation();\n\t\t\techo \"\\n<hr size=1 noshade color=dddddd>\";\n\n\t\t\t// Stop output buffering and capture debug HTML\n\t\t\t$html = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\t// Only echo output if it is turned on\n\t\t\tif ( $this->debug_echo_is_on )\n\t\t\t{\n\t\t\t\techo $html;\n\t\t\t}\n\n\t\t\t$this->vardump_called = true;\n\n\t\t\treturn $html;\n\n\t\t}", "public static function fdump($variable) {\r\n\t\tif(Debug::enabled()) {\r\n\t\t\tif(func_num_args() >= 1) {\r\n\t\t\t\techo \"<pre>\";\r\n\t\t\t\t$args = func_get_args();\r\n\t\t\t\t\r\n\t\t\t\t$count = count($args);\r\n\t\t\t\tfor($x = 0; $x < $count; $x++) {\r\n\t\t\t\t\tvar_dump($args[$x]);\r\n\t\t\t\t}\r\n\t\t\t\techo Debug::getBackTrace('', 1, 'fdumped in');\r\n\t\t\t\techo \"\\n\\n\";\r\n\t\t\t\techo \"</pre>\"; \r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static function dump($variable) {\n echo '<pre>';\n var_dump($variable);\n echo '</pre>';\n }", "public function dprint()\n\t{\n\t\tprint_r( $this->debug );\n\t}", "public static function dump($var)\n {\n echo \"<pre>\" . htmlentities(print_r($var, true)) . \"</pre>\";\n }", "function vardump($mixed='')\n\t\t{\n\t\t\t// Start output buffering\n\t\t\tob_start();\n\n\t\t\techo \"<p><table><tr><td bgcolor=ffffff><blockquote><font color=000090>\";\n\t\t\techo \"<pre><font face=arial>\";\n\n\t\t\tif ( ! $this->vardump_called )\n\t\t\t{\n\t\t\t\techo \"<font color=800080><b>ezSQL</b> (v\".EZSQL_VERSION.\") <b>Variable Dump..</b></font>\\n\\n\";\n\t\t\t}\n\n\t\t\t$var_type = gettype ($mixed);\n\t\t\tprint_r(($mixed?$mixed:\"<font color=red>No Value / False</font>\"));\n\t\t\techo \"\\n\\n<b>Type:</b> \" . ucfirst($var_type) . \"\\n\";\n\t\t\techo \"<b>Last Query</b> [$this->num_queries]<b>:</b> \".($this->last_query?$this->last_query:\"NULL\").\"\\n\";\n\t\t\techo \"<b>Last Function Call:</b> \" . ($this->func_call?$this->func_call:\"None\").\"\\n\";\n\t\t\t\n\t\t\tif (count($this->all_func_calls)>1)\n\t\t\t{\n\t\t\t\techo \"<b>List of All Function Calls:</b><br>\"; \n\t\t\t\tforeach($this->all_func_calls as $func_string)\n\t\t\t\t\techo \" \" . $func_string .\"<br>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<b>Last Rows Returned:</b> \".(count($this->last_result)>0 ? $this->last_result : '').\"\\n\";\n\t\t\techo \"</font></pre></font></blockquote></td></tr></table>\".$this->donation();\n\t\t\techo \"\\n<hr size=1 noshade color=dddddd>\";\n\n\t\t\t// Stop output buffering and capture debug HTML\n\t\t\t$html = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\t// Only echo output if it is turned on\n\t\t\tif ( $this->debug_echo_is_on )\n\t\t\t{\n\t\t\t\techo $html;\n\t\t\t}\n\n\t\t\t$this->vardump_called = true;\t\t\t\n\t\t\treturn $html;\n\t\t}", "public function addDumpVars(array $arguments = array())\r\n\t{\r\n\t\t$this->_dumpVars = $arguments;\r\n\t\treturn $this;\r\n\t}", "function grab_dump($var)\n{\n ob_start();\n var_dump($var);\n return ob_get_clean();\n}", "public static function out() {\r\n\t\t\tdisplayCallerCode(1);\r\n\t\t\t$aData = func_get_args();\r\n\t\t\tvar_dump_list($aData);\r\n\t\t\tdie();\r\n\t\t}", "function dv(...$args) {\n\tdebug_raw('var_dump',false,$args);\n}", "function myVar_dump($var)\n{\n echo sprintf('<pre>%s</pre>', print_r($var, true));\n}", "public function debug() {\n\t\tvar_dump(array(\n\t\t\t'config' => $this->config,\n\t\t\t'prices' => $this->prices\n\t\t));\n\t}", "function ddd()\n {\n if (! Sage::enabled()) {\n return '';\n }\n\n $_ = func_get_args();\n call_user_func_array(array('Sage', 'dump'), $_);\n die;\n }", "public function dump() {\n print_r($this->getConfig());\n }", "function dump ($var, $label = 'Dump', $echo = TRUE)\n {\n ob_start();\n var_dump($var);\n $output = ob_get_clean();\n \n // Add formatting\n $output = preg_replace(\"/\\]\\=\\>\\n(\\s+)/m\", \"] => \", $output);\n $output = '<pre style=\"background: #FFFEEF; color: #000; border: 1px dotted #000; padding: 10px; margin: 10px 0; text-align: left;\">' . $label . ' => ' . $output . '</pre>';\n \n // Output\n if ($echo == TRUE) {\n echo $output;\n }\n else {\n return $output;\n }\n }", "public static function debug()\n {\n if (func_num_args() === 0) {\n return;\n }\n\n // Get params\n $params = func_get_args();\n $output = array();\n\n foreach ($params as $var) {\n $output[] = '<pre>('.gettype($var).') '.html::specialchars(print_r($var, true)).'</pre>';\n }\n\n return implode(\"\\n\", $output);\n }", "function v($variable) {\tdie( var_dump($variable) ); }", "function Dump()\n {\n echo \"<pre>\" . htmlspecialchars($this->ToString()) . \"</pre>\";\n }", "function dump ($var, $label = 'Dump', $echo = TRUE)\n{\n // Store dump in variable\n ob_start();\n var_dump($var);\n $output = ob_get_clean();\n\n // Add formatting\n $output = preg_replace(\"/\\]\\=\\>\\n(\\s+)/m\", \"] => \", $output);\n $output = '<pre style=\"background: #FFFEEF; color: #000; border: 1px dotted #000; padding: 10px; margin: 10px 0; text-align: left;\">' . $label . ' => ' . $output . '</pre>';\n\n // Output\n if ($echo == TRUE) {\n echo $output;\n }\n else {\n return $output;\n }\n}", "function debug( $var ) {\n print \"<pre>\";\n var_dump( $var );\n print \"</pre>\";\n }", "function dump() {\n $args = func_get_args();\n echo '<div style=\"background-color: pink; margin: 3px;\">';\n foreach($args as $arg) {\n echo \"<p><pre>\";\n var_dump($arg);\n echo \"</pre></p>\";\n }\n echo '</div>';\n return @$args[0];\n}", "static public function dump(){\n \n $args = func_get_args();\n if( empty($args) ) return;\n \n $console = new \\Altumo\\Utils\\Console();\n call_user_func_array( array($console, 'writeDump'), $args );\n unset($console);\n \n }", "function dumpVar($var)\n\t{\n\t\tif (is_array($var) || is_object($var))\n\t\t\t$var = trim(preg_replace(\"/\\n */\", \" \", print_r($var, true)));\n\t\treturn htmlspecialchars($var, ENT_NOQUOTES);\n\t}", "public function print_vars($vars)\n\t{\n\t\t$this->last_selector = null;\n\n\t\t$args = array();\n\t\tforeach (func_get_args() as $name => $arg)\n\t\t{\n\t\t\tif (is_object($arg))\n\t\t\t{\n\t\t\t\t$arg = get_object_vars($arg);\n\t\t\t}\n\t\t\t$args[$name] = array(var_export($arg, true));\n\t\t}\n\n\t\treturn $this->cmd(6, $args);\n\t}", "public function mg_dump($arg){\n\t\t$debug = '<br /><br />Debug Output:<br /><pre>';\n\t\t$debug.= print_r($arg,true);\n\t\t$debug .= '</pre><br /><br />';\n\t\treturn $debug;\n\t}", "function sa_dump_php(){\n # _debugLog('Local Variables',get_defined_vars()); // LOCAL VARS\n // _debugLog('PHP GLOBALS',$GLOBALS); //PHP SUPER GLOBALS\n _debugLog('PHP Includes',get_required_files()); // INCLUDES\n _debugLog('PHP User Constants',sa_array_index(get_defined_constants(true),'user')); //PHP USER CONSTANTS\n _debugLog('PHP Extensions',sa_phpInfoLite()); // PHP LOADED EXTENSIONS\n _debugLog('PHP All Constants',get_defined_constants(true)); // PHP ALL CONSTANTS\n}", "function ddv(...$args) {\n\tdebug_raw('var_dump',true,$args);\n}", "public function debug(){\n $debug = [\n 'ID' => $this->ID,\n 'slug' => $this->slug,\n 'options' => $this->options,\n 'items' => $this->items,\n ];\n \"<pre>\".var_dump($debug).\"</pre>\";\n }", "private static function varDumpToString ($var)\n {\n ob_start();\n var_dump($var);\n $result = ob_get_clean();\n return $result;\n }", "public function dump(){\r\n print_r($this->_registry);\r\n }", "public function MyVarDump($var, $exit = true){\r\n\t\techo '<pre style=\"font-size:15px;\">';\r\n\t\t\tvar_dump($var);\r\n\t\techo '</pre>';\r\n\t\tif($exit){exit;}\r\n\t}", "public static function dump(){\n self::_print(\"enabled : \". (int)self::$enabled .\"\\n\");\n self::_print(\"disabled : \". (int)self::$disabled .\"\\n\");\n self::_print_r(self::$list);\n }", "function dump($var, $label = 'Dump', $echo = true) {\n ob_start();\n var_dump($var);\n $output = ob_get_clean();\n\n // Add formatting\n $output = preg_replace(\"/\\]\\=\\>\\n(\\s+)/m\", '] => ', $output);\n $output = '<pre style=\"background: #FFFEEF; color: #000; border: 1px dotted #000; padding: 10px; margin: 10px 0; text-align: left;\">'.$label.' => '.$output.'</pre>';\n\n // Output\n if ($echo == true) {\n echo $output;\n } else {\n return $output;\n }\n }", "function w_dump($var) {\n if(is_object($var) and $var instanceof Closure) {\n $str = 'function (';\n $r = new ReflectionFunction($var);\n $params = array();\n foreach($r->getParameters() as $p) {\n $s = '';\n if($p->isArray()) {\n $s .= 'array ';\n } else if($p->getClass()) {\n $s .= $p->getClass()->name . ' ';\n }\n if($p->isPassedByReference()){\n $s .= '&';\n }\n $s .= '$' . $p->name;\n if($p->isOptional()) {\n $s .= ' = ' . var_export($p->getDefaultValue(), TRUE);\n }\n $params []= $s;\n }\n $str .= implode(', ', $params);\n $str .= '){' . PHP_EOL;\n $lines = file($r->getFileName());\n for($l = $r->getStartLine(); $l < $r->getEndLine(); $l++) {\n $str .= $lines[$l];\n }\n echo $str;\n return;\n } else if(is_array($var)) {\n echo \"<xmp class='a-left'>\";\n print_r($var);\n echo \"</xmp>\";\n return;\n } else {\n var_dump($var);\n return;\n }\n}", "function var_dump_pre ($input_variable)\n{\n print(\"<pre>\");\n var_dump($input_variable);\n print(\"</pre>\");\n}", "function dumpInfo() {\n global $_dOp;\n $op = \"SECTION: $this->sectionName<br />\";\n $_dOp = '';\n foreach ($this->varList as $secID => $vars) {\n $op .= \" -- section ID: $secID<br />\";\n foreach ($vars as $varKey => $varTag) {\n if (is_array($varTag)) {\n foreach ($varTag as $varObj) {\n $op .= \" .... VAR: $varKey<br />\\n\";\n $aList = $varObj->getAttrList();\n foreach ($aList as $attr) {\n if ($attr == 'NAME')\n continue;\n $v = $varObj->getAttr($attr);\n if ($v === false)\n $v = 'false';\n if ($v === true)\n $v = 'true';\n if ($v === NULL)\n $v = '[not set]';\n \n $op .= \"........ $attr => \".$v.\"<br />\\n\";\n }\n }\n }\n else {\n $op .= \" .... VAR: $varKey<br />\\n\";\n $aList = $varTag->getAttrList();\n foreach ($aList as $attr) {\n if ($attr == 'NAME')\n continue;\n $v = $varTag->getAttr($attr);\n if ($v === false)\n $v = 'false';\n if ($v === true)\n $v = 'true';\n if ($v === NULL)\n $v = '[not set]';\n $op .= \"........ $attr => \".$v.\"<br />\\n\";\n }\n }\n }\n }\n return $op;\n }", "function base_deployVardump($vartodump,$filename){\n ob_flush();\n ob_start();\n var_dump($vartodump);\n file_put_contents($filename, ob_get_flush());\n ob_end_flush();\n}", "function vardump($x)\r\n{\r\n\tob_start();\r\n\tvar_dump($x);\r\n\t$str = ob_get_clean();\r\n\treturn strip_tags($str);\r\n}", "public function mldump($var=\"No value given...\")\n {\n echo \"<pre>\";\n echo var_dump($var);\n echo \"</pre>\";\n }" ]
[ "0.74795", "0.7443288", "0.7347192", "0.7331276", "0.72233325", "0.71730953", "0.7164486", "0.71284384", "0.71284384", "0.709462", "0.7075199", "0.7070126", "0.7039977", "0.7030618", "0.70213723", "0.6923036", "0.6874994", "0.68364185", "0.6789546", "0.6753663", "0.6748538", "0.6738497", "0.6735665", "0.67166376", "0.6714806", "0.67136484", "0.6698905", "0.6693805", "0.66404235", "0.6635966", "0.6611112", "0.661041", "0.65724015", "0.656588", "0.65550935", "0.65549105", "0.6544536", "0.6540915", "0.6537975", "0.6517645", "0.65148383", "0.6499686", "0.64984137", "0.64908296", "0.64859486", "0.6462076", "0.6460627", "0.64597666", "0.64506376", "0.6429637", "0.64242125", "0.6402813", "0.63973135", "0.63890874", "0.63727254", "0.6364935", "0.63445836", "0.6335457", "0.6319972", "0.63083255", "0.62892604", "0.6271074", "0.6263094", "0.62568855", "0.62502193", "0.6244872", "0.6240229", "0.62297237", "0.6224941", "0.6217314", "0.6199788", "0.61984044", "0.61838305", "0.61748135", "0.6155193", "0.61382776", "0.60757434", "0.6075366", "0.6073756", "0.6071975", "0.60617936", "0.6060991", "0.6060858", "0.6051044", "0.6045611", "0.6040081", "0.6036245", "0.602424", "0.6023358", "0.60221875", "0.6014314", "0.6012099", "0.5969616", "0.5966022", "0.5963981", "0.5959789", "0.5959674", "0.5952205", "0.59438235", "0.59428084", "0.59287524" ]
0.0
-1
get count of pool
public function count(): int { return count($this->pool); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return $this->busyPool->count() + $this->availablePool->count();\n }", "function countRefPool($pid)\n\t\t {\n\t\t $sql = \"SELECT COUNT(*) As cnt FROM pof_candidates WHERE pofid =\".$pid.\" AND stage ='287' \";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t\t }", "public function _count();", "public function getConnectionCount();", "function fetchCount();", "public function getWorkerCount(): int;", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public static function count();", "public function getProcessedCount();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "function count(){}", "public abstract function count();", "public abstract function count();", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function taskCount(): int {}", "function count() ;", "public function getSingletonCount ();", "function count ()\n\t{\n\t\treturn $this->_count ;\n\t}", "public function getCount() {\n \treturn $this->count();\n }", "public function getPoolSize();", "public function getResCount()\n {\n return $this->count(self::RES);\n }", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "public function getPointCount() {}", "public function getCount()\n {\n return $this->count++;\n }", "public function count() {\n\t\treturn $this->count;\n\t}", "public function count() {\n\t\treturn $this->_count;\n\t}", "public function count() { return $this->_m_count; }", "public function count(){\n return $this->_count;\n }", "public function getCount()\n\t{\n\t\treturn $this->count;\n\t}", "public function getCount() {\r\n return $this->count;\r\n }", "public function count()\n {\n return count($this->_loadedPackets);\n }", "public function getCount() : int\n {\n return $this->count;\n }", "public function processedCount() {\n $query = $this->connection->select($this->mapTable);\n $query->addExpression('COUNT(*)', 'count');\n $count = $query->execute()->fetchField();\n return $count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\r\n {\r\n return $this->count;\r\n }", "function count()\n\t{\n\t\treturn $this->count;\n\t}", "function count() {\n # The return value of this function is intended to indicate the total\n # number of results of the operation the Iter represents.\n return NULL;\n }", "public function getCount()\n\t{\n\t\treturn $this->_count;\n\t}", "public function count() {\n\t\t\treturn (int)$this->count;\n\t\t}", "public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }", "public function count() {\n return sizeof(self::$connections);\n }", "public function getCount() {}", "public function getCount() {}", "public function getPoolSize()\n\t{\n\t\tif ($this->poolDir !== null)\n\t\t{\n\t\t\t$size=exec(\"cd \".$this->getPoolDir().\"; du | tail -n1\");\n\t\t\t$size/=1024;\n\t\t\treturn(sprintf(\"%.2f\",$size));\n\t\t}\n\t\telse\n\t\t\treturn(0);\n\t}", "public function getCount() {}", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getCount()\n {\n return $this->count;\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function count()\r\n\t{\r\n\t\treturn $this->count;\r\n\t}", "public function count(){\n\t\treturn count($this->nodes);\n\t}", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public static function getNumberOfWorkers();", "public function getCount()\n {\n return $this->_count;\n }", "public function getCount()\n {\n return $this->_count;\n }", "public abstract function count(): int;" ]
[ "0.7639367", "0.71290934", "0.69995016", "0.6839287", "0.6782821", "0.673165", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.6709026", "0.66679406", "0.6648802", "0.6596826", "0.6596826", "0.6596826", "0.6596826", "0.6592609", "0.65898794", "0.65898794", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.65646523", "0.6564554", "0.6564554", "0.65632695", "0.6550619", "0.6546761", "0.6470654", "0.64700145", "0.6435939", "0.642758", "0.64272434", "0.6426932", "0.6423939", "0.6402678", "0.63932514", "0.6385979", "0.6383183", "0.6381214", "0.63790977", "0.6370485", "0.6370378", "0.63618135", "0.63550055", "0.63527346", "0.633473", "0.6332462", "0.63302064", "0.63295", "0.6326162", "0.6324725", "0.63175255", "0.63175255", "0.63169533", "0.6316282", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.63123953", "0.6307634", "0.6307634", "0.6307634", "0.63064855", "0.6302123", "0.63015777", "0.62971455", "0.62924635", "0.62924635", "0.6292452" ]
0.8311693
0
Lets assume that the remote control has 5 slots
public function __construct() { /*instantiate & initialize the on and off arrays*/ $noCommand = new NoCommand(); for ($i=0; $i<=4; $i++) { $this->onCommand[$i] = $noCommand; $this->offCommand[$i] = $noCommand; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _createSlots()\n {\n $slots = array_fill(0, $this->numSlots, 0);\n $this->slots = $slots;\n }", "public function hasSlots(){\n return $this->_has(5);\n }", "public function addSlots( $value){\n return $this->_add(5, $value);\n }", "public function MyExecute()\r\n\t{\r\n Utility::turnDebugOn();\r\n //config switch\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",3); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",4); \r\n// \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",3);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",4); \r\n \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Disabled\");\r\n// \r\n// Utility::insertBreakPoint(); \r\n// \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Enabled\");\r\n// \r\n// $this->syncAPs();\r\n \r\n// if($this->checkPage()==TRUE)\r\n// {\r\n// Utility::insertBreakPoint(\"hahahahaha\"); \r\n// }\r\n// else\r\n// {\r\n// system(\"banner baga\");\r\n// }\r\n \r\n\r\n $MYVSC=new VSC(\"V2\",\"V2\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n $MYVSC->commit();\r\n \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\");\r\n// $my_wireless=new WirelessProtection();\r\n// $my_wireless->setWirelessProtectionType(\"WEP\");\r\n// $my_wireless->setKeySource(\"STATIC\");\r\n// $my_wireless->setKey(array( \"c67347dd12a787b7a132f690d0\", \"c67347dd12a797b7a132f690d1\", \"c673a7dd12a787b7a132f690d2\", \"c67347dd16a787b7a132f690d3\", \"2\", \"HEX\"));\r\n// $MYVSC->configureWirelessProtection($my_wireless); \r\n// $MYVSC->commit();\r\n \r\n $MYVSC=new VSC(\"V3\",\"V3\",\"WPA(TKIP)\",\"HTML\");\r\n $my_wireless=new WirelessProtection();\r\n $my_wireless->setWirelessProtectionType(\"WPA(TKIP)\");\r\n $my_wireless->setKeySource(\"STATIC\");\r\n $my_wireless->setKey(\"26d4a5f7cf549710a7aae2db4e712027\");\r\n $MYVSC->configureWirelessProtection($my_wireless); \r\n $MYVSC->commit();\r\n \r\n \r\n \r\n// $MYVSC=new VSC(\"V4\",\"V4\",\"None\",\"MAC\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V5\",\"V5\",\"None\",\"HTML_MAC\");\r\n// $MYVSC->commit();\r\n// \r\n // $MYVSC=new VSC(\"V6\",\"V6\",\"WEP\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V7\",\"V7\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V8\",\"V8\",\"WPA/WPA2\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// $MYVSC=new VSC(\"V2\",\"V2\",\"WEP\");\r\n// $MYVSC->commit(); \r\n// \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\"); \r\n// $MYVSC->commit(); \r\n// \r\n \r\n Utility::insertBreakPoint(); \r\n return \"passed\";\r\n \r\n\t}", "public function hasRelaySlotsMax()\n {\n return $this->relay_slots_max !== null;\n }", "public function getSlotsList(){\n return $this->_get(5);\n }", "public function check($slots = null) {\n $slots = $slots ?: $this->getSlots();\n $queueKey = $this->getSlotsQueueName();\n\r\n // set a watch on the $queueKey\r\n $this->client->watch($queueKey);\n\r\n // start transaction\r\n $tx = $this->client->multi();\r\n\r\n // removed the slot from the $queueKey\r\n $this->client->zcard($queueKey);\r\n\r\n // execute the transaction\r\n $results = $this->client->exec();\n\n if ($results[0] > $slots) {\n $rem = $results[0] - $slots;\n echo \"we need to remove [{$rem}] slots \\n\";\n\n $this->client->zremrangebyrank($queueKey, 0, $rem-1);\n } else if ($results[0] < $slots) {\n $add = $slots - $results[0];\n\n echo \"we need to add [{$add}] slots \\n\";\n\r\n for ($i = 0; $i < $add; $i++) {\n $this->client->zadd($queueKey, 0, self::getSlotName($i));\r\n }\n }\n }", "public function checkSlotWriting() {\n $writeSlot = 1;\n foreach($this->decission as $item) {\n if($item === 0) {\n $writeSlot = 0;\n }\n }\n if($writeSlot == 1 AND $this->nextStation->sendToAllAtOnce == 0) {\n $this->checkForNewSlot($this->nextStation->workflow_slot_id);\n }\n else {\n $this->nextStation->checkSendToAllAtOnce();\n }\n }", "public function generateTimeSlots()\r\n {\r\n \r\n // then add available times as long as they don't intersect with unavailable times.\r\n \r\n // finally remove the unavailable time slots since we only to check for available time slots in the frontend.\r\n }", "protected function getSlots() {\n return getAppConfig(\"gw2spidy.request-slots.count\");\n }", "function startRelaying() { }", "function caricastatorelays()\n {\n global $arrRelays;\n $statorele = shell_exec( '/usr/sbin/i2cget -y 1 0x23' );\n if (empty($statorele)) {\n\n die(\"<h1>La multipresa sembra scollegata!</h1>\");\n }\n $relays = zerificabinario( base_convert( $statorele, 16, 2 ) );\n $arrRelays = str_split( $relays );\n return ( $arrRelays );\n }", "function nextSlave();", "public function loop_x5() {\r\n $this->loop_x5++;\r\n if ($this->loop_x5 == 5) {\r\n $this->loop_x5 = 0;\r\n\r\n if ($this->syncing)\r\n return;\r\n\r\n if (!$this->connected_to_bootstrap || !$this->bootstrap_node)\r\n return;\r\n\r\n //We get the pending transactions from BootstrapNode\r\n if (!$this->bootstrap_node) {\r\n $transactionsByPeer = BootstrapNode::GetPendingTransactions($this->chaindata,$this->isTestNet);\r\n foreach ($transactionsByPeer as $transactionByPeer) {\r\n $this->chaindata->addPendingTransactionByBootstrap($transactionByPeer);\r\n }\r\n }\r\n }\r\n }", "function install_new_vps($IDVPS, $connection, $OS, $hostname, $disque, $ip, $swap, $memoire, $cpu, $passroot)\n{\n\t//On suprrime et r�installe le serveur--------------------------------------------------------------------------------\n\t\n\t//Commande � ex�cuter\n\t//$command = '/usr/bin/pvectl vzcreate '.$IDVPS.' --disk '.$disque.' --ostemplate '.$OS.' --hostname '.$hostname.' --nameserver 127.0.0.1 --nameserver 213.186.33.99 --searchdomain ovh.net --onboot no --ipset '.$ip.' --swap '.$swap.' --mem '.$memoire.' --cpus '.$cpu.' && vzctl restart '.$IDVPS.' && vzctl set '.$IDVPS.' --userpasswd root:'.$passroot;\n$command='/usr/bin/pvectl create -vmid '.$IDVPS.' -ostemplate '.$OS.' -disk '.$disque.' -hostname '.$hostname.' -nameserver 156.154.70.1 -nameserver 156.154.71.1 -searchdomain heberge-hd.net -onboot 1 -ip_address '.$ip.' -swap '.$swap.' -memory '.$memoire.' -cpus '.$cpu.' -password '.$passroot.' && sleep 10 && vzctl start '.$IDVPS;\n$command0='sleep 10 && vzctl exec '.$IDVPS.' echo -e \"auto eth0 \\niface eth0 inet static \\n\\taddress '.$ip.' \\n\\tnetmask 255.255.255.0 \\n\\tgateway 192.168.5.1 \\n\\tbroadcast 192.168.5.255\" > /etc/network/interfaces';\n\n //On lance la commande\n $stream = ssh2_exec($connection, $command);\n stream_set_blocking($stream, true);\n\n $stream0 = ssh2_exec($connection, $command0);\n stream_set_blocking($stream0, true);\n\t//R�cup�re le r�sultat\n\t$rep=\"\";\n\twhile($line = fgets($stream)){\n\t\t$rep.=$line;\t\n\t}\n\t//Ferme la connection\n\tfclose($stream);\n\tfclose($stream0);\n\n\t\n\tif($stream!=false){\n\t\treturn true;\n\t}else{$ok=stripos($rep,\"Container start in progress\");\n\t$time=time();\n\t$message = mysql_real_escape_string('Le '.date('d/m/y - H:i:s').' le VPS '.$hostname.' ('.$IDVPS.') est passer en erreur lors de sa réinstallation.\n\t\tVoici le message : '.$rep.'\n\n\t\tCommande : \n\t\t'.$command_stop.'');\n\t$IDVPS = mysql_real_escape_string($IDVPS);\n\t$time = mysql_real_escape_string($time);\n\tmysql_query(\"INSERT INTO `warning` ( `id` , `id_client` , `ip` , `message` , `page` , `time` , `type`, `TYPE_W`)\nVALUES (\nNULL , '\".$IDVPS.\"', 'IP', '\".$message.\"', '', '\".$time.\"', 'W_ERREUR_SETUP_VPS', 'VPS'\n)\");\n\t\treturn false;\n\t}\n\t\n}", "function VM_GUIstepCheckHost()\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t//Preset values for making screenshots\n\tif ($_GET['screenshot'] == 1)\n\t{\n\t\t$_SESSION['VM_createStep'] = VM_stepCheckHost;\n\t\t$_SESSION['VM_host'] = \"localhost\";\n\t}\n\t\n\t//Check if this part should be shown in the current step\n\tif ($_SESSION['VM_createStep'] < VM_stepCheckHost)\n\t\treturn(false);\n\n\t//Check if the client is running and offer wake-on-lan if not\n\tif (CLIENT_isrunning($_SESSION['VM_host']))\n\t{\n\t\t//Get current disk and memory usage\n\t\t$freeDiskSpace = (CLIENT_getCurrentFreeSpaceInDir($_SESSION['VM_host'], \"/m23/vms\") / 1024);\n\t\t$memoryUsage = CLIENT_getCurrentMemoryUsage($_SESSION['VM_host']);\n\t\t\n\t\t$cpuInfoHTML = HWINFO_getCPU($_SESSION['VM_host']);\n\n\t\t$VBoxVer = VM_getVBoxVersion($_SESSION['VM_host']);\n\n\t\t//convert the switch status to readable information\n\t\t$readableStatus = VM_convertSwitchStatusInfo(VM_STATE_ON);\n\n\t\techo(\"\n\t\t\t<tr><td colspan=\\\"2\\\"><hr></td></tr>\n\t\t\t<tr><td>$readableStatus[text]</td><td align=\\\"right\\\">$readableStatus[imgTag]</td></tr>\n\t\t\t<tr><td>$I18N_vboxVersion</td><td align=\\\"right\\\">$VBoxVer</td></tr>\n\t\t\t<tr><td colspan=\\\"2\\\"><hr></td></tr>\n\t\t\t<tr><td colspan=\\\"2\\\"><span class=\\\"title\\\">$I18N_hardware_info</span></td></tr>\n\t\t\t<tr><td>CPU</td><td>$cpuInfoHTML</td></tr>\n\t\t\t<tr><td>$I18N_freeDiskSpace</td><td align=\\\"right\\\">\".number_format($freeDiskSpace, 0, \",\",\".\").\" MB</td></tr>\n\t\t\t<tr><td>$I18N_totalMemory</td><td align=\\\"right\\\">\".number_format($memoryUsage['all'] / 1024, 0, \",\",\".\").\" MB</td></tr>\n\t\t\t<tr><td>$I18N_freeMemory</td><td align=\\\"right\\\">\".number_format($memoryUsage['free'] / 1024, 0, \",\",\".\").\" MB</td></tr>\n\t\t\t\");\n\t\t\n\t\t//If the client is accessible go forward to the next step\n\t\t$_SESSION['VM_createStep'] = VM_stepCreateGuest;\n\t}\n\telse\n\t{\n\t\tif (HTML_submit(\"BUT_wol\",$I18N_wakeUp))\n\t\t\tCLIENT_wol($_SESSION['VM_host']);\n\n\t\tHTML_submit(\"BUT_refresh\",$I18N_refresh);\n\n\t\t//convert the switch status to readable information\n\t\t$readableStatus = VM_convertSwitchStatusInfo(VM_STATE_OFF);\n\n\t\techo(\"\n\t\t\t<tr><td colspan=\\\"2\\\"><hr></td></tr>\n\t\t\t<tr><td>$readableStatus[text]</td><td align=\\\"right\\\">$readableStatus[imgTag]</td></tr>\n\t\t\t<tr><td>\".BUT_wol.\"</td><td>\".BUT_refresh.\"</td></tr>\");\n\t}\n}", "public function testMultipleClients()\n {\n self::$mediumString = TestHelper::makeBigString(2);\n\n $this->assertEquals(self::$multiple, $this->query(['method' => 'resetMultiple']));\n $parallel = 50;\n\n for ($i = 0; $i < $parallel; ++$i) {\n self::newRemoteClient('computeMD5AndSleep');\n }\n\n static::waitForRemoteClientsToExit();\n\n $multiple = $this->query(['method' => 'getMultiple']);\n $this->assertEquals($parallel, $multiple['connections']);\n $this->assertEquals($parallel, $multiple['maxSimultaneousConnections']);\n $this->assertEquals($parallel, $multiple['md5ok']);\n }", "function checkHotpResync($secret, $counter, $key, $counterwindow = 2);", "public function run()\n {\n Reservation::factory(1000)->times(50);\n }", "function reset_vvrecusers() {\n\t\t$connection_parameters = array(I5_OPTIONS_JOBNAME=>'I5JOB',I5_OPTIONS_INITLIBL=>'PGMCOMET',I5_OPTIONS_LOCALCP=>'UTF-8;ISO8859-1'); //i5_OPTIONS_IDLE_TIMEOUT=>120,I5_OPTIONS_LOCALCP=>'CCSID'\n\t\tif ($conn = @i5_connect ( '127.0.0.1', 'hdh', 'hdh', $connection_parameters )) {\n\n\n\t\t\ti5_transaction(I5_ISOLEVEL_NONE,$conn);\n\n\t\t\t//for ($i=0;$i<count($sqlstr);$i++) {\n\n\t\t\ti5_query(\"DROP TABLE VVBASE/VVRECUSERS\");\n\t\t\ti5_query(\"create table VVBASE/VVRECUSERS (\n\t\t\t\t\tID INT generated always as identity\n\t\t\t\t\t(start with 1 increment by 1 cycle),\n\t\t\t\t\tSITENAME VARCHAR(50),\n\t\t\t\t\tNOM VARCHAR(50),\n\t\t\t\t\tPRENOM VARCHAR(50),\n\t\t\t\t\tEMAIL VARCHAR(50),\n\t\t\t\t\tNUMFID VARCHAR(15),\n\t\t\t\t\tFONCTION VARCHAR(50),\n\t\t\t\t\tPrimary key (ID))\");\n\t\t\t//}\n\n\n\t\t\t$result = !(i5_commit($conn));\n\n\t\t\tif (!i5_close($conn)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t}", "abstract public function getMaxPorts();", "function process_unlock_set_queen($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->gainPart('head', 29, true);\n $player->gainPart('body', 27, true);\n $player->gainPart('feet', 25, true);\n $player->gainPart('eHead', 29);\n $player->gainPart('eBody', 27);\n $player->gainPart('eFeet', 25);\n $player->sendCustomizeInfo();\n }\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "public function getSlots()\n {\n return $this->slots;\n }", "public function run()\n {\n while(true)\n {\n $changed_sockets = $this->allsockets;\n $write = null;\n $except = null;\n @stream_select($changed_sockets, $write, $except, 0, 5000); \n foreach($changed_sockets as $socket)\n {\n if($socket == $this->master)\n {\n if(($ressource = stream_socket_accept($this->master)) === false)\n {\n $this->log('Socket error: ' . socket_strerror(socket_last_error($ressource)));\n continue;\n }\n else\n {\n $client = $this->createConnection($ressource);\n $this->clients[(int)$ressource] = $client;\n $this->allsockets[] = $ressource;\n \n if(count($this->clients) > $this->_maxClients)\n {\n $this->log('Attention: Client Limit Reached!');\n $client->onDisconnect();\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->statusMsg('Attention: Client Limit Reached!', 'warning');\n }\n continue;\n }\n \n $this->_addIpToStorage($client->getClientIp());\n if($this->_checkMaxConnectionsPerIp($client->getClientIp()) === false)\n {\n $this->log('Connection/Ip limit for ip ' . $client->getClientIp() . ' was reached!');\n $client->onDisconnect();\n if($this->getApplication('status') !== false)\n {\n $this->getApplication('status')->statusMsg('Connection/Ip limit for ip ' . $client->getClientIp() . ' was reached!', 'warning');\n }\n continue;\n } \n }\n }\n else\n { \n $client = $this->clients[(int)$socket];\n if(!is_object($client))\n {\n unset($this->clients[(int)$socket]);\n continue;\n }\n $data = $this->readBuffer($socket); \n $bytes = strlen($data);\n \n if($bytes === 0)\n {\n $client->onDisconnect(); \n continue;\n }\n elseif($data === false)\n {\n $this->removeClientOnError($client);\n continue;\n }\n elseif($client->waitingForData === false && $this->_checkRequestLimit($client->getClientId()) === false)\n {\n $client->onDisconnect();\n }\n else\n { \n $client->onData($data);\n }\n }\n }\n }\n }", "public function waiting_requester(){\n\n }", "function setSyncItemsAvailabilityCount()\n {\n }", "public function get_slot(): int {\n return $this->slot;\n }", "function __reload_ne_adapaters() {\n\t\t$appliance_id = $this->response->html->request()->get('appliance_id');\n\t\t$appliance = new appliance();\n\t\t$appliance->get_instance_by_id($appliance_id);\n\t\t$resource = new resource();\n\t\t$resource->get_instance_by_id($appliance->resources);\n\t\t$command = $this->basedir.\"/plugins/hyperv/bin/htvcenter-hyperv-network post_net_adapters -i \".$resource->ip;\n\t\t$command .= ' --htvcenter-ui-user '.$this->user->name;\n\t\t$command .= ' --htvcenter-cmd-mode fork';\n\t\t$file = $this->rootdir.'/plugins/hyperv/hyperv-stat/'.$resource->ip.'.net_adapters';\n\t\tif(file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t\t$htvcenter_server = new htvcenter_server();\n\t\t$htvcenter_server->send_command($command, NULL, true);\n\t\twhile (!file_exists($file)) // check if the data file has been modified\n\t\t{\n\t\t usleep(10000); // sleep 10ms to unload the CPU\n\t\t clearstatcache();\n\t\t}\n\t\treturn true;\n\t}", "function connect($r) {\n\t\t\t\tif($r == 0) echo \"{$r}-CONX-OK|\";\n\t\t\t\tif($r == 1) echo \"{$r}-Connection refused (unacceptable protocol version)|\";\n\t\t\t\tif($r == 2) echo \"{$r}-Connection refused (identifier rejected)|\";\n\t\t\t\tif($r == 3) echo \"{$r}-Connection refused (broker unavailable )|\"; \n\t\t}", "public function checkLockToIP() {}", "function process_unlock_set_king($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->gainPart('head', 28, true);\n $player->gainPart('body', 26, true);\n $player->gainPart('feet', 24, true);\n $player->gainPart('eHead', 28);\n $player->gainPart('eBody', 26);\n $player->gainPart('eFeet', 24);\n $player->sendCustomizeInfo();\n }\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "public function QueueSlotBooking(){\r\n //echo 'hi';\r\n $getSessionData = StringHelper::getMainSession(3);\r\n if($getSessionData == FALSE){\r\n return 0;\r\n }else{\r\n $bookingdata = Input::all(); \r\n if(!empty($bookingdata)){\r\n $returnBooking = $this->MainBooking($bookingdata,$bookingdata['booktype']); \r\n return $returnBooking;\r\n }else{\r\n return 0;\r\n } \r\n }\r\n }", "public function __toString()\n {\n $str = \"\\n---Remote Control---\\n\";\n for ($i=0; $i<=4; $i++) {\n $str .= \"\\nSlot[$i]\" . $this->onCommand[$i]->getName() . \" <===> \" . $this->offCommand[$i]->getName();\n }\n return $str;\n }", "function mark_robot( $socket, $data ) {\r\n\tif($socket->process == true) {\r\n\t\t$ip = $data;\r\n\t\tglobal $player_array;\r\n\t\tRobots::add($ip);\r\n\t\tforeach( $player_array as $player ) {\r\n\t\t\tif($player->ip == $ip) {\r\n\t\t\t\t$player->human = false;\r\n\t\t\t\t$player->hostage_exp_points = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function recruitPlayer($cxn,$player,$request)\r\n {\r\n \r\n }", "private function _increaseSlot(int $slotNr){\n $this->slots[$slotNr]++;\n }", "public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "function wp_smpro_servers() {\r\n\t$server_list = array(\r\n\t\t'https://smush1.wpmudev.com/',\r\n\t\t'https://smush2.wpmudev.com/',\r\n\t\t'https://smush3.wpmudev.com/',\r\n\t\t'https://smush4.wpmudev.com/',\r\n\t\t'https://smush5.wpmudev.com/',\r\n\t\t'https://smush6.wpmudev.com/',\r\n\t\t'https://smush7.wpmudev.com/',\r\n\t\t'https://smush8.wpmudev.com/',\r\n\t\t'https://smush9.wpmudev.com/',\r\n\t\t'https://smush10.wpmudev.com/'\r\n\t);\r\n\r\n\treturn $server_list;\r\n}", "function isAvailable() ;", "function isAvailable() ;", "public function setup($slots = null) {\n $slots = $slots ?: $this->getSlots();\n\n $this->client->del($this->getSlotsQueueName());\n\n for ($i = 1; $i <= $slots; $i++) {\n $this->client->zadd($this->getSlotsQueueName(), 0, self::getSlotName($i));\n }\n }", "function reinstall_vps($IDVPS, $connection, $OS, $hostname, $disque, $ip, $swap, $memoire, $cpu, $passroot){\n\t//On suprrime et r�installe le serveur--------------------------------------------------------------------------------\n\t\n\t// Pour old version : Commande � ex�cuter\n\t//$command='/usr/bin/pvectl vzcreate '.$IDVPS.' --disk '.$disque.' --ostemplate '.$OS.' --hostname '.$hostname.' --nameserver 127.0.0.1 --nameserver 213.186.33.99 --searchdomain ovh.net --onboot no --ipset '.$ip.' --swap '.$swap.' --mem '.$memoire.' --cpus '.$cpu.' && vzctl restart '.$IDVPS.' && vzctl set '.$IDVPS.' --userpasswd root:'.$passroot;\n\t// pour proxmox 2.X\n $command='/usr/bin/pvectl create -vmid '.$IDVPS.' -ostemplate '.$OS.' -disk '.$disque.' -hostname '.$hostname.' -nameserver 156.154.70.1 -nameserver 156.154.71.1 -searchdomain heberge-hd.net -onboot 1 -ip_address '.$ip.' -swap '.$swap.' -memory '.$memoire.' -cpus '.$cpu.' -password '.$passroot.' && sleep 10 && vzctl start '.$IDVPS;\n $command0='sleep 10 && vzctl exec '.$IDVPS.' echo -e \"auto eth0 \\niface eth0 inet static \\n\\taddress '.$ip.' \\n\\tnetmask 255.255.255.0 \\n\\tgateway 192.168.5.1 \\n\\tbroadcast 192.168.5.255\" > /etc/network/interfaces';\n\n\t//On arr�te le serveur\n\tstop_destroy_vps($IDVPS, $connection);\n\t\n\t//On lance la commande d'install\n $stream = ssh2_exec($connection, $command );\n stream_set_blocking($stream, true);\n\t\n\t//on lance la configuration des ip\n\t $stream0 = ssh2_exec($connection, $command0 );\n \t stream_set_blocking($stream0, true);\n\n\t//R�cup�re le r�sultat\n\t$rep=\"\";\n\twhile($line = fgets($stream)){\n\t\t$rep.=$line;\t\n\t\t$repp.=$line;\n\t}\n\t//Ferme la connection\n\tfclose($stream);\n\tfclose($stream0);\n\n\tif($stream!=false){\n\t\treturn true;\n\t}else{\n\n\n\t$ok=stripos($rep,\"Container start in progress\");\n\t$time=time();\n\t$message = mysql_real_escape_string('Le '.date('d/m/y - H:i:s').' le VPS '.$hostname.' ('.$IDVPS.') est passer en erreur lors de sa réinstallation.\n\t\tVoici le message : '.$rep.'\n\n\t\tCommande : \n\t\t'.$command_stop.'');\n\t$IDVPS = mysql_real_escape_string($IDVPS);\n\t$time = mysql_real_escape_string($time);\n\tmysql_query(\"INSERT INTO `warning` ( `id` , `id_client` , `ip` , `message` , `page` , `time` , `type`, `TYPE_W`)\nVALUES (\nNULL , '\".$IDVPS.\"', 'IP', '\".$message.\"', '', '\".$time.\"', 'W_ERREUR_SETUP_VPS', 'VPS'\n)\");\n\n\t\treturn false;\n\t}\n\t\n}", "public function start() {\n $cmd = sprintf(\"./control.sh start %s -game %s -ip %s -port %d -maxplayers %d -map %s -rcon %s\", $this->sid, $this->gameId, $this->ip, $this->port, $this->maxplayers, $this->map, $this->rcon);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 1 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }", "function serverEvaluaConnElectronica()\n\t{\n\t\t//hacemos un TestNodeLink, evaluamos el valor que devuelve la funcion 1 = puerto conn TCP no abierta\n\t\t//notese que en caso de evento NodeTimeOut el servidor tiene implementado codigo para responder al cliente consecuentemente\n\t\t\n\t\t$valor = $this->TestNodeLink();\n\t\t\n\t\tif ($valor > 0)\n\t\t{\n\t\t\t$this->responseClientFunction( \"clienteEvaluaConnElectronica\", array($valor) );\n\t\t}\n\t\t\n\t}", "function playerSentToPenaltyBox($currentPlayer) {\n\t}", "public function setNumSlots(int $numSlots)\n {\n $this->numSlots = $numSlots;\n }", "function snmp2_getnext($host, $community, $object_id, $timeout = '1000000', $retries = '5')\n{\n}", "public function getSlots() :array\n {\n return $this->slots;\n }", "function checkSchedule($slot = \"\") {\n\t\t//$slotArray = explode()\n\t\treturn true;\n\t}", "function addLatestServer($remote_ip, $service_port, $serverTitle, $connectedClients, $networkSlots )\n\t{\n\t\t$server = \"$remote_ip:$service_port\";\n\t\t$players = \"$connectedClients/$networkSlots\";\n\t\tmysqli_query( Registry::$mysqliLink, \"INSERT INTO recent_servers (name, server, players) VALUES('$serverTitle', '$server', '$players')\");\n\n\t\t// make sure there are not too much servers\n\t\t$count_query = mysqli_fetch_assoc(mysqli_query( Registry::$mysqliLink, \"SELECT COUNT(*) as count FROM recent_servers\"));\n\t\t$count = (int) $count_query['count'];\n\t\t$over = $count - MAX_RECENT_SERVERS;\n\t\tmysqli_query( Registry::$mysqliLink, \"DELETE FROM recent_servers ORDER BY id LIMIT $over\");\n\t}", "function set_empty_slots(&$school,$section, &$pending_subject,$empty_slot,$days,$maxslots,$init_start,$tchr_max_consec=NULL){\n $pending_subjteacher = $pending_subject->get_subject_teacher();\n if(empty($tchr_max_consec)){\n $tchr_max_consec = $school->get_preferences()->get_max_consec_class();\n }\n $break4period = $school->get_preferences()->get_b4break_periods();\n $index = $empty_slot['INDEX'];\n $weekday = $empty_slot['DAY'];\n\n if($pending_subjteacher->is_slot_available($weekday,$index,$maxslots,$tchr_max_consec,$break4period)\n && $pending_subject->is_full()==FALSE) {\n //drupal_set_message(\"Empty slot present for: $pending_subject of $section\");\n $this->slots[$weekday][$index]=$pending_subject;\n $pending_subjteacher->update_slot($weekday,$index,$section);\n $pending_subject->increment_count();\n return ;\n }\n foreach ($days as $day) {\n for($i=$init_start;$i<=$maxslots;$i++){\n if(!empty($this->slots[$day][$i]) && $day!=$weekday && $index!=$i){\n $subject = $this->slots[$day][$i];\n $teacher = $subject->get_subject_teacher();\n if($subject->is_hard_allocation() != TRUE\n && $pending_subjteacher->is_slot_available($day,$i,$maxslots,$tchr_max_consec,$break4period)\n && $pending_subject->is_full()==FALSE\n && $teacher->is_slot_available($weekday,$index,$maxslots,$tchr_max_consec,$break4period)){\n $this->slots[$weekday][$index]=$subject;\n $teacher->clear_slot($day,$i);\n $this->slots[$day][$i]=$pending_subject;\n $pending_subject->increment_count();\n $pending_subjteacher->update_slot($day,$i,$section);\n $teacher->update_slot($weekday,$index,$section);\n //drupal_set_message(\"Pending Subj: $pending_subject placed at: $day and $i and $subject moved to $weekday and $index for $section\");\n return ;\n }\n }\n }\n }\n }", "protected function _balanceQueues(){\n// $this->RUNNING = false;\n }", "function process_unlock_set_djinn($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->gainPart('head', 35, true);\n $player->gainPart('body', 35, true);\n $player->gainPart('feet', 35, true);\n $player->gainPart('eHead', 35);\n $player->gainPart('eBody', 35);\n $player->gainPart('eFeet', 35);\n $player->sendCustomizeInfo();\n }\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "public function inputSlots(): array;", "public function pps_monitor() \r\n { if(!$this->m_connected) return;\r\n \r\n set_time_limit(0);\r\n \r\n \r\n $this->m_buffer = '';\r\n $sockets = $this->get_sockets();;\r\n \r\n /*foreach( $this->servers as $key => $server ){\r\n if( $server->type === SERVER_TYPE_IRC ) {\r\n if( true ) {\r\n echo \"IRC TEST\\n\";\r\n $server->hooked = true;\r\n $server->parse_line(\"]{ing!~art@me65536d0.tmodns.net PRIVMSG #soldat.na :!ls\");\r\n return; \r\n }\r\n echo \"Hook irc\\n\";\r\n if( true )\r\n $sockets[] = $server->sock;\r\n continue;\r\n }\r\n if( !$server->connected ) continue;\r\n echo \"Found available server, hoocking stats\\n\";\r\n $server->stats = new base_stats( $this->db, $this->servers[$key], $this->servers[$key]->get_refreshx());\r\n $this->m_TPC += $server->stats->pc;\r\n $sockets[] = $server->sock;\r\n }*/\r\n\r\n echo \"--> Now monitoring...\\n\";\r\n $this->f_monitor($sockets);\r\n \r\n \r\n echo \"--> Ubnormal Termination => 'connection lost'\\n\\r\";\r\n foreach( $this->servers as $server ){\r\n socket_close($server->sock);\r\n }\r\n $this->m_is_connected = false;\r\n }", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }", "function serverSync() {\n\n\t\t// check server build\n\t\tif (strlen($this->server->build) == 0 ||\n\t\t ($this->server->getGame() == 'MP' && strcmp($this->server->build, MP_BUILD) < 0)) {\n\t\t\ttrigger_error(\"Obsolete server build '\" . $this->server->build . \"' - must be at least '\" . MP_BUILD . \"' !\", E_USER_ERROR);\n\t\t}\n\n\t\t// get server id, login, nickname, zone & packmask\n\t\t$this->server->isrelay = false;\n\t\t$this->server->relaymaster = null;\n\t\t$this->server->relayslist = array();\n\t\t$this->server->gamestate = Server::RACE;\n\t\t$this->server->packmask = '';\n\t\t$this->client->query('GetSystemInfo');\n\t\t$response['system'] = $this->client->getResponse();\n\t\t$this->server->serverlogin = $response['system']['ServerLogin'];\n\n\t\t$this->client->query('GetDetailedPlayerInfo', $this->server->serverlogin);\n\t\t$response['info'] = $this->client->getResponse();\n\t\t$this->server->id = $response['info']['PlayerId'];\n\t\t$this->server->nickname = $response['info']['NickName'];\n\t\t$this->server->zone = substr($response['info']['Path'], 6); // strip 'World|'\n\n\t\t$this->client->query('GetLadderServerLimits');\n\t\t$response['ladder'] = $this->client->getResponse();\n\t\t$this->server->laddermin = $response['ladder']['LadderServerLimitMin'];\n\t\t$this->server->laddermax = $response['ladder']['LadderServerLimitMax'];\n\n\t\t$this->client->query('IsRelayServer');\n\t\t$this->server->isrelay = ($this->client->getResponse() > 0);\n\t\tif ($this->server->isrelay) {\n\t\t\t$this->client->query('GetMainServerPlayerInfo', 1);\n\t\t\t$this->server->relaymaster = $this->client->getResponse();\n\t\t}\n\n\t\t// get MP packmask\n\t\t$this->client->query('GetServerPackMask');\n\t\t$this->server->packmask = $this->client->getResponse();\n\n\t\t// clear possible leftover ManiaLinks\n\t\t$this->client->query('SendHideManialinkPage');\n\n\t\t// get mode & limits\n\t\t$this->client->query('GetCurrentGameInfo', 1);\n\t\t$response['gameinfo'] = $this->client->getResponse();\n\t\t$this->server->gameinfo = new Gameinfo($response['gameinfo']);\n\n\t\t// get status\n\t\t$this->client->query('GetStatus');\n\t\t$response['status'] = $this->client->getResponse();\n\t\t$this->currstatus = $response['status']['Code'];\n\n\t\t// get game & mapdir\n\t\t$this->client->query('GameDataDirectory');\n\t\t$this->server->gamedir = $this->client->getResponse();\n\t\t$this->client->query('GetTracksDirectory');\n\t\t$this->server->mapdir = $this->client->getResponse();\n\n\t\t// get server name & options\n\t\t$this->getServerOptions();\n\n\t\t// throw 'synchronisation' event\n\t\t$this->releaseEvent('onSync', null);\n\n\t\t// get current players/servers on the server (hardlimited to 300)\n\t\t$this->client->query('GetPlayerList', 300, 0, 2);\n\t\t$response['playerlist'] = $this->client->getResponse();\n\n\t\t// update players/relays lists\n\t\tif (!empty($response['playerlist'])) {\n\t\t\tforeach ($response['playerlist'] as $player) {\n\t\t\t\t// fake it into thinking it's a connecting player:\n\t\t\t\t// it gets team & ladder info this way & will also throw an\n\t\t\t\t// onPlayerConnect event for players (not relays) to all plugins\n\t\t\t\t$this->playerConnect(array($player['Login'], ''));\n\t\t\t}\n\t\t}\n\t}", "function reset_vvusers() {\n\t\t$connection_parameters = array(I5_OPTIONS_JOBNAME=>'I5JOB',I5_OPTIONS_INITLIBL=>'PGMCOMET',I5_OPTIONS_LOCALCP=>'UTF-8;ISO8859-1'); //i5_OPTIONS_IDLE_TIMEOUT=>120,I5_OPTIONS_LOCALCP=>'CCSID'\n\t\tif ($conn = @i5_connect ( '127.0.0.1', 'hdh', 'hdh', $connection_parameters )) {\n\n\n\t\t\ti5_transaction(I5_ISOLEVEL_NONE,$conn);\n\n\t\t\t//for ($i=0;$i<count($sqlstr);$i++) {\n\n\t\t\ti5_query(\"DROP TABLE VVBASE/VVUSERS\");\n\t\t\ti5_query(\"create table VVBASE/VVUSERS (\n\t\t\t\t\tID INT generated always as identity\n\t\t\t\t\t(start with 1 increment by 1 cycle),\n\t\t\t\t\tSITENAME VARCHAR(50),\n\t\t\t\t\tNOM VARCHAR(50),\n\t\t\t\t\tPRENOM VARCHAR(50),\n\t\t\t\t\tEMAIL VARCHAR(50),\n\t\t\t\t\tPrimary key (ID))\");\n\t\t\t//}\n\n\n\t\t\t$result = !(i5_commit($conn));\n\n\t\t\tif (!i5_close($conn)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t}", "public function loop_x10() {\r\n $this->loop_x10++;\r\n if ($this->loop_x10 == 10) {\r\n $this->loop_x10 = 0;\r\n\r\n $blocksMinedByPeers = $this->chaindata->GetPeersMinedBlocks();\r\n if (!empty($blocksMinedByPeers)) {\r\n while ($blockMinedByPeerDB = $blocksMinedByPeers->fetch_array(MYSQLI_ASSOC)) {\r\n $blockMinedByPeer = Tools::objectToObject($blockMinedByPeerDB['block'],'Block');\r\n\r\n //Check if block is valid\r\n if (!$blockMinedByPeer->isValid())\r\n $this->chaindata->RemovePeerMinedBlockByPrevious($blockMinedByPeerDB['previous_hash']);\r\n\r\n //Check if block is on blockchain\r\n $blockInBlockchain = $this->chaindata->GetBlockByHash($blocksMinedByPeers->hash);\r\n if ($blockInBlockchain != null)\r\n $this->chaindata->RemovePeerMinedBlockByPrevious($blockMinedByPeerDB['previous_hash']);\r\n }\r\n }\r\n\r\n //Check dead peers\r\n $this->CheckConnectionWithPeers();\r\n }\r\n }", "public function getSlot()\n {\n return $this->slot;\n }", "function manageCollector($temperatures){\r\n\tglobal $settings;\r\n\tglobal $states;\r\n\tglobal $logicDescription;\r\n\t$pt= $temperatures[\"pT\"]; // if current temp bad it may use average value\r\n\t$ct= GreenhouseClass::averageTemp(\"cT\",2);\r\n\t$rt= $temperatures[\"rT\"];\r\n\t$response .= \"\"; // maybe do nothing\r\n\t$initCollState = \"5\"; // off\r\n\tif($states['collectorPumpOn'] == 1){ \r\n\t\t$initCollState = \"4\";\r\n\t}\r\n\t\t\r\n\t// ------------------ Always send some signal--------------------------\r\n\t\r\n\t//Send PUMP ON signal\r\n\tif($ct > ($pt + $settings['collectorTempDeltaOn'])){\r\n\t\tif($states['collectorPumpOn'] != 1){\r\n\t\t\t$logicDescription .= \"Col. on. $ct &gt; $pt + \" . $settings['collectorTempDeltaOn'] . \"<br>\";\r\n\t\t}\r\n\t\t$states['collectorPumpOn'] = 1;\r\n\t\treturn \"4\";\r\n\t}\r\n\t\t//- SEND PUMP OFF SIGNAL -----------------------\r\n\t\t// Pump is on\r\n\tif($rt < ($pt + $settings['returnTempDeltaOff'])){\r\n\t\tif($states['collectorPumpOn'] != 0){\r\n\t\t\t\t$logicDescription .= \"Col. off. $rt &lt; $pt + \" . $settings['returnTempDeltaOff'] . \"<br>\";\r\n\t\t}\r\n\t\t$states['collectorPumpOn'] = 0;\r\n\t\treturn \"5\";\r\n\t}\r\n\treturn $initCollState; // No change was called for. But send bc arduino will turn off q 60 minutes \r\n}", "private function _createBoard()\n {\n $board = array();\n for($nr = 1; $nr <= $this->numSlots; $nr++){\n $board[] = array_fill(0, $nr, 0);\n }\n\n $this->board = $board;\n }", "public function loop()\n {\n $i = 0;\n $j = 0;\n while (true) {\n printf(\"\\033[37;40m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" Current {$this->user} state:\\033[39;49m\\n%s\\n\", $this);\n foreach ($this->state as $p => $data) {\n if ($p == $this->port) {\n continue;\n }\n if (empty($p)) {\n printf(\"\\e[0;31m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" Current {$this->user} has data with empty port.\\e[0m\\n\");\n }\n $j++;\n $data = json_encode($this->state);\n $peerState = @file_get_contents('http://localhost:' . $p . '/gossip', false, stream_context_create([\n 'http' => [\n 'method' => 'POST',\n 'ignore_errors' => 1,\n 'header' => \"Content-type: application/json\\r\\nContent-length: \" . strlen($data) . \"\\r\\n\",\n 'content' => $data\n ]\n ]));\n\n if (!$peerState) {\n unset($this->state[$p]);\n $this->save();\n } else {\n $this->update(json_decode($peerState, true));\n }\n }\n\n $this->reload();\n usleep(rand(300000, 3000000));\n if (++$i % 2) {\n $coins = $this->updateMine();\n printf(\"\\033[37;40m\" . date_format(new \\DateTime(), 'Y.m.d H:i:s') . \" {$this->user} own coins updated to {$coins}.\\033[39;49m\\n\");\n }\n }\n }", "public function maxAttempts(): int\n {\n return 5;\n }", "function prsvrx() \r\n{\r\n\tprsvr();\r\n\texit;\r\n}", "function isAcquired() ;", "protected function ipLockClause() {}", "function nextOpenPacket($usedPackets){\n\t$packet = 1; \n\twhile (true){\n\t\t$columns = array('promoted', 'psets_id', 'round_id');\n\t\t$where = array(\"'1'\", \"'\" . $_SESSION['tournament'] . \"'\", \"'\" . strval($packet) . \"'\");\n\t\t\n\t\t$count = getNumOf('tossups', $columns, $where);\n\t\t$count = $count + getNumOf('bonuses', $columns, $where);\n\n\t\tif ($count == 0 and !in_array($packet, $usedPackets)){\n\t\t\treturn $packet;\n\t\t}\n\t\t\n\t\telse{\n\t\t\t$packet = $packet + 1;\n\t\t}\n\t}\n}", "public function disConnect();", "public function rocketBooster() {\n\t\techo \"systems are not ready yet\";\n\t}", "private function detectServerRepair()\n {\n $h = date(\"H\", time());\n if ($h == \"03\") {\n Log::write(\"Server Repair Time,\", 2, \"spider\");\n sleep(3600);\n }\n }", "function schedule()\n {\n $this->currentTcb = $this->list;\n while ($this->currentTcb != null) {\n if ($this->currentTcb->isHeldOrSuspended()) {\n $this->currentTcb = $this->currentTcb->link;\n } else {\n $this->currentId = $this->currentTcb->id;\n $this->currentTcb = $this->currentTcb->run();\n }\n }\n }", "protected function limit()\n {\n if (count($this->clients) > $this->limit)\n {\n $this->log->info(\"Limit connection exceeded!\");\n\n $this->conn->send('Limit connection exceeded!');\n\n $this->conn->close();\n }\n }", "public function adminSetMaxNumPlayers(int $slots) : bool\n {\n return $this->_consoleCommand('AdminSetMaxNumPlayers', $slots, 'Set MaxNumPlayers to ' . $slots);\n }", "#[NoReturn] function takeControl(): void {\r\n $this\r\n ->initDecks(Settings::getInstance()->getInt(Settings::SETTINGS_DECK_COUNT)) //// grabs cards from configured number of decks\r\n ->shuffle() /// shuffles cards\r\n ->initPlayers(Settings::getInstance()->getInt(Settings::SETTINGS_PLAYER_COUNT)) /// creates requested amount of players\r\n ->dealer()\r\n ->clear() /// clears the dealer's card\r\n ->deal($this->cards, $this->players); /// deal 2 cards to each player and to the dealer\r\n\r\n echo PHP_EOL, 'Game Started', PHP_EOL, PHP_EOL;\r\n echo 'Cards have been dealt', PHP_EOL, PHP_EOL;\r\n\r\n $this->printStatus(); /// prints all the\r\n\r\n foreach ($this->players as $player) {\r\n /// serve the current player\r\n $this->dealer->serve($player, $this->cards);\r\n }\r\n\r\n /// the dealer can play now\r\n $this->dealer->play($this->cards);\r\n\r\n /// all players have played, state scores now\r\n $this->stateScores();\r\n }", "function mc_ses_gc($maxlt)\n{\n}", "public function test_admin_restart_match()\n {\n $this->assertTrue($this->btwServer->adminRestartMatch());\n\n sleep(30);\n }", "public function run()\n {\n for($i=0;$i<5;$i+=1){\n\\App\\Ip::create([\n 'ip' => '1.0.0.1024',\n 'location' => 'nn',]);\n }}", "function process_unlock_perk($socket, $data)\n{\n global $player_array;\n\n if ($socket->process === true) {\n list($slug, $user_id, $guild_id, $user_name, $quantity) = explode('`', $data);\n $user_id = (int) $user_id;\n $guild_id = (int) $guild_id;\n start_perk($slug, $user_id, $guild_id, time() + ($quantity * 3600));\n $player = id_to_player($user_id, false);\n $display_name = userify($player, $user_name);\n\n if ($guild_id !== 0) {\n if (strpos($slug, 'guild_') === 0) {\n $type = ucfirst(explode('_', $slug)[1]);\n $duration = format_duration($quantity * 3600);\n $msg = \"$display_name unlocked $type mode for your guild for $duration!\";\n send_to_guild($guild_id, \"systemChat`$msg\");\n } elseif ($slug === 'happy_hour') {\n global $chat_room_array;\n\n $hh_lang = $quantity > 1 ? \"$quantity Happy Hours\" : 'a Happy Hour';\n if (isset($chat_room_array['main'])) {\n $main = $chat_room_array['main'];\n $main->sendChat(\"systemChat`$display_name just triggered $hh_lang!\");\n foreach ($player_array as $player) {\n if (isset($player->chat_room) && $player->chat_room !== $main) {\n $player->write(\"systemChat`$display_name just triggered $hh_lang!\");\n }\n }\n } else {\n sendToAll_players(\"systemChat`$display_name just triggered $hh_lang!\");\n }\n }\n }\n\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}", "function recruitTeam($cxn,$player,$request)\r\n {\r\n \r\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "function start_new_day( $socket, $data ) {\r\n\tif( $socket->process == true ) {\r\n\t\tglobal $player_array;\r\n\t\tforeach( $player_array as $player ) {\r\n\t\t\t$player->start_exp_today = $player->exp_today = 0;\r\n\t\t}\r\n\t\t$socket->write('day-ok');\r\n\t}\r\n}", "public function requests() : int;", "public function ManageDoctorSlots(){\r\n $returnBooking = Doctor_Library::ManageDoctorSlot(); \r\n return $returnBooking; \r\n }", "public function __sleep(){\n\t\t$instance = Connection::getMaster();\n\t\tswitch($this->value){\n\t\tcase \"set\":\n\t\t\t$instance->set($this->serialize_testkey, $this->value.\"value_serialize\");\n\t\t\tbreak;\n\t\tcase \"add\":\n\t\t\t$instance->add($this->serialize_testkey, $this->value.\"value_serialize\");\n\t\t\tbreak;\n\t\tcase \"replace\":\n\t\t\t$instance->replace($this->serialize_testkey, $this->value.\"value_serialize\");\n\t\t\tbreak;\t\t\t\t\n\t\tcase \"cas\":\n\t\t\t$instance->get($this->serialize_testkey, $returnFlags, $returnCAS);\n\t\t\t$instance->cas($this->serialize_testkey, $this->value.\"value_serialize\", 0, 0, $returnCAS);\n\t\t\tbreak;\t\n\t\tcase \"append\":\n\t\t\t$instance->append($this->serialize_testkey, $this->value.\"value_serialize\");\n\t\t\tbreak;\t\t\n\t\tcase \"prepend\":\n\t\t\t$instance->prepend($this->serialize_testkey, $this->value.\"value_serialize\");\n\t\t\tbreak;\t\t\n\t\tdefault:\n\t\t\tsleep($this->set_sleep);\n\t\t\tbreak;\n\t\t}\n\t\treturn array('value'); \n\t}", "public function testKeepPlayingSurpassLimit()\n {\n $name = \"Computer Harry Potter\";\n $player = new ComputerPlayer($name);\n $player -> addPoints(90);\n $this->assertFalse($player -> keepPlaying(14, 100, 5));\n }", "public abstract function hasWaitingLobby(): bool;", "public function testUnlimitedExecutionTime()\n {\n $response = $this->http->send(\n new Request('GET', '/visit-counter.php?with_no_time_limit')\n );\n\n $this->assertSame('1', (string) $response->getBody());\n $this->assertCreatedNewSession($response);\n $this->assertSame(1, $this->redis->dbSize());\n }", "abstract public function _get_connected();", "protected function changeGearUp()\n\t{\n\t\tif ($this->currentGear >= 5){\n\t\t\techo 'Already on the max gear.';\n\t\t}\n\t\telse {\n\t\t\t$this->currentGear++;\n\t\t}\n\t}", "public function videoconferenciaNoInterrumpir( ) {\n $this->setNoInterrumpir(\"OFF\");\n //$this->setNoInterrumpir(\"ALLOCATED\");\n }", "public function waitPush()\n {\n sleep(7);\n\n return 0;\n }", "function isAvailable()\n {\n }", "public function getDuplex() {}", "abstract public function isAvailable() ;", "public function run()\n {\n Mechanic::factory()\n ->count(50)\n ->create();\n }", "function getSpin(){\n\t$s=rand(1,38);\n\treturn $s;\n}", "public function test_admin_end_match()\n {\n $this->assertTrue($this->btwServer->adminEndMatch());\n\n sleep(30);\n }" ]
[ "0.5614975", "0.55069023", "0.5326362", "0.5292835", "0.5254236", "0.51986706", "0.517132", "0.514031", "0.50759614", "0.5061717", "0.5003849", "0.49743128", "0.49405876", "0.48795667", "0.48317063", "0.4819154", "0.48180422", "0.47654283", "0.47494763", "0.47223732", "0.4721404", "0.47144485", "0.4712566", "0.47016904", "0.46910807", "0.46776196", "0.4663312", "0.46133277", "0.46008042", "0.4587193", "0.45837492", "0.45761624", "0.4516707", "0.45027342", "0.45024946", "0.44973207", "0.4490774", "0.44880804", "0.44756153", "0.44756153", "0.4473244", "0.44694087", "0.44643703", "0.4452041", "0.4446911", "0.44463295", "0.44456685", "0.44409296", "0.44369873", "0.4432128", "0.4430093", "0.44218966", "0.4414953", "0.44128197", "0.4404988", "0.43999973", "0.43972442", "0.4362067", "0.43603262", "0.43510827", "0.43462756", "0.4344553", "0.43381897", "0.43333223", "0.4330971", "0.4329871", "0.4328422", "0.43260947", "0.4319672", "0.42998743", "0.42972657", "0.429213", "0.42895183", "0.42894945", "0.42879623", "0.4287616", "0.42875245", "0.42829785", "0.42724478", "0.42661053", "0.42651707", "0.42586392", "0.42571846", "0.42571846", "0.4251536", "0.42514622", "0.42445374", "0.42426395", "0.42373118", "0.4236856", "0.4228244", "0.42275128", "0.42250407", "0.42222032", "0.421794", "0.42153382", "0.4211758", "0.4201061", "0.41921207", "0.41915795", "0.41864902" ]
0.0
-1
This function takes a slot position and on On and Off command to be stored in that slot. It puts these commands in the on and off arrays for later use.
public function setCommand($slot, ICommand $onCommand, ICommand $offCommand) { $this->onCommand[$slot] = $onCommand; $this->offCommand[$slot] = $offCommand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onButtonWasPushed($slot)\n {\n $this->onCommand[$slot]->execute();\n }", "public function inputSlots(): array;", "private function _createSlots()\n {\n $slots = array_fill(0, $this->numSlots, 0);\n $this->slots = $slots;\n }", "public function __construct()\n {\n /*instantiate & initialize the on and off arrays*/\n $noCommand = new NoCommand();\n for ($i=0; $i<=4; $i++) {\n $this->onCommand[$i] = $noCommand;\n $this->offCommand[$i] = $noCommand;\n }\n }", "public static function auto_mark_slot($connection, $register_event_slot_id) {\r\n\t\r\n\t\tglobal $USER;\r\n\t\r\n\t\t//Query to get default marks\r\n\t\t$lookup_sql = \"SELECT object_type, usage_code FROM usages WHERE object_type IN ('T','R') AND is_default_usage = 'Y' AND is_positive = 'Y'\";\r\n\t\t\r\n\t\t$lookup_statement = oci_parse($connection, $lookup_sql);\r\n\t\t\r\n\t\tif(!$lookup_statement) {\r\n\t\t\t$error = oci_error($lookup_statement);\r\n\t\t\tdie(\"An error was encountered parsing the default usages lookup query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\r\n\t\tif(!oci_execute($lookup_statement, OCI_DEFAULT)) {\r\n\t\t\t$error = oci_error($lookup_statement);\r\n\t\t\tdie(\"An error was encountered executing the default usages lookup query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\twhile($row = oci_fetch_array($lookup_statement, OCI_DEFAULT)) {\r\n\t\t\r\n\t\t\t$mark_sql = \"\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\tregister_event_details_slots\r\n\t\t\t\tSET\r\n\t\t\t\t\tusage_code = :usage_code,\r\n\t\t\t\t\tactual_start_date = planned_start_date,\r\n\t\t\t\t\tactual_end_date = planned_end_date,\r\n\t\t\t\t\tupdated_by = :username,\r\n\t\t\t\t\tupdated_date = SYSDATE\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tregister_event_slot_id = :register_event_slot_id\r\n\t\t\t\t\tAND object_type = :object_type\r\n\t\t\t\t\tAND usage_code IS NULL\r\n\t\t\t\";\r\n\t\t\t\r\n\t\t\t$mark_statement = oci_parse($connection, $mark_sql);\r\n\t\t\t\r\n\t\t\tif(!$mark_statement) {\r\n\t\t\t\t$error = oci_error($mark_startement);\r\n\t\t\t\tdie(\"An error was encountered parsing the detail slot marking query: \" . $error[\"message\"]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\toci_bind_by_name($mark_statement, \":usage_code\", $row[\"USAGE_CODE\"]);\r\n\t\t\toci_bind_by_name($mark_statement, \":username\", $USER->username);\r\n\t\t\toci_bind_by_name($mark_statement, \":register_event_slot_id\", $register_event_slot_id);\r\n\t\t\toci_bind_by_name($mark_statement, \":object_type\", $row[\"OBJECT_TYPE\"]);\r\n\t\t\t\r\n\t\t\tif(!oci_execute($mark_statement, OCI_DEFAULT)) {\r\n\t\t\t\t$error = oci_error($mark_statement);\r\n\t\t\t\tdie(\"An error was encountered executing the detail slot marking query: \" . $error[\"message\"]);\r\n\t\t\t}\r\n\t\t}\t\t\t\t\r\n\t}", "function process_commands ($cmds) {\n\n if (is_string ($cmds)) {\n $cmds = yaml_decode ($cmds);\n }\n\n \n # get the values for which they are not converted\n \n $no_set_values = yaml_decode ($GLOBALS[\"process_commands_no_set_value\"]);\n \n \n # get the existing pipe data\n \n $pipe = @$GLOBALS['pipe_data'];\n \n \n # loop through the commands\n \n for ($i=0; $i<count($cmds); $i++) {\n \n $cmd = $cmds[$i];\n \n if (is_string ($cmd))\n $cmd = array ($cmd => null);\n \n foreach ($cmd as $func => $opts) {\n \n \n # check to see if we are setting a variable\n \n if (substr ($func, 0, 1) == '$') {\n \n \n # set the variable as the pipe\n \n if ($opts == null) {\n \n $pipe = value ($func);\n \n } else {\n \n $var_name = substr ($func, 1);\n \n $GLOBALS[$var_name] = $opts;\n }\n continue;\n }\n \n \n # special case if the function is 'echo'\n \n if ($func == 'echo') {\n \n echo value ($opts), \"\\n\";\n continue;\n }\n \n \n # check that the function exists\n \n if (!function_exists ($func))\n return error ($func, \"function '$func' does not exist\");\n \n \n # check to see if the input is a string that can be converted to an array\n \n if (is_string ($opts)) {\n \n $opts = value ($opts);\n }\n \n \n # re-write variables passed to the array\n \n if (is_array ($opts) && count ($opts) > 0) {\n \n foreach ($opts as $opt => $value) {\n \n if ($opt == '=' || !is_string ($value))\n continue;\n \n if (!@$no_set_values[$func][$opt]) {\n\n $opts[$opt] = value ($value);\n }\n \n if (@$GLOBALS['error'] || @$GLOBALS['error_msg'])\n return false;\n }\n }\n \n \n # call the function passing the options\n\n $r = $func ($opts, $pipe);\n\n if ($r === false)\n return false;\n \n \n # check to see if we should set a value upon return\n \n if (is_array ($opts)) {\n \n if (array_key_exists ('=', $opts)) {\n \n $var = $opts['='];\n \n if (!is_string ($var)) {\n return error ($func, \"var name to save data to is not a string\");\n }\n \n if (substr ($var, 0, 1) != '$') {\n return error ($func, \"var name '$var' for saving does not start with a '$'\");\n }\n \n debug_echo ($func, \"saving response to var '$var'\");\n \n $var_name = substr ($var, 1);\n \n $GLOBALS[$var_name] = $r;\n }\n }\n \n \n # define the $pipe for the next piped command\n \n $pipe = $r;\n }\n }\n\n $GLOBALS['pipe_data'] = $pipe;\n \n return ($r === false ? false : true);\n}", "public function test_it_maps_array_commands(): void\n {\n $locator = app('Victormln\\LaravelTactician\\Locator\\LocatorInterface');\n $locator->addHandlers([\n 'Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommand' => 'Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandHandler',\n 'Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandInput' => 'Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandSecondHandler'\n ]);\n $handler = $locator->getHandlerForCommand('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommand');\n $handler2 = $locator->getHandlerForCommand('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandInput');\n $this->assertInstanceOf('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandHandler', $handler);\n $this->assertInstanceOf('Victormln\\LaravelTactician\\Tests\\Stubs\\TestCommandSecondHandler', $handler2);\n }", "public function checkSlotWriting() {\n $writeSlot = 1;\n foreach($this->decission as $item) {\n if($item === 0) {\n $writeSlot = 0;\n }\n }\n if($writeSlot == 1 AND $this->nextStation->sendToAllAtOnce == 0) {\n $this->checkForNewSlot($this->nextStation->workflow_slot_id);\n }\n else {\n $this->nextStation->checkSendToAllAtOnce();\n }\n }", "function pick_move() {\n for ($cell = 0; $cell < 8; $cell++) {\n\n //if this the cell is a dash put an X in it\n if ($this->position[$cell] == '-') {\n\n //place X in the following cell\n $this->position[$cell] = 'x';\n break;\n }\n }\n }", "function update_ups_commands_list($ups, $command)\n {\n $file = new File(clearos_app_base('ups_server').'/packaging/'.self::FILE_DEFAULT_UPS_CONF);\n $lines = $file->get_contents_as_array();\n $start = '/\\['.$ups.'\\]/';\n $end = '/^\\[/';\n $conf = array();\n $conf['basic'] = array();\n $i['count']=0;\n foreach ($lines as $line)\n {\n if (preg_match($start, $line)) {\n $found['start'] = TRUE;\n $found['ups'] = TRUE;\n $conf['basic'][] = $line;\n //FIX: use array count\n $found['splice_start'] = $i['count'];\n continue;\n }\n if ($found['start'])\n {\n if (preg_match('/default\\./', $line)) {\n if (preg_match('/default\\.'.$command['command'].'\\s*=/', $line)) {\n $found['default'] = TRUE;\n if (!empty($command['default'])) $conf['default'][] = 'default.'.$command['command'].'='.$command['default'];\n } else {\n $conf['default'][] = $line;\n }\n continue;\n } elseif (preg_match('/override\\./', $line)) {\n if (preg_match('/override\\.'.$command['command'].'\\s*=/', $line)) {\n $found['override'] = TRUE;\n if (!empty($command['override'])) $conf['override'][] = 'override.'.$command['command'].'='.$command['override'];\n } else {\n $conf['override'][] = $line;\n }\n continue;\n } elseif (preg_match('/driver\\s*=/', $line)) {\n $found['driver'] = TRUE;\n if (!empty($command['driver'])) $conf['basic'][] = 'driver='.$command['driver'];\n continue;\n } elseif (preg_match('/port\\s*=/', $line)) {\n $found['port'] = TRUE;\n if (!empty($command['port'])) $conf['basic'][] = 'port='.$command['port'];\n continue;\n } elseif (preg_match('/sdorder\\s*=/', $line)) {\n $found['sdorder'] = TRUE;\n if (!empty($command['sdorder'])) $conf['basic'][] = 'sdorder='.$command['sdorder'];\n continue;\n } elseif (preg_match('/desc\\s*=/', $line)) {\n $found['desc'] = TRUE;\n if (!empty($command['desc'])) $conf['basic'][] = 'desc=\"'.$command['desc'].'\"';\n continue;\n } elseif (preg_match('/nolock\\s*=/', $line)) {\n $found['nolock'] = TRUE;\n if (!empty($command['nolock'])) $conf['basic'][] = 'nolock='.$command['nolock'];\n continue;\n } elseif (preg_match('/ignorelb\\s*=/', $line)) {\n $found['ignorelb'] = TRUE;\n if (!empty($command['ignorelb'])) $conf['basic'][] = 'ignorelb='.$command['ignorelb'];\n continue;\n } elseif (preg_match('/maxstartdelay\\s*=/', $line)) {\n $found['maxstartdelay'] = TRUE;\n if (!empty($command['maxstartdelay']) && $command['maxstartdelay'] != 45) $conf['basic'][] = 'maxstartdelay='.$command['maxstartdelay'];\n continue;\n } elseif (preg_match($end, $line)) {\n $found['start'] = FALSE;\n }\n }\n if (!empty($line)) {\n $conf['output'][] = $line;\n $i['count']++;\n }\n }\n //Add UPS if not found\n if (!$found['ups']) {\n $conf['output'][] = '['.$command['name'].']';\n $conf['output'][] = 'desc='.$command['desc'];\n //$found['splice_start'] = $i['count'];\n }\n //Add default variable if not found.\n if (!$found['default'] && !empty($command['default'])) $conf['default'][] = 'default.'.$command['command'].'='.$command['default'];\n //Add override variable if not found.\n if (!$found['override'] && !empty($command['override'])) $conf['override'][] = 'override.'.$command['command'].'='.$command['override'];\n //Add driver variable if not found\n if (!$found['driver'] && !empty($command['driver'])) $conf['basic'][] = 'driver='.$command['driver'];\n //Add port variable if not found\n if (!$found['port'] && !empty($command['port'])) $conf['basic'][] = 'port='.$command['port'];\n //Add sdorder variable if not found\n if (!$found['sdorder'] && !empty($command['sdorder'])) $conf['basic'][] = 'sdorder='.$command['sdorder'];\n //Add desciption variable if not found\n if (!$found['desc'] && !empty($command['desc'])) $conf['basic'][] = 'desc=\"'.$command['desc'].'\"';\n //Add nolock variable if not found\n if (!$found['nolock'] && !empty($command['nolock'])) $conf['basic'][] = 'nolock='.$command['nolock'];\n //Add ignorelb variable if not found\n if (!$found['ignorelb'] && !empty($command['ignorelb'])) $conf['basic'][] = 'ignorelb='.$command['ignorelb'];\n //Add maxstartdelay variable if not found\n if (!$found['maxstartdelay'] && !empty($command['maxstartdelay']) && $command['maxstartdelay'] != 45) $conf['basic'][] = 'maxstartdelay='.$command['maxstartdelay'];\n //Sort and merge arrays\n sort($conf['basic']);\n sort($conf['default']);\n sort($conf['override']);\n //Delete UPS\n if ($command['command'] != 'delete') {\n $output = array_merge($conf['default'], $conf['override']);\n $output = array_merge($conf['basic'], $output);\n }\n array_splice($conf['output'], $found['splice_start'], 0, $output);\n $file->dump_contents_from_array($conf['output']);\n }", "function zc_plugin_slot($slot_num, $args = null)\n{\n\tglobal $context;\n\t\n\tif (!empty($args))\n\t\t$num_args = count($args);\n\t\t\n\tif (!empty($context['zc']['plugin_slots'][$slot_num]['functions']))\n\t\tforeach ($context['zc']['plugin_slots'][$slot_num]['functions'] as $function)\n\t\t\tif (function_exists($function))\n\t\t\t\tif (empty($num_args))\n\t\t\t\t\t$function();\n\t\t\t\telseif ($num_args == 1)\n\t\t\t\t\t$function($args[0]);\n\t\t\t\telseif ($num_args == 2)\n\t\t\t\t\t$function($args[0], $args[1]);\n\t\t\t\telseif ($num_args == 3)\n\t\t\t\t\t$function($args[0], $args[1], $args[2]);\n\t\t\t\telseif ($num_args == 4)\n\t\t\t\t\t$function($args[0], $args[1], $args[2], $args[3]);\n\t\t\t\telseif ($num_args == 5)\n\t\t\t\t\t$function($args[0], $args[1], $args[2], $args[3], $args[4]);\n\t\t\t\telseif ($num_args == 6)\n\t\t\t\t\t$function($args[0], $args[1], $args[2], $args[3], $args[4], $args[5]);\n}", "public function getCommands($mode);", "public static function connect( $signal, $slot )\n\t{\n\t\tif( is_array( $signal ) )\n\t\t{\n\t\t\t$emitent = $signal[0];\n\t\t\t$signal = $signal[1];\n\t\t\t\n\t\t\tif( is_object( $emitent ) )\n\t\t\t{\n\t\t\t\t$emitent = get_class( $emitent );\n\t\t\t}\n\t\t\t\n\t\t\t$signal = $emitent . '_' . $signal;\n\t\t}\n\t\t\n\t\t$GLOBALS['_RPC_']['signals'][$signal][] = array( 'type' => 'callback', 'slot' => $slot );\n\t}", "function checkSchedule($slot = \"\") {\n\t\t//$slotArray = explode()\n\t\treturn true;\n\t}", "private function registerAppCommands()\n {\n }", "function _getCommands()\n\t{\n\t\treturn array();\n\t}", "function do_button_out($rbuf)\r\n{\r\n\techo \"cmd: $rbuf\\r\\n\";\r\n\t$cmd = array();\r\n\t$cmd = explode(\" \", $rbuf, 2);\r\n\r\n\tif($cmd[0] == \"pwr\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"POWER button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"POWER button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, LOW);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n\telse if($cmd[0] == \"rst\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"RESET button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"RESET button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, LOW);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n}", "public function getCommandMap(): array\n {\n return [\n 'GetProducts' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductList',\n 'GetProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductGet',\n 'CreateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductCreate',\n 'UpdateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductUpdate',\n 'DeleteProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductDelete',\n 'GetLicenses' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\LicenseList'\n ];\n }", "function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}", "function procInstrArray($lineSplit) {\n\t$lineSplit[6] = mysql_real_escape_string($lineSplit[6]);\n\t$lineSplit[7] = mysql_real_escape_string($lineSplit[7]);\n\treturn $lineSplit;\n}", "public function _createCommands($btn,$rowPos)\n\t{\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_ADD);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_UPDATE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_DELETE_MULTI_2);\n\t\t$this->_setTemplateDefButtons(_html\\HtmlButton::_ACTION_CLOSE);\n\t}", "abstract protected function getCommandList();", "public function getCommands(): array;", "public function __toString()\n {\n $str = \"\\n---Remote Control---\\n\";\n for ($i=0; $i<=4; $i++) {\n $str .= \"\\nSlot[$i]\" . $this->onCommand[$i]->getName() . \" <===> \" . $this->offCommand[$i]->getName();\n }\n return $str;\n }", "private function _put_in($position, $handles)\n\t{\n\t\t$handles = (array) $handles;\n\n\t\tforeach ($handles as $handle)\n\t\t{\n\t\t\tif (!in_array($handle, $this->print_positions[$position]))\n\t\t\t\t$this->print_positions[$position][] = $handle;\n\t\t}\n\t}", "public function setup($slots = null) {\n $slots = $slots ?: $this->getSlots();\n\n $this->client->del($this->getSlotsQueueName());\n\n for ($i = 1; $i <= $slots; $i++) {\n $this->client->zadd($this->getSlotsQueueName(), 0, self::getSlotName($i));\n }\n }", "public function updateSlot(Slot $slot, SlotUpdateStruct $slotUpdateStruct): Slot;", "function parsePlaceInstruction($doc, $form, $body, $command) {\n\t\t$placeholder = $_POST[\"command\"];\n\n\t \t$div = $doc->createElement('div', $placeholder);\n\t \t$textEntry = $doc->createElement('p', $placeholder);\n\t \t// $div->appendChild($textEntry);\n\t \t$doc->appendChild($div);\n\t \t\n\t \t$instructionSet = new placementInstructions();\n\t \tif(strlen($command) < 5) {\n\t\t\techo \"string\";\n\t\t\t//Command too short \n\t\t\treturn;\n\t\t}\n\n\t\t$acceptedDirection = array('NORTH', 'SOUTH', 'EAST', 'WEST');\n\t\t\n\t\t$instructionSet = new placementInstructions();\n\t\t$commandArray = explode(\",\", $command);\n\t\t// echo count($commandArray);\n\n\t\tif(count($commandArray) < 2 || count($commandArray) > 3) {\n\t\t\t// At least 2 commas should be present in a command\n\t\t\treturn;\n\t\t}\n\n\t\tfor($i = 0; $i < count($commandArray); $i++) {\n\t\t\t$commandArray[$i] = str_replace(' ', '', $commandArray[$i]);\n\n\t\t\t// \"PLACE0\" split 1st coord from place\n\t\t\tif(strpos($commandArray[$i], 'PLACE') !== false) {\n\t\t\t\t$tempStr = $commandArray[$i];\n\t\t\t\t$tmpArray = explode(\"PLACE\", $commandArray[$i]);\n\t\t\t\t// $tempStr->str_replace('PLACE', '', $tempStr);\n\t\t\t\t// Put first coord in coord array.\n\t\t\t\tarray_unshift($instructionSet->coordinates, $tmpArray[1]);\n\t\t\t\t$instructionSet->place = true;\n\t\t\t} else if(in_array($commandArray[$i], $acceptedDirection)) {\n\t\t\t\t$instructionSet->facing = $commandArray[$i];\n\t\t\t\t//echo $facing;\n\t\t\t} else {\n\t\t\t\tarray_push($instructionSet->coordinates, $commandArray[$i]);\n\t\t\t}\n\t\t}\t\n\n\n\t\t//___________________PLACE, X, Y, F_________________\n\t\t// line needs to be comma separated\n\t\t// 4 elements ALWAYS\n\t\t// elements load in non-linearly so doesn't matter if its not the first element\n\t\t// HOwever, order in PLACE command itself must be rigidly followed\n\t\t//-------------------X & Y--------------------------\n\t\t// same line as PLACE\n\t\t// two numbers, single-digit\n\t\t// check if type is numbers\n\t\t// if(X > 0 && X < 5 ) && (Y > 0 && Y < 5 )\n\n\t\t//-------------------F------------------------------\n\t\t//Can only be string type\n\t\t//NORTH, SOUTH, EAST or WEST\n\t\t//Must be all-caps\n\t \t// $instructionSet = parseCommand($placeholder);\n\n\t \techo printStart($instructionSet);\n\t\t// $placeholder = $doc->getElementsByTagName('command')[0];\n\t\t// $formsToRemove = $doc->getElementById('cursor');\n\t\t// echo $formsToRemove->nodeValue;\n\t\t// foreach($formsToRemove as $form) {\n\t\t\t// $formParent = $formsToRemove->parentNode;\n\t\t\t// $formParent->removeChild($formsToRemove);\t\n\t\t// }\n\t\t\n\t\tsetAttr($doc, 'input', 'placeholder', 'Enter next Instructions');\n\n\t\t// $form = $doc->getElementsByTagName('command')[0];\n\t\t// setAttr($doc, 'input', 'placeholder', 'Enter next Instructions');\n\t\treturn $instructionSet;\n\t}", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setCoEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setCoRegion($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setCoNegocio($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCoDivision($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setCoTipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setCoCustodio($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setTxEtiquetaSti($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setCoEstado($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setTxNombreEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setTxFunsionEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setCoSo($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setTxEtiquetaActivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setTxSerialHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setTxMarcaHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setTxModeloHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setCoCiudad($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setCoEdificio($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setTxDireccionUbicacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setTxDetalleUbicacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setCoCentroDato($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setCoRack($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setTxUbicacionLlave($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setInRespaldoAutomatizado($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setInBloqueoInactividad($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setInAdiministradoresPersonalizados($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setInPoliticaPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\t$this->setInSincronizacionReloj($value);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\t$this->setInMonitoreado($value);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\t$this->setInInfActualizada($value);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\t$this->setInLogActivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\t$this->setCoNivelCriticidad($value);\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\t$this->setTxObservaciones($value);\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\t$this->setTxRutaRespaldoConfiguraciones($value);\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\t$this->setCoNumInventario($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function ga_service_add_slot()\n {\n $name = 'ga_service_custom_slots';\n $id = uniqid();\n ?>\n <tr>\n <td>\n <select name=\"<?php echo \"{$name}[{$id}][start]\"; ?>\">\n <?php\n foreach (get_ga_appointment_time() as $time => $text) {\n echo '<option value=' . $time . '>' . $text . '</option>';\n }\n ?>\n </select>\n </td>\n\n <td>\n <select name=\"<?php echo \"{$name}[{$id}][end]\"; ?>\">\n <?php\n foreach (get_ga_appointment_time($out = false, $_24 = true) as $time => $text) {\n echo '<option value=' . $time . '>' . $text . '</option>';\n }\n ?>\n </select>\n </td>\n\n <td>\n <?php\n foreach (array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday') as $key => $week) {\n $week_short = substr(ucfirst($week), 0, 1);\n echo \"<div class='ga_week_day'>\n\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t<input type='checkbox' name='{$name}[{$id}][availability][]' value='{$week}'>\n\t\t\t\t\t\t\t\t\t<span>{$week_short}</span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\";\n }\n ?>\n </td>\n\n <td>\n <select name=\"<?php echo \"{$name}[{$id}][capacity]\"; ?>\">\n <?php\n foreach (ga_services_capacity_options() as $num => $text) {\n echo '<option value=' . $num . '>' . $text . '</option>';\n }\n ?>\n </select>\n </td>\n\n <td>\n <?php echo gf_get_currency_symbol(); ?> <input type=\"text\" class=\"cmb2-text-small\" name=\"<?php echo \"{$name}[{$id}][price]\"; ?>\" id=\"\" value=\"\">\n </td>\n\n <td>\n <div class=\"slot-delete\">Delete</div>\n </td>\n </tr>\n\n<?php\n wp_die();\n }", "public function setup_usage_info(\\question_usage_by_activity $quba, int $slot) {\n $this->quba = $quba;\n $this->slot = $slot;\n\n $question = $this->quba->get_question($this->slot);\n\n if ($this->embedid->questionidnumber === '*') {\n if (empty($question->idnumber)) {\n throw new \\moodle_exception('questionnolongerhasidnumber', 'filter_embedquestion');\n }\n } else {\n if ($this->embedid->questionidnumber !== $question->idnumber) {\n throw new \\moodle_exception('questionidnumberchanged', 'filter_embedquestion', '',\n s($this->embedid->questionidnumber));\n }\n }\n if ($question->category != $this->category->id) {\n throw new \\moodle_exception('questionnolongerincategory', 'filter_embedquestion', '',\n s($this->embedid->categoryidnumber));\n }\n\n $this->synch_options_from_loaded_quba();\n }", "public function map($cmd) {\n\n\t\t/**\n\t\t * Who are you?\n\t\t * help\n\t\t * h\n\t\t */\n\t\tif( preg_match(\"/who are you/i\", $cmd) === 1 ||\n\t\t\tpreg_match(\"/help/i\", $cmd) === 1 ||\n\t\t\tstrtolower($cmd) === \"h\" ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Basics\",\n\t\t\t\t\"action\" => \"help\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * q or Q\n\t\t */\n\t\tif( strtolower($cmd) === \"q\" ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Basics\",\n\t\t\t\t\"action\" => \"quickCommands\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * pure integers will get caughts, since we expect them to be a quick command\n\t\t */\n\t\tif( is_numeric($cmd) ) {\n\n\t\t\ttry {\n\t\t\t\t$realCommand = \\Rita\\Modules\\Basics::getCommandByNumber(intval($cmd), $this->userConfig);\n\t\t\t\treturn $this->map($realCommand);\n\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\treturn array(\n\t\t\t\t\t\"module\" => \"Basics\",\n\t\t\t\t\t\"action\" => \"notAbleToFindCommand\",\n\t\t\t\t\t\"params\" => array(\n\t\t\t\t\t\t\"input\" => intval($cmd)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * =======================================================\n\t\t * Weather\n\t\t * =======================================================\n\t\t */\n\n\t\t/**\n\t\t * How is the current weather?\n\t\t */\n\t\t$matches = array();\n\t\tif( preg_match(\"/current/i\", $cmd, $matches) === 1 && preg_match(\"/weather/i\", $cmd, $matches) === 1) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Weather\",\n\t\t\t\t\"action\" => \"current\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * How will the weather be the next days?\n\t\t */\n\t\t$matches = array();\n\t\tif( (preg_match(\"/next/i\", $cmd, $matches) === 1 || preg_match(\"/forecast/i\", $cmd, $matches) === 1) &&\n\t\t preg_match(\"/weather/i\", $cmd, $matches) === 1) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Weather\",\n\t\t\t\t\"action\" => \"nextDays\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * =======================================================\n\t\t * Zimbra & Meeting mappings\n\t\t * =======================================================\n\t\t */\n\n\t\t/**\n\t\t * What is the plan for this week?\n\t\t */\n\t\tif( preg_match(\"/this week/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t\t\t\t\"action\" => \"forThisWeek\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is the plan for next week?\n\t\t */\n\t\tif( preg_match(\"/next week/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t\t\t\t\"action\" => \"forNextWeek\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is the plan for next Monday/Tuesday/...\n\t\t */\n\t\t$matches = array();\n\t\tif( preg_match(\"/next (Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)/i\", $cmd, $matches) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t \"action\" => \"byDate\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"day\" => date(\"Y-m-d\", strtotime(\"next \".$matches[1]))\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is the next event now?\n\t\t */\n\t\tif( preg_match(\"/next/i\", $cmd) === 1 ||\n\t\t preg_match(\"/now/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t\t\t\t\"action\" => \"nextUpcoming\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is going on today?\n\t\t */\n\t\tif( preg_match(\"/today/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t \"action\" => \"byDate\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"day\" => date(\"Y-m-d\")\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is going on tomorrow?\n\t\t */\n\t\tif( preg_match(\"/tomorrow/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t \"action\" => \"byDate\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"day\" => date(\"Y-m-d\", strtotime(\"+1 day\"))\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is going on 2016-12-02?\n\t\t */\n\t\t$matches = array();\n\t\tif( preg_match(\"/on (.*)\\?/i\", $cmd, $matches) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Events\",\n\t \"action\" => \"byDate\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"day\" => date(\"Y-m-d\", strtotime($matches[1]))\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * =======================================================\n\t\t * Graylog\n\t\t * =======================================================\n\t\t */\n\t\tif( preg_match(\"/server/i\", $cmd) === 1 ||\n\t\t\tpreg_match(\"/error/i\", $cmd) === 1 ||\n\t\t preg_match(\"/state/i\", $cmd) === 1 ) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Server\",\n\t\t\t\t\"action\" => \"overview\",\n\t\t\t\t\"params\" => array()\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * =======================================================\n\t\t * Wikipedia\n\t\t * =======================================================\n\t\t */\n\n\t\t/**\n\t\t * Who is Albert Einstein?\n\t\t */\n\t\t$matches = array();\n\t\tif( preg_match(\"/who is (.*)\\?/i\", $cmd, $matches) === 1) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Wikipedia\",\n\t\t\t\t\"action\" => \"search\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"q\" => $matches[1]\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * What is fruit?\n\t\t * What is a banana?\n\t\t * What is an apple?\n\t\t */\n\t\t$matches = array();\n\t\tif( preg_match(\"/what is( a| an)? (.*)\\?/i\", $cmd, $matches) === 1) {\n\t\t\treturn array(\n\t\t\t\t\"module\" => \"Wikipedia\",\n\t\t\t\t\"action\" => \"search\",\n\t\t\t\t\"params\" => array(\n\t\t\t\t\t\"q\" => $matches[2]\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * default is nothing\n\t\t */\n\t\treturn array();\n\t}", "public function addAt() {\n\t\t$at = json_decode(Flight::request()->query['at'],true);\n\t\t$date = date('H:i Y-m-d', $at['d']);\n\t\tswitch ($at['t']) {\n\t\t\tcase 'on': exec('at '.$date.' -q A -f /srv/www/home.fr/public/conf/aton.txt'); break;\n\t\t\tcase 'off': exec('at '.$date.' -q B -f /srv/www/home.fr/public/conf/atoff.txt'); break;\n\t\t\tcase 'tts': exec('at '.$date.' -q C -f /srv/www/home.fr/public/conf/attts.txt'); break;\n\t\t}\n\t\tFlight::json(array('Status' => 'OK','At' => $date, 'Type' => $at['t']));\n\t}", "abstract function command();", "function adace_before_content_slot_option( $slot_fields, $adace_ad_slot ) {\n\tif ( adace_get_before_content_slot_id() !== $adace_ad_slot['id'] ) {\n\t\treturn $slot_fields;\n\t}\n\t$slot_fields['wrap_the_content'] = esc_html__( 'Wrap the text around the ad ', 'adace' );\n\treturn $slot_fields;\n}", "function eventclass_slot()\n\t{\n\n//\tonscreen events\n\n\t}", "public function updateBuyOrderStatusAndCreatePosition()\n {\n $orders = $this->orderService->getOpenBuyOrders();\n\n if (count($orders)) {\n $this->msg[] = $this->timestamp . ' .... <info>updateBuyOrderStatusAndCreatePosition</info>';\n foreach ($orders as $order) {\n /** @var \\GDAX\\Types\\Response\\Authenticated\\Order $gdaxOrder */\n $gdaxOrder = $this->gdaxService->getOrder($order['order_id']);\n // Mocken\n\n $position_id = 0;\n $status = $gdaxOrder->getStatus();\n\n if ($status) {\n if ($status == 'done') {\n $position_id = $this->positionService->open($gdaxOrder->getId(), $gdaxOrder->getSize(), $gdaxOrder->getPrice());\n $this->msg[] = $this->timestamp . ' .... <info>Opend position</info>';\n }\n\n $this->orderService->updateOrderStatus($order['id'], $gdaxOrder->getStatus(), $position_id);\n } else {\n $this->orderService->updateOrderStatus($order['id'], $gdaxOrder->getMessage(), $position_id);\n }\n }\n }\n }", "public function setAdTagPositionForLibraryAdSlot(LibraryDisplayAdSlotInterface $libraryAdSlot, array $newAdTagOrderIds);", "function defCmdT($idx, $title, $command, $has_filter = false, $header_size = 0) {\n\tglobal $commands;\n\t$title = htmlspecialchars($title, ENT_NOQUOTES);\n\t$commands[$idx] = array(\n\t\t'title' => $title,\n\t\t'command' => $command,\n\t\t'has_filter' => $has_filter,\n\t\t'header_size' => $header_size);\n}", "public function getAvailableCommands() {}", "public function _AT(string $cmd): string\n {\n // $chrPos is a int;\n // $cmdLen is a int;\n // $waitMore is a int;\n // $res is a str;\n // $buff is a bin;\n // $bufflen is a int;\n // $buffstr is a str;\n // $buffstrlen is a int;\n // $idx is a int;\n // $suffixlen is a int;\n // quote dangerous characters used in AT commands\n $cmdLen = strlen($cmd);\n $chrPos = YAPI::Ystrpos($cmd,'#');\n while ($chrPos >= 0) {\n $cmd = sprintf('%s%c23%s', substr($cmd, 0, $chrPos), 37,\n substr($cmd, $chrPos+1, $cmdLen-$chrPos-1));\n $cmdLen = $cmdLen + 2;\n $chrPos = YAPI::Ystrpos($cmd,'#');\n }\n $chrPos = YAPI::Ystrpos($cmd,'+');\n while ($chrPos >= 0) {\n $cmd = sprintf('%s%c2B%s', substr($cmd, 0, $chrPos), 37,\n substr($cmd, $chrPos+1, $cmdLen-$chrPos-1));\n $cmdLen = $cmdLen + 2;\n $chrPos = YAPI::Ystrpos($cmd,'+');\n }\n $chrPos = YAPI::Ystrpos($cmd,'=');\n while ($chrPos >= 0) {\n $cmd = sprintf('%s%c3D%s', substr($cmd, 0, $chrPos), 37,\n substr($cmd, $chrPos+1, $cmdLen-$chrPos-1));\n $cmdLen = $cmdLen + 2;\n $chrPos = YAPI::Ystrpos($cmd,'=');\n }\n $cmd = sprintf('at.txt?cmd=%s',$cmd);\n $res = sprintf('');\n // max 2 minutes (each iteration may take up to 5 seconds if waiting)\n $waitMore = 24;\n while ($waitMore > 0) {\n $buff = $this->_download($cmd);\n $bufflen = strlen($buff);\n $buffstr = $buff;\n $buffstrlen = strlen($buffstr);\n $idx = $bufflen - 1;\n while (($idx > 0) && (ord($buff[$idx]) != 64) && (ord($buff[$idx]) != 10) && (ord($buff[$idx]) != 13)) {\n $idx = $idx - 1;\n }\n if (ord($buff[$idx]) == 64) {\n // continuation detected\n $suffixlen = $bufflen - $idx;\n $cmd = sprintf('at.txt?cmd=%s', substr($buffstr, $buffstrlen - $suffixlen, $suffixlen));\n $buffstr = substr($buffstr, 0, $buffstrlen - $suffixlen);\n $waitMore = $waitMore - 1;\n } else {\n // request complete\n $waitMore = 0;\n }\n $res = sprintf('%s%s', $res, $buffstr);\n }\n return $res;\n }", "protected function registerActiveInstanceCommands()\n {\n // API wrapper commands\n $this->add(new SearchReindexCommand());\n $this->add(new SearchStatusCommand());\n $this->add(new SearchFieldsCommand());\n $this->add(new ElasticsearchQueueCommand());\n $this->add(new ElasticsearchRoutingCommand());\n $this->add(new ElasticsearchIndicesCommand());\n\n // Legacy commands\n $this->add(new CronCommand($this->logger, $this->config, \\SugarMetric_Manager::getInstance()));\n }", "abstract public function OnCall(Command $command);", "function setOffset ($offSet, $newOffset) {\r\n $offSet = $offSet + $newOffset; \r\n return $offSet;\r\n}", "public function check($slots = null) {\n $slots = $slots ?: $this->getSlots();\n $queueKey = $this->getSlotsQueueName();\n\r\n // set a watch on the $queueKey\r\n $this->client->watch($queueKey);\n\r\n // start transaction\r\n $tx = $this->client->multi();\r\n\r\n // removed the slot from the $queueKey\r\n $this->client->zcard($queueKey);\r\n\r\n // execute the transaction\r\n $results = $this->client->exec();\n\n if ($results[0] > $slots) {\n $rem = $results[0] - $slots;\n echo \"we need to remove [{$rem}] slots \\n\";\n\n $this->client->zremrangebyrank($queueKey, 0, $rem-1);\n } else if ($results[0] < $slots) {\n $add = $slots - $results[0];\n\n echo \"we need to add [{$add}] slots \\n\";\n\r\n for ($i = 0; $i < $add; $i++) {\n $this->client->zadd($queueKey, 0, self::getSlotName($i));\r\n }\n }\n }", "public function addCommands(array $commands);", "public function addCommands(array $commands);", "public function getSlots() :array\n {\n return $this->slots;\n }", "function getPosition() ;", "function adace_after_paragraph_3_slot_option( $slot_fields, $adace_ad_slot ) {\n\tif ( adace_get_after_paragraph_3_slot_id() !== $adace_ad_slot['id'] ) {\n\t\treturn $slot_fields;\n\t}\n\t$slot_fields['wrap_the_content'] = esc_html__( 'Wrap the text around the ad ', 'adace' );\n\t$slot_fields['after_x_paragraph'] = esc_html__( 'Show after X paragraphs', 'adace' );\n\n\treturn $slot_fields;\n}", "public function getCommands();", "function motor_status() {\n // Read pin values.\n $leftPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . LEFT_PIN));\n $rightPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . RIGHT_PIN));\n $forwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . FORWARD_PIN));\n $backwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . BACKWARD_PIN));\n\n $status = array();\n\n // Get status of front motor.\n if (($leftPinVal == 0 && $rightPinVal == 0) || ($leftPinVal == 1 && $rightPinVal == 1)) {\n $status['front'] = 'neutral';\n }\n else if ($leftPinVal == 1 && $rightPinVal == 0) {\n $status['front'] = 'left';\n }\n else {\n $status['front'] = 'right';\n }\n\n // Get status of back motor.\n if (($forwardPinVal == 0 && $backwardPinVal == 0) || ($forwardPinVal == 1 && $backwardPinVal == 1)) {\n $status['back'] = 'neutral';\n }\n else if ($forwardPinVal == 1 && $backwardPinVal == 0) {\n $status['back'] = 'forward';\n }\n else {\n $status['back'] = 'backward';\n }\n\n return $status;\n}", "static public function parse_commands($input)\n\t{\n\t\t$commands = array();\n\n\t\tforeach ($input as $k => $c)\n\t\t{\n\t\t\t// if we're dealing string as parameter or an assoc array\n\t\t\tif ( ! is_array($c) OR count(array_filter(array_keys($c), 'is_string')) > 0)\n\t\t\t{\n\t\t\t\t$commands[] = array('name' => $k, 'param' => $c);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// if multiple command instances were defined (non-assoc array)\n\t\t\t\tforeach ($c as $p)\n\t\t\t\t{\n\t\t\t\t\t$commands[] = array('name' => $k, 'param' => $p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $commands;\n\t}", "protected function buildCommandsIndex() {}", "public function getCommandMap(): array;", "function trigger_hook ($trigger_id, $command)\n{\nif ($trigger_id == 1 && $command == 1) {\n\t// action to do on trigger 1 enable event\n\t//error_log (\"@@@@@@@@@@@@@@@@@@Trigger 1 enable event\");\n\n\tprocess_custom_pin_hook (101, 1); // enable pin 101\n\t// mark start time\n\t$timestamp_now = microtime(true);\n\tapc_store('internet_on_timestamp',$timestamp_now);\n\n lock_pin(101);\n\n}\nif ($trigger_id == 1 && $command == 0) {\n\t// action to do on trigger 1 enable event\n\t//error_log (\"@@@@@@@@@@@@@@@@@@Trigger 1 disable event\");\n\n\tprocess_custom_pin_hook (101, 0);// disable pin 101\n unlock_pin(101);\n}\nif ($trigger_id == 3 && $command == 1) {\n\t// action to do on trigger 1 enable event\n\t//error_log (\"@@@@@@@@@@@@@@@@@@Trigger 1 enable event\");\n\n\t// mark start time\n\t$timestamp_now = microtime(true);\n\tapc_store('trigger_laistisana_start_timestamp',$timestamp_now);\n\n}\n\n\n}", "public function getOffArray($create = false) {}", "public function generateCommands();", "public function insert(TimeSlot $slot, ?int $position): void\n {\n if ($position === null || $position < 0) {\n $this->collection[] = $slot;\n return;\n }\n\n array_splice($this->collection, $position, 0, [$slot]);\n }", "function get_slots_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$where.=\" and a.slot_type=b.id\";\n\t\t$data= $this->select_query(\"slot_master a,slot_type b\",\"a.id,a.name,a.amount,a.hours,a.color,a.status,b.name as type_name,a.grace_period\",$where.\" and a.slot_type=b.id \",$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public function getHandledCommands(): array\n {\n return ['wotd'];\n }", "function pawn($original_position, $new_position){\n\t\t//if($vector == 1 move ahead\n\t\t//X movement\n\t\t//Y movement\n\t\t//E2 to E4\n\t\t//E minus the E\n\t\t//4 minus 2\n\t\n\t}", "private function searchActivity($slot,$date)\n {\n $str=\"\";\n foreach ($this->data as $item) {\n $t = str_replace(\"-\",\"/\",$item[\"DDATE\"]);\n if (str_replace(\"-\",\"/\",$item[\"DDATE\"])==$date AND $item[\"SLOT\"]==$slot){\n if (strlen($str)>0)$str.= \"</br>\";\n\n $tmp[\"id\"] = $item[\"ID\"];\n $sha1=sha1(serialize($tmp));\n $this->cellsItem[$sha1]=$tmp; \n\n $onclick= \"onclick=\\\"request(check,'removeCell=\".$sha1.\"')\\\"\";\n $str.= \"<a $onclick href=\\\"#\\\">\".$item[\"TITLE\"] .\" (\".$item[\"CODE\"].\")</a>\";\n }\n }\n\n return $str;\n }", "public function __construct\n (\n array $input_parts\n )\n {\n if (count($input_parts) < 1 || count($input_parts) > 4) {\n throw new InvalidCommandException('Invalid number of parts for a command '.print_r($input_parts, true));\n }\n\n // Validate that all parts of the input has to be number\n foreach ($input_parts as $part) {\n if (!is_numeric($part)) {\n throw new InvalidCommandException('Command contains parts that are not numeric '.print_r($input_parts, true));\n }\n }\n\n // Get the value of the command number\n $potential_command_number = intval($input_parts[0]);\n\n // Make sure to validate the command number\n if (!$this->validateCommandNumber($potential_command_number)) {\n throw new InvalidCommandException('Invalid command number '.$potential_command_number);\n }\n\n // Store the command number\n $this->opcode = $potential_command_number;\n\n if ($this->opcode === self::COMMAND_HALT) {\n // It's a command to halt, nothing needed further\n return;\n } else {\n // It's either an add or multiply command\n if (count($input_parts) !== 4) {\n throw new InvalidCommandException('Not enough parts for command '.print_r($input_parts));\n }\n\n // Store the parts of the command\n $this->operant1 = intval($input_parts[1]);\n $this->operant2 = intval($input_parts[2]);\n $this->target_position = intval($input_parts[3]);\n }\n }", "function newCommands($input){\n $output = dbcCmd(\"newCommands\\n\".$input);\n return str_replace(\"\\n\",\"\",$output[\"stdout\"]);\n}", "protected final function slotInit()\n\t{\n\t\t\t// nothing to do here\n\t}", "function updateBracket($con, $input, $spot)\n{\n mysqli_query($con,\"UPDATE ro16 \"\n . \"SET name = '$input' \"\n . \"WHERE spot='$spot'\");\n}", "function msg_processing_commands($context) {\n if($context->is_callback()) {\n if(isset($context->memory[MYGAMES_SWITCH_KEY])) {\n if(!$context->verify_callback()) {\n return false;\n }\n\n if(preg_match_all('/^switch (\\d*) (0|1)$/', $context->callback->data, $matches, PREG_PATTERN_ORDER) >= 1) {\n $target_id = intval($matches[1][0]);\n $target_admin = (bool)$matches[2][0];\n\n Logger::info(\"Switching to game #{$target_id} as admin \" . b2s($target_admin), __FILE__, $context);\n\n $context->set_active_game($target_id, $target_admin);\n\n $context->comm->reply(\"Done!\");\n }\n\n $context->memory[MYGAMES_SWITCH_KEY] = null;\n\n return true;\n }\n }\n\n else if($context->is_message()) {\n $text = $context->message->text;\n\n // HELP\n if($text === '/help') {\n $context->comm->reply(__('cmd_help'));\n\n return true;\n }\n // START\n else if(starts_with($text, '/start')) {\n $payload = extract_command_payload($text);\n\n Logger::debug(\"Start command with payload '{$payload}'\", __FILE__, $context);\n\n if($payload === '') {\n // Naked /start message\n if($context->game && $context->game->group_state) {\n $context->comm->reply(__('cmd_start_registered'));\n\n msg_processing_handle_group_state($context);\n }\n else {\n $context->comm->reply(__('cmd_start_new'));\n }\n }\n else if($payload === 'test') {\n // Test message from docs website\n $context->comm->reply(__('cmd_test'));\n }\n else {\n $code_info = db_row_query(sprintf(\n \"SELECT `type`, `event_id`, `game_id`, `location_id`, `is_disabled` FROM `code_lookup` WHERE `code` = '%s'\",\n db_escape($payload)\n ));\n\n if($code_info === false) {\n $context->comm->reply(__('failure_general'));\n return true;\n }\n if($code_info == null) {\n Logger::warning(\"Unknown /start payload received: '{$payload}'\", __FILE__, $context);\n $context->comm->reply(__('cmd_start_wrong_payload'));\n return true;\n }\n else if($code_info[4] == 1) {\n // Code has been disabled\n $context->comm->reply(__('cmd_start_wrong_payload'));\n return true;\n }\n\n Logger::debug(\"Code '{$payload}' for {$code_info[0]} scanned\", __FILE__, $context);\n\n $event_id = intval($code_info[1]);\n $game_id = intval($code_info[2]);\n $location_id = intval($code_info[3]);\n\n switch($code_info[0]) {\n case 'creation':\n Logger::debug(\"Creation code scanned for event #{$event_id}\", __FILE__, $context);\n\n msg_processing_init_game_creation($context, $event_id);\n\n break;\n\n case 'registration':\n Logger::debug(\"Registration code scanned for game #{$game_id}\", __FILE__, $context);\n\n $result = bot_register($context, $game_id);\n if($result === true) {\n $context->comm->reply(__('cmd_register_confirm'));\n msg_processing_handle_group_state($context);\n }\n else if($result === 'already_registered') {\n $context->comm->reply(__('cmd_register_registered'));\n msg_processing_handle_group_state($context);\n }\n else if($result === 'unallowed_event_not_ready') {\n $context->comm->reply(__('cmd_register_game_unallowed_event_not_ready'));\n }\n else if($result === 'unallowed_event_over') {\n $context->comm->reply(__('cmd_register_game_unallowed_event'));\n }\n else if($result === 'unallowed_game_over') {\n $context->comm->reply(__('cmd_register_game_unallowed'));\n }\n else if($result === 'unallowed_game_not_ready') {\n $context->comm->reply(__('cmd_register_game_unallowed_not_ready'));\n }\n else {\n $context->comm->reply(__('failure_general'));\n }\n break;\n\n case 'location':\n Logger::debug(\"Location code scanned for location #{$location_id}, game #{$game_id}\", __FILE__, $context);\n\n $result = bot_reach_location($context, $location_id, $game_id);\n if($result === false) {\n $context->comm->reply(__('failure_general'));\n }\n else if($result === 'unexpected') {\n $context->comm->reply(__('cmd_start_location_unexpected'));\n }\n else if($result === 'wrong') {\n $context->comm->reply(__('cmd_start_location_wrong'));\n }\n else if($result === 'unallowed_event_not_ready') {\n $context->comm->reply(__('failure_event_not_ready'));\n }\n else if($result === 'unallowed_event_over') {\n $context->comm->reply(__('failure_event_over'));\n }\n else if($result === 'unallowed_game_not_ready') {\n $context->comm->reply(__('failure_game_not_ready'));\n }\n else if($result === 'unallowed_game_over') {\n $context->comm->reply(__('failure_game_dead'));\n }\n else {\n if($result === 'first') {\n $context->comm->reply(__('cmd_start_location_reached_first'));\n }\n else if($result === 'last') {\n $context->comm->reply(__('cmd_start_location_reached_last'));\n }\n else {\n $context->comm->reply(__('cmd_start_location_reached'));\n }\n\n msg_processing_handle_group_state($context);\n }\n break;\n\n case 'victory':\n Logger::debug(\"Victory code scanned for game #{$game_id}, event #{$event_id}\", __FILE__, $context);\n\n msg_process_victory($context, $event_id, $game_id);\n\n break;\n\n default:\n Logger::error(\"Code '{$payload}' matches unknown type {$code_info[0]}\", __FILE__, $context);\n\n $context->comm->reply(__('cmd_start_wrong_payload'));\n\n break;\n }\n }\n\n return true;\n }\n // STATUS\n else if($text === '/status') {\n if(!$context->game) {\n $context->comm->reply(\"You are new to me. Hello! 🙂\");\n return true;\n }\n\n $status = \"%FIRST_NAME%, you are \" . (($context->game->is_admin) ? '<b>administering</b>' : 'playing') . \" game <code>#%GAME_ID%</code> “%GAME_NAME%”, in the event <code>#%EVENT_ID%</code> “%EVENT_NAME%”.\\n\";\n\n if($context->game->is_admin) {\n $status .= 'The game is <code>' . map_state_to_string(GAME_STATE_READABLE_MAP, $context->game->game_state) . '</code>.';\n }\n else {\n $status .= 'Your team “%GROUP_NAME%” is in state: <code>' . map_state_to_string(STATE_READABLE_MAP, $context->game->group_state) . '</code>.';\n }\n\n $context->comm->reply($status);\n\n return true;\n }\n // MY GAMES\n else if($text === '/mygames') {\n $games = bot_get_associated_games($context);\n\n $text = '';\n $game_keyboard = array();\n $seen_admin = false;\n $seen_player = false;\n $i = 0;\n foreach($games as $game) {\n if($game[3] && !$seen_admin) {\n $seen_admin = true;\n $text .= \"👑 <b>Administered games:</b>\\n\";\n }\n if(!$game[3] && !$seen_player) {\n $seen_player = true;\n $text .= \"👤 <b>Played games:</b>\\n\";\n }\n\n $text .= \"<code>#{$game[0]}</code> \" . (($game[1]) ? \"“{$game[1]}”\" : \"No name\") . \" (\" . map_state_to_string(GAME_STATE_READABLE_MAP, $game[2]) . \")\";\n if($context->game->game_id == $game[0] && $context->game->is_admin == $game[3]) {\n $text .= \" ✅\";\n }\n\n $text .= \"\\n\";\n\n if($i % 3 == 0) {\n $game_keyboard[] = array();\n }\n $game_keyboard[sizeof($game_keyboard) - 1][] = array(\n 'text' => (($game[3]) ? '👑 Admin #' : '👤 Play #') . $game[0],\n 'callback_data' => \"switch {$game[0]} \" . (int)$game[3]\n );\n $i++;\n }\n\n $text .= \"\\nTo which game do you want to switch?\";\n\n $context->memorize_callback($context->comm->reply($text, null, array(\n 'reply_markup' => array(\n 'inline_keyboard' => $game_keyboard\n )\n )));\n\n $context->memory[MYGAMES_SWITCH_KEY] = true;\n\n return true;\n }\n }\n\n return false;\n}", "public function addCmds($cmds)\n {\n $this->cmds = $cmds;\n }", "function getCommandFrame($a_cmd)\n\t{\n\t\treturn parent::getCommandFrame($a_cmd);\n\t}", "public function enableOffset();", "function set_op_vars()\n{\n global $opname, $action, $basecost;\n\n $action[1] = \"recon\";\n $opname[1] = \"Recon\";\n $basecost[1] = 1;\n\n $action[2] = \"sneak\";\n $opname[2] = \"Sneak\";\n $basecost[2] = 1;\n\n $action[3] = \"intercept\";\n $opname[3] = \"Intercept\";\n $basecost[3] = 1;\n\n $action[4] = \"bribe\";\n $opname[4] = \"Bribe Accountant\";\n $basecost[4] = 1;\n\n $action[5] = \"truth\";\n $opname[5] = \"Truth's Eye\";\n $basecost[5] = 1;\n\n $action[6] = \"farm\";\n $opname[6] = \"Weather's Light\";\n $basecost[6] = 0;\n\n $action[7] = \"poison\";\n $opname[7] = \"Poison Water\";\n $basecost[7] = 14;\n\n $action[8] = \"money\";\n $opname[8] = \"Templu Amplo\";\n $basecost[8] = 0;\n\n $action[9] = \"arson\";\n $opname[9] = \"Arson\";\n $basecost[9] = 20;\n\n $action[10] = \"trap\";\n $opname[10] = \"Thieves Trap (SELF)\";\n $basecost[10] = 4;\n\n $action[11] = \"boze\";\n $opname[11] = \"Boze\";\n $basecost[11] = 20;\n\n $action[12] = \"monitoring\";\n $opname[12] = \"Monitoring\";\n $basecost[12] = 12;\n\n $action[13] = \"tunneling\";\n $opname[13] = \"Tunneling (WAR ONLY)\";\n $basecost[13] = 10;\n\n $action[14] = \"rebellion\";\n $opname[14] = \"Thieves Rebellion\";\n $basecost[14] = 10;\n\n $action[15] = \"raid\";\n $opname[15] = \"Hwighton Raid\";\n $basecost[15] = 20;\n\n $action[16] = \"research\";\n $opname[16] = \"Napanometry\";\n $basecost[16] = 0;\n \n $action[17] = \"ambush\";\n $opname[17] = \"Ambush\";\n $basecost[17] = 280;\n\n}", "public function getCommands()\n {\n return [\n ];\n }", "public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function addPipe($x,$y,$index){\n $steam = $this->game->getGrid()[$y][$x];\n $player = $this->game->get_current_turn();\n if($this->game->get_current_turn()==$this->game->getPlayer1() ){ //check if the it is the player 1 want to add the pipe or player 2\n $pipe = $this->game->getPlayer1()->ReturnStock()[$index];\n $newpipe = new TilePipe($x,$y,$pipe->ReturnType(),$this->game->getPlayer1()->ReturnName()); //generate a new pipe with the same coordination of steam where you want to add the pipe\n while ($pipe->GetDirection()!=$newpipe->GetDirection()){\n $newpipe->Rotate(); //rotate the new pipe until it have same direction as the pipe in stock array\n }\n if ($this->game->getPlayer1()->Connected($newpipe,$steam)){\n //we only allow to put pipe that are connect to the previous one\n\n\n $this->game->addPipe($this->game->getPlayer1(),$newpipe);\n $games = new Games($this->site);\n $games->addPipe($this->game->getGameId(),$newpipe);\n $this->game->getPlayer1()->ReplaceStock($this->game->RandomPipe($player->ReturnName()),$index);\n $this->game->set_current_turn($this->game->getPlayer2());\n\n $this->game->UpdateStatus();\n\n //update the status\n\n return true;\n }else{\n return false;\n }\n }else{\n $pipe = $this->game->getPlayer2()->ReturnStock()[$index];\n $newpipe = new TilePipe($x,$y,$pipe->ReturnType(),$this->game->getPlayer2()->ReturnName());\n while ($pipe->GetDirection()!=$newpipe->GetDirection()){\n $newpipe->Rotate();\n }\n if ($this->game->getPlayer2()->Connected($newpipe,$steam)){\n $this->game->addPipe($this->game->getPlayer2(),$newpipe);\n $games = new Games($this->site);\n $games->addPipe($this->game->getGameId(),$newpipe);\n $this->game->getPlayer2()->ReplaceStock($this->game->RandomPipe($player->ReturnName()),$index);\n $this->game->UpdateStatus();\n $this->game->set_current_turn($this->game->getPlayer1());\n //update the status\n\n return true;\n }else{\n return false;\n }\n }\n return false;\n }", "function packSTYLECHANGERECORD($StateNewStyles, $StateLineStyle, $StateFillStyle1, $StateFillStyle0, $StateMoveTo, $MoveDeltaX, $MoveDeltaY, $nFillBits, $nLineBits, $FillStyle0, $FillStyle1, $LineStyle, $FillStyles, $LineStyles, $NumFillBits, $NumLineBits)\n\t{\n#error_log(\"statennewstyles: $StateNewStyles, statelinestyle: $StateLineStyle, statefillstyle1: $StateFillStyle1, statefillstyle0: $StateFillStyle0, statemoveto: $StateMoveTo, movedeltaX: $MoveDeltaX, movedeltay: $MoveDeltaY, nfillbits: $nFillBits, nlinebits: $nLineBits, fillstyle0: $FillStyle0, fillstyle1: $FillStyle1, linestyle: $LineStyle, fillstyles: $FillStyles, linestyles: $LineStyles, numfillbits: $NumFillBits, numlinebits: $NumLineBits\");\n#error_log(\"nFillBits: $nFillBits\");\n#error_log(\"nLineBits: $nLineBits\");\n\t\tarray_push($this->FMDebug, \"packSTYLECHANGERECORD\");\n\n\t\t$atom = array(\"Bitstream\" => \"\", \"Bytestream\" => \"\");\n\t\t$atom[\"Bitstream\"] .= \"0\";\n\n\t\t$atom[\"Bitstream\"] .= sprintf(\"%1d\", $StateNewStyles);\n\t\t$atom[\"Bitstream\"] .= sprintf(\"%1d\", $StateLineStyle);\n\t\t$atom[\"Bitstream\"] .= sprintf(\"%1d\", $StateFillStyle1);\n\t\t$atom[\"Bitstream\"] .= sprintf(\"%1d\", $StateFillStyle0);\n\t\t$atom[\"Bitstream\"] .= sprintf(\"%1d\", $StateMoveTo);\n\n\t\tif ($StateMoveTo == 1) {\n\n\t\t\t$MoveDeltaX = $this->packSBchunk($MoveDeltaX); \n\t\t\t$MoveDeltaY = $this->packSBchunk($MoveDeltaY);\n\n\t\t\t$MoveBits = (int) max(strlen($MoveDeltaX), strlen($MoveDeltaY));\n\t\t\t$nMoveBits = $this->packnBits($MoveBits, 5);\n\n\t\t\t$MoveDeltaX = str_repeat(substr($MoveDeltaX, 0, 1), ($MoveBits - strlen($MoveDeltaX))) . $MoveDeltaX;\n\t\t\t$MoveDeltaY = str_repeat(substr($MoveDeltaY, 0, 1), ($MoveBits - strlen($MoveDeltaY))) . $MoveDeltaY;\n\n\t\t\t$atom[\"Bitstream\"] .= $nMoveBits . $MoveDeltaX . $MoveDeltaY;\n\t\t}\n\n\t\tif ($StateFillStyle0) {\n\n\t\t\t$atom[\"Bitstream\"] .= $this->packnBits($FillStyle0, $nFillBits);\n\t\t} \n\n\t\tif ($StateFillStyle1) {\n\n\t\t\t$atom[\"Bitstream\"] .= $this->packnBits($FillStyle1, $nFillBits);\n\t\t} \n\n\t\tif ($StateLineStyle) {\n\n\t\t\t$atom[\"Bitstream\"] .= $this->packnBits($LineStyle, $nLineBits);\n\t\t\t#error_log($this->packnBits($LineStyle, $nLineBits));\n\t\t\t#error_log(\"here?\");\n\t\t} \n\n\t\tif ($StateNewStyles) {\n\n\t\t\t$atom[\"Bytestream\"] = $FillStyles . $LineStyles . $this->packUI8((int)($this->packnBits($NumFillBits, 4) . $this->packnBits($NumLineBits, 4)));\n\t\t} \n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $atom;\n\t}", "public function _getCommands()\n\t{\n\t\t$commands\t= array();\n\t\t$commands[] = array(\"permission\" => \"read\", \"cmd\" => \"view\", \"lang_var\" => \"enter\", \"default\" => true);\n\t\t$commands[] = array(\"permission\" => \"write\", \"cmd\" => \"settings-general\", \"lang_var\" => \"settings\");\n\t\t\n\t\t// alex 3 Oct 2012: this leads to a blank screen, i guess it is a copy/paste bug from files\n\t\t//$commands[] = array(\"permission\" => \"write\", \"cmd\" => \"versions\", \"lang_var\" => \"versions\");\n\n\t\treturn $commands;\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setOpPrimeId($value);\n break;\n case 1:\n $this->setOpId($value);\n break;\n case 2:\n $this->setOpPrimeLibelle($value);\n break;\n case 3:\n $this->setOpPrimeNumero($value);\n break;\n case 4:\n $this->setGdlArtId($value);\n break;\n case 5:\n $this->setOperationPrimeCurrencyId($value);\n break;\n case 6:\n $this->setOperationPrimeRRewardTypeId($value);\n break;\n case 7:\n $this->setOperationPrimeRRewardExpeditionModeId($value);\n break;\n case 8:\n $this->setOperationPrimeRRewardTransporterId($value);\n break;\n case 9:\n $this->setOperationPrimeFixedAmount($value);\n break;\n case 10:\n $this->setOperationPrimeProductPricePourcentage($value);\n break;\n case 11:\n $this->setOperationPrimeMaximumAmount($value);\n break;\n } // switch()\n }", "public function processQuerySlots($sql, $slots) {\n\n $db = $this->provider->getDatabase();\n\n //Just a funny code to identify slots based on randomness\n $code = sha1(rand(1,1000)*time());\n\n //This ensures no one can hack our queries via SQL template injection\n foreach( $slots as $key=>$value ) {\n $sql = str_replace( \"{\".$key.\"}\", \"{\".$code.$key.\"}\" ,$sql );\n }\n\n //replace the slots inside the SQL template\n foreach( $slots as $key=>$value ) {\n $sql = str_replace( \"{\".$code.$key.\"}\", $this->provider->getWriter()->getQuote().$db->escape( $value ).$this->provider->getWriter()->getQuote(),$sql );\n }\n\n return $sql;\n }", "public function registerCommands()\n\t{\n// Artisan::add(new InstallCommand);\n// Artisan::add(new UpdateCommand);\n \n\t\t$commands = array('SkinsInstall','SkinsUpdate');\n\n\t\tforeach ($commands as $command)\n\t\t{\n\t\t\t$this->{'register'.$command.'Command'}();\n\t\t}\n\n\t\t$this->commands(\n\t\t\t'command.skins.install','command.skins.update'\n\t\t);\n \n\t}", "function parseactions($actionblock, $data_length) {\n $block_length = 0;\n\n while ($data_length) {\n if ($block_length) {\n $actionblock = substr($actionblock, $block_length);\n }\n\tif(strlen($actionblock))\n\t{\n $temp = unpack('Cplayer_id/Slength', $actionblock);\n $player_id = $temp['player_id'];\n $block_length = $temp['length']+3;\n $data_length -= $block_length;\n\n $was_deselect = false;\n $was_subupdate = false;\n\n $n = 3;\n\t$ablength = strlen($actionblock);\n while ($n < $block_length) {\n\t\n\t\t\n //$prev = $action;\n $action = ord($actionblock{$n});\n\n switch ($action) {\n\t\t\t// DotA player stats (kill, deaths, creep kills, creep denies)\n\t\tcase 0x6B:\n\t\t\t\n\t\t\t$n++;\t//Skip the action byte\n\t\t\t$n+=5;\n\t\t\t$data = substr($actionblock, $n, 4);\n\t\t\tif($data == 'Data')\n\t\t\t{\n\t\t\t\t$n++;\n\t\t\t\t$n+=4;\n\t\t\t\t\n\t\t\t\tif( substr($actionblock, $n, 9) == 'GameStart')\n\t\t\t\t{\n\t\t\t\t\t$n+=9;\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['text'] = '-- Creeps Spawn --';\n\t\t\t\t\t$temp['type'] = 'Start';\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 4) == 'Hero')\n\t\t\t\t{\n\t\t\t\t\t$n+=4;\n\t\t\t\t\t\n\t\t\t\t\t$victim = substr($actionblock, $n, 2);\n\t\t\t\t\tif(strlen(trim($victim)) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$killer = (ord($actionblock{$n+2}));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$killer = (ord($actionblock{$n+3}));\n\t\t\t\t\t}\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['killer'] = $killer;\n\t\t\t\t\t$temp['victim'] = $victim;\n\t\t\t\t\t$temp['type'] = 'Hero';\n\t\t\t\t\t$temp['text'] = ' killed ';\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 7) == 'Courier')\n\t\t\t\t{\n\t\t\t\t\t$n+=7;\n\t\t\t\t\t\n\t\t\t\t\t$victim = substr($actionblock, $n, 2);\n\t\t\t\t\tif(strlen(trim($victim)) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$killer = ord($actionblock{$n+2});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$killer = ord($actionblock{$n+3});\n\t\t\t\t\t}\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['killer'] = $killer;\n\t\t\t\t\t$temp['victim'] = $victim;\n\t\t\t\t\t$temp['type'] = 'Courier';\n\t\t\t\t\t$temp['text'] = '\\'s courier was killed by ';\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 5) == 'Tower')\n\t\t\t\t{\n\t\t\t\t\t$n+=5;\n\t\t\t\t\t$team = substr($actionblock, $n, 1);\n\t\t\t\t\t$level = substr($actionblock, $n+1, 1);\n\t\t\t\t\t$side = substr($actionblock, $n+2, 1);\n\t\t\t\t\t$killer = ord($actionblock{$n+4});\n\t\t\t\t\tif($team == '0')\n\t\t\t\t\t{\n\t\t\t\t\t\t$team = 'Sentinel';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$team = 'Scourge';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($side == '0')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'top';\n\t\t\t\t\t}\n\t\t\t\t\telse if($side == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'middle';\n\t\t\t\t\t}\n\t\t\t\t\telse if($side == '2')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'bottom';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['killer'] = $killer;\n\t\t\t\t\t$temp['type'] = 'Tower';\n\t\t\t\t\t$temp['side'] = $side;\n\t\t\t\t\t$temp['level'] = $level;\n\t\t\t\t\t$temp['team'] = $team;\n\t\t\t\t\tif($team == 'Sentinel' && ($killer > 0 && $killer <= 5))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' denied the ';\n\t\t\t\t\t}\n\t\t\t\t\telse if($team == 'Scourge' && ($killer <=11 && $killer >= 7))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' denied the ';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' killed the ';\n\t\t\t\t\t}\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 3) == 'Rax')\n\t\t\t\t{\n\t\t\t\t\t$n+=3;\n\t\t\t\t\t$team = substr($actionblock, $n, 1);\n\t\t\t\t\t$side = substr($actionblock, $n+1, 1);\n\t\t\t\t\t$type = substr($actionblock, $n+2, 1);\n\t\t\t\t\t$killer = ord($actionblock{$n+4});\n\t\t\t\t\tif($team == '0')\n\t\t\t\t\t{\n\t\t\t\t\t\t$team = 'Sentinel';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$team = 'Scourge';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($side == '0')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'top';\n\t\t\t\t\t}\n\t\t\t\t\telse if($side == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'middle';\n\t\t\t\t\t}\n\t\t\t\t\telse if($side == '2')\n\t\t\t\t\t{\n\t\t\t\t\t\t$side = 'bottom';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($type == '0')\n\t\t\t\t\t{\n\t\t\t\t\t\t$type = 'melee';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$type = 'ranged';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['killer'] = $killer;\n\t\t\t\t\t$temp['type'] = 'Rax';\n\t\t\t\t\t$temp['side'] = $side;\n\t\t\t\t\t$temp['raxtype'] = $type;\n\t\t\t\t\t$temp['team'] = $team;\n\t\t\t\t\tif($team == 'Sentinel' && ($killer > 0 && $killer <= 5))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' denied the ';\n\t\t\t\t\t}\n\t\t\t\t\telse if($team == 'Scourge' && ($killer <=11 && $killer >= 7))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' denied the ';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['text'] = ' killed the ';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 6) == 'Throne')\n\t\t\t\t{\n\t\t\t\t\t$n+=6;\n\t\t\t\t\t$percent = ord($actionblock{$n+1});\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['type'] = 'Throne';\n\t\t\t\t\t$temp['text'] = 'The Frozen Throne is at '.$percent.' % health';\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t\telse if(substr($actionblock, $n, 4) == 'Tree')\n\t\t\t\t{\n\t\t\t\t\t$n+=4;\n\t\t\t\t\t$percent = ord($actionblock{$n+1});\n\t\t\t\t\t$temp['player_id'] = '';\n\t\t\t\t\t$temp['type'] = 'Tree';\n\t\t\t\t\t$temp['text'] = 'The World Tree is at '.$percent.' % health';\n\t\t\t\t\t$temp['time'] = $this->time;\n\t\t\t\t\t$temp['mode'] = 'System';\n\t\t\t\t\t$this->chat[] = $temp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$n+=2;\n\t\t\tbreak;\n\n default:\n\t\t\t$n+=2;\n }\n\t\tif(!isset($actionblock{$n}))\n\t\t{\n\t\t\t$n = $block_length;\n\t\t}\n }\n\t}\n\telse\n\t{\n\t\t$n = 3;\n\t\tbreak;\n\t}\n }\n }", "function handle($match, $state, $pos, Doku_Handler $handler){\n return array($state, $match);\n }", "function getNextAction($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses, $allObstacles, $allActions, $logger, $directionToAvoid = null)\n{\n\t$thereIsABomb = false;\n\t$coordinatesInfo = getCoordinatesInfo($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses);\n\t$typeOfObstacle = $coordinatesInfo[\"typeOfObstacle\"];\n\t$moveAvailable = $coordinatesInfo[\"moveAvailable\"];\n\n\tif(in_array($allObstacles[\"bomb\"], $typeOfObstacle) || $game->state->findActiveBombAt($myPositionX, $myPositionY)) //bomb discovered\n\t{\n\t\t$action = runFromBomb($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $game, $logger);\n\t\t$thereIsABomb = true;\n\t}\n\telseif(in_array($allObstacles[\"opponent\"], $typeOfObstacle)) //opponent discovered \n\t{\n\t\t$action = huntOpponent($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\telseif(in_array($allObstacles[\"destroyable_block\"], $typeOfObstacle)) //destroyable block discovered\n\t{\n\t\t$action = destroyBlock($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger, $directionToAvoid);\n\t}\n\telse{ //just free path\n\t\t$action = runRandom($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\n\treturn [\n\t\t'action' => $action,\n\t\t'thereIsABomb' => $thereIsABomb,\n\t\t'typeOfObstacle' => $typeOfObstacle,\n\t\t'moveAvailable' => $moveAvailable\n\t];\n}", "public function getCommands()\n {\n return array();\n }", "public function setRing($ring, $type = 'ring', $rotatable_step = true, $step_pos = 0) {\n\t\tif ( ! empty(self::$STATOR[$ring])) {\n\t\t\t$this->is_stator = true;\n\t\t\t$this->has_rotatable_step = false;\n\t\t\t$this->ring = self::$STATOR[$ring][0];\n\t\t\t$this->pos = 0;\n\t\t}\n\t\telseif ( ! empty(self::$RING[$ring])) {\n\t\t\t$this->ring = self::$RING[$ring][0];\n\t\t\t$this->step_pos = self::$RING[$ring][1];\n\t\t\t$this->pos = 0;\n\t\t}\n\t\telseif ( ! empty(self::$EXTRA[$ring])) {\n\t\t\t$this->is_extra = true;\n\t\t\t$this->has_rotatable_step = false;\n\t\t\t$this->ring = self::$EXTRA[$ring][0];\n\t\t\t$this->pos = 0;\n\t\t}\n\t\telseif ( ! empty(self::$REFLECTOR[$ring])) {\n\t\t\t$this->is_reflector = true;\n\t\t\t$this->has_rotatable_step = false;\n\t\t\t$this->ring = self::$REFLECTOR[$ring][0];\n\t\t\t$this->pos = 0;\n\t\t}\n\t\telseif ( ! $this->strict && (26 === strlen($ring))) {\n\t\t\tswitch (strtolower($type)) {\n\t\t\t\tcase 'stator' : // no break\n\t\t\t\tcase 'entry' : // no break\n\t\t\t\tcase 'eintrittswalze' : // no break\n\t\t\t\tcase 'etw' :\n\t\t\t\t\t$this->is_stator = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'extra' : // no break\n\t\t\t\tcase 'thin' : // no break\n\t\t\t\tcase 'zusatzwalze' :\n\t\t\t\t\t$this->is_extra = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'reflector' : // no break\n\t\t\t\tcase 'umkehrwalze' : // no break\n\t\t\t\tcase 'ukw' :\n\t\t\t\t\t$this->is_reflector = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->has_rotatable_step = (bool) $rotatable_step;\n\t\t\t$this->ring = $ring;\n\t\t\t$this->step_pos = self::toIndex($step_pos);\n\t\t\t$this->pos = 0;\n\n\t\t\t$ring = 'MANUAL';\n\t\t}\n\t\telse {\n\t\t\tthrow new \\InvalidArgumentException(\"Ring type '{$ring}' not found\");\n\t\t}\n\n\t\t$this->type = $ring;\n\t}", "protected function defineCommandOptions(){}", "function execCmds() {\n\tglobal $commands;\n\tforeach ($commands as $idx => $command) {\n\t\tshowCmdT($idx, $command);\n\t}\n}", "function _getCommands()\n\t{\n\t\t$commands = array();\n\t\t$commands[] = array( 'permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true );\n//\t\t$commands[] = array('permission' => 'read', 'cmd' => 'render', 'lang_var' => 'show', 'default' => true);\n//\t\t$commands[] = array('permission' => 'write', 'cmd' => 'enableAdministrationPanel', 'lang_var' => 'edit_content');\n//\t\t$commands[] = array( 'permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'settings' );\n\n\t\treturn $commands;\n\t}", "public function getCommandInfo(): array\n {\n return [\n new BuiltInCommandInfo('alias', 'Add a bash-style alias', true),\n new BuiltInCommandInfo('unalias', 'Remove a bash-style alias', true)\n ];\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setMcode($value);\n break;\n case 2:\n $this->setNameF($value);\n break;\n case 3:\n $this->setNameT($value);\n break;\n case 4:\n $this->setNameE($value);\n break;\n case 5:\n $this->setPosid($value);\n break;\n case 6:\n $this->setMdate($value);\n break;\n case 7:\n $this->setBirthday($value);\n break;\n case 8:\n $this->setNational($value);\n break;\n case 9:\n $this->setIdTax($value);\n break;\n case 10:\n $this->setIdCard($value);\n break;\n case 11:\n $this->setIdCardImg($value);\n break;\n case 12:\n $this->setIdCardImgDate($value);\n break;\n case 13:\n $this->setZip($value);\n break;\n case 14:\n $this->setHomeT($value);\n break;\n case 15:\n $this->setOfficeT($value);\n break;\n case 16:\n $this->setMobile($value);\n break;\n case 17:\n $this->setMcodeAcc($value);\n break;\n case 18:\n $this->setBonusrec($value);\n break;\n case 19:\n $this->setBankcode($value);\n break;\n case 20:\n $this->setBranch($value);\n break;\n case 21:\n $this->setAccType($value);\n break;\n case 22:\n $this->setAccNo($value);\n break;\n case 23:\n $this->setAccNoImg($value);\n break;\n case 24:\n $this->setAccNoImgDate($value);\n break;\n case 25:\n $this->setAccName($value);\n break;\n case 26:\n $this->setAccProv($value);\n break;\n case 27:\n $this->setSvCode($value);\n break;\n case 28:\n $this->setSpCode($value);\n break;\n case 29:\n $this->setSpName($value);\n break;\n case 30:\n $this->setSpCode2($value);\n break;\n case 31:\n $this->setSpName2($value);\n break;\n case 32:\n $this->setUpaCode($value);\n break;\n case 33:\n $this->setUpaName($value);\n break;\n case 34:\n $this->setLr($value);\n break;\n case 35:\n $this->setComplete($value);\n break;\n case 36:\n $this->setCompdate($value);\n break;\n case 37:\n $this->setModate($value);\n break;\n case 38:\n $this->setUsercode($value);\n break;\n case 39:\n $this->setNameB($value);\n break;\n case 40:\n $this->setSex($value);\n break;\n case 41:\n $this->setAge($value);\n break;\n case 42:\n $this->setOccupation($value);\n break;\n case 43:\n $this->setStatus($value);\n break;\n case 44:\n $this->setMarName($value);\n break;\n case 45:\n $this->setMarAge($value);\n break;\n case 46:\n $this->setEmail($value);\n break;\n case 47:\n $this->setBeneficiaries($value);\n break;\n case 48:\n $this->setRelation($value);\n break;\n case 49:\n $this->setDistrictid($value);\n break;\n case 50:\n $this->setAmphurid($value);\n break;\n case 51:\n $this->setProvinceid($value);\n break;\n case 52:\n $this->setFax($value);\n break;\n case 53:\n $this->setInvCode($value);\n break;\n case 54:\n $this->setUid($value);\n break;\n case 55:\n $this->setOid($value);\n break;\n case 56:\n $this->setPosCur($value);\n break;\n case 57:\n $this->setPosCur1($value);\n break;\n case 58:\n $this->setPosCur2($value);\n break;\n case 59:\n $this->setPosCur3($value);\n break;\n case 60:\n $this->setPosCur4($value);\n break;\n case 61:\n $this->setPosCurTmp($value);\n break;\n case 62:\n $this->setRposCur4($value);\n break;\n case 63:\n $this->setPosCur3Date($value);\n break;\n case 64:\n $this->setMemdesc($value);\n break;\n case 65:\n $this->setCmp($value);\n break;\n case 66:\n $this->setCmp2($value);\n break;\n case 67:\n $this->setCmp3($value);\n break;\n case 68:\n $this->setCcmp($value);\n break;\n case 69:\n $this->setCcmp2($value);\n break;\n case 70:\n $this->setCcmp3($value);\n break;\n case 71:\n $this->setAddress($value);\n break;\n case 72:\n $this->setStreet($value);\n break;\n case 73:\n $this->setBuilding($value);\n break;\n case 74:\n $this->setVillage($value);\n break;\n case 75:\n $this->setSoi($value);\n break;\n case 76:\n $this->setEwallet($value);\n break;\n case 77:\n $this->setEatoship($value);\n break;\n case 78:\n $this->setEcom($value);\n break;\n case 79:\n $this->setBmdate1($value);\n break;\n case 80:\n $this->setBmdate2($value);\n break;\n case 81:\n $this->setBmdate3($value);\n break;\n case 82:\n $this->setCbmdate1($value);\n break;\n case 83:\n $this->setCbmdate2($value);\n break;\n case 84:\n $this->setCbmdate3($value);\n break;\n case 85:\n $this->setOnline($value);\n break;\n case 86:\n $this->setCnameF($value);\n break;\n case 87:\n $this->setCnameT($value);\n break;\n case 88:\n $this->setCnameE($value);\n break;\n case 89:\n $this->setCnameB($value);\n break;\n case 90:\n $this->setCbirthday($value);\n break;\n case 91:\n $this->setCnational($value);\n break;\n case 92:\n $this->setCidTax($value);\n break;\n case 93:\n $this->setCidCard($value);\n break;\n case 94:\n $this->setCaddress($value);\n break;\n case 95:\n $this->setCbuilding($value);\n break;\n case 96:\n $this->setCvillage($value);\n break;\n case 97:\n $this->setCstreet($value);\n break;\n case 98:\n $this->setCsoi($value);\n break;\n case 99:\n $this->setCzip($value);\n break;\n case 100:\n $this->setChomeT($value);\n break;\n case 101:\n $this->setCofficeT($value);\n break;\n case 102:\n $this->setCmobile($value);\n break;\n case 103:\n $this->setCfax($value);\n break;\n case 104:\n $this->setCsex($value);\n break;\n case 105:\n $this->setCemail($value);\n break;\n case 106:\n $this->setCdistrictid($value);\n break;\n case 107:\n $this->setCamphurid($value);\n break;\n case 108:\n $this->setCprovinceid($value);\n break;\n case 109:\n $this->setInameF($value);\n break;\n case 110:\n $this->setInameT($value);\n break;\n case 111:\n $this->setIrelation($value);\n break;\n case 112:\n $this->setIphone($value);\n break;\n case 113:\n $this->setIidCard($value);\n break;\n case 114:\n $this->setStatusDoc($value);\n break;\n case 115:\n $this->setStatusExpire($value);\n break;\n case 116:\n $this->setStatusTerminate($value);\n break;\n case 117:\n $this->setTerminateDate($value);\n break;\n case 118:\n $this->setStatusSuspend($value);\n break;\n case 119:\n $this->setSuspendDate($value);\n break;\n case 120:\n $this->setStatusBlacklist($value);\n break;\n case 121:\n $this->setStatusAto($value);\n break;\n case 122:\n $this->setSletter($value);\n break;\n case 123:\n $this->setSinvCode($value);\n break;\n case 124:\n $this->setTxtoption($value);\n break;\n case 125:\n $this->setSetregis($value);\n break;\n case 126:\n $this->setSlr($value);\n break;\n case 127:\n $this->setLocationbase($value);\n break;\n case 128:\n $this->setCidMobile($value);\n break;\n case 129:\n $this->setBewallet($value);\n break;\n case 130:\n $this->setBvoucher($value);\n break;\n case 131:\n $this->setVoucher($value);\n break;\n case 132:\n $this->setManager($value);\n break;\n case 133:\n $this->setMtype($value);\n break;\n case 134:\n $this->setMtype1($value);\n break;\n case 135:\n $this->setMtype2($value);\n break;\n case 136:\n $this->setMvat($value);\n break;\n case 137:\n $this->setUidbase($value);\n break;\n case 138:\n $this->setExpDate($value);\n break;\n case 139:\n $this->setHeadCode($value);\n break;\n case 140:\n $this->setPvL($value);\n break;\n case 141:\n $this->setPvC($value);\n break;\n case 142:\n $this->setHpvL($value);\n break;\n case 143:\n $this->setHpvC($value);\n break;\n case 144:\n $this->setPvLNextmonth($value);\n break;\n case 145:\n $this->setPvCNextmonth($value);\n break;\n case 146:\n $this->setPvLLastmonth1($value);\n break;\n case 147:\n $this->setPvCLastmonth1($value);\n break;\n case 148:\n $this->setPvLLastmonth2($value);\n break;\n case 149:\n $this->setPvCLastmonth2($value);\n break;\n case 150:\n $this->setRcodeStar($value);\n break;\n case 151:\n $this->setBunit($value);\n break;\n case 152:\n $this->setProvince($value);\n break;\n case 153:\n $this->setLineId($value);\n break;\n case 154:\n $this->setFacebookName($value);\n break;\n case 155:\n $this->setTypeCom($value);\n break;\n case 156:\n $this->setExpPos($value);\n break;\n case 157:\n $this->setExpPos60($value);\n break;\n case 158:\n $this->setTripPrivate($value);\n break;\n case 159:\n $this->setTripTeam($value);\n break;\n case 160:\n $this->setMyfile1($value);\n break;\n case 161:\n $this->setMyfile2($value);\n break;\n case 162:\n $this->setClineId($value);\n break;\n case 163:\n $this->setCfacebookName($value);\n break;\n case 164:\n $this->setProfileImg($value);\n break;\n case 165:\n $this->setAtocom($value);\n break;\n case 166:\n $this->setHpv($value);\n break;\n } // switch()\n\n return $this;\n }", "function itemPlacement($placeInput, $array){\n echo 'Enter Item' . PHP_EOL;\n $string = getInput();\n switch ($placeInput) {\n case 'B':\n array_unshift($array, $string);\n break;\n default:\n array_push($array, $string);\n break;\n } \n return $array;\n}", "static function getSubCommands();", "function startEndArray ($items, $newItem)\n{\n echo 'Add new item to (S)tart or (E)nd of list? ' . PHP_EOL;\n $option = getInput(true);\n\n if ($option == 's') {\n array_unshift($items, $newItem);\n } else {\n array_push($items, $newItem);\n }\n\n return $items; \n}", "public function SetPosition($position)\n\t{\n\t\t$pos = str_split($position);\n\t\t\n\t\tif(in_array(strtoupper(strtoupper($pos[0])), $this->horizontal) && in_array($pos[1], $this->verticle))\n\t\t{\n\t\t\t$this->position['horizontal'] = strtoupper($pos[0]);\n\t\t\t$this->position['verticle'] = $pos[1];\n\t\t}\n\t}", "private function calcShifts() : void\n\t{\n\t\t$this->shiftY = $this->scaleY*abs($this->rangeYHigh);\n\n\t\t$this->shiftX = $this->scaleX*abs($this->rangeXLow);\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setShnttype($value);\n break;\n case 1:\n $this->setShnttypedesc($value);\n break;\n case 2:\n $this->setOehhnbr($value);\n break;\n case 3:\n $this->setShntyear($value);\n break;\n case 4:\n $this->setOedhline($value);\n break;\n case 5:\n $this->setShntlotser($value);\n break;\n case 6:\n $this->setShntpickticket($value);\n break;\n case 7:\n $this->setShntpackticket($value);\n break;\n case 8:\n $this->setShntinvoice($value);\n break;\n case 9:\n $this->setShntacknow($value);\n break;\n case 10:\n $this->setShntseq($value);\n break;\n case 11:\n $this->setShntnote($value);\n break;\n case 12:\n $this->setShntkey2($value);\n break;\n case 13:\n $this->setShntform($value);\n break;\n case 14:\n $this->setDateupdtd($value);\n break;\n case 15:\n $this->setTimeupdtd($value);\n break;\n case 16:\n $this->setDummy($value);\n break;\n } // switch()\n\n return $this;\n }", "function __construct($id, $userid, $name, $slot){\n parent::__construct($id, $userid, $name, $slot);\n \n\t$this->pointCost = 1100;\n $this->faction = \"Centauri (WotCR)\";\n $this->phpclass = \"wlcEmperorDN2090\";\n $this->shipClass = \"Emperor Dreadnought\";\n\t\t$this->variantOf = \"Garut Survey Ship\";\n\t$this->limited = 10; \n //$this->occurence = \"rare\"; \n $this->fighters = array(\"heavy\"=>24); \n\t\t$this->unofficial = true;\n\t\t$this->isd = 2090;\n\n $this->shipSizeClass = 3; //Enormousis not implemented\n $this->Enormous = true;\t\t\n $this->forwardDefense = 19;\n $this->sideDefense = 20;\n\t$this->iniativebonus = 0;\n\n $this->imagePath = \"img/ships/sakar.png\";\n\n\n\n $this->turncost = 2;\n $this->turndelaycost = 2;\n $this->accelcost = 8;\n $this->rollcost = 6;\n $this->pivotcost = 6;\n \n $this->addPrimarySystem(new Reactor(6, 36, 0, 0));\n $this->addPrimarySystem(new CnC(6, 25, 0, 0)); \n $this->addPrimarySystem(new CnC(7, 16, 0, 0)); \n $this->addPrimarySystem(new Scanner(5, 25, 6, 9));\n $this->addPrimarySystem(new Engine(5, 36, 0, 12, 3));\n\t$this->addPrimarySystem(new Hangar(5, 12));\n\t$this->addPrimarySystem(new AssaultLaser(4, 6, 4, 0, 360));\n\t$this->addPrimarySystem(new TwinArray(3, 6, 2, 0, 360));\n \n\t$this->addFrontSystem(new Thruster(3, 20, 0, 5, 1));\n $this->addFrontSystem(new Thruster(3, 20, 0, 5, 1));\n\t$this->addFrontSystem(new Hangar(3, 18));\n $this->addFrontSystem(new AssaultLaser(3, 6, 4, 240, 360));\n\t$this->addFrontSystem(new AssaultLaser(3, 6, 4, 300, 60));\n\t$this->addFrontSystem(new AssaultLaser(3, 6, 4, 300, 60));\n\t$this->addFrontSystem(new AssaultLaser(3, 6, 4, 0, 120));\n $this->addFrontSystem(new TwinArray(3, 6, 2, 240, 60));\n\t$this->addFrontSystem(new TwinArray(3, 6, 2, 300, 120));\n\t$this->addFrontSystem(new SentinelPointDefense(2, 4, 2, 240, 60));\n\t$this->addFrontSystem(new SentinelPointDefense(2, 4, 2, 300, 120));\n\t\t\n $this->addAftSystem(new Thruster(4, 16, 0, 3, 2));\n $this->addAftSystem(new Thruster(4, 16, 0, 3, 2));\n $this->addAftSystem(new Thruster(4, 16, 0, 3, 2));\n $this->addAftSystem(new Thruster(4, 16, 0, 3, 2));\n\t$this->addAftSystem(new JumpEngine(5, 32, 6, 20));\n\t$this->addAftSystem(new AssaultLaser(3, 6, 4, 120, 240));\n\t$this->addAftSystem(new AssaultLaser(3, 6, 4, 120, 240));\n\t$this->addAftSystem(new TwinArray(3, 6, 2, 120, 300));\n\t$this->addAftSystem(new TwinArray(3, 6, 2, 60, 240));\n\t$this->addAftSystem(new SentinelPointDefense(2, 4, 2, 90, 270));\n\t\t\n\t$this->addLeftSystem(new Thruster(4, 30, 0, 8, 3));\n $this->addLeftSystem(new AssaultLaser(3, 6, 4, 240, 360));\n\t$this->addLeftSystem(new TwinArray(3, 6, 2, 180, 360));\n\t$this->addLeftSystem(new TwinArray(3, 6, 2, 180, 360));\n\t$this->addLeftSystem(new CargoBay(3, 12));\n\t\t\n\t$this->addRightSystem(new Thruster(4, 30, 0, 8, 4));\n $this->addRightSystem(new AssaultLaser(3, 6, 4, 0, 120));\n\t$this->addRightSystem(new TwinArray(3, 6, 2, 0, 180));\n\t$this->addRightSystem(new TwinArray(3, 6, 2, 0, 180));\n\t$this->addRightSystem(new CargoBay(3, 12));\n\t\t\n //0:primary, 1:front, 2:rear, 3:left, 4:right;\n $this->addFrontSystem(new Structure( 4, 110));\n $this->addAftSystem(new Structure( 4, 140));\n $this->addLeftSystem(new Structure( 4, 120));\n $this->addRightSystem(new Structure( 4, 120));\n $this->addPrimarySystem(new Structure( 5, 112));\n\n\n \n\t//d20 hit chart\n\t$this->hitChart = array(\n\t\t\n\t\t0=> array(\n\t\t\t8 => \"Structure\",\n\t\t\t9 => \"Twin Array\",\n\t\t\t10 => \"Assault Laser\",\n\t\t\t13 => \"Scanner\",\n\t\t\t15 => \"Engine\",\n\t\t\t17 => \"Hangar\",\n\t\t\t19 => \"Reactor\",\n\t\t\t20 => \"C&C\",\n\t\t),\n\n\t\t1=> array(\n\t\t\t5 => \"Thruster\",\n\t\t\t7 => \"Assault Laser\",\n\t\t\t9 => \"Sentinel Point Defense\",\n\t\t\t10 => \"Twin Array\",\n\t\t\t12 => \"Hangar\",\n\t\t\t18 => \"Structure\",\n\t\t\t20 => \"Primary\",\n\t\t),\n\n\t\t2=> array(\n\t\t\t5 => \"Thruster\",\n\t\t\t7 => \"Jump Engine\",\n\t\t\t8 => \"Sentinel Point Defense\",\n\t\t\t9 => \"Twin Array\",\n\t\t\t11 => \"Assault Laser\",\n\t\t\t18 => \"Structure\",\n\t\t\t20 => \"Primary\",\n\t\t),\n\n\t\t3=> array(\n\t\t\t5 => \"Thruster\",\n\t\t\t8 => \"Twin Array\",\n\t\t\t10 => \"Assault Laser\",\n\t\t\t11 => \"CargoBay\",\n\t\t\t18 => \"Structure\",\n\t\t\t20 => \"Primary\",\n\t\t),\n\n\t\t4=> array(\n\t\t\t5 => \"Thruster\",\n\t\t\t8 => \"Twin Array\",\n\t\t\t10 => \"Assault Laser\",\n\t\t\t11 => \"Cargo Bay\",\n\t\t\t18 => \"Structure\",\n\t\t\t20 => \"Primary\",\n\t\t),\n\n\t);\n\n\n }", "public function commands()\n {\n return ['a'];\n }", "protected abstract function _commandHandler(string $command, $data_array);", "function align_pos(&$ofset, &$pos, &$cpos)\n{\n\t$konstpos = $pos;\n\t$konstcpos = $cpos;\n\tfor ($i = 0; $i <= $konstpos; $i++)\n\t\t$pos += $ofset[$i];\n\t\n\tfor ($i = 0; $i < $konstcpos; $i++)\n\t\t$cpos += $ofset[$i];\n}" ]
[ "0.50526077", "0.48723024", "0.47931382", "0.46704364", "0.44290996", "0.43127495", "0.4276447", "0.4224626", "0.41887617", "0.41437304", "0.4121893", "0.41105187", "0.4101656", "0.4071196", "0.40681913", "0.40678996", "0.40672624", "0.40649438", "0.40496346", "0.40469486", "0.40425143", "0.4038334", "0.40354633", "0.4033297", "0.40214336", "0.40135437", "0.400116", "0.3998345", "0.3983572", "0.39830887", "0.39589176", "0.39565945", "0.39541358", "0.39530796", "0.39213905", "0.39148572", "0.3907303", "0.3902875", "0.38950518", "0.38947815", "0.3888347", "0.38833576", "0.3881753", "0.38722882", "0.38706148", "0.38704416", "0.38704416", "0.38664445", "0.38610053", "0.38421023", "0.3841279", "0.38410532", "0.3837947", "0.3830743", "0.382965", "0.3828776", "0.38190582", "0.38171616", "0.38150626", "0.3813662", "0.38129267", "0.38127893", "0.38126665", "0.38122874", "0.38071552", "0.37825197", "0.3767388", "0.37669876", "0.3766341", "0.376185", "0.37602895", "0.37602755", "0.37558308", "0.37514153", "0.37485334", "0.37438503", "0.37437975", "0.37425852", "0.37419945", "0.37407538", "0.3740581", "0.3739679", "0.37392357", "0.37302575", "0.37230822", "0.37215576", "0.37196332", "0.37190807", "0.37069213", "0.36993578", "0.36989596", "0.36986065", "0.36967075", "0.36930233", "0.36835802", "0.36829057", "0.3682623", "0.3679897", "0.3668786", "0.36650205" ]
0.71221966
0
/When an On or Off button is pressed, the hardware takes care of calling the corresponding methods onButtonWasPushed() or offButtonWasPushed()
public function onButtonWasPushed($slot) { $this->onCommand[$slot]->execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function switchOn();", "public function handleInput() {\n if ($this->isPressed(BUTTON_W)) {\n jump();\n } elseif ($this->isPressed(BUTTON_A)) {\n fireGun();\n } elseif ($this->isPressed(BUTTON_S)) {\n swapWeapon();\n } elseif ($this->isPressed(BUTTON_D)) {\n duck();\n }\n }", "private function ledOn()\n {\n $this->ledPin->setValue(PinInterface::VALUE_HIGH);\n }", "function do_button_out($rbuf)\r\n{\r\n\techo \"cmd: $rbuf\\r\\n\";\r\n\t$cmd = array();\r\n\t$cmd = explode(\" \", $rbuf, 2);\r\n\r\n\tif($cmd[0] == \"pwr\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"POWER button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"POWER button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_PWR_BTN, LOW);\r\n\t\t\tuio_out(0, MB_PWR_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n\telse if($cmd[0] == \"rst\")\r\n\t{\r\n\t\tif($cmd[1] == \"1\")\r\n\t\t{\r\n\t\t\techo \"RESET button pressed\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, HIGH);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, LOW);\r\n\t\t}\r\n\t\telse if($cmd[1] == \"0\")\r\n\t\t{\r\n\t\t\techo \"RESET button released\\r\\n\";\r\n\t\t\tuio_out(0, PC_RST_BTN, LOW);\r\n\t\t\tuio_out(0, MB_RST_BTN_LED, HIGH);\r\n\t\t}\r\n\t}\r\n}", "public function ledsOn()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_LEDS_ON, $payload);\n }", "public function handleInput() {\n $this->button_input = fread(STDIN, 1);\n if ($this->isPressed(BUTTON_W)) {\n $this->buttonW->execute();\n } elseif ($this->isPressed(BUTTON_A)) {\n $this->buttonA->execute();\n } elseif ($this->isPressed(BUTTON_S)) {\n $this->buttonS->execute();\n } elseif ($this->isPressed(BUTTON_D)) {\n $this->buttonD->execute();\n }\n }", "public function pushDownButton() {\n\t\t//print_r(\"Pushing Down Button\".PHP_EOL);\n\t\tif($this->floor > LOWEST) {\n\t\t\t// successful push\n\t\t\t// set direction to down\n\t\t\t$this->indicatedDirection = DOWN;\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t// stay put\n\t\t\treturn false;\n\t\t}\n\t}", "public function gameButtons() {\n\n }", "public function onEvent();", "public function pushUpButton() {\n\t\tif( ($this->floor < $this->floors)) {\n\t\t\t// successful push\n\t\t\t// set direction to up\n\t\t\t$this->indicatedDirection = UP;\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// stay put\n\t\t\treturn false;\n\t\t}\n\t}", "private function ledOff()\n {\n $this->ledPin->setValue(PinInterface::VALUE_LOW);\n }", "function setIsOn($isOn){\n\t\tglobal $db;\n\t\t$statement = $db->prepare('UPDATE bot_on_off SET isOn = :isOn');\n\t\t$statement->bindValue(':isOn', $isOn, PDO::PARAM_INT);\n\t\t$statement->execute();\n\t}", "protected function registerButtons() {}", "protected function registerButtons() {}", "public function on()\n\t{\n\t\treturn $this->settings[ $this->onOffSetting() ];\n\t}", "public function on()\n\t{\n\t\treturn $this->settings[ $this->onOffSetting() ];\n\t}", "public function powerUp()\n {\n if ($this->motor_power)\n $this->motor_power->setValue(1);\n }", "public function wipers_on() {\r\n echo PHP_EOL;\r\n $this->action(\"turning windshield wipers on\");\r\n $this->wipers_on = TRUE;\r\n $this->action(\"windshield wipers are on\");\r\n }", "public function isOffHook() {\n\t\treturn $this->offHook;\n\t}", "public function set_button($button) { $this->button = $button; }", "public function getOn()\n {\n if (isset($this->a_State['on']))\n {\n return($this->a_State['on']);\n } /* if */\n else\n {\n return(null);\n } /* else */\n }", "public function onOffSetting()\n\t{\n\t\treturn \"eco_stocks_on\";\n\t}", "public function onEnterState() {\n\n }", "abstract function HookEvents();", "public function putDown();", "public function onOffSetting()\n\t{\n\t\treturn \"eco_loans_on\";\n\t}", "public function setUpsideDown(bool $on = true)\n {\n $this -> connector -> write(self::ESC . \"{\" . ($on ? chr(1) : chr(0)));\n }", "public function isDownButtonClicked(int $floor): bool;", "private function sendSignal()\n {\n $this->view->downSignal = true;\n }", "public function ledsOff()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_LEDS_OFF, $payload);\n }", "public function setOn($value)\n {\n $this->on = $value;\n }", "public function is_switched()\n {\n }", "public function isUpButtonClicked(int $floor): bool;", "function ms_is_switched()\n {\n }", "function getOnClick() {return $this->readOnClick();}", "public function getButton() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "public function disableButtons()\n\t{\n\t}", "public function addsButtons() {}", "public function post_off(){\n\n\t\tSettings::where_in('type', 'indira')->and_where('param', '=', 'under_development')->update(array('value' => 'false'));\n\n\t\t$data = array();\n\t\t$data[\"on\"] = null;\n\t\t$data[\"off\"] = 'active';\n\n\t\tIndira::set('indira.under_development');\n\n\t\treturn View::make('admin.development.thumbler', $data);\n\t}", "public function turn_on()\n {\n $this->testing = TRUE;\n }", "public function wipers_off() {\r\n echo PHP_EOL;\r\n $this->action(\"turning windshield wipers off\");\r\n $this->wipers_on = FALSE;\r\n $this->action(\"windshield wipers are off\");\r\n }", "public function post_on(){\n\n\t\tSettings::where_in('type', 'indira')->and_where('param', '=', 'under_development')->update(array('value' => 'true'));\n\n\t\t$data = array();\n\t\t$data[\"on\"] = 'active';\n\t\t$data[\"off\"] = null;\n\n\t\tIndira::set('indira.under_development');\n\n\t\treturn View::make('admin.development.thumbler', $data);\n\t}", "public function engine_state() {\r\n echo PHP_EOL;\r\n $this->action(\"checking engine\");\r\n if ($this->engine_on) {\r\n $this->action(\"engine is on! Don't forget to turn it off\");\r\n }\r\n else {\r\n $this->action(\"engine is off\");\r\n }\r\n }", "private function hooks() {\n\t\t\t// Register settings\n\t\t\tadd_filter( 'edd_settings_extensions', array( $this, 'settings' ), 1 );\n\n\t\t\t// Handle licensing\n\t\t\t// @todo Replace the Per Product Button and Your Name with your data\n\t\t\tif( class_exists( 'EDD_License' ) ) {\n\t\t\t\t$license = new EDD_License( __FILE__, 'Per Product Button', EDD_PER_PRODUCT_BUTTON_VER, 'WP Human' );\n\t\t\t}\n\n\t\t\t// Public class\n\t\t\t$public = new EDD_Per_Product_Button_Public();\n\t\t\tadd_filter( 'edd_purchase_link_defaults', array( $public, 'purchase_link_defaults' ) );\n\t\t\tadd_filter( 'edd_purchase_link_args', array( $public, 'purchase_link_args' ), 5000 );\n\n\t\t\t// Admin class\n\t\t\t$admin = new EDD_Per_Product_Button_Admin();\n\t\t\tadd_action( 'edd_meta_box_fields', array( $admin, 'meta_box_fields' ), 100 );\n\t\t\tadd_filter( 'edd_metabox_fields_save', array( $admin, 'metabox_fields_save' ) );\n\t\t\tadd_filter( 'edd_metabox_save__edd_per_product_button_text', array( $admin, 'sanitize_button_text' ) );\n\t\t\tadd_filter( 'edd_metabox_save__edd_per_product_button_force_override', array( $admin, 'sanitize_button_force_override' ) );\n\t\t\tadd_filter( 'edd_metabox_save__edd_per_product_button_style', array( $admin, 'sanitize_button_style' ) );\n\t\t\tadd_filter( 'edd_metabox_save__edd_per_product_button_color', array( $admin, 'sanitize_button_color' ) );\n\n\t\t}", "public function no_button() { $this->button = NULL; }", "public function onEvent(Event $event)\n {\n if ($event->eventType == Event::JOY_BUTTON_1 && $event->value == Event::BUTTON_NEUTRAL) {\n $this->container->get(GameServer::class)->switchToGameLoop(\n $this->container->get(PressStartToPlayGameLoop::class)\n );\n }\n }", "public function checkStatusRegisters()\n {\n\n foreach (Register\\GPIO::$GPEDS as $bank => $address) {\n $bank_event_bits = $this->gpio_register[$address];\n\n if ($bank_event_bits === 0) {\n continue;\n }\n\n //This used to be a one-liner. Decided to stop being clever for clarity.\n for ($bit_position = 0; $shifted = $bank_event_bits >> $bit_position; $bit_position++) {\n //The $bit_position bit is set\n if ($shifted & 1) {\n if (isset($this->pins[$bank][$bit_position])) {\n //This is a bit of a double operation here, but really the best that can be done.\n /** @var Pin $pin */\n $pin = $this->pins[$bank][$bit_position];\n //Read pin level, which internally processes it if it's new.\n\n //Toggle the pin level since something has changed (even though if we read it now we may have missed it).\n $pin->invertInternalLevel();\n //Read the level and set it to whatever it is now, it will usually be the toggled state, but if the rise/fall event\n //was too fast for us to observe, it'll bring the pin back to normal.\n $pin->getLevel();\n }\n\n }\n }\n\n //Set the clear bit for any that we will have dealt with\n $this->gpio_register[$address] = $bank_event_bits;\n }\n }", "public function whenAddressed(): bool\n {\n return false;\n }", "public function headlights_on() {\r\n echo PHP_EOL;\r\n $this->action(\"turning headlights on\");\r\n $this->lights_on = TRUE;\r\n $this->action(\"headlights are on\");\r\n }", "function on_buy()\r\n\t{\r\n\t}", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "function on_off ($bool)\n{\n return $bool ? __ ('on', 'capitularia') : __ ('off', 'capitularia');\n}", "public function getButtons() {}", "public function setMouseButton($value) {\r\n $this->mouseButton = $value;\r\n }", "public function off()\n {\n echo 'The tv is off now.' . PHP_EOL;\n }", "public function getOn()\n {\n return $this->on;\n }", "function controls()\n\t{\n\t}", "public function controls($status = true);", "public function preDown()\n {\n }", "function onEvent($element_id)\r\n\t{\r\n\t\t\r\n\t}", "function switchSensorStatus()\n{\n if ($_GET[\"sensor_status\"] == \"OFF\")\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"ON\");\n }\n \n else\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"OFF\");\n }\n \n seeSensors();\n}", "public function on_change($new_value){\n $this->create_event(\n \"motion\",\n $new_value ? \"active\" : \"inactive\"\n );\n }", "protected function generateButtons() {}", "public function setCommand($slot, ICommand $onCommand, ICommand $offCommand)\n {\n $this->onCommand[$slot] = $onCommand;\n $this->offCommand[$slot] = $offCommand;\n }", "public function click() {\r\n\t\tswitch($this->current) {\r\n\t\t\tdefault:\r\n\t\t\t\t$this->current = self::SEA;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::ISLAND:\r\n\t\t\t\t$this->current = self::NONE;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::SEA:\r\n\t\t\t\t$this->current = self::ISLAND;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function headlights_off() {\r\n echo PHP_EOL;\r\n $this->action(\"turning headlights off\");\r\n $this->lights_on = FALSE;\r\n $this->action(\"headlights are off\");\r\n\r\n }", "function readOnClick() {return $this->_onclick;}", "public function handles_events()\n\t{\n\t\treturn false;\n\t}", "function OnDigitalInputBoolean($din0, $din1, $din2, $din3)\n\t{\n\t\t\n\t\techo \"\\nEvento OnDigitalInputBoolean lanzado!!!\\n\";\n\t\t\n\t\t//el DIN-0 variable $din0, esta asociado a la apertura o cierre de puerta\n\t\t//(su activacion implica cierre)\n\t\tif($din0)\n\t\t{\t\n\t\t\t//con broadcast informamos a todo cliente que estuviera conectado a este server/nodo\n\t\t\t$this->broadcastClientFunction( \"clientePuertaCerrada\", array() );\n\t\t}\n\t\telse \n\t\t{\t\n\t\t\t//con broadcast informamos a todo cliente que estuviera conectado a este server/nodo\n\t\t\t$this->broadcastClientFunction( \"clientePuertaAbierta\", array() );\n\t\t}\n\t\t\n\t}", "public static function track_onboarding_toggle( $mixed, $value ) {\n\t\tif ( defined( 'WC_ADMIN_MIGRATING_OPTIONS' ) && WC_ADMIN_MIGRATING_OPTIONS ) {\n\t\t\treturn;\n\t\t};\n\n\t\twc_admin_record_tracks_event(\n\t\t\t'onboarding_toggled',\n\t\t\tarray(\n\t\t\t\t'previous_value' => ! $value,\n\t\t\t\t'new_value' => $value,\n\t\t\t)\n\t\t);\n\t}", "public function statusButton() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed</div>';\n\t\t}else if($code === '1'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">On Hold</div>';\n\t\t}else if($code === '2'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Open</div>';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Opening '.$openingDate.'</div>'; \n\t\t}else if($code === '4'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed <span>For Season</span></div>'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Delayed Opening</div>\n\t\t\t\t\t<div class=\"estimate\">'.$updateTime.'</div>'; \n\t\t}\n\t}", "public function on()\n {\n echo 'The tv is on now.' . PHP_EOL;\n }", "public static function event_method()\n {\n return true;\n }", "public function button($buttoncode = \"\")\n\t{\n\t\tif (empty($buttoncode))\n\t\t{\n\t\t\tuser_error(\"button() empty buttoncode.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" button \".urlencode($buttoncode));\n\t}", "public function setOn($Ab_State)\n {\n $Lb_Return = true;\n $this->a_Errors = null;\n\n if (is_bool($Ab_State))\n {\n $this->a_State['on'] = $Ab_State;\n } /* if */\n else\n {\n $this->a_Errors[] = Hue::SVNHUE_ERROR_WRONG_PARAMETER;\n $Lb_Return = false;\n } /* else */\n\n return($Lb_Return);\n }", "public function makeInputButton() {}", "function SetButtonPrev($a_cmd = 0,$a_lng = 0)\n\t{\n\t\t$this->btn_prev_on = true;\n\t\t$this->btn_prev_cmd = ($a_cmd) ? $a_cmd : \"gateway\";\n\t\t$this->btn_prev_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(\"prev\");\n\t}", "public function checkSignal()\n {\n if($this->current_signal){\n $this->fire($this->current_signal); \n }\n }", "public function processButton($data)\n {\n if ($data == \"<\") {\n $this->previous();\n } else {\n $this->next();\n }\n }", "public function off($event);", "function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}" ]
[ "0.6215516", "0.5927548", "0.5897001", "0.5712064", "0.5562124", "0.5315339", "0.5309582", "0.51959187", "0.50870985", "0.5076185", "0.5069121", "0.5016334", "0.49759138", "0.4973537", "0.49605164", "0.49605164", "0.4948659", "0.49467963", "0.49146175", "0.48679203", "0.48580506", "0.48329672", "0.48317754", "0.48266053", "0.4819023", "0.48135474", "0.48039126", "0.47838813", "0.475712", "0.47408912", "0.47386804", "0.47080332", "0.47000346", "0.46475223", "0.4641035", "0.4638778", "0.46382785", "0.46382785", "0.46382785", "0.46382785", "0.46382073", "0.46382073", "0.46382073", "0.46382073", "0.46382073", "0.46380165", "0.46380165", "0.46380165", "0.46380165", "0.46380165", "0.46380165", "0.46380165", "0.46380165", "0.46338812", "0.46284598", "0.46222535", "0.46000287", "0.45933014", "0.45884684", "0.45765382", "0.4550939", "0.4538393", "0.45375028", "0.45343533", "0.45329255", "0.45174143", "0.45096567", "0.4496671", "0.4496671", "0.4496671", "0.44966227", "0.44958338", "0.44935846", "0.4493332", "0.44830418", "0.4463917", "0.4460326", "0.44462314", "0.44440624", "0.4442809", "0.44349688", "0.44245118", "0.44227797", "0.4414359", "0.44113785", "0.4411299", "0.44041505", "0.44037545", "0.43988115", "0.43929622", "0.43816766", "0.43815544", "0.43796697", "0.4378478", "0.43702996", "0.43617007", "0.43323803", "0.43302146", "0.43179068", "0.43150547" ]
0.54344726
5
to print out each slot and its corresponding command.
public function __toString() { $str = "\n---Remote Control---\n"; for ($i=0; $i<=4; $i++) { $str .= "\nSlot[$i]" . $this->onCommand[$i]->getName() . " <===> " . $this->offCommand[$i]->getName(); } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function printListOfCommands()\n {\n /**\n * @var Padding\n */\n $padding = $this->cli->padding(50)->char(' ');\n $padding->label(' <bold><blue>show dbs:</blue></bold>')->result('show database names');\n $padding->label(' <bold><blue>show collection:</blue></bold>')->result('show collections in current database');\n $padding->label(' <bold><blue>use:</blue></bold>')->result('set current database');\n }", "public function printCommandList(): void\n {\n $commandList = $this->getCommandList();\n $this->writeData('Available commands:');\n array_map(function ($command) {\n $this->writeData('-------------------------');\n $this->writeData('-name: '.$command->getName());\n $this->writeData('-description: '.$command->getDescription());\n $this->writeData('-------------------------');\n }, $commandList);\n }", "public function dump() {\n $fmt = \"%-25s | %s | %2s | %s\\n\";\n foreach ($this->blocks as $block) {\n printf(\"Team: %25s\\n Rep: %s\\n\", $block->team, $block->representative);\n foreach (array('A', 'B', 'C', 'D') as $div) {\n foreach (array(RP::SKIPPER, RP::CREW) as $role) {\n $section = sprintf('%s_%s', $role, $div);\n foreach ($block->$section as $s) {\n printf($fmt,\n $s->getSailorName(),\n $s->division,\n $s->getSailorYear(),\n DB::makeRange($s->races_nums));\n }\n print(\"\\n\");\n }\n print(\"--------------------\\n\");\n }\n print(\"--------------------\\n\");\n }\n }", "public function print_out()\n {\n echo \"id: \" . $this->id . \"<br/>\";\n echo $this->rewrite;\n echo $this->extension;\n echo $this->stranglerPattern;\n echo $this->continuousEvolution;\n echo $this->split;\n echo $this->processStrategyOthers;\n echo $this->ddd;\n echo $this->functionalDecomposition;\n echo $this->existingStructure;\n echo $this->decompositionStrategyOthers;\n echo $this->SCA;\n echo $this->MDA;\n echo $this->WDA;\n echo $this->DMC;\n echo $this->techniqueOthers;\n echo $this->GR;\n echo $this->MO;\n echo $this->sourceCode;\n echo $this->useCase;\n echo $this->systemSpecification;\n echo $this->API;\n echo $this->inputOthers;\n echo $this->list;\n echo $this->archi;\n echo $this->outputOthers;\n echo $this->experiment;\n echo $this->example;\n echo $this->caseStudy;\n echo $this->noValidation;\n echo $this->maintainability;\n echo $this->performance;\n echo $this->reliability;\n echo $this->scalability;\n echo $this->security;\n echo $this->qualityOthers;\n echo $this->score;\n echo $this->matchScore;\n echo $this->misMatch . \"<br/>\";\n }", "public function listCommands()\n {\n $commands = $this->library->getAll();\n\n foreach ($commands as $name => $details) {\n $this->output->writeln(ucwords($name));\n $this->output->hr(strlen($details['description']), '-');\n $this->output->writeln($details['description']);\n $this->output->hr(strlen($details['description']), '-');\n\n foreach ($details['actions'] as $action) {\n $this->output->writeln(\n sprintf(\n \"%s - php [file] %s%s [params]\",\n $action,\n $name,\n ($action != 'main' ? \":$action\" : '')\n )\n );\n }\n\n // Just for padding\n $this->output->writeln('');\n }\n }", "public function print () : void {\r\n echo $this->getTitle(), PHP_EOL, PHP_EOL;\r\n echo $this->getInfo(), PHP_EOL, PHP_EOL;\r\n\r\n foreach ($this->items as $index => $value) {\r\n echo ($index + 1) . '. ' . $value->getText(), PHP_EOL;\r\n }\r\n\r\n echo PHP_EOL;\r\n }", "public function cmdDump() {\n $this->output()->outputDump(\n $this->commandToArray(Terminus::getRootCommand())\n );\n }", "public function show(Slot $slot)\n {\n //\n }", "abstract function printOutput()", "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "abstract public function print_item();", "function printvalues(){\n\t\tprint_r([$this->bedroom,$this->bathroom,$this->kitchen, $this->livingroom]);\n\t}", "protected function toString(){\n echo '<br>The item name: '.$this->getName().'</br>The item price is : '.$this->getPrice();\n }", "function printOptions()\n {\n $lines = $this->outputOptions();\n echo join( \"\\n\" , $lines );\n }", "public function __toString()\n {\n print($this->np . \" \" . $this->nr . \"\\n\");\n\n for($i = 0; $i < count($this->procData); ++$i)\n {\n for($j = 0; $j < count($this->procData[$i]); ++$j)\n {\n if($j == 0)\n print(\"\\n\" . $this->procData[$i][$j] . \"\\t\");\n else if(($j % 2) == 0)\n print($this->procData[$i][$j] . \"\\t\");\n else\n print($this->procData[$i][$j] . \" \");\n }\n }\n\n print(\"\\n\");\n print(\"WAITING QUEUE: \");\n print_r($this->waiting);\n print(\"READY QUEUE: \");\n print_r($this->ready);\n\n return \"\";\n }", "private function printItems()\n\t{ \n\t\tforeach ($this->items as $item) \n\t\t{\n\t\t\t$thisItems = $item->get_elements();\n\t\t\t\n\t\t\t//the argument is printed as rdf:about attribute of item in rss 1.0 \n\t\t\techo $this->startItem($thisItems['link']['content']);\n\t\t\t\n\t\t\tforeach ($thisItems as $zajlib_feed_item ) \n\t\t\t{\n\t\t\t\techo $this->makeNode($zajlib_feed_item['name'], $zajlib_feed_item['content'], $zajlib_feed_item['attributes']); \n\t\t\t}\n\t\t\techo $this->endItem();\n\t\t}\n\t}", "function execCmds() {\n\tglobal $commands;\n\tforeach ($commands as $idx => $command) {\n\t\tshowCmdT($idx, $command);\n\t}\n}", "protected function listAvailableCommands()\n {\n $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) {\n if (Str::startsWith($key, 'neat:')) {\n return [$key => $command];\n }\n\n return [];\n })->toArray();\n\n $width = $this->getColumnWidth($commands);\n\n /** @var Command $command */\n foreach ($commands as $command) {\n $this->line(sprintf(\" %-{$width}s %s\", $command->getName(), $command->getDescription()));\n }\n }", "public function __toString() {\r\n\t\t$return = $this->getName () . ' : every ';\r\n\t\tforeach ( $this->getDays () as $d ) {\r\n\t\t\t$return .= $d . ', ';\r\n\t\t}\r\n\t\t$return .= '<br>from ' . $this->getStartTime () . ' to ' . $this->getEndTime ();\r\n\t\t$return .= '<br>during this time slot : ' . $this->getTimeSlot ();\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "function dump() {\n\t\t$vars = get_object_vars( $this );\n\t\techo '<pre style=\"text-align:left\">';\n\t\tforeach( $vars as $name => $value ) {\n\t\t\techo $name.': '.$value.\"\\n\";\n\t\t}\n\t\techo '</pre>';\n\t}", "private function printItems()\n {\n foreach ($this->items as $item) {\n $thisItems = $item->getElements();\n\n\n echo $this->startItem($thisItems['link']['content']);\n\n foreach ($thisItems as $feedItem) {\n echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']);\n }\n echo $this->endItem();\n }\n }", "public function __toString()\n {\n $sql = array();\n foreach ($this->items as $command => $args)\n if (!empty($args))\n $sql[] = sprintf(\"%s %s\", $command, $args);\n\n return implode(' ', $sql);\n }", "private function print() {\n\t\tvar_dump($this->getParams());\n\t}", "function listCmds() {\n\tglobal $commands; ?>\n\t<ul width=\"700\">\n<?php\tforeach ($commands as $idx => $command): ?>\n\t\t<li>\n\t\t\t<strong><a href=\"#<?= htmlspecialchars($command['title']) ?>\"><?= htmlspecialchars($command['title']) ?></a></strong>\n\t\t</li>\n<?php\tendforeach; ?>\n\t</ul>\n<?php\n}", "public function printCardInfo() {\n\t\tprint $this->strRepresentation();\n\t}", "function dumpContents()\r\n {\r\n\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n //TODO [Perez][JLeon] Do we leave this method?\r\n // call the OnShow event if assigned so the Text property can be changed\r\n if ($this->_onshow != null)\r\n {\r\n $this->callEvent('onshow', array());\r\n }\r\n\r\n $avalue = $this->_text;\r\n $avalue=str_replace('\"','&quot;',$avalue);\r\n $type = \"progress\";\r\n if ($this->_type == pbsMeterBar)\r\n $type = \"meter\";\r\n echo \"<$type id=\\\"$this->_name\\\" value=\\\"$avalue\\\" $attributes>$this->_text</$type>\";\r\n\r\n }", "function display() {\n $output = '';\n \n $output .= $this->_component_id;\n $output .= '<br/>' . $this->_component_type_id;\n $output .= '<br/>' . $this->_quote_id;\n $output .= '<br/>' . $this->component_name;\n $output .= '<br/>' . $this->metal;\n $output .= '<br/>' . $this->powdercoating;\n $output .= '<br/>' . $this->fabric;\n $output .= '<br/>' . $this->processing;\n $output .= '<br/>' . $this->wastage;\n $output .= '<br/>' . $this->installation;\n $output .= '<br/>' . $this->margin;\n $output .= '<br/>' . $this->other;\n\n $output .= '<br/>';\n \n return $output;\n }", "function getMessagesPrint(){\r\n foreach ($this->messages as $key => $value) {\r\n echo $this->messagePrefixForPrint.$value.\"<br>\\n\";\r\n }\r\n }", "public function help()\n\t\t{\n\t\t\t//On défini les commandes dispo\n\t\t\t$commands = array(\n\t\t\t\t'generateObjectFromTable' => array(\n\t\t\t\t\t'description' => 'Cette commande permet de générer un objet correspondant à la table fournie en argument.',\n\t\t\t\t\t'requireds' => array(\n\t\t\t\t\t\t'-t' => 'Nom de la table pour laquelle on veux générer un objet',\n\t\t\t\t\t),\n\t\t\t\t\t'optionals' => array(),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$message = \"Vous êtes ici dans l'aide de la console.\\n\";\n\t\t\t$message .= \"Voici la liste des commandes disponibles : \\n\";\n\n\t\t\t//On écrit les texte pour la liste des commandes dispos\n\t\t\tforeach ($commands as $name => $value)\n\t\t\t{\n\t\t\t\t$requireds = isset($value['requireds']) ? $value['requireds'] : array();\n\t\t\t\t$optionals = isset($value['optionals']) ? $value['optionals'] : array();\n\n\t\t\t\t$message .= '\t' . $name . ' : ' . $value['description'] . \"\\n\";\n\t\t\t\t$message .= \"\t\tArguments obligatoires : \\n\";\n\t\t\t\tif (!count($requireds))\n\t\t\t\t{\n\t\t\t\t\t$message .= \"\t\t\tPas d'arguments\\n\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tforeach ($requireds as $argument => $desc)\n\t\t\t\t\t{\n\t\t\t\t\t\t$message .= '\t\t\t\t- ' . $argument . ' : ' . $desc . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$message .= \"\t\tArguments optionels : \\n\";\n\t\t\t\t\n\t\t\t\tif (!count($optionals))\n\t\t\t\t{\n\t\t\t\t\t$message .= \"\t\t\tPas d'arguments\\n\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tforeach ($optionals as $argument => $desc)\n\t\t\t\t\t{\n\t\t\t\t\t\t$message .= '\t\t\t\t- ' . $argument . ' : ' . $desc . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo $message;\n\t\t}", "function display() {\n\t\tforeach($this as $prop => $val) {\n\t\t\techo $val;\n\t\t}\n\t}", "function printStatus (): void {\r\n foreach ( $this->allPlayers() as $player ) {\r\n $player->printDeck();\r\n }\r\n }", "public function getSlotsList(){\n return $this->_get(5);\n }", "public function dump()\n {\n foreach ($this->sudoku as $y => $row) {\n foreach ($row as $x => $value) {\n echo \"{$value} \";\n }\n\n echo \"\\n\";\n }\n\n echo \"\\n\";\n }", "private function visitSlots(SlotList $slots, OutputVisitor $outputVisitor): Generator\n {\n foreach ($slots as $slot) {\n yield $outputVisitor->visit($slot);\n }\n }", "function printGenes() {\n\t foreach($this->genes as $g) {\n\t $s .= \"[\".$g[0].','.$g[1]. \"]\";\n\t }\n\t return $s;\n\t}", "static public function dumpInstances()\n {\n foreach (static::$instances as $k => $v) {\n echo $k . ':' . get_class($v) . ':'; print_r($v->getOption()); PHP_EOL;\n }\n }", "public function printValues() {\n\t\t//print_r($this->objects);\n\t\tforeach ($this->objects as $value) {\n\t\t\techo \"$value<br/>\";\n\t\t}\n\t}", "public function getSlots()\n {\n return $this->slots;\n }", "public function toString()\n {\n echo \"<h3>Executive Manager</h3>\";\n parent::toString();\n echo \"<br><strong>Bonus</strong>: $\", number_format($this->getBonus(), 2);\n }", "function printSnapshots($snapshots) {\n\tforeach ($snapshots as $snapshot) {\n\t\techo \"{$snapshot['SnapshotId']}\\n\";\n\t\techo \"{$snapshot['VolumeId']}\\n\";\n\t\techo date('Y-m-d H:i:s').$snapshot['StartTime']->getTimestamp().\"\\n\";\n\n\t\tif (isset($snapshot['Tags'])) {\n\t\t\t$tags = array_walk($snapshot['Tags'], function($tag, $index) {\n\t\t\t\techo \"{$tag['Key']}={$tag['Value']} | \";\n\t\t\t});\n\t\t\techo \"\\n\";\n\t\t}\n\n\t\techo \" = = = \\n\";\n\t}\n}", "public function __toString() {\n\t\t\treturn $this->builder->command()->__toString();\n\t\t}", "public function help()\n {\n echo PHP_EOL;\n $output = new Output;\n $output->write('Available Commands', [\n 'color' => 'red',\n 'bold' => true,\n 'underline' => true,\n ]);\n echo PHP_EOL;\n\n $maxlen = 0;\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n if ($len > $maxlen) {\n $maxlen = $len;\n }\n\n }\n\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n $output->write(' ')\n ->write($key, ['color' => 'yellow'])\n ->write(str_repeat(' ', $maxlen - $len))\n ->write(' - ')\n ->write($description);\n\n echo PHP_EOL;\n }\n\n echo PHP_EOL;\n\n }", "public function print();", "function printStats() {\n\n\t\t$this->printStatsTable($this->table);\n\t\t$this->printStatsPlayers($this->players);\n\n\t}", "function printNeighbors(){\n\t\tforeach($vertexList as $v){\n\t\t\tif(count($v->neighbors) > 0){\n\t\t\t\tprint($word . \": \");\n\t\t\t\tforeach($v->neighbors as $vertex){\n\t\t\t\t\tprint($vertex->word.\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getCommands();", "function robm_dump() {\r\n echo '<pre style=\"border:1px solid #000; padding:5px; margin:5px; max-height:150px; overflow:auto;\" id=\"' . md5(serialize($object)) . '\">';\r\n $i = 0; $args = func_get_args();\r\n foreach ( (array) $args as $object ) {\r\n if ( $i == 0 && count($args) > 1 && is_string($object) )\r\n echo \"<h3>$object</h3>\";\r\n var_dump($object);\r\n $i++;\r\n }\r\n echo '</pre>';\r\n }", "function describe() {\n print(\"\\nI am \" . $this->getName() . \" - \" . $this->getCode() . \" price: \" . $this->price);\n }", "function debugdeck($deck) {\n\t$txt = '' ;\n\tforeach ( $deck->main as $id => $card )\n\t\t$txt .= ' - '.$card->name.'\\n' ;\n\tforeach ( $deck->side as $id => $card )\n\t\t$txt .= ' - '.$card->name.'\\n' ;\n\treturn $txt ;\n}", "function printOut(){\n\t\tfor($i=0;$i<sizeof($this->_Items);$i++){\n\t\t\t$this->_Items[$i]->flush();\n\t\t}\n\t}", "public function printPath(): void\n {\n [$row, $column] = $this->last;\n [\"--show-grid\" => $gridType] = $this->args;\n for ($r = 0; $r < count($this->grid_array); $r++) {\n echo \"[\";\n for ($c = 0; $c < count($this->grid_array[$r]); $c++) {\n $grid = ($gridType == \"symbol\")\n ? $this->resolve($this->grid_array[$r][$c])[\"symbol\"]\n : $this->grid_array[$r][$c];\n echo ($c == 0) ? \"\" : \"[\";\n echo ($r == $row && $c == $column)\n ? \"(\" . $grid . \")\"\n : \" \" . $grid . \" \";\n echo ($c == count($this->grid_array[$r]) - 1) ? \"\" : \"]\";\n }\n echo \"] \\n\";\n }\n }", "public function getSlotname()\n {\n return $this->slotname;\n }", "private static function get_commands_list(){ return array_keys(self::$current_runner->commands_list); }", "function dump_steps($steps) {\n $str = '';\n foreach ($steps as $step) {\n if ($step['action'] == 'create_slice') {\n $str .= \" action = create_slice\\n\";\n } else {\n $str .= sprintf(\" action = %s, id = %s\\n\", $step['action'], $step['id']);\n }\n }\n return $str;\n }", "public function generateCommands();", "function printStatsKv() {\n\n\t\t$this->printStatsTableKv($this->table);\n\t\t$this->printStatsPlayersKv($this->table, $this->players);\n\n\t}", "function help()\n {\n return\n \"\\n -------------------------------------------------------------------------\\n\".\n \" ---- ~ BidVest Data : Assessment Commands ~ -------\\n\".\n \" -------------------------------------------------------------------------\\n\\n\".\n \" All comamnds begin with '\\e[1m\\033[92mphp run.php\\033[0m'\\e[0m\\n\".\n \" Then append of the folling options: \\n\".\n \" -------------------------------------------------------------------------\\n\".\n \"\\n\\n\".\n \" 1. \\e[1m --action=\\033[34madd \\033[0m \\e[0m : \\e[3mThis allows you to add a record.\\e[0m \\n\\n\".\n \" 2. \\e[1m --action=\\033[33medit \\033[0m \\e[1m--id=<vaild_id>\\e[0m \\e[0m : \\e[3mEdit a student record.\\e[0m \\n\\n\".\n \" (leave filed blank to keep previous value)\\n\\n\".\n \" 3. \\e[1m --action=\\033[91mdelete\\033[0m \\e[1m--id=<vaild_id>\\e[0m \\e[0m : \\e[3mDelete a student record (remove file only).\\e[0m \\n\\n\".\n \" 4. \\e[1m --action=\\033[36msearch \\033[0m \\e[0m : \\e[3mSearch for a student record. \\e[0m \\n\\n\".\n \" -------------------------------------------------------------------------\\n\\n\".\n \" Where \\e[1m<valid_id>\\e[0m must be an 8-digit number.\\n\\n\".\n \" -------------------------------------------------------------------------\\n\";\n }", "public function __toString() {\n\t\t$ret = $this->getName() . \" [\" . $this->getGold() . \"]\";\n\n\t\tif ($this->getDoneTurn()) {\n\t\t\t$ret .= \" - DONE\";\n\t\t}\n\n\t\t$ret .= \"\\n\";\n\t\n\t\t$ret .= $this->getCardHand() . \"\\n\";\n\t\t$ret .= $this->getCardPublicStand() . \"\\n\";\n\t\t$ret .= $this->getCardHiddenStand() . \"\\n\";\n\n\t\tif (count($this->getCardAux()) > 0) {\n\t\t\t$ret .= $this->getCardAux() . \"\\n\";\n\t\t}\n\n\t\treturn $ret;\n\t}", "function printSummary () {\n foreach ($this->ids as $i) {\n $this->link[$i]->printSummary();\n }\n }", "public function dprint()\n\t{\n\t\tprint_r( $this->debug );\n\t}", "public function glitchDump(): iterable\n {\n yield 'properties' => [\n '*adapter' => $this->_adapter->getDsn()->getDisplayString(),\n '*name' => $this->_name\n ];\n }", "function print_all_rooms(){\n $rooms = new RoomsView();\n $rooms->print_all_rooms();\n }", "protected function getShortCommandIdentifiers() {}", "function dumpInfo() {\n $op = '';\n foreach ($this->sectionList as $sectionName=>$sec) {\n $op .= $sec->dumpInfo();\n }\n return $op;\n }", "public function printClass() {\n print $this->track_id . '::' . $this->track_name . '::' . $this->track_icon . '::' . $this->track_primary_color . '::' . $this->track_secondary_color . '::' . $this->track_date_insert . '::' . $this->track_last_update;\n }", "public function glitchDump(): iterable\n {\n yield 'definition' => $this->toString();\n }", "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "function show_symbol()\n {\n echo \"Symbols purchased in Stack are:\\n\";\n $this->object_linkedlist->display();\n }", "abstract protected function getCommandList();", "function scaffold_dump() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\tprintf(\"<pre>\\n%s\\n</pre>\\n\", print_r($arg, true));\n\t}\n}", "function printState() {\n\t\t$state = $this->getState();\n\t\techo $state;\n\n\t\n\t}", "public static function getAllTimeSlots(){\n $result = DB::dataQuery(\"SELECT * FROM timeslots\");\n foreach ($result as $timeslot) {\n echo \"<option value=\".$timeslot['idTimeSlot'].\"> Dia: \".$timeslot['dayOfWeek']. \" De \". $timeslot['startTime'] .\" a \". $timeslot['endTime'].\"</option>\";\n }\n }", "public function ovpnDisplayConfigSet()\n {\n foreach ($this as $key=>$value) {\n echo \"$key = $value<br />\\n\";\n }\n }", "public function printApplicationDetails()\n {\n $this->output->writeln($this->console->getName());\n\n if (!is_null($this->console->getVersion())) {\n $this->output->writeln('version '.$this->console->getVersion());\n }\n\n // New line padding\n $this->output->writeln('');\n }", "public function print(){\n echo $this->output;\n }", "public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }", "public function start_output() {\n echo \"[\";\n }", "public function getCommands()\n {\n return [\n ];\n }", "public function print_output() {\r\n foreach($this->customFields as $customField){\r\n if(get_post_meta( get_the_ID(), $customField['name'] , true )): ?>\r\n <li class=\"details-item\">\r\n <strong><?php echo __($customField['title'] , 'ex-list'); ?></strong> <?php echo get_post_meta( get_the_ID(), $customField['name'] , true ); ?>\r\n\t\t\t\t</li>\r\n <?php\r\n endif;\r\n }\r\n }", "function printout() {\n print_a($this);\n }", "public function printAll(){\n $temp = $this->head;\n while($temp != NULL){\n echo $temp->data . \" \";\n $temp = $temp->next;\n }\n }", "public static function dump(){\n self::_print(\"enabled : \". (int)self::$enabled .\"\\n\");\n self::_print(\"disabled : \". (int)self::$disabled .\"\\n\");\n self::_print_r(self::$list);\n }", "function debugRoute($route){\n\t\techo 'Router::connect(\\''.$route['Route']['url'].'\\', array(';\n\t\t$parts = array();\n\t\tforeach($route['Route']['values'] as $k => $v){\n\t\t\t$parts[] = \"'$k' => '$v'\";\n\t\t}\n\t\techo implode(', ', $parts);\n\t\techo '), array(';\n\t\t$parts = array();\n\t\tforeach($route['Route']['regex'] as $k => $v){\n\t\t\t$parts[] = \"'$k' => '$v'\";\n\t\t}\n\t\techo implode(', ', $parts);\n\t\techo ')); </br>';\n\t}", "private static function printAll() {\r\n\t\tforeach (self::$global as $type) {\r\n\t\t\t$type->dump();\r\n\t\t}\r\n\t}", "function registerChatCommands() {\n\t\tif ($this->debug) {\n\t\t\tif (isset($this->chat_commands)) {\n\t\t\t\tforeach ($this->chat_commands as $command) {\n\t\t\t\t\t// display message if debug mode is set to true ...\n\t\t\t\t\t$this->console_text('register chat command: ' . $command->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function registerConsoleCommands()\n {\n $this->commands(DB2Reader\\Commands\\SyncStructures::class);\n }", "public function mostrar()\n\t\t{\n\t\t\tfor ($i=0; $i<count($this->nombres); $i++) { \n\t\t\t\techo $this->nombres[$i].\" \".$this->apellidos[$i].\"<br>\";\n\t\t\t}\n\t\t}", "public function methods()\n\t{\n\t\techo \"->ProcessTransaction(\\$data[]);<br>\\n\";\n\t\techo \"->ProcessVaultTransaction(\\$data[]);<br>\\n\";\n\t\techo \"->UpdateTransaction(\\$data[]);<br>\\n\";\n\t\techo \"->ProcessAccount(\\$data[]);<br>\\n\";\n\t\techo \"->ProcessCustomer(\\$data[]);<br>\\n\";\n\t\techo \"->ProcessCustomerAndAccount(\\$data[]);<br>\\n\";\n\t\techo \"->AddABAccount(\\$data[]);<br>\\n\";\n\t\techo \"->UpdateABAccount(\\$data[]);<br>\\n\";\n\t\techo \"->UpdateABSchedule(\\$data[]);<br>\\n\";\n\t}", "function snmp_get_quick_print ($d) {}", "public function getAvailableCommands() {}", "public function __toString()\n {\n return 'CardGame32 : ' . count($this->cards) . ' carte(s)';\n }", "function execute(Angie_Output $output) {\n $commands = Angie::getAvailableCommands();\n if(is_foreachable($commands)) {\n $output->printMessage('Available commands:');\n $output->printMessage('');\n \n $longest_command_name = 0;\n $name_description_map = array();\n foreach($commands as $command => $handler_file) {\n if(strlen($command) > $longest_command_name) {\n $longest_command_name = strlen($command);\n } // if\n \n require_once $handler_file;\n $handler = Angie::constructCommandHandler($command);\n \n $name_description_map[$command] = $handler->defineDescription();\n } // foreach\n \n foreach($name_description_map as $name => $description) {\n $result = $name;\n \n for($i = strlen($name); $i < ($longest_command_name + 2); $i++) {\n $result .= ' ';\n } // for\n \n $result .= '- ' . $description;\n \n $output->printMessage($result);\n } // foreach\n \n $output->printMessage('');\n $output->printMessage('To see more information for any specific command type <command> --help');\n } else {\n $output->printMessage('No commands available');\n } // if\n }", "function printCharacteristics($car){\n echo 'Color: '.$car->getColor();\n echo \"</br>\";\n echo 'Power: '.$car->getPower();\n echo \"</br>\";\n echo 'Brand: '.$car->getBrand();\n }", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "protected static function command_details($options, $keys) {\r\n $propel_class = call_user_func(array(get_called_class(), 'getPropelClass')) . 'Query';\r\n $q = new $propel_class;\r\n\r\n $item = $q->findOneBy($keys['id']['colname'], $options['id']);\r\n if ($item == null) {\r\n $cmdname = call_user_func(array(get_called_class(), 'CLI_commandName'));\r\n trigger_error(sprintf(\"No $cmdname found for id %d.\\n\", $options['id']), E_USER_ERROR);\r\n }\r\n\r\n $table_keys = array_keys(array_filter($keys, function($val) {\r\n return isset($val['colname']);\r\n }));\r\n $results = self::prepareQueryResult(array($item));\r\n self::printTable($table_keys, $results);\r\n }", "public function dump()\n\t{\n\t\t$this->read();\n\t\techo '<br /><span style=\"color:#c00;\">Game Dump:</span><br />';\n\t\techo '| ID: '.$this->data['Game']['id'].'<br />';\n\t\techo '| Active Player: '.$this->data['Game']['active_player'].'<br />';\n\t\t\n\t\techo '| Players:<br />';\n\t\t$player_ids = array_values($this->Player->find('list', array(\n\t\t\t'fields' => array(\n\t\t\t\t'Player.user_id',\n\t\t\t\t'Player.id',\n\t\t\t),\n\t\t\t'conditions' => array(\n\t\t\t\t'game_id' => $this->id,\n\t\t\t),\n\t\t\t'order' => 'Player.id ASC',\n\t\t)));\n\t\tforeach ($player_ids as $player_id)\n\t\t{\n\t\t\t$this->Player->id = $player_id;\n\t\t\t$this->Player->read();\n\t\t\techo '| - '.$this->Player->data['Player']['id'].': User('.$this->Player->data['Player']['user_id'].') Rack('.$this->Player->data['Player']['rack_tiles'].')<br />';\n\t\t}\n\t\t\n\t\techo '| Board:<br />';\n\t\tfor ($y = 0; $y < 15; $y++)\n\t\t{\n\t\t\techo '| ';\n\t\t\tfor ($x = 0; $x < 15; $x++)\n\t\t\t{\n\t\t\t\t$r = $this->PlacedTile->find('first', array(\n\t\t\t\t\t'recursive' => 0,\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'PlacedTile.game_id' => $this->id,\n\t\t\t\t\t\t'PlacedTile.x' => $x,\n\t\t\t\t\t\t'PlacedTile.y' => $y,\n\t\t\t\t\t),\n\t\t\t\t));\n\t\t\t\tif (empty($r))\n\t\t\t\t{\n\t\t\t\t\techo ' . ';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($r['PlacedTile']['letter'] == '_')\n\t\t\t\t\t{\n\t\t\t\t\t\techo '['.strtolower($r['PlacedTile']['blankletter']).']';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo ' '.strtoupper($r['PlacedTile']['letter']).' ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '<br />';\n\t\t}\n\t}", "public function PrintData() {\r\n echo \"\".\"<br/>\";\r\n echo $this->string_var.\"<br/>\";\r\n echo $this->int_var.\"<br/>\";\r\n }" ]
[ "0.6831905", "0.67604", "0.59623843", "0.5884462", "0.58190185", "0.5814746", "0.57653445", "0.56946844", "0.5651435", "0.5569376", "0.5568352", "0.556773", "0.55452466", "0.54640573", "0.5452033", "0.5443967", "0.5429546", "0.5427174", "0.5385554", "0.53571135", "0.53560734", "0.5352366", "0.53170925", "0.53055876", "0.5292853", "0.5288904", "0.5273171", "0.5256273", "0.5246263", "0.5239278", "0.5236566", "0.5228875", "0.5228477", "0.5178831", "0.5164204", "0.51284784", "0.51078266", "0.5091827", "0.50913393", "0.5090797", "0.50724715", "0.50668466", "0.50633013", "0.50458384", "0.5043604", "0.5040861", "0.5039429", "0.5035454", "0.50253403", "0.5019011", "0.5015676", "0.50126183", "0.49989974", "0.49910903", "0.49801713", "0.49638698", "0.4960029", "0.4959997", "0.4942201", "0.493464", "0.49330166", "0.49249533", "0.49167088", "0.49128926", "0.49066475", "0.49009553", "0.49007437", "0.48971683", "0.48971683", "0.4896863", "0.4877155", "0.48595703", "0.4856905", "0.48539233", "0.48494086", "0.48470965", "0.48470712", "0.48452997", "0.4841792", "0.48403218", "0.48396528", "0.48393968", "0.48360533", "0.48259866", "0.48207483", "0.48168364", "0.48163265", "0.4813686", "0.4805832", "0.48004594", "0.47916785", "0.47817886", "0.4777565", "0.47748533", "0.4772301", "0.47688383", "0.47688383", "0.47676516", "0.4766785", "0.47657275" ]
0.6199668
2
Devuelve el nombre del edificio segun su codigo.
public static function getDayName() { $fecha = [ 'dia' => ['domingo','lunes','martes','miercoles','jueves','viernes','sabado',], 'mes' => ['enero','febrero','marzo','abril','mayo','junio','julio', 'agosto','septiembre','octubre','noviembre','diciembre'] ]; return $fecha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdEdificio()\n {\n return $this->c_id_edificio;\n }", "function getNameForONIXCode() {\n\t\t$onixCodelistItemDao =& DAORegistry::getDAO('ONIXCodelistItemDAO');\n\t\t$codes =& $onixCodelistItemDao->getCodes('List150'); // List150 is for object formats\n\t\treturn $codes[$this->getEntryKey()];\n\t}", "protected function fijarId(){\n return \"cod_categoria\";\n }", "public function getDocumentoNombre(){\n return $this->docPersona.' - '.$this->nombre.' '.$this->apellidos;\n \n }", "function &getERCName() {\n\t\t$extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');\n\t\t$erc = $extraFieldDao->getExtraField($this->getERCId());\n $ercName = $erc->getLocalizedExtraFieldName();\n return $ercName;\n\t}", "function dame_codigo($codigo) {\n $query = $this->db->query(\"select nExpedienteCodigo from tb_sistram_expediente where nExpedienteId= $codigo\");\n if ($query->num_rows() > 0) {\n $row = $query->row();\n $tipo = $row->nExpedienteCodigo;\n return $tipo;\n }\n }", "public function getCod_especialidad()\n {\n return $this->cod_especialidad;\n }", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "public function getCodeName(): string;", "function name($code) {\n\t\t\treturn $code;\t\n\t\t}", "function nombrecampo($numcampo) {\r\n\r\n return mysql_field_name($this->Consulta_ID, $numcampo);\r\n\r\n}", "public function getNomJoli($code){\n\t\tswitch($code) {\n\t\t\tcase 'ACC':\n\t\t\t\treturn 'Accueil';\n\t\t\t\tbreak;\n\t\t\tcase 'FOU':\n\t\t\t\treturn 'Fournitures';\n\t\t\t\tbreak;\n\t\t\tcase 'USR':\n\t\t\t\treturn 'Utilisateurs';\n\t\t\t\tbreak;\n case 'CAT':\n return 'Catégories';\n break;\n case 'COM':\n return 'Commande';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "function get_nome_cidade()\n {\n if (empty($this->cidade))\n $this->cidade = new Cidade($this->id_cidade);\n \n return $this->cidade->nome;\n }", "public function CodigoProducto()\n\t{\n\t\tself::SetNames();\n\n\t\t$sql = \" select codproducto from productos order by codproducto desc limit 1\";\n\t\tforeach ($this->dbh->query($sql) as $row){\n\n\t\t\t$codproducto[\"codproducto\"]=$row[\"codproducto\"];\n\n\t\t}\n\t\tif(empty($codproducto[\"codproducto\"]))\n\t\t{\n\t\t\techo $nro = '00001';\n\n\t\t} else\n\t\t{\n\t\t\t$resto = substr($codproducto[\"codproducto\"], 0, -0);\n\t\t\t$coun = strlen($resto);\n\t\t\t$num = substr($codproducto[\"codproducto\"] , $coun);\n\t\t\t$dig = $num + 1;\n\t\t\t$codigo = str_pad($dig, 5, \"0\", STR_PAD_LEFT);\n\t\t\techo $nro = $codigo;\n\t\t}\n\t}", "protected abstract function getNombreArchivo();", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function getNombreEmpresa(){\n $empresa=DatosEmpresa::datosGenerales($this->idempresa);\n if($empresa==null)\n return '';\n else\n return $empresa->razonsocial;\n }", "function getId_nom()\n {\n if (!isset($this->iid_nom) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_nom;\n }", "function getId_nom()\n {\n if (!isset($this->iid_nom) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_nom;\n }", "public function nombreAsocId($nombre){\n $todosLosUsuarios = $this->buscarUsuarios();\n $datosDeUsuario = [];\n $idDelUsuario='';\n foreach ($todosLosUsuarios as $usuario) {\n if($usuario['nombre'] == $nombre){\n $datosDeUsuario[] = $usuario;\n }\n }\n foreach ($datosDeUsuario as $dato) {\n $idDelUsuario = $dato['id'];\n }\n\n return $idDelUsuario;\n }", "public function getCod_entidad()\n {\n return $this->cod_entidad;\n }", "public function getNomAlternatif()\n {\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ DEBUT; \");\n\n $strNomAlter = \"\";\n \n if ($this->getId() == Budget_typeTable::RESTITUE)\n {\n $strNomAlter = libelle('msg_libelle_restitution');\n } else\n {\n $strNomAlter = libelle('msg_libelle_allocation');\n }\n\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ FIN; \");\n\n return $strNomAlter;\n }", "public function getCodeEmploi() {\n return $this->codeEmploi;\n }", "public function getOrgaName();", "public function getNameE()\n {\n return $this->name_e;\n }", "function RegEdificio ($nEdificio){\n\t\t \t$sql=\"INSERT INTO edificio(nomEdf)\n\t\t \tVALUES('$nEdificio')\";\n\t\t\t$this->db->query($sql, Adapter::QUERY_MODE_EXECUTE);\n\t\t\t$idEdificio = $this->db->getDriver()->getLastGeneratedValue();\n\t\t\t\n\t\t\treturn $this->DatosEdificio($idEdificio);\n\t\t }", "function getNameHelper(){\n\treturn 'Ejercicio de aprendizaje';\n}", "function getCodUsu() {\n return $this->codUsu;\n }", "public function getListeName()\n\t{\n\t\treturn substr($this->getLogicalId(), strpos($this->getLogicalId(),\"_\")+2, 1).\" - \".parent::getName();\n\t}", "public function getCompanyNameByCompanyCode()\n {\n $nombre = $this->db->select(\"t.empresa as value\")\n ->from(\"token t\") \n ->where(\"t.codigo\", $this->codigo)\n ->get()->row();\n\n // echo '<pre>' . var_dump($nombre) . '</pre>';\n return $nombre;\n }", "public function getNom();", "public function obtener_nombre()\n {\n echo \" el nombre es del alumno es: \" .$this -> nombre; \n }", "public function getName()\n {\n return 'nombreUsuraio';\n }", "public function getCod_especial()\n {\n return $this->cod_especial;\n }", "public function getNombreCompleto() {\n\t\treturn $this->txt_username . ' ' . $this->txt_apellido_paterno . ' ' . $this->txt_apellido_materno;\n\t}", "function getNombre_dl()\n {\n if (!isset($this->snombre_dl) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->snombre_dl;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getNombre_convenio() {\n return $this->nombre_convenio;\n }", "public function getCod_autor()\r\n {\r\n return $this->cod_autor;\r\n }", "public function getNombre_empresa(){\n return $this->nombre_empresa;\n }", "public function getCoEdificio()\n\t{\n\t\treturn $this->co_edificio;\n\t}", "public function getIdDetail()\n {\n \treturn \"AVD-03-\". date(\"Y\") . sprintf('%05d', $this->id_actadocumentacion);\n }", "public function getCodigoViaje(){\n\t\t$codigo = 'VPI';\n\t\t$codigo .= '-'.str_pad($this->nroViaje['valor'], 4, '0', STR_PAD_LEFT);\n\t\treturn $codigo;\n\t}", "public function getCodice()\n {\n return $this->codice;\n }", "function getNome($codice) {\n\t$nome=\"\";\n\t$connessione=dbConnectionData::getMysqli();\t//CONNESSIONE AL DATABASE\n\ttry {\n\t\tif ($connessione->connect_errno) {\n\t\t\tthrow new Exception(\"Connessione fallita: \".$connessione->connect_error.\".\");\n\t\t} else {\n\t\t\t$query=\"SELECT nome FROM Gruppi WHERE idGruppo=\\\"\".$codice.\"\\\"\";\t//CREAZIONE DELLA QUERY\n\t\t\tif (!$result=$connessione->query($query)) {\n\t\t\t\t$page .= \"Query non valida: \".$connessione->error.\".\";\n\t\t\t} else {\n\t\t\t\tif ($result->num_rows>0) {\n\t\t\t\t\t$row=$result->fetch_array(MYSQLI_ASSOC);\n\t\t\t\t\t$nome=$row['nome'];\n\t\t\t\t}\n\t\t\t\t$result->free();\n\t\t\t}\n\t\t\t$connessione->close();\t//CHIUSURA CONNESSIONE\n\t\t}\n\t} catch (Exception $e){\n\t\t$page .= \"Errore: dati non recuperati (\".$e->getMessage().\").\";\n\t}\n\treturn $nome;\n}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "function tipoedital($cod,$desc){\r\n\t\t$fTpEdital = new fachada_tipoedital();\r\n\t\t$oTipoEdital = $fTpEdital->tipoedital($cod,$desc);\r\n\t\treturn $oTipoEdital;\r\n\t}", "public function getIdByNameEspecialidad($name){//FUNCION PARA VERIFICAR LA EXISTENCIA DE UN CORREO EN TABLA MEDICO\n $objT=new especialidadDAO();\n $resul=$objT->readall();\n $act=0;\n for($i=0;$i<count($resul);$i++){\n if(strtoupper($resul[$i]['nombre']) == strtoupper($name)){\n $act=$resul[$i]['id_especialidad'];\n }\n }\n return $act; \n }", "public function getNodename();", "public function getNomeClasse() {\n return $this->sNomeClasse;\n }", "public function getNOMBRE()\r\n {\r\n return $this->NOMBRE;\r\n }", "public function obtenerNombre() {\n return $this->nombreModelo;\n }", "public function getName() {\n\t\treturn '+edit';\n\t}", "public function getName()\n {\n return 'createrecipe';\n }", "public function getNomeOriginal()\n {\n return $this->nome_original;\n }", "function getCodUsuario() {\n return $this->codUsuario;\n }", "public function getNomtierce()\n {\n return $this->nomtierce;\n }", "public function getNome();", "public function getNome();", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getCode()\n\t{\n\t\tif(Precurio_Utils::isNull($this->code))\n\t\t{\n\t\t\t$c = \"\";\n\t\t\t$str = str_word_count($this->getDisplayName(),1);\n\t\t\tforeach($str as $s)$c .= strtoupper($s{0});\n\t\t\t$this->code=$c;\n\t\t}\n\t\treturn $this->code;\n\t}", "function getKodeFoto(){\n $q = $this->db->query(\"select MAX(RIGHT(kode_foto,3)) as kd_max from tbl_foto\");\n $kd = \"\";\n if($q->num_rows()>0){\n foreach($q->result() as $k){\n $tmp = ((int)$k->kd_max)+1;\n $kd = sprintf(\"%03s\", $tmp);\n }\n }else{\n $kd = \"001\";\n }\n return \"B-\".$kd;\n }", "public function getCodiceFiscale(){ return $this->codiceFiscale;}", "function getDatosNombre_dl()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'nombre_dl'));\n $oDatosCampo->setEtiqueta(_(\"nombre de la delegación\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(30);\n return $oDatosCampo;\n }", "public function setIdEdificio($n)\n {\n echo $this->getContenido();\n $this->c_id_edificio = $n;\n }", "public function getNomOpe()\n {\n return $this->nomOpe;\n }", "public static function getNomeClasse()\n {\n return self::$nomeClasse;\n }", "public function getCodUsuario()\n {\n return $this->codUsuario;\n }", "protected function filename()\n {\n return 'Jogadores_' . date('YmdHis');\n }", "public function getCodPersona()\n {\n return $this->codPersona;\n }", "function get_realizado_pend_por($dni_usu){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$cons_pers = \"SELECT apellidos_usu,nombres_usu FROM usuario WHERE dni_usu='$dni_usu'\";\n\t$resp_pers = mysqli_query($connect,$cons_pers);\n\t$name = \"\";\n\tif($row = mysqli_fetch_array($resp_pers)){\n\t\t$apellidos = $row['apellidos_usu'];\n\t\t$nombres = $row['nombres_usu'];\n\t\t$name = $nombres.' '.$apellidos;\n\t\t$name = mb_convert_case($name, MB_CASE_UPPER, \"UTF-8\");\n\t}else{\n\t\t$name = \"--\";\n\t}\n\treturn $name;\n}", "public function getNome_ano()\n {\n return $this->nome_ano;\n }", "public function getNome(){\n \treturn $this->nome;\n }", "public function getName() {\n return \"text\".$this->hashCode();\n }", "public function get_name();", "public function get_name();", "public function get_name();", "function get_nombre_archivo_xml()\n\t{\n\t\treturn $this->xml_proyecto;\n\t}", "public function getNamaPelajaran();", "public function getCod_entidad_tuicion()\n {\n return $this->cod_entidad_tuicion;\n }", "public function getCodArtFrm()\r\n {\r\n return $this->codArtFrm;\r\n }", "function _jenisDosen($kode){\n\t\tif($kode == 'DS') $name = 'DOSEN BIASA';\n\t\telse if($kode == 'DT') $name = 'DOSEN DENGAN TUGAS TAMBAHAN';\n\t\telse if($kode == 'PR') $name = 'PROFESOR';\n\t\telse if($kode == 'PT') $name = 'PROFESOR DENGAN TUGAS TAMBAHAN';\n\t\telse $name = '';\n\t\treturn $name;\n\t}", "public function getNameLukasBodnariuc(): string{\r\n return $this->nameLukasBodnariuc . \" \" . $this->surnameLukasBodnariuc;\r\n }", "function nombreEmpresa($usuario){\n $db = obtenerBaseDeDatos();\n $sentencia = $db->prepare(\"SELECT * FROM proveedores WHERE id = ?\");\n $sentencia->execute([$usuario]);\n return $sentencia->fetchObject();\n }", "public function accion(){\n \t$accion = $this->accion;\n \tif ($accion == 'CREAR') {\n \t\t$accion = \"CREACION\";\n \t}else{\n \t\t$accion = \"EDICION\";\n \t}\n \treturn $accion;\n }", "public function get_name() {\r\n\t\treturn '';\r\n\t}", "function construir_id_def_base($nombre_fuente)\n\t{\n\t\treturn $this->get_instancia()->get_id().' '.$this->get_id().' '.$nombre_fuente;\n\t}", "public function getArl_nombre(){\n return $this->arl_nombre;\n }", "function buscaNomeExame($iSetorExame) {\n\n $oDaoExame = new cl_lab_setorexame();\n $sSqlExame = $oDaoExame->sql_query_setorexame(null, \"la08_c_descr\", null, \" la09_i_codigo = {$iSetorExame} \");\n $rsExame = db_query($sSqlExame);\n\n if ( !$rsExame ) {\n throw new Exception( _M(ARQUIVO_MENSAGEM_COTAS . \"erro_buscar_nome_exame\") );\n }\n\n $oMsgErro = new stdClass();\n $oMsgErro->exame = db_utils::fieldsMemory($rsExame, 0)->la08_c_descr;\n return $oMsgErro;\n}", "public function getNombre(){\n \n return $this->_nombre;\n \n }", "public function getCodigoOrdem(){\n return $this->iCodigoOrdem;\n }", "public function getCodGenero()\n {\n return $this->cod_genero;\n }", "public function identifier()\n {\n return 'Feegleweb.Octoshop';\n }", "public function getCnameE()\n {\n return $this->cname_e;\n }", "public function getId(): string\n {\n return $this->name;\n }", "public function generarCodigoTipoUsuario() {\n $pdo = Database::connect();\n $sql = \"select max(ID_TIPO_USU) as cod from INV_TAB_TIPO_USUARIO\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n $res = $consulta->fetch(PDO::FETCH_ASSOC);\n $nuevoCod = '';\n if ($res['cod'] == NULL) {\n $nuevoCod = 'TUSU-0001';\n } else { \n $rest= ((substr($res['cod'], -4))+1).''; // Separacion de la parte numerica TUSU-0023 --> 23\n // Ciclo que completa el codigo segun lo retornado para completar los 9 caracteres \n // TUSU-00 --> 67, TUSU-0 --> 786\n if($rest >1 && $rest <=9){\n $nuevoCod = 'TUSU-000'.$rest;\n }else{\n if($rest >=10 && $rest <=99){\n $nuevoCod = 'TUSU-00'.$rest;\n }else{\n if($rest >=100 && $rest <=999){\n $nuevoCod = 'TUSU-0'.$rest;\n }else{\n $nuevoCod = 'TUSU-'.$rest; \n } \n } \n }\n }\n Database::disconnect();\n return $nuevoCod; // RETORNO DEL NUEVO CODIGO DE TIPO USUARIO\n }", "public function getCrearFoto(){\n\t\treturn 'formulario de de crear Albumes';\n\t}" ]
[ "0.6758011", "0.6630301", "0.6471113", "0.64592123", "0.6432021", "0.6336687", "0.63291", "0.6307226", "0.62652427", "0.6217361", "0.62031114", "0.6189874", "0.6168661", "0.61500144", "0.6143739", "0.61018246", "0.61018246", "0.60910064", "0.6082512", "0.607501", "0.607501", "0.60682946", "0.6056491", "0.60308623", "0.602924", "0.6028067", "0.60229397", "0.602001", "0.6011122", "0.60054165", "0.60050523", "0.6002536", "0.5997001", "0.59670866", "0.59643966", "0.5964265", "0.5961848", "0.59541917", "0.59499407", "0.59499407", "0.5933723", "0.59316355", "0.5922985", "0.5917231", "0.5915118", "0.59127045", "0.59120584", "0.5905549", "0.5902043", "0.59019774", "0.59014076", "0.5899474", "0.58960986", "0.5891335", "0.58867794", "0.5885246", "0.5878995", "0.58765405", "0.58757997", "0.5859395", "0.5851708", "0.5851708", "0.584668", "0.584668", "0.58372235", "0.5834376", "0.58265513", "0.5823716", "0.58173025", "0.5814143", "0.58132637", "0.5810853", "0.5807166", "0.58033663", "0.58019304", "0.57998997", "0.5795983", "0.5795944", "0.57867765", "0.57867765", "0.57867765", "0.57821053", "0.57812715", "0.5777345", "0.5776993", "0.5774462", "0.57739466", "0.5771907", "0.57700926", "0.5767986", "0.57678777", "0.5759301", "0.57565343", "0.57558006", "0.5751317", "0.57492036", "0.5734457", "0.5734018", "0.5732504", "0.5729344", "0.5721225" ]
0.0
-1
all stuff for on page load. Nothing here at the moment, but leaving this for future if needed.
public function ee_breakouts_page_load() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function on_page_init() {\n return true;\n }", "public function onLoad() {\n \n }", "public function onLoad() {\n\t}", "protected function onInit() {}", "protected function __onInit()\n\t{\n\t}", "public function page_init() {\n }", "protected function after_load(){\n\n\n }", "protected function afterLoad()\n {\n }", "public function initPage() {}", "public function initPage() {}", "public function postLoad() { }", "protected function postLoad(){\n\t\t\t\n\t\t}", "function init_page() {\n\n $this->is_logged_in = qa_get_logged_in_userid();\n $this->timer = microtime(true);\n $this->cache_file = $this->get_filename();\n\n if (CACHE_STATUS && $this->check_cache() && $this->do_caching()) {\n $this->get_cache();\n } else if (CACHE_STATUS && $this->do_caching()) {\n ob_start();\n } else {\n return;\n }\n }", "public function afterLoad() { }", "protected function _afterInit() {\n\t}", "public function postLoad() {}", "function run_on_startup(): void {\r\n\r\n\t // Add the current page to GT\r\n\t $this->gtpage = MJKGTAPI::add_page([\r\n\t\t 'id' => 'masthead',\r\n\t\t 'name' => 'Masthead',\r\n\t\t 'source' => self::source,\r\n\t\t 'renderer' => 'MJKMH_Renderer',\r\n\t\t 'settings' => [JKNAPI::settings_page('roles')]\r\n\t ]);\r\n\r\n // Add the ACF filters\r\n\t MJKMH_ACF_Roles::add_filters();\r\n\t MJKMH_ACF_User::add_filters();\r\n\r\n\t // Add the dynamic field loading on the user ACF page\r\n\t global $pagenow;\r\n\t if (($pagenow === 'user-edit.php') || ($pagenow == 'user-new.php')) {\r\n\t \tMJKMH_ACF_User::enqueue_js();\r\n\t }\r\n\r\n }", "protected function init()\n\t{\n\t\t\n\t}", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "protected function setupPage() {}", "protected function _beforeInit() {\n\t}", "protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}", "protected function init() {return;}", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "protected function _init()\r\n\t{\r\n\t}", "public static function onLoad() {\n\t\tF3::$global['BGCOLOR']='FFF';\n\t\tF3::$global['FGTRANS']=32;\n\t\tF3::$global['IBLOCKS']=4;\n\t\tF3::$global['IPIXELS']=64;\n\t\tF3::$global['HEADERS']=array();\n\t\tF3::$global['SITEMAP']=array();\n\t}", "protected function _afterLoad()\n {\n return parent::_afterLoad();\n }", "function PostInit()\n {\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "protected function MetaAfterLoad() {\n\t\t}", "function _on_initialize()\n {\n }", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "function ready();", "public function onPageInitialized()\n {\n // merge global with page specific googlemaps' yaml settings\n $defaults = (array) $this->config->get('plugins.googlemaps');\n $page = $this->grav['page'];\n if (isset($page->header()->googlemaps)) {\n $this->config->set('plugins.googlemaps', array_merge($defaults, $page->header()->googlemaps));\n }\n\n // subscribe to additional events\n $this->enable([\n 'onPageContentProcessed' => ['onPageContentProcessed', 0],\n 'onOutputGenerated' => ['onOutputGenerated', 0]\n ]);\n \n // if the plugin is active on this page\n if ($this->config->get('plugins.googlemaps.enabled', false)) {\n // get this page's cached assets (if any)\n $cache = $this->grav['cache'];\n $this->assetId = md5('googlemaps' . $page->path() . $cache->getKey());\n $this->assetData = $cache->fetch($this->assetId);\n\n // set this page's assets from the cache (if any)\n // note: if enabled flag for the page itself is false then this introduces\n // unnecessary assets (because cache cannot be deleted ...\n $this->setAssetsFromData();\n $this->assetData = null; // avoid saving again in onOutputGenerated()\n }\n }", "protected function init()\n\t{\n\t\t// Override this method as required.\n\t}", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "public function postInit()\n {\n }", "public function generatePage_preProcessing() {}", "public function settings_page_init() {\n $this->registration();\n $this->sections();\n }", "protected function onLoad()\n\t\t{\n\t\t\tparent::onLoad();\n\n\t\t\tif( $this->items->count > 0 )\n\t\t\t{\n\t\t\t\t$this->defaultHTMLControlId = $this->getHTMLControlId() . \"__0\";\n\t\t\t}\n\t\t}", "protected function _preloadContainerData()\r\n\t{\r\n\t\t$this->preloadTemplate('page_nav');\r\n\t}", "public function _on_initialize()\n {\n }", "function ControlOnLoad() {\n\t\tBackendPage::ControlOnLoad();\n\t\t@$this->_fileStorage = new FileStorage($this->Kernel->Settings->GetItem(\"settings\",\"FileStoragePath\"),\n\t\t$this->Request->ToString(\"directory\", \"\", 1));\n\t}", "public function selective_refresh_init()\n {\n }", "public function init()\n {\n // Nothing needs to be done initially, huzzah!\n }", "protected function init() {\n\t}", "protected function init() {\n\t}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "public function _before_init(){}", "function init()\r\n \t{\r\n \t}", "public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }", "public function onInit() {\n\t}", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "public function initialize_settings_page()\n {\n }", "public function onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }", "public function init()\n {\n $this->loadMeta();\n }", "protected function _init()\n\t{\n\t\tparent::_init();\n\t}", "function Page_AfterInitialize()\n{\n $Page_AfterInitialize = true;\n//End Page_AfterInitialize\n\n//Custom Code @418-93AB6436\n// -------------------------\n\n// -------------------------\n//End Custom Code\n\n//Close Page_AfterInitialize @1-379D319D\n return $Page_AfterInitialize;\n}", "protected function _init()\n {\n }", "function init() {\n\t\t\t$this->showHeaders();\n\n\t\t\t// Display the CSS content\n\t\t\t$this->createContent();\n\t\t\t$this->showContent();\n\t\t}", "static function init(){\n\t\t\t\tadd_action('wp_ajax_gdlr_core_get_pb_template', 'gdlr_core_page_builder_template::get_template');\n\t\t\t}", "protected function initialize() {\n\t\t\n\t}", "private function warmUp()\r\n\t{\r\n\t\t$this->loadPage( 1 );\r\n }", "public function wp_loaded()\n {\n }", "function initialize() ;", "function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}", "function admin_page_load() {\n\t\t$this->jetpack->admin_page_load();\n\t}", "public function onDocumentReady()\n {\n return '';\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "protected function init()\n {\n }", "public function onRun()\n {\n $this->page['tagPage'] = $this->property('tagPage');\n $this->page['tagPageSlug'] = $this->paramName('tagPageSlug');\n $this->page['tagsPage'] = $this->property('tagsPage');\n $this->page['tagsPageSlug'] = $this->paramName('tagsPageSlug');\n }", "public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }", "function ControlOnLoad(){\n \t$this->Request->SetValue(\"library\", \"props\");\n \t$id=$this->Request->ToString(\"id\",\"0\");\n \tif ($id!=0)\n \t\t$this->Request->SetValue(\"item_id\", $id);\n\n \t//$this->UseBanners=Engine::isPackageExists($this->Kernel, \"banners\");\n parent::ControlOnLoad();\n }", "public function onAfterInit() {\n\t\t// the admin section to 'grow' over time. We only need the css and js\n\t\t// for login, reset, logout and so on.\n\t\tif(!$this->owner->getRequest()->isAjax()) {\n\t\t\tDNRoot::include_requirements();\n\t\t}\n\t}", "public function initPageHeaders()\n\t{\n\t\tinclude_once('view/main_page_header.php');\n\t}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public static function _init() {\n // this is called upon loading the class\n }", "public function prePageContent();", "static function PageAutoload()\r\n\t{\r\n\t\t\r\n\t}", "public function init()\n {\n \t$arr_sitemap_nodes_main = CMS_Model_CMSSitemap::getSitemapByHandle('MAIN')->getSitemapNodes(6);\n \t\n \t$this->view->assign('arr_sitemap_nodes_main',$arr_sitemap_nodes_main);\n }", "public function preInit()\n {\n $this->_viewEngine = Bigace_Services::get()->getService('view');\n }", "function init() {\n\t\t\n\t\tparent::init();\n\t}", "protected function initialize() {}" ]
[ "0.7201191", "0.71819764", "0.6938481", "0.6906435", "0.6837533", "0.6779193", "0.677512", "0.67741686", "0.67370075", "0.67370075", "0.6729898", "0.67176527", "0.6679263", "0.66762406", "0.6673861", "0.6663049", "0.65059286", "0.64755785", "0.64698184", "0.6396211", "0.63694906", "0.6368822", "0.63575006", "0.6333191", "0.6333188", "0.63201743", "0.6300027", "0.6296829", "0.62965715", "0.6286366", "0.62633723", "0.6259164", "0.62515503", "0.62515503", "0.62319547", "0.6214572", "0.6209037", "0.619692", "0.619692", "0.619692", "0.61894", "0.6180047", "0.6166673", "0.61628824", "0.61481106", "0.61238766", "0.61171323", "0.61165506", "0.6094551", "0.6094551", "0.60937786", "0.60937786", "0.60937786", "0.60937786", "0.6093198", "0.6093198", "0.6093198", "0.6093198", "0.6093198", "0.6093198", "0.6092764", "0.6092764", "0.60796237", "0.60785395", "0.60672486", "0.60633326", "0.605341", "0.604633", "0.6044119", "0.60431176", "0.6041198", "0.60382736", "0.60195917", "0.60194606", "0.6018883", "0.60051274", "0.60042286", "0.59997016", "0.5978572", "0.59736294", "0.597303", "0.5968915", "0.5968358", "0.5968358", "0.5968358", "0.5968358", "0.5968358", "0.5967872", "0.5958186", "0.59428257", "0.59421796", "0.5940995", "0.59405607", "0.5939766", "0.59353864", "0.59318596", "0.5930978", "0.5927995", "0.5927696", "0.59257543" ]
0.7010409
2
validates the input for the page
public function validate_settings( $input ) { $input = empty($input) ? $_POST : $input; $newinput['breakout_page'] = (int) $input['breakout_page']; $newinput['breakout_categories'] = array_map( 'absint', $input['breakout_categories'] ); $newinput['breakout_main_event'] = (int) $input['breakout_main_event']; return $newinput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_page()\n {\n }", "function validate_page()\n {\n }", "function validate()\n\t{\n\t}", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "abstract public function validate();", "abstract public function validate();", "public function validation();", "function validateInput()\r\n\t{\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->name) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in name $this->name. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->desg) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in designation $this->desg. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(empty($this->addr))\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in address entered. Please fill correct address field as per gender: Office address for Male user, and Residential address for Female user.<br>\";\t\r\n\t\t}\r\n\r\n\t\tforeach($this->emails as $ele)\r\n\t\t{\r\n\t\t\tif(!filter_var($ele, FILTER_VALIDATE_EMAIL))\r\n\t\t\t{\r\n\t\t\t\t$this->err = true;\r\n\t\t\t\t$this->errMsgBeg .= \"-> Invalid email-id $ele. Enter correctly.<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "protected function _validate() {\n\t}", "public function validate($input);", "public abstract function validation();", "protected function validate()\n {\n }", "function validate() {\n\t\t// If it's not required, there's nothing to validate\n\t\tif ( !$this->get_attribute( 'required' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\n\t\t$field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t// Make sure the email address is valid\n\t\t\tif ( !is_email( $field_value ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Just check for presence of any text\n\t\t\tif ( !strlen( trim( $field_value ) ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s is required', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t}\n\t}", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "function validateInput() {\n $validationSuccessful = true;\n $errorMessage = \"\";\n\n\n //Validate title\n if (!preg_match(\"/^.{1,250}$/\", $_POST['title'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Title is invalid.\". $_POST['title'];\n }\n\n //Validate date\n if (!preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})$/\", $_POST['date'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Date is invalid.\" . $_POST['date'];\n }\n\n //Validate location\n if (!preg_match(\"/^.{1,250}$/\", $_POST['location'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Max_players is invalid.\" . $_POST['location'];\n }\n\n if($validationSuccessful == true) {\n return true;\n } else {\n echo $errorMessage;\n return false;\n }\n }", "public static function validate() {}", "function validate_user_form()\n {\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "function StartValidate() {\n\t$required = $_GET[\"required\"];\n\t$type = $_GET[\"type\"];\n\t$value = $_GET[\"value\"];\n\n\t// This is the function to check if a field is even required or not\n\t// So it's useful if you only want to check if it isn't empty\n\tvalidateRequired($required, $value, $type);\n\n\tswitch ($type) \n\t{\n\t\tcase 'number':\n\t\t\tvalidateNumber($value);\n\t\t\tbreak;\n\t\tcase 'alphanum':\n\t\t\tvalidateAlphanum($value);\n\t\t\tbreak;\n\t\tcase 'alpha':\n\t\t\tvalidateAlpha($value);\n\t\t\tbreak;\n\t\tcase 'date':\n\t\t\tvalidateDate($value);\n\t\t\tbreak;\n\t\tcase 'email':\n\t\t\tvalidateEmail($value);\n\t\t\tbreak;\n\t\tcase 'url':\n\t\t\tvalidateUrl($value);\n\t\t\tbreak;\n\t}\n}", "public function validationAction() {\n\n $video_type = $this->_getParam('type');\n $code = $this->_getParam('code');\n $ajax = $this->_getParam('ajax', false);\n $valid = false;\n\n //CHECK WHICH API SHOULD BE USED\n if ($video_type == \"youtube\") {\n $valid = $this->checkYouTube($code);\n }\n\n if ($video_type == \"vimeo\") {\n $valid = $this->checkVimeo($code);\n }\n\n $this->view->code = $code;\n $this->view->ajax = $ajax;\n $this->view->valid = $valid;\n }", "function validate_blog_form()\n {\n }", "function checkInput()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\tinclude_once \"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php\";\n\t\tif (is_array($_POST[$this->getPostVar()])) $_POST[$this->getPostVar()] = ilUtil::stripSlashesRecursive($_POST[$this->getPostVar()], false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString(\"assessment\"));\n\t\t$foundvalues = $_POST[$this->getPostVar()];\n\t\tif (is_array($foundvalues))\n\t\t{\n\t\t\t// check answers\n\t\t\tif (is_array($foundvalues['answer']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['answer'] as $aidx => $answervalue)\n\t\t\t\t{\n\t\t\t\t\tif (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check points\n\t\t\t$max = 0;\n\t\t\tif (is_array($foundvalues['points']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['points'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($foundvalues['points_unchecked'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($max == 0)\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"enter_enough_positive_points\"));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (is_array($_FILES) && count($_FILES) && $this->getSingleline())\n\t\t\t{\n\t\t\t\tif (!$this->hideImages)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['error']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// error handling\n\t\t\t\t\t\t\tif ($error > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($error)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_PARTIAL:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_partially_uploaded\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\t\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index])))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_missing_tmp_dir\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_CANT_WRITE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_cannot_write_to_disk\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_EXTENSION:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_upload_stopped_ext\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// check suffixes\n\t\t\t\t\t\t\tif (strlen($tmpname) && is_array($this->getSuffixes()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!in_array(strtolower($suffix), $this->getSuffixes()))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_wrong_file_type\"));\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// virus handling\n\t\t\t\t\t\t\tif (strlen($tmpname))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$vir = ilUtil::virusHandling($tmpname, $filename);\n\t\t\t\t\t\t\t\tif ($vir[0] == false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_virus_found\").\"<br />\".$vir[1]);\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn $this->checkSubItemsInput();\n\t}", "public function validate()\n {\n // Tipo de validación\n $type = $this->request->get('type');\n $type = ($type == 'email') ? 'email' : 'username';\n \n Core::getService('account.validate')->$type($this->request->get('value'));\n $status = 'taken';\n \n if (Core_Error::isPassed())\n {\n $status = 'ok'; \n }\n \n $this->call(\"var obj = $('#\" . $this->request->get('obj') . \"'); signup.show_status(obj, '{$status}');\");\n }", "private function validate_input() {\n\t\t$fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields );\n\n\t\t$this->validate_fields( $fields );\n\t\t$this->validate_fields_against_table( $fields );\n\t}", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "public function check_validity() {\r\n\t\t$value = $this->get_posted_value();\r\n\r\n\t\t// required field check\r\n\t\t// 0, '0', and 0.0 need special handling since they're valid, but PHP considers them falsy values.\r\n\t\tif ( $this->props['required'] && ( empty( $value ) && ! in_array( $value, [ 0, '0', 0.0 ], true ) ) ) {\r\n\t\t\t// translators: Placeholder %s is the label for the required field.\r\n\t\t\tthrow new \\Exception( sprintf( _x( '%s is a required field.', 'Add listing form', 'my-listing' ), $this->props['label'] ) );\r\n\t\t}\r\n\r\n\t\t// if field isn't required, then no validation is needed for empty values\r\n\t\tif ( empty( $value ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// otherwise, run validations\r\n\t\t$this->validate();\r\n\t}", "public function validated();", "public function getInputErrors();", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "static function all_Empty()\r\n {\r\n echo PageBuilder::printError(\"Please enter valid data in all the fields, nothing can not be empty.\");\r\n }", "function form1()\r\n {\r\n global $f3;\r\n $isValid= true;\r\n if (!validString($f3->get('animal'))) {\r\n $isValid = false;\r\n $f3->set(\"errors['animal']\", \"Please enter an animal \");\r\n }\r\n if (!validQty($f3->get('qty'))) {\r\n $isValid = false;\r\n $f3->set(\"errors['qty']\", \"Please enter quantity\");\r\n }\r\n return $isValid;\r\n }", "function _valInput() {\r\n\t\tswitch(TRUE) {\r\n\t\t\tcase (empty($_POST['lynkvp_name'])):\r\n\t\t\t\t$this->note .= __('Please enter a Name.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_FILES['lynkvp_file']['size']) && empty($_POST['lynkvp_url'])):\r\n\t\t\t\t$this->note .= __('Please choose a Video or enter an URL.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_POST['lynkvp_type'])):\r\n\t\t\t\t$this->note .= __('Please choose a Video Type.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_POST['lynkvp_size']) || !isset($this->videosizes[$_POST['lynkvp_size']])):\r\n\t\t\t\tif (empty($_POST['lynkvp_size']) || $_POST['lynkvp_size'] == 0) {\r\n\t\t\t\t\t$this->note .= __('Please select a Size.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t} elseif (preg_match('/[^\\d]/', $_POST['lynkvp_width'])) {\r\n\t\t\t\t\t$this->note .= __('Please enter a Width.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t} elseif(preg_match('/[^\\d]/', $_POST['lynkvp_height'])) {\r\n\t\t\t\t\t$this->note .= __('Please enter a Height.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE; break;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn TRUE; break;\r\n\t\t}\r\n\t}", "function validateInputsFromView($viewName)\n {\n\n $this->errorCount = 0;\n $this->errors = array();\n\n $view = View::loadToString($viewName);\n\n if (!$view ) {\n return true;\n }\n\n $doc = new DOMDocument();\n $doc->loadHTML($view);\n $inputs = $doc->getElementsByTagName('input');\n foreach ($inputs as $input) {\n $name = $input->getAttribute('name');\n $value = Input::get($name);\n $required = $input->getAttribute('required');\n $pattern = $input->getAttribute('pattern');\n $type = $input->getAttribute('type');\n $title = $input->getAttribute('title');\n $minlenght = $input->getAttribute('minlenght');\n $maxlenght = $input->getAttribute('maxlenght');\n $min = $input->getAttribute('min');\n $max = $input->getAttribute('max');\n\n if ($required ) {\n if (!$value ) {\n if ($title ) {\n $this->errors[] = $title;\n $this->errorCount++;\n } else {\n $this->errors[] = \"Field $name is required\";\n $this->errorCount++;\n } // end if then else $title\n } // end if !$value\n } // end if $required\n\n if ($pattern ) {\n if ($value ) {\n if (!$this->validateRegEx($patter, $value) ) {\n if ($title ) {\n $this->errors[] = $title;\n $this->errorCount++;\n } else {\n $this->errors[]\n = \"Field $name must be have the \" .\n \"regular expression pattern \" .\n $pattern;\n $this->errorCount++;\n } // end if then else $title\n } // end validateRegEx\n } // end if $value\n } // end if $pattern\n\n switch ($type) {\n case 'email':\n if ($value ) {\n if (! validEmail($value) ) {\n if ($title ) {\n $this->errors[] = $title;\n $this->errorCount++;\n } else {\n $this->errors[] = \"Field $name must be a valid email\";\n $this->errorCount++;\n }\n } // end if !validEmail\n } // end if $value\n break;\n\n case 'url':\n if ($value ) {\n if (! validUrl($value) ) {\n if ($title ) {\n $this->errors[] = $title;\n $this->errorCount++;\n } else {\n $this->errors[] = \"Field $name must be a valid email\";\n $this->errorCount++;\n }\n } // end if !validEmail\n } // end if $value\n break;\n\n default:\n // code...\n break;\n } // end switch\n } // end foreach\n\n if ($this->errorCount > 0 ) {\n return false;\n } else {\n return true;\n }\n\n }", "abstract public function valid();", "public function Valid();", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public function valid(){ }", "public function is_valid()\n {\n }", "public function is_valid()\n {\n }", "function validate() {\n // @todo Remove module_load_include() call when moving to Drupal core.\n module_load_include('inc', 'fapitng', '/includes/fapitng.validate');\n foreach ($this->validate_callbacks as $callback => $info) {\n if (!call_user_func_array($callback, array_merge(array($this->value), $info['arguments']))) {\n $this->errors[] = $info['message'];\n }\n }\n if ($this->errors) {\n $this->request['invalid_elements'][$this->id] = $this;\n }\n $this->validateInputElements($this->children);\n\n if (!empty($this->request['invalid_elements'])) {\n $this->request['rebuild'] = TRUE;\n return FALSE;\n }\n return TRUE;\n }", "function checkInput()\r\n\t{\r\n\t\tglobal $lng;\r\n\t\t\r\n\t\tforeach ($this->dirs as $dir)\r\n\t\t{\r\n\t\t\t$num_value = $_POST[$this->getPostVar()][$dir][\"num_value\"] = \r\n\t\t\t\ttrim(ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir][\"num_value\"]));\r\n\t\t\t$num_unit = $_POST[$this->getPostVar()][$dir][\"num_unit\"] = \r\n\t\t\t\ttrim(ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir][\"num_unit\"]));\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tif ($this->getRequired() && trim($num_value) == \"\")\r\n\t\t\t{\r\n\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\r\n\t\r\n\t\t\t\treturn false;\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tif (!is_numeric($num_value) && $num_value != \"\")\r\n\t\t\t{\r\n\t\t\t\t$this->setAlert($lng->txt(\"sty_msg_input_must_be_numeric\"));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (trim($num_value) != \"\")\r\n\t\t\t{\r\n\t\t\t\tswitch ($dir)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase \"all\": $this->setAllValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"top\": $this->setTopValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"bottom\": $this->setBottomValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"left\": $this->setLeftValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"right\": $this->setRightValue($num_value.$num_unit); break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function validate()\n {\n // TODO implement this\n }", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public function validate()\n {\n }", "public function validate()\n {\n }", "public function validation($input){\n\t\treturn true;\n\t}", "private function validate_input()\n \t{\n \t\t$this->errors_found = FALSE;\t\t\t\t\n\n\t\t// validate the get request\n\t\t//is their an IVR code?\n\t\tif(! isset($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing ivrcode';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for ivrcode - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['ivrcode'] = $_GET['ivrcode'];\n\t\t}\n\n\t\t//is there a phone number\n\t\tif(! isset($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing phonenumber';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for phonenumber - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['phonenumber'] = $_GET['phonenumber'];\n\t\t}\n\t\t\n\t\t//is there a well working?\n\t\tif(!isset($_GET['wellwork'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing wellwork';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else\n\t\t{\n\t\t\t$_GET['wellwork'] = strtolower($_GET['wellwork']);\n\t\t\t\n\t\t\tif($_GET['wellwork'] != 'yes' && $_GET['wellwork'] != 'no')\n\t\t\t{\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for wellwork - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_answers['wellwork'] = $_GET['wellwork'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t//is there a does the mechanic know?\n\t\tif(isset($_GET['mechanicknow']))\n\t\t{\n\t\t\t$_GET['mechanicknow'] = strtolower($_GET['mechanicknow']);\n\t\t\tif($_GET['mechanicknow'] != 'yes' && $_GET['mechanicknow'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicknow - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicknow'] = $_GET['mechanicknow'];\n\t\t\t}\n\t\t}\n\n\t\t\t\n\t\t//is there a can the mechanic fix\n\t\tif(isset($_GET['mechanicfix']))\n\t\t{\n\t\t\t$_GET['mechanicfix'] = strtolower($_GET['mechanicfix']);\n\t\t\tif($_GET['mechanicfix'] != 'yes' && $_GET['mechanicfix'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicfix - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicfix'] = $_GET['mechanicfix'];\n\t\t\t}\n\t\t}\n\t\t//is there a file name\n\t\tif(isset($_GET['filename'])){\n\t\t\t$get = new Validation($_GET);\n\t\t\t$get->add_rules('filename','standard_text');\n\t\t\tif(! $get->validate()){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for filename - should be standard text';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['filename'] = $_GET['filename'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//is there a response format \n\t\tif(isset($_GET['resp'])){\n\t\t\tif($_GET['resp'] != 'json' && $_GET['resp'] != 'xml'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for resp - should be json or xml';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->resp = $_GET['resp'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->resp = 'json';\n\t\t}\n\n\t\t//if there are errors, let them know.\n\t\tif($this->errors_found){\n\t\t\t$this->send_response($this->response, $this->resp);\n\t\t\treturn;\n\t\t}\t\t\n \t}", "public function validate() {\n }", "public function validate() {\n }", "function _inputCheck(){\n if (isset($_POST['verder']) && $this->_verify() == \"\") {\n return true;\n }\n else {\n return false;\n }\n }", "public function validateRequest();", "public function validate()\n {\n require APP . 'view/_templates/header.php';\n require APP . 'view/login/validate.php';\n require APP . 'view/_templates/footer.php';\n }", "function validate(){\n }", "function validation($data){\n //messages if there is a problem with the text.\n $errors = parent::validation($data);\n //extra check to make sure there is something in the htmlarea besides a <br />\n $questiontext= trim(strip_tags($data['questiontext']));\n if ($questiontext==''){\n $errors['questiontext'] = get_string('err_required', 'form');\n }\n return $errors;\n }", "public function beforeSave()\r\n {\r\n $pageToShow = $this->getData('fieldset_data')['which_page_to_show'];\r\n $inPage = $this->getData('fieldset_data')['include_pages'];\r\n $inPageUrl = $this->getData('fieldset_data')['include_pages_with_url'];\r\n\r\n if ($pageToShow == 1 && !($inPage || $inPageUrl)) {\r\n throw new Exception(__('Please enter the value into one of the following boxes: Include page(s) and Include Page(s) with URL contains.'));\r\n }\r\n\r\n return parent::beforeSave();\r\n }", "function ting_visual_relation_slide_form_validate($form, &$form_state) {\n if (empty($form_state['values']['name'])) {\n form_set_error('name', t('Please enter a name for the slide'));\n }\n $type = $form_state['values']['type'];\n switch ($type) {\n case 'external':\n case 'circular':\n $datawell_pid = $form_state['values']['datawell_pid'];\n // TODO: use a regex to validate the datawell-PID.\n if (empty($datawell_pid)) {\n form_set_error('datawell_pid', t('Please enter a valid datawell-PID'));\n }\n break;\n case 'structural':\n if (empty($form_state['values']['search_query'])) {\n form_set_error('search_query', t('Please enter a search query'));\n }\n }\n}", "public function isValid()\n\t{\n\t\tif (empty($this->titre)) $this->titre = \"TITRE A REMPLACER\";\n\t\telse $this->titre = trim (preg_replace('/\\s+/', ' ', $this->titre) ); // Suppression des espaces\n\t\tif (!empty($this->contenu)) $this->contenu = trim (preg_replace('/\\s+/', ' ', $this->contenu) ); // Suppression des espaces\n\t\tif (empty($this->statut)) $this->statut = 0;\n\t\tif (empty($this->id_type)) $this->id_type = 1;\n\t\tif (empty($this->id_membre)) $this->id_membre = 0;\n\t}", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "public function validate()\n {\n if ($this->getOptions('required') == 1 && $this->getValue() == '') {\n $this->setLibelle('<div class=\"error_message\">Le champ est requis et ne doit pas être vide.</div>');\n return false;\n } else {\n return true;\n }\n }", "abstract function validator();", "function ctr_validateHome(&$ctx)\n{\n $reservation = $ctx['reservation'];\n\n // variables exist *AND* are not empty\n if (!empty($_POST['destination']) AND !empty($_POST['personsCounter']))\n {\n $reservation->destination = htmlspecialchars($_POST['destination']);\n $reservation->insurance = isset($_POST['insurance'])? 'True':'False';\n $personsCounter = intval($_POST['personsCounter']);\n\n // set bounds to the number of persons\n if (1 <= $personsCounter AND $personsCounter <= 30)\n {\n $reservation->personsCounter = $personsCounter;\n $reservation->save();\n\n return true;\n }\n\n $ctx['warning'] .= \"Vous ne pouvez enregistrer \".\n \"que entre 1 et 30 personnes.\\n\";\n }\n\n // Bypass checks if datas were already filled\n if ($reservation->destination)\n return true;\n\n $ctx['warning'] .= \"Veuillez remplir tous les champs correctement.\\n\";\n\n return false;\n}", "public function validate() {\n\t\treturn false;\n\t}", "public function validate() { return TRUE; }", "public function validate_fields() {\n \n\t\t//...\n \n }", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function validate()\n\t{\n\t\t$this->vars['errors'] = $this->validation_errors();\n\t}", "protected function preValidate() {}", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"noEmpleado\"])) {\n $this->numEmpErr = \"El numero de empleado es requerido\";\n } else {\n $this->noEmpleado = $this->test_input($_POST[\"noEmpleado\"]);\n if (is_numeric($this->noEmpleado)) {\n $this->numEmpErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombre\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombre\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carrera\"])) {\n $this->carreraErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carrera\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"telefono\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefono\"]);\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "function exposed_validate(&$form, &$form_state) {\n if (!isset($this->options['expose']['identifier'])) {\n return;\n }\n\n $key = $this->options['expose']['identifier'];\n if (!empty($form_state['values'][$key])) {\n $this->query_parse_search_expression($form_state['values'][$key]);\n if (count($this->search_query->words()) == 0) {\n form_set_error($key, format_plural(variable_get('minimum_word_size', 3), 'You must include at least one positive keyword with 1 character or more.', 'You must include at least one positive keyword with @count characters or more.'));\n }\n }\n }", "function validateInputs(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\tif(!matchRegex($nric,'/^[a-zA-Z0-9]*$/')) { return false; }\n\tif(!matchRegex($firstName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($lastName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($dob,'/^[0-9-]*$/')) { return false; }\n\tif(!matchRegex($address1,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($address2,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($poCode,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($homeNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($handphoneNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($email,'/^[a-zA-Z0-9@._-]*$/')) { return false; }\n\tif(!matchRegex($description,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\t\n\treturn true;\n}", "public function checkInput() {\r\n\t\t\r\n//\t\tif (mb_strlen($this->mValue) < $this->aConfig['minlength']) {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/string_too_short';\r\n//\t\t}\r\n//\t\tif (mb_strlen($this->mValue) > $this->aConfig['maxlength']) {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/string_too_long';\r\n//\t\t}\r\n//\t\tif (mb_strlen($this->mValue) == 0 && $this->aConfig['required'] == 'TRUE') {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/not_null';\r\n//\t\t}\r\n//\t\t\r\n//\t\t$this->additionalChecks();\r\n\t\t\r\n\t\tif ($this->sErrorLabel == '') {\r\n\t\t\treturn (TRUE);\r\n\t\t} else {\r\n\t\t\treturn (FALSE);\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.7263051", "0.7263051", "0.66362256", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6584232", "0.6484838", "0.64808834", "0.64808834", "0.6479489", "0.6464104", "0.64527094", "0.6440786", "0.6396521", "0.6360141", "0.6343906", "0.63365096", "0.6334297", "0.6333481", "0.62938964", "0.6287921", "0.6287921", "0.6275229", "0.6234295", "0.62270045", "0.62269455", "0.62186015", "0.6216889", "0.620742", "0.61940736", "0.6172279", "0.61428666", "0.61414486", "0.61373496", "0.6119362", "0.61052287", "0.6081351", "0.60796326", "0.6074225", "0.6074003", "0.60715383", "0.60706645", "0.60706645", "0.60706645", "0.60706645", "0.60706645", "0.60706645", "0.60706645", "0.60706645", "0.6070578", "0.6070578", "0.6070578", "0.6070578", "0.6069677", "0.6062063", "0.60612774", "0.605509", "0.6037479", "0.6021824", "0.60218203", "0.60198337", "0.60198337", "0.6001341", "0.60008", "0.6000376", "0.6000376", "0.59843165", "0.5975395", "0.5963062", "0.59478563", "0.59469", "0.59391296", "0.59263927", "0.592459", "0.592421", "0.592421", "0.592421", "0.592421", "0.58994013", "0.58845353", "0.58758885", "0.5870796", "0.5869887", "0.586957", "0.5860658", "0.5858948", "0.5848968", "0.58339417", "0.58306396", "0.58288103", "0.58265173", "0.5820239" ]
0.0
-1
displays the options page
public function display_options_page() { ?> <div class="wrap ee-breakouts-admin"> <div id="icon-options-general" class="icon32"></div> <h2><?php _e('EE Breakouts Settings', 'event_espresso'); ?></h2> <div id="poststuff"> <div id="post-body-content"> <div class="form-wrap"> <form action="options.php" method="post"> <?php settings_fields('ee_breakout_options'); ?> <?php do_settings_sections('ee_breakouts_admin'); ?> <span class="submit"> <input type="submit" class="button primary-button" name="update_ee_breakout_options" value="Save Options" /> </span> </form> </div> <!-- end .form-wrap --> </div> <!-- end #post-body-content --> </div> <!-- end #poststuff --> </div> <!-- end .wrap --> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function optionsPage()\r\n {\r\n $this->updateOptions();\r\n include_once($this->path . '/views/options.php');\r\n }", "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "public function mm_options_page() { \n $tmp = $this->plugin_dir . '/inc/views/options-page.php';\n \n ob_start();\n include( $tmp );\n $output = ob_get_contents();\n ob_end_clean();\n echo $output;\n }", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "function owa_options_page() {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$params = array();\r\n\t$params['view'] = 'base.options';\r\n\t$params['subview'] = 'base.optionsGeneral';\r\n\techo $owa->handleRequest($params);\r\n\t\r\n\treturn;\r\n}", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function render_options_page()\n\t{\n\t\treturn include 'src/views/form.php';\n\t}", "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function option_page() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'top-story' ) );\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/option-page.php\" );\n\t}", "function options_page(){\r\n include($this->plugin_dir.'/include/options-page.php');\r\n }", "public function display_options_page() {\n if (! current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n?>\n<div class=\"wrap\">\n <h2><?php esc_attr_e($this->title); ?> Options</h2>\n <form action=\"options.php\" method=\"post\">\n <?php if (function_exists('settings_errors')): settings_errors(); endif; ?>\n <?php settings_fields($this->group); ?>\n <?php foreach ($this->sections as $section): do_settings_sections($section); endforeach; ?>\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" class=\"button-primary\" />\n </p>\n </form>\n</div>\n<?php\n }", "public function add_options_page()\n {\n }", "public function renderOptions() {\n $tab \t\t= sienna_mikado_get_admin_tab();\n $active_page \t= sienna_mikado_framework()->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n\n\n </div> <!-- close div.mkdf-page-navigation -->\n\n </div> <!-- close div.mkdf-page-content -->\n\n </div> <!-- close div.mkdf-page-content-wrapper -->\n\n </div> <!-- close div.mkd-options-page -->\n\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "public function indexAction() {\n\t\t\t$page_menu = $this->getPageMenu();\n\t\t\tif ( 'options' === $page_menu[ $this->getResultId() ]['type'] ) {\n\t\t\t\t$this->showOptions();\n\t\t\t} else {\n\t\t\t\t$this->showPage();\n\t\t\t}\n\t\t}", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "function options_page() {\n\t\t$settings = __( 'AdControl Settings', 'adcontrol' );\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n\t\techo <<<HTML\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>$settings</h2>\n\t\t\t<p>$notice</p>\n\t\t</div>\nHTML;\n\t}", "function optionPage() {\r\n\t\t$out = $uninstall = '';\r\n\r\n\t\t// Check write permissions\r\n\t\t$this->_checkDir();\r\n\r\n\t\t// Settings update or delete\r\n\t\tif(isset($_POST['options_update'])) { // options update\r\n\t\t\t// strip slashes array\r\n\t\t\t$_POST = $this->stripArray($_POST);\r\n\r\n\t\t\t$this->options['user_lvl'] = $_POST['vp_userlevel'];\r\n\t\t\t$this->options['show_option'] = $_POST['vp_show'];\r\n\t\t\t$this->options['class_name'] = $_POST['vp_classname'];\r\n\t\t\t$this->options['class_name_with_type'] = $_POST['vp_classwithtype'];\r\n\t\t\t$this->options['ins_shortcode'] = (isset($_POST['vp_shortcode']) && $_POST['vp_shortcode']=='1' ? '1' : '0');\r\n\t\t\t$this->updateOptions();\r\n\r\n\t\t\t$_POST = '';\r\n\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\r\n\t\t} elseif(isset($_POST['uninst'])) { // uninstall\r\n\t\t\t$this->deleteOptions();\r\n\t\t\tif (file_exists($this->data_dir))\r\n\t\t\t\t$this->_removeDir($this->data_dir);\r\n\t\t\t$this->note .= __('All files and folders have (probably) been deleted. Now click <strong>Plugins</strong> in the admin panel above and <b>Deactivate</b> the VideoPop plugin.', $this->textdomain_name);\r\n\t\t\t$this->note .= \"<br />\" . $this->data_dir;\r\n\t\t\t$this->error++;\r\n\t\t\t$this->initOptions();\r\n\t\t\terror_reporting(0);\r\n\t\t}\r\n\r\n\t\t// Add Options\r\n\t\t$out .= \"<div class=\\\"wrap\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('VideoPop+ Options', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"update_options\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<table class=\\\"optiontable form-table\\\" style=\\\"margin-top:0;\\\"><tbody>\\n\";\r\n\r\n\t\t// Add User Level\r\n\t\t// Permission -- Subscriber = 0, Contributor = 1, Author = 2, Editor = 7, Administrator = 9\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('User Level', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_userlevel\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'0').\">\".__('subscriber', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'1').\">\".__('contributor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"2\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'2').\">\".__('author', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"7\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'7').\">\".__('editor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"9\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'9').\">\".__('administrator', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Set the user level the user needs to have (at least) to manage/upload/delete videos', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Method of display\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Method of display', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_show\\\">\";\r\n\t\t$out .= \"<option value=\\\"popup\\\"\" .$this->_setOptionSelected($this->options['show_option'],'popup').\">\". __('Pop up', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"lightpop\\\"\".$this->_setOptionSelected($this->options['show_option'],'lightpop').\">\".__('LightPop', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"inline\\\"\" .$this->_setOptionSelected($this->options['show_option'],'inline').\">\". __('In line', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"none\\\"\" .$this->_setOptionSelected($this->options['show_option'],'none').\">\". __('The effect none', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Please select it from &quot;Pop up&quot;, &quot;LightPop&quot;, &quot;In line&quot;, and &quot;The effect none&quot;.', $this->textdomain_name);\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Class Name Setting\r\n\t\t$out .= \"<tr style=\\\"border-style:none;\\\">\\n\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><strong>\".__('Class name of the link tag', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><input type=\\\"text\\\" name=\\\"vp_classname\\\" value=\\\"\".$this->options['class_name'].\"\\\"/>&nbsp;</td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\">\".__('Please set the class name of the link tag.', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><select name=\\\"vp_classwithtype\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'0').\">\".__('Without File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'1').\">\".__('With File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Insert Editor Option (Shortcode or HTML Tag?)\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Insert Editor Option', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><input type=\\\"checkbox\\\" name=\\\"vp_shortcode\\\" value=\\\"1\\\" style=\\\"margin-right:0.5em;\\\" \".($this->options['ins_shortcode']=='1' ? \" checked\" : \"\").\" />\".__('Shortcode is inserted in the editor.', $this->textdomain_name).\"</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\r\n\t\t$out .= \"</tbody></table>\\n\";\r\n\r\n\t\t// Add Update Button\r\n\t\t$out .= \"<div style=\\\"text-align:right;margin-top:1em;\\\">\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"options_update\\\" value=\\\"\".__('Update Options', $this->textdomain_name).\"\\\" class=\\\"button\\\" />\";\r\n\t\t$out .= \"</div>\";\r\n\t\t$out .= \"</form></div>\\n\";\r\n\r\n\t\t// Add uninstall\r\n\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"margin-top:2em;\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('Uninstall', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<p>\".__('If you want to keep your videos and the popup functionality of your links but want to get rid of the additional menus in the control panel, just deactivate the plugin.<br />For a complete uninstall including all uploaded videos use the uninstall button.', $this->textdomain_name).\"</p>\\n\";\r\n\t\t$out .= \"<div style=\\\"text-align:right;\\\">\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"uninstall\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"uninst\\\" value=\\\"\".__('Uninstall VideoPop+', $this->textdomain_name).\"\\\" onclick=\\\"javascript:check=confirm('\".__('You are about to delete all your settings and Videos! The links you created with VideoPop will not work after uninstall! Proceed with uninstall?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" />\\n\";\r\n\t\t$out .= \"</form>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\r\n\t\t// Output\r\n\t\techo (!empty($this->note) ? \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>{$this->note}</p></div>\\n\" : '' ).\"\\n\";\r\n\t\techo ($this->error > 0 ? '' : $out).\"\\n\";\r\n\t}", "public function display_analytics_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2>WSU Analytics Settings</h2>\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t<?php\n\t\twp_nonce_field( 'wsuwp-analytics-options' );\n\t\tdo_settings_sections( $this->settings_page );\n\n\t\tsubmit_button();\n\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\n\t\t\t\t<input type=\"hidden\" name=\"option_page\" value=\"wsuwp-analytics\" />\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "public function options_page()\n\t\t{\n\t\t\tif (!@include 'options-page.php'):\n\t\t\t\tprintf(__('<div id=\"message\" class=\"updated fade\"><p>The options page for the <strong>Mailgun</strong> plugin cannot be displayed. The file <strong>%s</strong> is missing. Please reinstall the plugin.</p></div>',\n\t\t\t\t\t'mailgun'), dirname(__FILE__) . '/options-page.php');\n\t\t\tendif;\n\t\t}", "public function add_options_page() {\n add_options_page($this->title, $this->title, 'manage_options', $this->page, array(&$this, 'display_options_page'));\n }", "public function show_settings_page() : void {\n\t\t\t$categories = self::get_categories();\n\n\t\t\tSFWD_LMS::get_view(\n\t\t\t\t'support/help',\n\t\t\t\tarray(\n\t\t\t\t\t'categories' => $categories,\n\t\t\t\t),\n\t\t\t\ttrue\n\t\t\t);\n\t\t}", "function options_page_html()\n\t\t{\n\t\t\tif (!current_user_can('manage_options')) {\n\t\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"wrap\">';\n\t\t\techo '<h2>';\n\t\t\techo 'Verify Meta Tags Plugin Options';\n\t\t\techo '</h2>';\n\t\t\techo '<form method=\"post\" action=\"options.php\">';\n\t\t\tsettings_fields('vmt-options-page');\n\t\t\tdo_settings_sections('vmt-options-page');\n\t\t\techo '<p class=submit>';\n\t\t\techo '<input type=\"submit\" class=\"button-primary\" value=\"' . __('Save Changes') . '\" />';\n\t\t\techo '</p>';\n\t\t\techo '</form>';\n\t\t\techo '</div>';\n\t\t}", "function wpdc_divi_child_options_page(){\r\n\t\t\r\n\t\t$options = get_option('wpdc_options');\r\n\t\t\r\n echo '<div class=\"wrap\">';\r\n\t\techo '<h2>'.WPDC_THEME_NAME.' Options <span style=\"font-size:10px;\">Ver '.WPDC_VER.'</span></h2>';\r\n\t\techo '<form method=\"post\" action=\"options.php\">';\r\n\t\tsettings_fields('wpdc_plugin_options_group');\r\n\t\tsettings_errors();\r\n\t\trequire_once('views.php');\t\t// load table settings\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n\t\techo '</div>';\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n echo '</form>';\r\n }", "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );\n }", "function rkt_options_page() {\n require('tmpl/options.tmpl.php');\n}", "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "function wpct_options_page() { \n\t\tob_start();\n\t\tinclude( plugin_dir_path(__FILE__).\"/templates/tpl-admin-menu.php\" );\n\t\techo ob_get_clean();\n\t}", "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "function cbp_display_options_page() {\n\t?>\n\t<div>\n\t<h2>Chibipaint Integration Settings</h2>\n\tAll fields are required.\n\t<form action=\"options.php\" method=\"post\">\n\t<?php settings_fields('cbp_option_group');\n\tdo_settings_sections('options_cbp');\n\tsubmit_button();\n\t?>\n\t</form></div>\n\n\t<?php\n}", "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n }", "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "function add_options_page() {\n\t\t\t\tif ( function_exists('add_theme_page') ) {\n\t\t\t\t \tadd_theme_page( 'Cap &amp; Run', 'Cap &amp; Run', 'manage_options', \n\t\t\t\t\t\t\t\t\tbasename(__FILE__), array(&$this, 'options_page') );\n\t\t\t\t}\n\t\t\t}", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo self::$key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), self::$key ); ?>\n </div>\n <?php\n }", "function options() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\t{\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\t\tinclude WP_PLUGIN_DIR . '/qoorate/admin_options_page.php';\n\t}", "public function create_options_page() {\r\n\r\n\t\tadd_menu_page(\r\n\t\t\t$this->settings['heading'],\r\n\t\t\t$this->settings['menu_title'],\r\n\t\t\t'edit_theme_options',\r\n\t\t\t$this->settings['page_slug'],\r\n\t\t\tarray( $this, 'render_options_page' ),\r\n\t\t\t$this->settings['dashicon'],\r\n\t\t\t999 // Place at the bottom of the dash menu\r\n\t\t);\r\n\r\n\t}", "public function display() {\r\n\r\n\t\t$this->echoOptionHeader();\r\n\r\n\t\tif ( ! empty( $this->options ) ) {\r\n\t\t\tforeach ( $this->options as $option ) {\r\n\r\n\t\t\t\t// Display the name of the option.\r\n\t\t\t\t$name = $option->getName();\r\n\t\t\t\tif ( ! empty( $name ) && ! $option->getHidden() ) {\r\n\t\t\t\t\techo '<span class=\"tf-group-name\">' . esc_html( $name ) . '</span> ';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Disable wrapper printing.\r\n\t\t\t\t$option->echo_wrapper = false;\r\n\r\n\t\t\t\t// Display the option field.\r\n\t\t\t\techo '<span class=\"tf-group-option\">';\r\n\t\t\t\t$option->display();\r\n\t\t\t\techo '</span>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->echoOptionFooter();\r\n\t}", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), $this->key ); ?>\n </div>\n <?php\n }", "function add_options_page() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'options_page' )\n\t\t);\n\t}", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function options_page() {\t\t \n\t\t\t$error_log_results = $this->return_log('200');\n\t\t\techo '<div class=\"wraper\">';\n\t\t\tinclude ('form.php');\n\t\t\techo '<div id=\"replace\">';\n\t\t\techo '<table class=\"sort\" border=\"0\" cellspacing=\"10\"><tr><th>time_stamp</th><th>category</th><th>log_type</th><th>message</th></tr>';\n\t\t\tforeach ( $error_log_results as $error_line) {\n\t\t\t echo '<tr>';\n\t\t\t\tforeach ( $error_line as $error_type => $error) {\n\t\t\t\t\techo '<td>'.$error.'</td>'; \n\t\t\t\t}\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t\techo '</div>';\n\t\t\techo '</div>';\n\t\t}", "function initlab_options_page() {\n add_menu_page(\n __('init Lab Options', 'initlab-addons'),\n __('init Lab', 'initlab-addons'),\n 'manage_options',\n 'initlab',\n 'initlab_options_page_html'\n );\n}", "public function plugin_options() {\n\n if (!current_user_can('manage_options')) {\n wp_die( __('You do not have sufficient permissions to access this page.') );\n }\n\n echo $this->loadforum();\n }", "function EWD_URP_Output_Options_Page() {\n\t\tglobal $URP_Full_Version;\n\t\t\n\t\tif (!isset($_GET['page'])) {$_GET['page'] = \"\";}\n\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminHeader.php');\n\t\tif ($_GET['page'] == 'urp-options') {include( plugin_dir_path( __FILE__ ) . '../html/OptionsPage.php');}\n\t\tif ($_GET['page'] == 'urp-woocommerce-import') {include( plugin_dir_path( __FILE__ ) . '../html/WooCommerceImportPage.php');}\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminFooter.php');\n}", "public function render_admin_page() {\n $option_name = $this->name; \n include_once( dirname( __FILE__ ) . '/views/admin-page.php' );\n }", "public function acf_options_page() { \n\n\t\t\t// Check ACF Admin OK\n\t\t\tif ( ! $this->admin_acf_active() ) { return; }\n\n\t\t\t// Check Options Page OK \n\t\t\tif ( ! function_exists('acf_add_options_page') ) { return; }\n\t\t\t\n\t\t\t// Add Options Page\n\t\t\t$parent = acf_add_options_page( [ \n\t\t\t\t'title' => apply_filters( 'ipress_acf_title', 'iPress' ), \n\t\t\t\t'capability' => 'manage_options', \n\t\t\t] ); \n\n\t\t\t// Set Options Page Subpages\n\t\t\t$subpages = apply_filters( 'ipress_acf_pages', [] );\n\t \n\t\t\t// Add Subpages? \n\t\t\tif ( $subpages ) {\n\t\t\t\tforeach ( $subpages as $k=>$v ) {\n\t\t\t\t\tacf_add_options_sub_page( $v );\n\t\t\t\t} \n\t\t\t}\n\t\t}", "public function render_screen_options()\n {\n }", "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Promotions', 'Promotions page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Promotions', 'Promotions menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-promotions-settings',\n\t\t\t'capability'\t=> 'manage_options',\n\t\t\t'redirect'\t\t=> false,\n\t\t\t'parent_slug' => 'case27/tools.php',\n\t\t] );\n\t}", "function ba_options_page() {\n add_menu_page(\n 'ba Theme Options', // Page title\n 'Theme Options', // Menu title\n 'manage_options', // Capability\n 'ba_options', // Menu slug\n 'ba_options_page_html', // Display\n 'dashicons-format-video', // Icon\n 150\n );\n}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "public function acf_wpi_option_page() {\n\t\t// Prevent init acf wpi options if acf/acf-pro not activated.\n\t\tif ( ! class_exists( 'acf' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tacf_add_options_page(\n\t\t\tarray(\n\t\t\t\t'page_title' => __( 'ACF Wpi Options', 'acf_wpi' ),\n\t\t\t\t'menu_slug' => 'acf_wpi_options_page',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t)\n\t\t);\n\t\tModuleLoader::get_instance()->register_options_container();\n\t}", "function options_panel() {\r\n // Include options panel\r\n include($this->pluginPath . \"/includes/settings.php\");\r\n }", "function wpbs_echo_option()\n {\n include wpbs_advs_plugin_dir . 'admin/view/adminLayout.php';\n }", "public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }", "public function admin_options() {\n\n ?>\n <h3>交通银行支付平台</h3>\n \n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function print_default_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<p>WPCampus settings require the Advanced Custom Fields PRO plugin. <a href=\"<?php echo admin_url( 'plugins.php' ); ?>\">Manage plugins</a></p>\n\t\t</div>\n\t\t<?php\n\t}", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "public function optionsdemo_settings_content() { ?>\n\t\t\t<div class=\"wrap\">\t\t\t\t\n\t\t\t\t<form method=\"POST\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'optionsdemo' );\n\t\t\t\t\tdo_settings_sections( 'optionsdemo' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</div> <?php\n\t\t}", "function siteorigin_panels_options_page(){\n\tinclude plugin_dir_path(SITEORIGIN_PANELS_BASE_FILE) . '/tpl/options.php';\n}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "function abecaf_register_options_page() {\n add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' );\n}", "public function registerOptionsPage()\n {\n add_submenu_page(\n 'tools.php',\n 'PostmanCanFail Settings',\n 'PostmanCanFail',\n 'administrator',\n __FILE__,\n [$this, 'settingsPage']\n );\n }", "function printOptions()\n {\n $lines = $this->outputOptions();\n echo join( \"\\n\" , $lines );\n }", "public function plugin_page() {\n\t\t$this->setting_api->show_forms();\n\t}", "function lbcb_options_page(){\n?>\n\t<div class=\"wrap\">\n\t<form method=\"post\" action=\"options.php\">\n\t<?php settings_fields( 'lbcb_options_group' ); ?>\n\t<div class=\"icon32 swatch-icon32-color\"><br /></div>\n\t<h2 class=\"updatehook\"><?php _e('LB Colorbox settings', 'lbcb_textdomain' ); ?></h2>\n\t<table class=\"form-table\">\n\t<tbody>\n\n\t<?php do_settings_sections( 'lbcb_options_group' ); ?>\n\n\t</tbody>\n\t</table>\n\n\t<p class=\"submit\">\n\t<?php lbcb_print_option_buttons(); ?>\n\t</p>\n\t</form>\n<?php\n}", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "public function options_page_html() {\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'settcalc_messages', 'settcalc_message', __( 'Settings Saved', 'settcalc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'settcalc_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"wporg\"\n settings_fields( 'settcalc' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'settcalc' );\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n }", "public function settings_view() {\n?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Google Analytics Options', 'wp-google-analytics') ?></h2>\n\t\t\t<form action=\"options.php\" method=\"post\" id=\"wp_google_analytics\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'wga' );\n\t\t\t\t\tdo_settings_sections( 'wga' );\n\t\t\t\t\tsubmit_button( __( 'Update Options', 'wp-google-analytics' ) );\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n<?php\n\t}", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t\t\n\t\t</div>\n\t\t<?php\n\t}", "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "public function admin_page_display() {\r\n\t\t?>\r\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\r\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\r\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "public function admin_options() {\n\t\t\t?>\n\t\t\t<img style=\"float:right\" src=\"<?php echo plugin_dir_url(__FILE__); ?>coinsimple.png\" />\n\t\t\t<h3><?php _e('CoinSimple', 'woocommerce');?></h3>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function render_options_menu() {\n global $title;\n\n $section = isset($_REQUEST['cs_page']) ? stripslashes( $_REQUEST['cs_page'] ) : 'settings';\n\n if ( !isset($this->option_pages[$section]) ) $section = 'settings';\n\n $template = $this->option_pages[$section]['file'];\n\n ?>\n <div class=\"wrap\">\n <h2><?php echo esc_html($title); ?></h2>\n\n <br/>\n\n <h2 class=\"nav-tab-wrapper\">\n <?php\n foreach( $this->option_pages as $key => $tab ) {\n echo sprintf(\n '<a href=\"%s\" class=\"nav-tab %s\">%s</a>',\n add_query_arg( array( 'cs_page' => $key ), $this->options_page_url ),\n $section == $key ? 'nav-tab-active' : '',\n $tab['name']\n );\n }\n ?>\n </h2>\n\n <form class=\"caseswap-form\" id=\"caseswap-options-form\" action=\"<?php echo esc_attr( add_query_arg( array( 'cs_page' => $section ), $this->options_page_url ) ); ?>\" method=\"post\">\n\n <input name=\"page\" value=\"<?php echo esc_attr($this->options_page_slug); ?>\" type=\"hidden\"/>\n <input name=\"cs_page\" value=\"<?php echo esc_attr($section); ?>\" type=\"hidden\"/>\n <input name=\"cs_nonce\" value=\"<?php echo wp_create_nonce( \"save-caseswap-options\" ); ?>\" type=\"hidden\"/>\n\n <?php include( CSCore_PATH . $template ); ?>\n\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" value=\"Save Changes\" />\n </p>\n\n </form>\n </div>\n <?php\n }", "public function render_settings_page()\n {\n }", "public function form( $instance ) {\n \t// outputs the options form on admin\n }", "public function add_options_pages() {\n if ( function_exists('acf_add_options_page') ) {\n acf_add_options_page(array(\n \"page_title\" => \"Explanatory Text\",\n \"capability\" => \"edit_posts\",\n \"position\" => 50,\n \"icon_url\" => \"dashicons-format-aside\"\n ));\n }\n }", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function pt_options_page()\n\t\t{ \n\t\t\t?>\n\t\t\t<form action='options.php' method='post'>\n\t\t\t\t<h2>Pretty block Testimonials</h2>\n\t\t\t\t<?php\n\t\t\t\tsettings_fields( 'ptblock' );\n\t\t\t\tdo_settings_sections( 'ptblock' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}", "public function add_options_page() {\n add_options_page(\n __( 'Instagram Settings', 'bii-instagram' ),\n __( 'Instagram', 'bii-instagram' ),\n 'manage_options',\n 'bii-instagram',\n array( &$this, 'create_options_page' )\n );\n }", "function cil_plugin_optionMenu_list()\n{\n\t//show admin options view, this view exists in cil_adminOptionsView.php\n\tdo_action('show_cil_admin_manage_lists');\n}", "public function show_options( array $opts ) : void {\t\n\t\t$i = -1;\n\t\twhile( ($i++) < sizeof( $opts ) - 1 ){\n\t\t\tif( $i == 1 )\n\t\t\t\techo \"<br><br>\";\n\t\t\tforeach( $opts[ $i ] as $optn => $optv ){\n\t\t\t\techo \"<span style='position: absolute;'>\".$optn.\" -> \".$optv.\"</span><br>\";\n\t\t\t}\n\t\t}\n\t}", "public function acf_options_page()\n {\n if( function_exists('acf_add_options_page') ) {\n\n acf_add_options_page(array(\n 'page_title' \t=> 'Import / Export',\n 'menu_title'\t=> 'Import / Export',\n 'menu_slug' \t=> 'import-export-addressbook',\n 'capability'\t=> 'edit_posts',\n 'parent_slug' => 'edit.php?post_type=mv_address_book',\n 'redirect'\t\t=> false\n ));\n\n }\n }", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function optionsframework_options() {\n\t\t$options_pages = array(); \n\t\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t\t$options_pages[''] = 'Select a page:';\n\t\tforeach ($options_pages_obj as $page):\n\t\t\t$options_pages[$page->ID] = $page->post_title;\n\t\tendforeach;\n\t\n\t\t// If using image radio buttons, define a directory path\n\t\t$imagepath = get_template_directory_uri() . '/lib/assets/images/icons/';\n\t\n\t\t$options = array();\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('General Settings', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Favicon', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload your favicon to the site, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_favicon',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('RSS Link', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Add in the URL of your RSS feed here to overwrite the defaut WordPress ones.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_rss',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom CSS', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Not 100% happy with our lovely styles? Here you can add some custom CSS if you require minor changes to the ones we\\'ve created. We won\\'t be offended, honest :)', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_css',\n\t\t\t'type' \t\t=> 'textarea');\t\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Google Analytics (or custom Javascript)', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If you\\'re hooked up with Google Analytics you can paste the Javascript includes for it here (without the script tags). Or alternatively if you just want some custom Javascript added on top of ours, add that here too.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_js',\n\t\t\t'type' \t\t=> 'textarea');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Breadcrumb Trail?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the breadcrumb trail on all pages in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_breadcrumbs',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Application Form ID', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_application_form_id',\n\t\t\t'desc'\t\t=> 'If you have added an applcation form for the jobs section of your site using the Contact Form & plugin, you can add the ID of the form here for it to be pulled out automatically.',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Header', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom Logo', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload a custom logo, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_logo',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Header Text', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_text',\n\t\t\t'des'\t\t=> 'You can add some text to the header if you like. Keep it short and sweet mind; nobody likes a waffler :)',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Contact Telephone', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your contact telephone number here to go in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_phone',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Footer', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __('Copyright Text', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the text for your copyright here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_footer_copyright',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Hide FrogsThemes Link?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will hide our link :\\'( <--sad face', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_hide_ft_link',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Blog', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Style', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select if you prefer the blog to be as a list or in masonry.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_blog_style',\n\t\t\t'options' \t=> array('list' => __('List', 'frogsthemes'), 'masonry' => __('Masonry', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'list',\n\t\t\t'type' \t\t=> 'select');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Share Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the share links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_share_links',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Author Box?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the author box on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_author',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Next/Previous Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the next/previous post links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_next_prev',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Related Posts?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the related posts section. These are related by tag.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_related_posts',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Slider', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Speed of Transition', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the speed you would like the transition to be in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_speed',\n\t\t\t'std'\t\t=> '600',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pause Time', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the time you would like the gallery to pause between transitions in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_pause',\n\t\t\t'std'\t\t=> '7000',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Start?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically start the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_auto_start',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Loop?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically loop through the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_loop',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t/*\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Animation Type', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select which effect you would like to use when going between slides.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_transition',\n\t\t\t'options' \t=> array('fade' => __('Fade', 'frogsthemes'), 'slide' => __('Slide', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'fade',\n\t\t\t'type' \t\t=> 'select');\n\t\t*/\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Connections', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Facebook URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Facebook URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_facebook',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Twitter URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Twitter URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_twitter',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Google+ URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Google+ URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_google_plus',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'LinkedIn URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full LinkedIn URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_linkedin',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pinterest URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Pinterest URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_pinterest',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'YouTube URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full YouTube URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_youtube',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API Options', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To use the Twitter API, you need to sign up for an <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">app with Twitter</a>.', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'info');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Key', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_key',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\n\t\treturn apply_filters('optionsframework_options', $options);\n\t}", "public function admin_page_display()\n {\n?>\n <div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html(get_admin_page_title()); ?></h2>\n <?php cmb2_metabox_form($this->metabox_id, $this->key); ?>\n </div>\n<?php\n }", "function doOptionsPage()\r\n\t{\r\n\t\t/*\tDeclare the different settings\t*/\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'storeTpe', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeRang', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeIdentifier', '' );\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'environnement', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlSuccess', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlDeclined', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlCanceled', '' );\r\n\t\tsettings_fields( 'wpklikandpay_url_config_group' );\r\n\r\n\t\t/*\tAdd the section about the store main configuration\t*/\r\n\t\tadd_settings_section('wpklikandpay_store_config', __('Informations de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeConfigForm'), 'wpklikandpayStoreConfig');\r\n\r\n\t\t/*\tAdd the section about the back url\t*/\r\n\t\t// add_settings_section('wpklikandpay_url_config', __('Urls de retour apr&eacute;s un paiement', 'wpklikandpay'), array('wpklikandpay_option', 'urlConfigForm'), 'wpklikandpayUrlConfig');\r\n?>\r\n<form action=\"\" method=\"post\" >\r\n<input type=\"hidden\" name=\"saveOption\" id=\"saveOption\" value=\"save\" />\r\n\t<?php \r\n\t\tdo_settings_sections('wpklikandpayStoreConfig'); \r\n \r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the store main configuration\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['storeTpe'] = $_POST['storeTpe'];\r\n\t\t\t$optionList['storeRang'] = $_POST['storeRang'];\r\n\t\t\t$optionList['storeIdentifier'] = $_POST['storeIdentifier'];\r\n\t\t\t$optionList['environnement'] = $_POST['environnement'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_mainoption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Store main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<?php do_settings_fields('wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig'); ?>\r\n\t</table>\r\n\t<br/><br/><br/>\r\n<!--\r\n\t<?php \r\n\t\t// do_settings_sections('wpklikandpayUrlConfig');\r\n\r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the configuration for bakc url after payment\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['urlSuccess'] = $_POST['urlSuccess'];\r\n\t\t\t$optionList['urlDeclined'] = $_POST['urlDeclined'];\r\n\t\t\t$optionList['urlCanceled'] = $_POST['urlCanceled'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_urloption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Back url main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >\r\n\t\t<?php echo sprintf(__('Ajouter : %s dans les pages que vous allez cr&eacute;er.', 'wpklikandpay'), '<span class=\" bold\" >[wp-klikandpay_payment_return title=\"KlikAndPay return page\" ]</span>'); ?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >&nbsp;</td>\r\n\t\t</tr>\r\n<?php \r\n\t\tdo_settings_fields('wpklikandpayUrlConfig', 'backUrlConfig'); \r\n?>\r\n\t</table>\r\n-->\r\n\t<br/><br/><br/>\r\n\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Enregistrer les options', 'wpklikandpay'); ?>\" />\r\n</form>\r\n<?php\r\n\t}", "function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}", "public function get_plugin_options_page() {\r\n\t\tif( !current_user_can( 'manage_options' ) ) {\r\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( isset( $_GET['tab'] ) && $_GET['tab'] == 'settings' || !isset( $_GET['tab'] ) ) {\r\n\t\t\t$settings_active = 'nav-tab-active';\r\n\t\t}\r\n\t\telse if( isset( $_GET['tab'] ) && $_GET['tab'] == 'stories' ) {\r\n\t\t\t$stories_active = 'nav-tab-active';\r\n\t\t}\r\n\t\telse if( isset( $_GET['tab'] ) && $_GET['tab'] == 'maintenance') {\r\n\t\t\t$maintenance_active = 'nav-tab-active';\r\n\t\t}\r\n\t?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div><h2>MF-Timeline Options</h2>\r\n\t\t\t\r\n\t\t\t<?php \r\n\t\t\t\t$errors = $this->errors->get_error_messages();\r\n\t\t\t\t\r\n\t\t\t\tif( !empty( $errors ) ) :\r\n\t\t\t?>\r\n\t\t\t\t<?php foreach( $errors as $error ) : ?>\r\n\t\t\t\t\t\t<div class=\"error\">\r\n\t\t\t\t\t\t\t<p><strong><?php echo $error; ?></strong></p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t<?php endforeach; ?>\r\n\t\t\t<?php endif;?>\r\n\t\t\t\r\n\t\t\t<div id=\"nav\">\r\n\t\t\t\t<h3 class=\"themes-php\">\r\n\t\t\t\t\t<a class=\"nav-tab <?php echo $settings_active;?>\" href=\"?page=mf-timeline&amp;tab=settings\">Settings</a>\r\n\t\t\t\t\t<a class=\"nav-tab <?php echo $stories_active;?>\" href=\"?page=mf-timeline&amp;tab=stories\">Timeline Stories</a>\r\n\t\t\t\t\t<a class=\"nav-tab <?php echo $maintenance_active;?>\" href=\"?page=mf-timeline&amp;tab=maintenance\">Upgrade</a>\r\n\t\t\t\t</h3>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\t\t$active_tab = ( isset( $_GET['tab'] ) ) ? $_GET['tab'] : null;\r\n\t\t\t\t\r\n\t\t\t\tswitch( $active_tab ) {\r\n\t\t\t\t\tcase 'stories' :\r\n\t\t\t\t\t\tif( isset( $_GET['action'] ) && $_GET['action'] == 'editor' ) {\r\n\t\t\t\t\t\t\t$story_id = ( isset( $_GET['story_id'] ) ) ? (int) $_GET['story_id'] : null;\r\n\t\t\t\t\t\t\t$this->get_plugin_stories_editor( $story_id );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if( isset( $_GET['action'] ) && $_GET['action'] == 'delete' ) {\r\n\t\t\t\t\t\t\t$story_id = (int) $_GET['story_id'];\r\n\t\t\t\t\t\t\t$this->delete_story( $story_id );\r\n\t\t\t\t\t\t\t$this->get_plugin_stories_list_page();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$this->get_plugin_stories_list_page();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'maintenance' :\r\n\t\t\t\t\t\t$this->get_plugin_maintenance_page();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'settings' :\r\n\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t$this->get_plugin_settings_page();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "public function add_options_page() {\n\t\tadd_options_page( 'Import Users/Cron', 'Import Users/Cron', 'manage_options', 'import-users-cron-page', array( $this -> submenu_page, 'display' ) );\n\t}", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "function sfe_options_page() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( 'You do not have sufficient permissions to access this page.' );\n\t\t}\n\n\t\tob_start();\n\n\t\t?>\n\n\t\t<div class=\"wrap\">\n\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?> &mdash; <small>v<?php echo SIMPLE_FACEBOOK_EMBED_VERSION ?></small></h2>\n\n\t\t\t<form id=\"main\" name=\"sfpp-form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">\n\n\t\t\t\t<h2 class=\"nav-tab-wrapper hide-if-no-js\">\n\t\t\t\t\t<a href=\"#tab_basic\" class=\"nav-tab\"><?php _e( 'Basic', SIMPLE_FACEBOOK_EMBED_I18N ); ?></a>\n\t\t\t\t\t<!-- <a href=\"#tab_extras\" class=\"nav-tab\"><?php //_e( 'Extras', SIMPLE_FACEBOOK_PAGE_I18N ); ?></a> -->\n\t\t\t\t</h2>\n\n\t\t\t\t<div id=\"sfpptabs\">\n\n\t\t\t\t\t<?php settings_fields( 'sfpp_settings_group' ); // settings group name. This should match the group name used in register_setting(). ?>\n\n\t\t\t\t\t<div class=\"sfpp-tab\" id=\"tab_basic\"><?php do_settings_sections( 'sfpp-settings' ); ?></div>\n\n\t\t\t\t\t<div class=\"sfpp-tab\" id=\"tab_extras\"><?php //do_settings_sections( 'sfpp-extras' ); ?></div>\n\n\t\t\t\t</div>\n\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n\t\t\t<div id=\"aside\">\n\n\t\t\t\t<h2><?php _e( 'Sponsors', SIMPLE_FACEBOOK_EMBED_I18N ); ?></h2>\n\n\t\t\t\t<div id=\"banner\">\n\t\t\t\t\t<a href=\"http://www.siteground.com\" onClick=\"this.href='http://bit.ly/1FffXrN'\" >\n\t\t\t\t\t\t<img src=\"https://ua.siteground.com/img/banners/application/wordpress/250x250.gif\" alt=\"Web Hosting\" width=\"250\" height=\"250\" border=\"0\">\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\n\t\t\t\t<div id=\"banner\">\n\t\t\t\t\t<a href=\"http://www.csshero.org\" onClick=\"this.href='http://bit.ly/1Flr6sW'\">\n\t\t\t\t\t\t<img src=\"http://www.csshero.org/banners/250x250_01.png\" alt=\"WordPress Theme Editor\" width=\"250\" height=\"250\" border=\"0\">\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<?php\n\t\techo ob_get_clean();\n\t}", "function category_browsing_options_form()\r\n\t//admin options for category_browsing_options module\r\n\t{\r\n\t\t$this->body .= \"<tr><td class=\\\"col_hdr\\\" colspan=\\\"2\\\" style=\\\"width: 100%; font-weight: bold; text-align: center;\\\">Options selected below will be applied to the Category Browsing Options Module</td></tr>\";\r\n\t\t$show_options = array (\r\n\t\t\t'cat_browse_opts_as_ddl' => $this->db->get_site_setting('cat_browse_opts_as_ddl'),\r\n\t\t\t'cat_browse_all_listings' => $this->db->get_site_setting('cat_browse_all_listings'),\r\n\t\t\t'cat_browse_end_today' => $this->db->get_site_setting('cat_browse_end_today'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_class_only' => $this->db->get_site_setting('cat_browse_class_only'),\r\n\t\t\t'cat_browse_auc_only' => $this->db->get_site_setting('cat_browse_auc_only'),\r\n\t\t\t'cat_browse_buy_now' => $this->db->get_site_setting('cat_browse_buy_now'),\r\n\t\t\t'cat_browse_buy_now_only' => $this->db->get_site_setting('cat_browse_buy_now_only'),\r\n\t\t\t'cat_browse_auc_bids' => $this->db->get_site_setting('cat_browse_auc_bids'),\r\n\t\t\t'cat_browse_auc_no_bids' => $this->db->get_site_setting('cat_browse_auc_no_bids')\r\n\t\t\t\r\n\t\t);\r\n\t\t$ddlTooltip = geoHTML::showTooltip('Show as Dropdown', 'Choose yes to display the module\\'s options in a dropdown list, or no to show them as a text-based, delimeter-separated list.');\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_opts_as_ddl\",\"Show as Dropdown $ddlTooltip\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_all_listings\",\"All listings\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_end_today\",\"Listings Ending within 24 hours\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_has_pics\",\"Listings with Photos\");\r\n\t\t\r\n\t\tif(geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_class_only\",\"Classifieds only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_only\",\"Auctions only\");\r\n\t\t}\r\n\t\tif(geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now\",\"Auctions using Buy Now\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now_only\",\"Auctions using Buy Now Only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_bids\",\"Auctions with Bids\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_no_bids\",\"Auctions without Bids\");\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.8602562", "0.85334057", "0.8366217", "0.8298537", "0.7932009", "0.7809953", "0.7777949", "0.7763848", "0.77521837", "0.77476674", "0.7716377", "0.76748025", "0.7666479", "0.7665145", "0.7662264", "0.759446", "0.75890946", "0.75415826", "0.7506773", "0.74796784", "0.73844576", "0.72876275", "0.72851807", "0.72662705", "0.7257072", "0.7250701", "0.72264415", "0.72244227", "0.7187916", "0.7173469", "0.7163644", "0.7153743", "0.7149085", "0.71450686", "0.71376944", "0.7127506", "0.7121861", "0.710145", "0.7084398", "0.70675594", "0.70643836", "0.7062708", "0.70545083", "0.7039745", "0.70343494", "0.70173264", "0.7004123", "0.70035046", "0.7001355", "0.69699854", "0.6963351", "0.69486505", "0.6941622", "0.6941566", "0.69397295", "0.6927799", "0.68935883", "0.6888482", "0.6871508", "0.68701535", "0.68673974", "0.6866807", "0.6847094", "0.6826184", "0.6821261", "0.68147296", "0.6814156", "0.679287", "0.67777085", "0.67739654", "0.6769812", "0.67565304", "0.6753909", "0.6747701", "0.6738739", "0.6738512", "0.67269564", "0.6721788", "0.6719323", "0.6717833", "0.67148876", "0.6712932", "0.6709498", "0.6705396", "0.6703217", "0.66846514", "0.6658215", "0.6657813", "0.6656193", "0.6652696", "0.6647874", "0.6647208", "0.6641995", "0.66383255", "0.66382706", "0.6623698", "0.66199714", "0.6613774", "0.66117686", "0.6606497" ]
0.7798162
6
outputs the fields for the settings page
public function general_section_fields() { global $wpdb; //require form helper require_once EE_BREAKOUTS_PATH . 'helpers/EE_Form_Fields.helper.php'; $settings_ref = 'espresso_breakout_settings'; //get all wp_pages and setup page selector. $pages = get_pages(); $page_values = array(); foreach ( $pages as $page ) { $page_values[] = array( 'text' => $page->post_title, 'id' => $page->ID ); } $page_select = EE_Form_Fields::select_input( 'breakout_page', $page_values, $this->_settings['breakout_page'] ); //output the html for the forms echo $page_select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DisplaySettings()\n {\n $this->DisplayBreadcrumb();\n PrintPluginSettings($this->pluginid, array('form_wizard_settings','form_export_settings'), $this->_page);\n }", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "public function show_settings() {\n\n\t\twoocommerce_admin_fields( $this->get_settings() );\n\t}", "public function render_settings_page()\n {\n }", "public function settings() {\n\n\t\tdo_settings_sections( 'wpbgdc' );\n\n\t\tsubmit_button();\n\n\t\techo '<div class=\"clear\"></div>';\n\n\t}", "function print_hidden_settings_fields ()\n\t\t{\n\t\t\t$options = get_option('hs_settings');\n\n\t\t\t$hs_installed = ( isset($options['hs_installed']) ? $options['hs_installed'] : 1 );\n\t\t\t$hs_version = ( isset($options['hs_version']) ? $options['hs_version'] : HUBSPOT_TRACKING_CODE_PLUGIN_VERSION );\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_installed\" type=\"hidden\" name=\"hs_settings[hs_installed]\" value=\"%d\"/>',\n\t\t\t\t\t$hs_installed\n\t\t\t);\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_version\" type=\"hidden\" name=\"hs_settings[hs_version]\" value=\"%s\"/>',\n\t\t\t\t\t$hs_version\n\t\t\t);\n\t\t}", "public function print_settings_page() {\n\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<form method=\"post\" action=\"options.php\" novalidate=\"novalidate\">\n\t\t\t\t<?php\n\n\t\t\t\t// Setup fields.\n\t\t\t\tsettings_fields( 'conf_schedule' );\n\n\t\t\t\t?>\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div id=\"post-body\" class=\"metabox-holder columns-2\">\n\n\t\t\t\t\t\t<div id=\"postbox-container-1\" class=\"postbox-container\">\n\t\t\t\t\t\t\t<div id=\"side-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t// Print side boxes.\n\t\t\t\t\t\t\t\tdo_meta_boxes( $this->settings_page_id, 'side', array() );\n\n\t\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_side', false );\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"postbox-container-2\" class=\"postbox-container\">\n\n\t\t\t\t\t\t\t<div id=\"normal-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'normal', array() ); ?>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div id=\"advanced-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'advanced', array() ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_bottom', false );\n\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t\t<br class=\"clear\" />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\n\t}", "public function print_settings_page() {\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form method=\"post\" action=\"options.php\" novalidate=\"novalidate\">\n\t\t\t\t<?php\n\n\t\t\t\t// Setup fields.\n\t\t\t\tsettings_fields( 'conf_schedule' );\n\n\t\t\t\t?>\n <div id=\"poststuff\">\n <div id=\"post-body\" class=\"metabox-holder columns-2\">\n <div id=\"postbox-container-1\" class=\"postbox-container\">\n <div id=\"side-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t// Print side boxes.\n\t\t\t\t\t\t\t\tdo_meta_boxes( $this->settings_page_id, 'side', [] );\n\n\t\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_side', false );\n\n\t\t\t\t\t\t\t\t?>\n </div>\n </div>\n <div id=\"postbox-container-2\" class=\"postbox-container\">\n <div id=\"normal-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'normal', [] ); ?>\n </div>\n <div id=\"advanced-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'advanced', [] ); ?>\n </div>\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_bottom', false );\n\n\t\t\t\t\t\t\t?>\n </div>\n </div>\n <br class=\"clear\"/>\n </div>\n </form>\n </div>\n\t\t<?php\n\n\t}", "function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\n }", "public function optionsdemo_settings_content() { ?>\n\t\t\t<div class=\"wrap\">\t\t\t\t\n\t\t\t\t<form method=\"POST\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'optionsdemo' );\n\t\t\t\t\tdo_settings_sections( 'optionsdemo' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</div> <?php\n\t\t}", "public function add_settings_fields()\n\t{\n\t\t$this->add_field(\n\t\t\t'section-info',\n\t\t\t'name',\n\t\t\t'Name',\n\t\t\t'print_field_name',\n\t\t\tarray()\n\t\t);\n\t}", "public function optionsdemo_settings_content() { ?>\n <div class=\"wrap\">\n <div id=\"icon-themes\" class=\"icon32\"><br/></div>\n <h1>Options Demo</h1>\n <form action=\"options.php\" method=\"POST\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( \"optionsdemo_general\" );\n\t\t\t\t\t\tdo_settings_sections( \"optionsdemo_general\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubmit_button( esc_html__( 'Save Setting', 'optionsdemo' ) )\n\t\t\t\t\t?>\n </form>\n </div>\n\t\t<?php }", "public function settings_page() {\n\n\t\t?>\n\n\t\t<div class=\"wrap schedule-a-visit-to-sherpa-settings\">\n\t\t\t\n\t\t\t<form id=\"schedule-a-visit-to-sherpa-form\" method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'schedule_a_visit_to_sherpa_data', 'schedule_a_visit_to_sherpa_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'schedule_a_visit_to_sherpa_settings_section' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'schedule-a-visit-to-sherpa' ); ?>\n\t\t\t\t\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n\t\t<?php\n\n\t}", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function settingsPage() {\n // Handling the submit for settings page.\n $this->_submitHandler();\n // Getting Default values for the fields.\n $fields = get_option('pii_fields');\n \n ?>\n <div class=\"wrap\">\n <h2><?php echo __('PII Settings'); ?></h2>\n <p><?php echo __('Select the fields you want to be encrypted while storing in database.'); ?></p>\n <form name='pii-settings-form' method='post'>\n <?php wp_nonce_field('pii_settings', 'pii_settings_nonce'); ?>\n <input type='hidden' name='type' value='pii_settings' />\n <?php\n $options = $this->getFields();\n \n foreach ($options as $id => $label) {\n $is_checked = !empty($fields) ? (in_array($id, $fields) ? \" checked\": \"\") : '';\n ?>\n <div><label for='<?php print $id; ?>'><input type='checkbox' name='options[]' value='<?php print $id; ?>' <?php print $is_checked;?> /> <?php print str_replace('meta_', \"\", $label); ?></label><br/></div>\n <?php\n }\n print submit_button();\n ?>\n </form>\n \n <h2><?php echo __('Configure User Meta fields'); ?></h2>\n <form name='pii-custom-fields-form' method='post'>\n <?php wp_nonce_field('pii_custom_meta_fields', 'pii_custom_meta_fields_nonce'); ?>\n <input type='hidden' name='type' value='pii_custom_meta_fields' />\n <?php\n $custom_fields = $this->getCustomFields();\n ?>\n <div><label for='pii_custom_meta_fields'><?php echo __('Provide a separated list of multiple user meta keys to apply encryption.'); ?></br></label><textarea cols='80' rows='10' id='pii_custom_meta_fields' name='pii_custom_meta_fields'><?php print $custom_fields;?></textarea></div>\n <?php \n print submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "function display_custom_info_fields(){\n\t\n\tadd_settings_section(\"section\", \"Virksomhedsinformation\", null, \"theme-options\");\n\n add_settings_field(\"business_name\", \"Virksomhedsnavn\", \"display_business_name_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"support_phone\", \"Support Telefon\", \"display_support_phone_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"support_email\", \"Support Email\", \"display_support_email_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"street_address\", \"Gade\", \"display_street_address_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"city\", \"By og postnummer\", \"display_city_element\", \"theme-options\", \"section\");\n\n register_setting(\"section\", \"business_name\");\n\tregister_setting(\"section\", \"support_phone\");\n\tregister_setting(\"section\", \"support_email\");\n\tregister_setting(\"section\", \"street_address\");\n\tregister_setting(\"section\", \"city\");\n\t\n}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function display() {\n\t\techo \"<input id='\" . esc_attr( $this->setting_id ) . \"' type='hidden' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( wp_json_encode( $this->get(), JSON_UNESCAPED_UNICODE ) ) . \"'>\";\n\t}", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "public function display_options_page() {\n\t\t?>\n\t\t<div class=\"wrap ee-breakouts-admin\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\t<h2><?php _e('EE Breakouts Settings', 'event_espresso'); ?></h2>\n\t\t\t<div id=\"poststuff\">\n\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t<div class=\"form-wrap\">\n\t\t\t\t\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\t\t\t\t<?php settings_fields('ee_breakout_options'); ?>\n\t\t\t\t\t\t\t<?php do_settings_sections('ee_breakouts_admin'); ?>\n\t\t\t\t\t\t\t<span class=\"submit\">\n\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button primary-button\" name=\"update_ee_breakout_options\" value=\"Save Options\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div> <!-- end .form-wrap -->\n\t\t\t\t</div> <!-- end #post-body-content -->\n\t\t\t</div> <!-- end #poststuff -->\n\t\t</div> <!-- end .wrap -->\n\t\t<?php\n\t}", "function ms_settings_section() {\n?>\n<h3><?php _e( 'Post Revision Workflow', $this->text_domain ) ?></h3>\n<table class=\"form-table\">\n\t<tbody>\n \t<tr valign=\"top\">\n \t<th scope=\"row\">\n \t<label for=\"dpn_reviewers\"><?php _e( 'Default email address for post revision workflow notification:', $this->text_domain ) ?></label>\n </th>\n <td>\n \t<?php $this->settings_field() ?>\n </td>\n </tr>\n </tbody>\n</table>\n<?php\n\t\t}", "function settings_page() {\n\t\textract( $this->group, EXTR_OVERWRITE ); ?>\n\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php echo esc_html( $page_title ) ?></h2>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_before\", $this->group ) ?>\n\t\t<form action=\"options.php\" method=\"post\" id=\"kc-settings-form\">\n\t\t\t<?php\n\t\t\t\t# The hidden fields\n\t\t\t\tsettings_fields( \"{$prefix}_settings\" );\n\n\t\t\t\tswitch ( $this->group['display'] ) {\n\t\t\t\t\tcase 'metabox' :\n\t\t\t\t\t\t$this->metabox->display();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'plain' :\n\t\t\t\t\t\tforeach ( $this->group['options'] as $section ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h3><?php echo esc_html( $section['title'] ) ?></h3>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$this->settings_section( $section );\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tsubmit_button( __( 'Save Changes' ) );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t?>\n\t\t</form>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_after\", $this->group ) ?>\n\t</div>\n\t<?php }", "public function display_analytics_settings() {\n\t\tadd_settings_field( 'wsuwp-ga-id', 'Google Analytics ID', array( $this, 'general_settings_ga_id' ), $this->settings_page, 'wsuwp-analytics', array(\n\t\t\t'label_for' => 'wsuwp_ga_id',\n\t\t) );\n\t\tadd_settings_field( 'wsuwp-ga4-id', 'GA4 Analytics ID', array( $this, 'general_settings_ga4_id' ), $this->settings_page, 'wsuwp-analytics', array(\n\t\t\t'label_for' => 'wsuwp_ga4_id',\n\t\t) );\n\t\tadd_settings_field( 'wsuwp-analytics-option-map', 'General Analytics Settings', array( $this, 'general_settings_inputs' ), $this->settings_page, 'wsuwp-analytics', array(\n\t\t\t'label_for' => 'wsuwp_analytics_option_map',\n\t\t) );\n\t}", "public static function output() {\n\t\tglobal $kopa_current_tab, $kopa_show_save_button;\n\n\t\tdo_action( 'kopa_settings_start' );\n\n\t\t// Include settings pages\n\t\tself::get_settings_pages();\n\n\t\t// Get current tab/section\n\t\t$kopa_current_tab = empty( $_GET['tab'] ) ? 'theme-options' : sanitize_title( $_GET['tab'] );\n\n\t\t// Determines whether or not show save submit button\n\t\t$kopa_show_save_button = true;\n\t\tif ( 'backup-manager' === $kopa_current_tab ) {\n\t\t\t$kopa_show_save_button = false;\n\t\t}\n\t\t$kopa_show_save_button = apply_filters( 'kopa_settings_show_save_button', $kopa_show_save_button, $kopa_current_tab );\n\n\t\t// Save settings if data has been posted\n\t if ( ! empty( $_POST ) ) {\n\t \tself::save();\n\t }\n\n\t // Add any posted messages\n\t if ( ! empty( $_GET['kopa_error'] ) ) {\n\t \tself::add_error( stripslashes( $_GET['kopa_error'] ) );\n\t }\n\n \tif ( ! empty( $_GET['kopa_message'] ) ) {\n\t \tself::add_message( stripslashes( $_GET['kopa_message'] ) );\n\t\t}\n\n\t self::show_messages();\n\n\t\t// Get tabs for the settings page\n\t $tabs = apply_filters( 'kopa_settings_tabs_array', array() );\n\n\t include 'views/html-admin-settings.php';\n\t}", "public function maz_hspm_settings_content() {\n ?>\n <div class=\"wrap\">\n <h2>Halve Spacers On Mobile Settings</h2>\n <form method=\"post\" action=\"options.php\">\n <br>\n <hr>\n <br>Breakpoint configures the screen width in pixels when the spacers change size.\n <br>Ratio defines the amount of change. For example, 0.5 will halve the size, 2 will double it.\n <br>\n\n <?php\n # Places all the fields defined above and the submit button in the markup\n settings_fields( 'maz_hspm_fields' );\n do_settings_sections( 'maz_hspm_fields' );\n submit_button();\n ?>\n </form>\n <div class=\"\">\n A Plugin by Moritz Zimmer, 2020\n </div>\n </div>\n <?php\n }", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function print_settings_section_info()\n {\n }", "public function settingsPage() {\n require_once 'form.phtml';\n }", "public function showSettingsPage()\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $configValues = $config->read();\n\n // Regex out the setting values and comments to provide a list of settings that we can render out.\n foreach ($this->fieldGroups as $field => $group) {\n\n if (!key_exists($field, $this->labelOverrides)) {\n $label = ucwords(str_replace('_', ' ', $field));\n } else {\n $label = $this->labelOverrides[$field];\n }\n\n // Get the value from the settings file...\n $value = $configValues[$field];\n\n $inputType = Setting::TYPE_TEXT;\n if (in_array($field, $this->booleanFields)) {\n $inputType = Setting::TYPE_BOOL;\n }\n\n $inputComments = null;\n if (key_exists($field, $this->fieldComments)) {\n $inputComments = $this->fieldComments[$field];\n }\n\n $panelInputs[$group][] = new Setting($field, $label, $group, $value, $inputType, $inputComments);\n }\n\n\n return view('_pages.settings')->with('panels', $panelInputs);\n }", "public function getSettingsHtml()\n {\n return craft()->templates->render('controlleractionfield/fieldtypes/controlleraction/settings', array(\n 'settings' => $this->getSettings(),\n 'placeholders' => $this->getPlaceholderStrings(),\n ));\n }", "function printAdminPageSettings() {\r\n \r\n wpscSupportTickets_saveSettings(); // Action hook for saving\r\n\r\n $devOptions = $this->getAdminOptions();\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n $this->adminHeader();\r\n\r\n if (@isset($_POST['update_wpscSupportTicketsSettings'])) {\r\n\r\n if (isset($_POST['wpscSupportTicketsmainpage'])) {\r\n $devOptions['mainpage'] = esc_sql($_POST['wpscSupportTicketsmainpage']);\r\n }\r\n if (isset($_POST['turnwpscSupportTicketsOn'])) {\r\n $devOptions['turnon_wpscSupportTickets'] = esc_sql($_POST['turnwpscSupportTicketsOn']);\r\n }\r\n if (isset($_POST['email'])) {\r\n $devOptions['email'] = esc_sql($_POST['email']);\r\n }\r\n if (isset($_POST['email_new_ticket_subject'])) {\r\n $devOptions['email_new_ticket_subject'] = esc_sql($_POST['email_new_ticket_subject']);\r\n }\r\n if (isset($_POST['email_new_ticket_body'])) {\r\n $devOptions['email_new_ticket_body'] = esc_sql($_POST['email_new_ticket_body']);\r\n }\r\n if (isset($_POST['email_new_reply_subject'])) {\r\n $devOptions['email_new_reply_subject'] = esc_sql($_POST['email_new_reply_subject']);\r\n }\r\n if (isset($_POST['email_new_reply_body'])) {\r\n $devOptions['email_new_reply_body'] = esc_sql($_POST['email_new_reply_body']);\r\n }\r\n if (isset($_POST['disable_inline_styles'])) {\r\n $devOptions['disable_inline_styles'] = esc_sql($_POST['disable_inline_styles']);\r\n }\r\n if (isset($_POST['allow_guests'])) {\r\n $devOptions['allow_guests'] = esc_sql($_POST['allow_guests']);\r\n }\r\n if (isset($_POST['custom_field_position'])) {\r\n $devOptions['custom_field_position'] = esc_sql($_POST['custom_field_position']);\r\n } \r\n if (isset($_POST['custom_field_frontend_position'])) {\r\n $devOptions['custom_field_frontend_position'] = esc_sql($_POST['custom_field_frontend_position']);\r\n } \r\n if (isset($_POST['use_ticket_in_email'])) {\r\n $devOptions['use_ticket_in_email'] = esc_sql($_POST['use_ticket_in_email']);\r\n } \r\n if (isset($_POST['use_reply_in_email'])) {\r\n $devOptions['use_reply_in_email'] = esc_sql($_POST['use_reply_in_email']);\r\n } \r\n if (isset($_POST['display_severity_on_create'])) {\r\n $devOptions['display_severity_on_create'] = esc_sql($_POST['display_severity_on_create']);\r\n }\r\n if(isset($_POST['email_name'])) {\r\n $devOptions['email_name'] = esc_sql($_POST['email_name']);\r\n }\r\n if(isset($_POST['hide_email_on_frontend_list'])) {\r\n $devOptions['hide_email_on_frontend_list'] = esc_sql($_POST['hide_email_on_frontend_list']);\r\n } \r\n if(isset($_POST['email_encoding'])) {\r\n $devOptions['email_encoding'] = esc_sql($_POST['email_encoding']);\r\n } \r\n if(isset($_POST['hide_email_on_support_tickets'])) {\r\n $devOptions['hide_email_on_support_tickets'] = esc_sql($_POST['hide_email_on_support_tickets']);\r\n } \r\n if(isset($_POST['enable_beta_testing'])) {\r\n $devOptions['enable_beta_testing'] = esc_sql($_POST['enable_beta_testing']);\r\n } \r\n if(isset($_POST['disable_all_emails'])) {\r\n $devOptions['disable_all_emails'] = esc_sql($_POST['disable_all_emails']);\r\n } \r\n if(isset($_POST['override_wordpress_email'])) {\r\n $devOptions['override_wordpress_email'] = esc_sql($_POST['override_wordpress_email']);\r\n }\r\n if(isset($_POST['overrides_email'])) {\r\n $devOptions['overrides_email'] = esc_sql($_POST['overrides_email']);\r\n } \r\n if(isset($_POST['custom_title'])) {\r\n $devOptions['custom_title'] = esc_sql($_POST['custom_title']);\r\n }\r\n if(isset($_POST['custom_message'])) {\r\n $devOptions['custom_message'] = esc_sql($_POST['custom_message']);\r\n } \r\n if(isset($_POST['show_login_text'])) {\r\n $devOptions['show_login_text'] = esc_sql($_POST['show_login_text']);\r\n } \r\n if(isset($_POST['override_mysql_timezone'])) {\r\n $devOptions['override_mysql_timezone'] = esc_sql($_POST['override_mysql_timezone']);\r\n }\r\n if(isset($_POST['show_advanced_options'])) {\r\n $devOptions['show_advanced_options'] = esc_sql($_POST['show_advanced_options']);\r\n }\r\n if(isset($_POST['custom_new_ticket_button_text'])) {\r\n $devOptions['custom_new_ticket_button_text'] = esc_sql($_POST['custom_new_ticket_button_text']);\r\n } \r\n \r\n if(isset($_POST['cc_all_new_tickets'])) {\r\n $devOptions['cc_all_new_tickets'] = esc_sql($_POST['cc_all_new_tickets']);\r\n } \r\n if(isset($_POST['cc_all_new_tickets_to_email'])) {\r\n $devOptions['cc_all_new_tickets_to_email'] = esc_sql($_POST['cc_all_new_tickets_to_email']);\r\n } \r\n if(isset($_POST['cc_all_user_replies'])) {\r\n $devOptions['cc_all_user_replies'] = esc_sql($_POST['cc_all_user_replies']);\r\n } \r\n if(isset($_POST['cc_all_user_replies_to_email'])) {\r\n $devOptions['cc_all_user_replies_to_email'] = esc_sql($_POST['cc_all_user_replies_to_email']);\r\n } \r\n if(isset($_POST['cc_all_admin_replies'])) {\r\n $devOptions['cc_all_admin_replies'] = esc_sql($_POST['cc_all_admin_replies']);\r\n } \r\n if(isset($_POST['cc_all_admin_replies_to_email'])) {\r\n $devOptions['cc_all_admin_replies_to_email'] = esc_sql($_POST['cc_all_admin_replies_to_email']);\r\n } \r\n if(isset($_POST['allow_search'])) {\r\n $devOptions['allow_search'] = esc_sql($_POST['allow_search']);\r\n } \r\n update_option($this->adminOptionsName, $devOptions);\r\n\r\n echo '<div class=\"updated\"><p><strong>';\r\n _e('Settings Updated.', 'wpsc-support-tickets');\r\n echo '</strong></p></div>';\r\n }\r\n\r\n echo '\r\n \r\n <script type=\"text/javascript\">\r\n jQuery(function() {\r\n jQuery( \"#wst_tabs\" ).tabs();\r\n setTimeout(function(){ jQuery(\".updated\").fadeOut(); },3000);\r\n });\r\n </script>\r\n\r\n <form method=\"post\" action=\"' , $_SERVER[\"REQUEST_URI\"] , '\">\r\n \r\n\r\n <div id=\"wst_tabs\" style=\"padding:5px 5px 0px 5px;font-size:1.1em;border-color:#DDD;border-radius:6px;\">\r\n <ul>\r\n <li><a href=\"#wst_tabs-1\">' , __('General', 'wpsc-support-tickets') , '</a></li>\r\n <li><a href=\"#wst_tabs-3\">' , __('Email', 'wpsc-support-tickets') , '</a></li>\r\n <li><a href=\"#wst_tabs-4\">' , __('Styling', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-5\">' , __('Guests', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-6\">' , __('Custom Fields', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-2\">' , __('PRO', 'wpsc-support-tickets') , '</a></li>\r\n </ul> \r\n \r\n \r\n <div id=\"wst_tabs-1\">\r\n\r\n <br />\r\n <h1>' , __('General', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td>\r\n\r\n <p><strong>' , __('Main Page', 'wpsc-support-tickets') , ':</strong> ' , __('You need to use a Page as the base for wpsc Support Tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"wpscSupportTicketsmainpage\">\r\n <option value=\"\">';\r\n esc_attr(__('Select page', 'wpsc-support-tickets'));\r\n echo '</option>';\r\n\r\n $pages = get_pages();\r\n foreach ($pages as $pagg) {\r\n $option = '<option value=\"' . $pagg->ID . '\"';\r\n if ($pagg->ID == $devOptions['mainpage']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg->post_title;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n \r\n echo '\r\n </select>\r\n </p>';\r\n\r\n echo '<p><strong>' , __('Allow user to select Severity on ticket creation?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the user to select the severity of their ticket when creating it.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"display_severity_on_create\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['display_severity_on_create']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n \r\n <p><strong>' , __('Show Advanced Settings?', 'wpsc-support-tickets') , ':</strong> ' , __('By default, some advanced settings are hidden that are either rarely used or that can problems. Set this to true if you want to enable Advanced Settings. Note that you will need to save your settings before any change will occur.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"show_advanced_options\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['show_advanced_options']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> ';\r\n\r\n if($devOptions['show_advanced_options']=='true') {\r\n \r\n echo '\r\n <p><strong>' , __('Enabled & Test Beta Features?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true ONLY ON TEST websites. This will enable new beta features as they are released. ', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"enable_beta_testing\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['enable_beta_testing']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n\r\n <p style=\"padding:5px;border:1px dotted black;\">\r\n '; \r\n\r\n // New search system, now in beta \r\n if ($devOptions['enable_beta_testing'] == 'true') {\r\n echo '<br />\r\n <strong>', __('BETA', 'wpsc-support-tickets') ,': ' , __('Enable Ticket Search?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to \"true\" to show a ticket search box on the \"Main Page\" you set. If you have \"Allow Guests\" set to \"false\" and \"Allow everyone to see all tickets\" (PRO only) set to \"false\", then search will only work for registered users and they can only search their own tickets. If you have \"Allow Guests\" set to \"true\", but \"Allow everyone to see all tickets\" (PRO only) set to \"false\", then users and guests can search, but are limited to their own tickets. If you have \"Allow Guests\" set to \"true\", and \"Allow everyone to see all tickets\" (PRO only) set to \"true\", then users and guests can search everyone\\'s tickets, making everything publicly searchable. ', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"allow_search\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['allow_search']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br /><br /> '; \r\n } \r\n \r\n echo ' \r\n <img src=\"' , plugins_url() , '/wpsc-support-tickets/images/bug_report.png\" alt=\"' , __('Warning', 'wpsc-support-tickets') , '\" style=\"float:left;\" /> <strong style=\"font-size:1.2em;\">' , __('Warning', 'wpsc-support-tickets') , ' - ' , __('This may fix issues on incorrectly configured servers, but it comes at a performance cost of an additional database connection and an additional query on every page load. Generally, you should only turn this on if tickets do not change who replied last, and always say the Last Poster was the ticket creator, no matter how many times an admin makes a reply. You should not change this setting unless you believe that your PHP timezone and MySQL are not set to the same thing, as evidence by the Last Poster issue. If you turn this on when it is not needed, you will only slow down the performance of your website with no benefits. ', 'wpsc-support-tickets') , '</strong><br style=\"clear:both;\" /><br />\r\n <strong>' , __('Force Sync MySQL timezone to PHP timezone?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to make emails come from your wpsc Support Ticket admin email below, and to change your sent from name to your Blog\\'s name.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"override_mysql_timezone\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['override_mysql_timezone']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br />\r\n </p>';\r\n }\r\n \r\n echo '\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-3\"> \r\n <h1>' , __('Email', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <strong>' , __('Email', 'wpsc-support-tickets') , ':</strong> ' , __('The admin email where all new ticket &amp; reply notification emails will be sent', 'wpsc-support-tickets') , '<br /><input name=\"email\" value=\"' . $devOptions['email'] . '\" style=\"width:95%;\" /><br /><br />\r\n \r\n <strong>' , __('New Ticket Email', 'wpsc-support-tickets') , '</strong> ' , __('The subject &amp; body of the email sent to the customer when creating a new ticket.', 'wpsc-support-tickets') , '<br /><input name=\"email_new_ticket_subject\" value=\"' , stripslashes(stripslashes($devOptions['email_new_ticket_subject'])) , '\" style=\"width:95%;\" />\r\n <textarea style=\"width:95%;\" name=\"email_new_ticket_body\">' , stripslashes(stripslashes($devOptions['email_new_ticket_body'])) , '</textarea>\r\n <br /><br />\r\n \r\n <p><strong>' , __('Include the ticket in New Ticket Email', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the content of the ticket included in the new ticket email.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"use_ticket_in_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['use_ticket_in_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <strong>' , __('New Reply Email', 'wpsc-support-tickets') , '</strong> ' , __('The subject &amp; body of the email sent to the customer when there is a new reply.', 'wpsc-support-tickets') , '<br /><input name=\"email_new_reply_subject\" value=\"' , stripslashes(stripslashes($devOptions['email_new_reply_subject'])) , '\" style=\"width:95%;\" />\r\n <textarea style=\"width:95%;\" name=\"email_new_reply_body\">' , stripslashes(stripslashes($devOptions['email_new_reply_body'])) , '</textarea>\r\n <br /><br />\r\n \r\n <p><strong>' , __('Include the reply in New Reply Email', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the content of the reply included in the new reply email.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"use_reply_in_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['use_reply_in_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n <p><strong>' , __('Email Charset Encoding', 'wpsc-support-tickets') , ':</strong> ' , __('You may need to change this if email text is encoding incorrectly. The default is utf-8.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"email_encoding\">\r\n ';\r\n\r\n $pagesYxxx[0] = 'utf-8';\r\n $pagesYxxx[1] = 'iso-8859-1';\r\n $pagesYxxx[2] = 'koi8-r';\r\n $pagesYxxx[3] = 'gb2312';\r\n $pagesYxxx[4] = 'big5';\r\n $pagesYxxx[5] = 'shift_jis';\r\n $pagesYxxx[5] = 'euc-jp';\r\n foreach ($pagesYxxx as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['email_encoding']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <p><strong>' , __('Disable All Emails', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to turn off all emails from wpsc Support Tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"disable_all_emails\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['disable_all_emails']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n ';\r\n \r\n if ($devOptions['show_advanced_options'] == 'true') {\r\n \r\n echo '\r\n <div style=\"padding:5px;border:1px dotted black;\">\r\n <p><strong>' , __('CC All New Tickets?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all new tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_new_tickets\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_new_tickets']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on New Tickets', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new tickets.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_new_tickets_to_email\" value=\"' , $devOptions['cc_all_new_tickets_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n '; \r\n \r\n \r\n echo '\r\n <p><strong>' , __('CC All User Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all user replies to tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_user_replies\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_user_replies']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on All User Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new user replies.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_user_replies_to_email\" value=\"' , $devOptions['cc_all_user_replies_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n '; \r\n \r\n \r\n \r\n echo '\r\n <p><strong>' , __('CC All Admin Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all admin replies to tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_admin_replies\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_admin_replies']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on All Admin Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new admin replies.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_admin_replies_to_email\" value=\"' , $devOptions['cc_all_admin_replies_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n </div>\r\n <br /><br /> \r\n '; \r\n \r\n \r\n \r\n echo ' \r\n <p style=\"padding:5px;border:1px dotted black;\">\r\n <img src=\"' , plugins_url() , '/wpsc-support-tickets/images/bug_report.png\" alt=\"' , __('Warning', 'wpsc-support-tickets') , '\" style=\"float:left;\" /> <strong style=\"font-size:1.2em;\">' , __('Warning', 'wpsc-support-tickets') , ' - ' , __('Activating these overrides can cause registration emails to fail in some circumstances. Please double check that new users receive their registration emails after enabling this override.', 'wpsc-support-tickets') , '</strong><br style=\"clear:both;\" /><br />\r\n <strong>' , __('Override Wordpress Email Sent \"Name\" &amp; \"From\"', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to make emails come from your wpsc Support Ticket admin email below, and to change your sent from name to your Blog\\'s name.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"override_wordpress_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['override_wordpress_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br />\r\n <strong>' , __('Override Name Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The name of the admin email sender, such as \"Business Name Support Team\", or whatever is appropriate for your situation.', 'wpsc-support-tickets') ,'<br /><input name=\"email_name\" value=\"' , $devOptions['email_name'] , '\" style=\"width:95%;\" /><br /><br />\r\n <strong>' , __('Override Email Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The email address that all outgoing emails will appear to be sent from.', 'wpsc-support-tickets') ,'<br /><input name=\"overrides_email\" value=\"' , $devOptions['overrides_email'] , '\" style=\"width:95%;\" /><br /><br />\r\n </p>';\r\n }\r\n \r\n echo ' \r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-4\"> \r\n <h1>' , __('Styling', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Disable inline styles', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to disable the inline CSS styles.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"disable_inline_styles\">\r\n ';\r\n\r\n $pagesX[0] = 'true';\r\n $pagesX[1] = 'false';\r\n foreach ($pagesX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['disable_inline_styles']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-5\"> \r\n <h1>' , __('Guests', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Allow Guests', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want Guests to be able to use the support ticket system.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"allow_guests\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['allow_guests']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n <p><strong>' , __('Show guest email address in front end list', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true and a guest\\'s email address will be displayed in the ticket list.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"hide_email_on_frontend_list\">\r\n ';\r\n\r\n $pagesXn[0] = 'true';\r\n $pagesXn[1] = 'false';\r\n foreach ($pagesXn as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['hide_email_on_frontend_list']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n\r\n <p><strong>' , __('Show guest email address on support tickets', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true and a guest\\'s email address will be displayed in support tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"hide_email_on_support_tickets\">\r\n ';\r\n\r\n $pagesXnr[0] = 'true';\r\n $pagesXnr[1] = 'false';\r\n foreach ($pagesXnr as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['hide_email_on_support_tickets']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n \r\n\r\n <p><strong>' , __('Show login/register links?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to false if you do not want a link to register or login to appear when a user is not logged in.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"show_login_text\">\r\n ';\r\n\r\n $pagesXnr[0] = 'true';\r\n $pagesXnr[1] = 'false';\r\n foreach ($pagesXnr as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['show_login_text']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-6\"> \r\n <h1>' , __('Custom Fields', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Place custom form fields', 'wpsc-support-tickets') , ':</strong> ' , __('When creating a ticket, this determines where your custom fields are placed on the ticket submission form.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"custom_field_position\">\r\n ';\r\n\r\n $pagesXX[0]['valname'] = 'before everything';$pagesXX[0]['displayname'] = __('before everything', 'wpsc-support-tickets');\r\n $pagesXX[1]['valname'] = 'before message';$pagesXX[1]['displayname'] = __('before message', 'wpsc-support-tickets');\r\n $pagesXX[2]['valname'] = 'after message';$pagesXX[2]['displayname'] = __('after message', 'wpsc-support-tickets');\r\n $pagesXX[3]['valname'] = 'after everything';$pagesXX[3]['displayname'] = __('after everything', 'wpsc-support-tickets');\r\n\r\n foreach ($pagesXX as $pagg) {\r\n $option = '<option value=\"' . $pagg['valname'] . '\"';\r\n if ($pagg['valname'] === $devOptions['custom_field_position']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg['displayname'];\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <p><strong>' , __('Display custom fields', 'wpsc-support-tickets') , ':</strong> ' , __('When a ticket creator views a ticket they created, this setting determines where the custom fields are placed on the page.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"custom_field_frontend_position\">\r\n ';\r\n\r\n $pagesXY[0]['valname'] = 'before everything';$pagesXY[0]['displayname'] = __('before everything', 'wpsc-support-tickets');\r\n $pagesXY[1]['valname'] = 'before message';$pagesXY[1]['displayname'] = __('before message', 'wpsc-support-tickets');\r\n $pagesXY[2]['valname'] = 'after message';$pagesXY[2]['displayname'] = __('after message &amp; replies', 'wpsc-support-tickets');\r\n\r\n foreach ($pagesXY as $pagg) {\r\n $option = '<option value=\"' . $pagg['valname'] . '\"';\r\n if ($pagg['valname'] === $devOptions['custom_field_frontend_position']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg['displayname'];\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n \r\n <strong>' , __('Change TITLE to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, a user must fill out a title when submitting a ticket. This setting lets you easily change the name of the word TITLE so that you word this appropriately for your situation.', 'wpsc-support-tickets') , '<br /><input name=\"custom_title\" value=\"' . $devOptions['custom_title'] . '\" style=\"width:95%;\" /><br /><br />\r\n \r\n <strong>' , __('Change MESSAGE to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, a user must fill out a message when submitting a ticket. This setting lets you easily change the name of the words YOUR MESSAGE so that you word this appropriately for your situation.', 'wpsc-support-tickets') , '<br /><input name=\"custom_message\" value=\"' . $devOptions['custom_message'] . '\" style=\"width:95%;\" /><br /><br />\r\n ';\r\n \r\n echo '<strong>' , __('Change New Ticket button text to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, this button says Create a New Ticket, but here you can change it to whatever you want.', 'wpsc-support-tickets') , '<br /><input name=\"custom_new_ticket_button_text\" value=\"' . $devOptions['custom_new_ticket_button_text'] . '\" style=\"width:95%;\" /><br /><br />';\r\n \r\n echo ' \r\n\r\n <br /><br /><br /><br />\r\n </td></tr></table>\r\n\r\n\r\n </div>\r\n\r\n <div id=\"wst_tabs-2\">';\r\n\r\n wpscSupportTickets_settings(); // Action hook\r\n\r\n echo '\r\n </div>\r\n \r\n\r\n <input type=\"hidden\" name=\"update_wpscSupportTicketsSettings\" value=\"update\" />\r\n <div style=\"float:right;position:relative;top:-20px;\"> <input class=\"button-primary\" style=\"position:relative;z-index:999999;\" type=\"submit\" name=\"update_wpscSupportTicketsSettings_submit\" value=\"';\r\n _e('Update Settings', 'wpsc-support-tickets');\r\n echo'\" /></div>\r\n \r\n\r\n </div>\r\n </div>\r\n </form>\r\n \r\n\r\n ';\r\n\r\n\r\n }", "function showGeneralPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t$ilTabs->activateTab(\"adve_page_editor_settings\");\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function settings_view() {\n?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Google Analytics Options', 'wp-google-analytics') ?></h2>\n\t\t\t<form action=\"options.php\" method=\"post\" id=\"wp_google_analytics\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'wga' );\n\t\t\t\t\tdo_settings_sections( 'wga' );\n\t\t\t\t\tsubmit_button( __( 'Update Options', 'wp-google-analytics' ) );\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n<?php\n\t}", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "public function get_settings_fields() {\n\n\n\t\t/*\n\t\t * name ( name of the field)\n\t\t * type ( type of the field which help to call call class back)\n\t\t * label ( [optional] if you want to display any think the description )\n\t\t * default ( [optional] default values)\n\t\t * options ( [optional] options we use when type is select mostly but this use to give option to fields)\n\t\t * link ( [optional] in case you send a link to field)\n\t\t * sanitize_callback ( [optional] sanitize call back of the field)\n\t\t * priority [ [optional] use to giving parity to the user]\n\t\t * page ( page name we use menu slug this fields belong to this page)\n\t\t *\n\t\t * */\n\n\n\t\t// setting files index key is ( section => array( fields ))\n\t\t$settings_fields = array(\n\t\t\t'test_1' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'name',\n\t\t\t\t\t'label' => __( 'Enter the name', 'sharaz_settings' ),\n\t\t\t\t\t'desc' => __( '<h4>Sharaz Setting Api</h4>if you like please share to others', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '5',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'salary',\n\t\t\t\t\t'label' => 'Select your salary range',\n\t\t\t\t\t'type' => 'ss_select',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '2000',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'1000' => '1000',\n\t\t\t\t\t\t'2000' => '2000',\n\t\t\t\t\t\t'3000' => '3000',\n\t\t\t\t\t),\n\t\t\t\t\t'priority' => '10'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'advance_bonus',\n\t\t\t\t\t'label' => __( 'Receving advance bonus', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_checkbox',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '15',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'your_color',\n\t\t\t\t\t'label' => __( 'Your Setting', 'sharaz-setting' ),\n\t\t\t\t\t'type' => 'ss_color',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'priority' => '20',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'test_2' => array(\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'suggestion',\n\t\t\t\t\t\t'label' => __( 'Ang suggestion', 'sharaz_settings' ),\n\t\t\t\t\t\t'desc' => __( '<h4>Please type some</h4>if you like suggest some thing to us', 'sharaz_settings' ),\n\t\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t\t'page' =>'ss_page1',\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t\t'priority' => '5',\n\t\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\treturn $settings_fields;\n\t}", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "function renderSettings()\t{\n\t\tglobal $LANG;\n\n\t\t\t// Create checkboxes for additiona languages to show:\n\t\t$checkOutput = array();\n\t\tforeach($this->langKeys as $langKey)\t{\n\t\t\tif ($langKey != 'default')\t{\n\t\t\t\t$checkOutput[] = '<div class=\"langbox\">'.t3lib_BEfunc::getFuncCheck('','SET[addLang_'.$langKey.']',$this->MOD_SETTINGS['addLang_'.$langKey]).' '.$langKey.(' ['.$LANG->sL('LLL:EXT:setup/mod/locallang.xml:lang_'.$langKey).']').'</div>';\n\t\t\t}\n\t\t}\n\t\t$out.= $this->showCSH('funcmenu_'.$this->MOD_SETTINGS['function'],$LANG->getLL('additional_languages')).'<br />'.\n\t\t\t\timplode('',$checkOutput);\n\n\t\t\t// Select font size:\n\t\t$out.= '<h3 style=\"clear:both\">'.$LANG->getLL('select_font').'</h3>'.\n\t\t\t\tt3lib_BEfunc::getFuncMenu('','SET[fontsize]',$this->MOD_SETTINGS['fontsize'],$this->MOD_MENU['fontsize']);\n\n\t\t\t// Return output:\n\t\treturn $out;\n\t}", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "public function register_fields() {\n\t\t\tregister_setting( 'reading', 'maksimer_logged_in_front_page', 'esc_attr' );\n\t\t\tadd_settings_field(\n\t\t\t\t'maksimer_logged_in_front_page',\n\t\t\t\t'<label for=\"maksimer_logged_in_front_page\">' . __( 'Logged in front page' , 'maksimer_logged_in_front_page' ) . '</label>',\n\t\t\t\tarray( $this, 'field_output' ),\n\t\t\t\t'reading'\n\t\t\t);\n\t\t}", "function render_field_settings( $field )\n {\n\t\t\t$this->create_options( $field );\n\t\t}", "public function settings_fields() {\n\t\t$this->create_sections();\n\t\t$this->create_fields();\n\t\tregister_setting( $this->token, $this->token, array( $this, 'validate_fields' ) );\n\t}", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "function do_settings_fields($page, $section)\n {\n }", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "public function render_settings_section() {\n\t\tprintf( __( 'Insert your %s license information to enable future updates (including bug fixes and new features) and gain access to support.', $this->text_domain ), $this->product_name );\n\t}", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "public function settings_screen() {\n\t\tglobal ${class_name};\n\t\tdo_action( ${class_name}->token . '_before_settings' );\n\t\tdo_action( $this->token . '_before_settings' );\n\t\tsettings_fields( $this->token );\n\t\tdo_settings_sections( $this->token );\n\t\tdo_action( $this->token . '_after_settings' );\n\t\tdo_action( ${class_name}->token . '_after_settings' );\n\t\tsubmit_button();\n\t}", "public static function paymentsense_settings_form() {\r\n\t\t$output = \"\r\n \t<tr class='firstrowth'>\r\n \t\t<td style='border-bottom: medium none;' colspan='2'>\r\n \t\t\t<strong class='form_group'>Paymentsense Gateway Settings</strong><br>\r\n \t\t</td>\r\n \t</tr>\t\r\n \t<tr>\r\n \t\t<td>Merchant ID:</td>\r\n \t\t<td>\r\n \t\t<input type='text' size='40' value='\" . get_option( 'paymentsense_id' ) . \"' name='paymentsense_id' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>Merchant Password:</td>\r\n \t\t<td>\r\n \t\t<input type='password' size='28' value='\" . get_option( 'paymentsense_password' ) . \"' name='paymentsense_password' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>Pre-shared Key:</td>\r\n \t\t<td>\r\n \t\t<input type='text' size='28' value='\" . get_option( 'paymentsense_preshared_key' ) . \"' name='paymentsense_preshared_key' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>&nbsp;</td>\r\n \t\t<td>&nbsp;</td>\r\n \t</tr>\r\n \t<tr class='firstrowth'>\r\n \t\t<td colspan='2'>\r\n \t\t\t<strong class='form_group'>Paymentsense Links</strong>\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td colspan=\\\"2\\\"><a href=\\\"https://mms.paymentsensegateway.com\\\">Paymentsense Merchant Management System (MMS)</a></td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td colspan=\\\"2\\\"><a href=\\\"http://www.paymentsense.com/\\\">Paymentsense website</a></td>\r\n \t</tr>\r\n \t\";\r\n\t\treturn $output;\r\n\t}", "public function KemiSitemap_settings_fields()\n {\n // Section: KemiSitemap_section\n add_settings_field(\n 'KemiSitemap_cpt',\n __('', 'KemiSitemap'),\n array( $this, 'KemiSitemap_cpt_output' ),\n 'KemiSitemap_group',\n 'KemiSitemap_options',\n ''\n );\n }", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "function theme_settings_page(){ \n\t?>\n\t<div class=\"wrap\">\n\t\t<h1>Virksomhedsinformation</h1>\n\t\t<p>Dette er globale virksomhedsoplysninger. Ændringer kan ses flere stedet på websitet</p>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n\t\t\tsettings_fields(\"section\");\n\t\t\tdo_settings_sections(\"theme-options\");\n\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t\n\t<?php }", "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "function cbp_display_options_page() {\n\t?>\n\t<div>\n\t<h2>Chibipaint Integration Settings</h2>\n\tAll fields are required.\n\t<form action=\"options.php\" method=\"post\">\n\t<?php settings_fields('cbp_option_group');\n\tdo_settings_sections('options_cbp');\n\tsubmit_button();\n\t?>\n\t</form></div>\n\n\t<?php\n}", "public function settings()\n {\n $section = self::$panel . '.settings';\n\n /**\n * Add Section and fields for Header Layout\n */\n new Section(\n $section,\n array(\n 'title' => esc_attr__('Settings', 'stage'),\n 'description' => esc_attr__('Footer settings.', 'stage'),\n 'panel' => self::$panel,\n 'type' => 'expand',\n 'priority' => 10,\n )\n );\n\n Customizer::addField(\n self::$config,\n array(\n 'type' => 'text',\n 'settings' => $section . '.copyright',\n 'label' => esc_html__('Copyright Text', 'stage'),\n 'section' => $section,\n 'default' => stage_get_default($section . '.copyright'),\n 'priority' => 10,\n 'transport' => 'postMessage',\n 'partial_refresh' => array(\n 'footer_copyright_text' => array(\n 'selector' => 'footer p.copyright',\n 'container_inclusive' => false,\n 'fallback_refresh' => false,\n 'render_callback' => function () use ($section) {\n return stage_get_fallback($section . '.copyright');\n },\n ),\n ),\n )\n );\n }", "public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "function output_html() {\n $adminroot =& admin_get_root();\n $return = '<fieldset>'.\"\\n\".'<div class=\"clearer\"><!-- --></div>'.\"\\n\";\n foreach($this->settings as $setting) {\n $fullname = $setting->get_full_name();\n if (array_key_exists($fullname, $adminroot->errors)) {\n $data = $adminroot->errors[$fullname]->data;\n } else {\n $data = $setting->get_setting();\n if (is_null($data)) {\n $data = $setting->get_defaultsetting();\n }\n }\n $return .= $setting->output_html($data);\n }\n $return .= '</fieldset>';\n return $return;\n }", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "function ajax_render_field_settings()\n {\n }" ]
[ "0.77597266", "0.77508634", "0.7635584", "0.754257", "0.74424785", "0.743999", "0.7402067", "0.7390697", "0.7368513", "0.73580325", "0.7333659", "0.7286497", "0.7265154", "0.72457916", "0.722324", "0.72001576", "0.71963125", "0.7178631", "0.7146564", "0.71182066", "0.71101975", "0.7103021", "0.7092542", "0.707968", "0.70697737", "0.70471895", "0.70270324", "0.7024154", "0.70238364", "0.70201963", "0.6994708", "0.69865644", "0.69748807", "0.696047", "0.6951261", "0.69434273", "0.6939459", "0.69318783", "0.6930048", "0.6927662", "0.69196045", "0.6905113", "0.6896923", "0.6895637", "0.6885573", "0.68841916", "0.6878987", "0.68755704", "0.6872333", "0.6872222", "0.6868813", "0.6864696", "0.685285", "0.6846262", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6845309", "0.6833202", "0.6828118", "0.6823575", "0.681514", "0.68085", "0.6806299", "0.6804074", "0.6792531", "0.67921007", "0.6787379", "0.6777419", "0.67692274", "0.6751783", "0.6748172", "0.6740747" ]
0.7033808
26
This just takes care of updating any breakout info that may be associated with an attendee id when an attendee is deleted (via Event List view)
public function update_breakout_info( $att_id, $evt_id ) { global $wpdb; //set settings hasn't been run so let's do that $this->_set_settings(); $evt_id = (int) $evt_id; $att_id = (int) $att_id; //make sure the incoming event (if one) is a breakout event! if ( empty($evt_id) ) return; //empty event can't do anything! //get categories this event belongs to! $sql = "SELECT ec.cat_id AS c_id FROM " . EVENTS_CATEGORY_REL_TABLE . " as ec WHERE ec.event_id = %d"; $cats = $wpdb->get_results( $wpdb->prepare( $sql, $evt_id ) ); $e_cats = array(); if ( !empty( $cats ) ) { //prepare cats for check foreach ( $cats as $cat ) { if ( in_array($cat->c_id, $this->_settings['breakout_categories'] ) ) $e_cats[] = $cat->c_id; } } if ( empty($e_cats) ) return; //this event doesn't belong to any of the breakout categories so get out. require_once( EE_BREAKOUTS_PATH . 'helpers/EE_Data_Retriever.helper.php' ); //made it here so let's setup the deletes for extra breakout info. //first get the main event registration id to update the breakout count attached to that reg id $reg_id = EE_Data_Retriever::get_attendee_meta_value( $att_id, 'breakout_main_registration_id' ); //do we delete reg_id? $reg_group = EE_Data_Retriever::get_attendee_meta_value( $att_id, 'breakout_reg_group' ); $reg_ref = 'brk_id_' . $reg_group; $reg_id_count = (int) get_option($reg_ref); $new_id_count = !empty($reg_id_count) ? $reg_id_count - 1 : 0; //now we ONLY update the breakout count IF the $new_id_count is 0 or less. if ( $new_id_count <= 0 ) { //update reg_id count $existing_reg_count = (int) get_option( $reg_id . '_breakout_count' ); $new_count = !empty($existing_reg_count) ? $existing_reg_count - 1 : 0; if ( $new_count > 0 ) update_option( $reg_id . '_breakout_count', $new_count ); else delete_option( $reg_id . '_breakout_count' ); } if ( $new_id_count > 0 ) update_option( $reg_ref, $new_id_count ); else delete_option($reg_ref); //we need to update the event meta count for the breakout cat this attendee attached to. So let's take care of that. $breakout_cat_name = EE_Data_Retriever::get_attendee_meta_value( $att_id, 'breakout_category_name' ); $ref = sanitize_key( $breakout_cat_name ) . '_breakout_spots_left'; //get event_meta for given event $event_meta = event_espresso_get_event_meta($evt_id); $event_meta[$ref] = isset( $event_meta[$ref] ) ? $event_meta[$ref] + 1 : ''; //update meta for event with new count if ( !empty( $event_meta[$ref] ) ) { $data = array( 'event_meta' => serialize($event_meta) ); $format = array( '%s' ); $where = array( 'id' => $evt_id ); $where_format = array( '%d' ); $wpdb->update( EVENTS_DETAIL_TABLE, $data, $where, $format, $where_format ); } //great that's it! all attendee meta fields should get deleted by EE core after this hook is executed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function afterDelete(){\r\n\t\t//$sql = 'DELETE FROM {{apartment_comments}} WHERE email=\"'.$this->email.'\"';\r\n\t\t//Yii::app()->db->createCommand($sql)->execute();\r\n\r\n\t\t$sql = 'SELECT id FROM {{booking}} WHERE user_id=\"'.$this->id.'\"';\r\n\t\t$bookings = Yii::app()->db->createCommand($sql)->queryColumn();\r\n\t\t\r\n\t\tif($bookings){\r\n\t\t\t$sql = 'DELETE FROM {{payments}} WHERE order_id IN ('.implode(',', $bookings).')';\r\n\t\t\tYii::app()->db->createCommand($sql)->execute();\r\n\t\t}\r\n\r\n\t\t$sql = 'DELETE FROM {{booking}} WHERE user_id=\"'.$this->id.'\"';\r\n\t\tYii::app()->db->createCommand($sql)->execute();\r\n\r\n\t\t$sql = 'UPDATE {{apartment}} SET owner_id=1, owner_active=:active, active=:inactive WHERE owner_id=:userId';\r\n\t\tYii::app()->db->createCommand($sql)->execute(array(\r\n\t\t\t':active' => Apartment::STATUS_ACTIVE,\r\n\t\t\t':inactive' => Apartment::STATUS_INACTIVE,\r\n\t\t\t':userId' => $this->id,\r\n\t\t));\r\n\r\n\t\treturn parent::afterDelete();\r\n\t}", "public function update($id)\n {\n if (Sentry::check()) {\n // Find active user\n $user = Sentry::getUser();\n $event = Appointment::find($id);\n\n // Check if User belongs to group/school which the appointment is from\n if ($user->hasAccess('school') || ($user->hasAccess(\n 'event'\n ) && $user->school_id == $event->group->school_id)\n ) {\n $endDate = new DateTime();\n // Check if endDate isn't blank\n if (Input::get('end-date') == '') {\n $endDate = null;\n }\n\n $validator = Validator::make(\n [\n 'group' => Input::get('group'),\n 'description' => Input::get('description'),\n 'start-date' => Input::get('start-date'),\n 'end-date' => $endDate,\n 'start-time' => Input::get('start-time'),\n 'end-time' => Input::get('end-time'),\n 'title' => Input::get('title'),\n 'day' => Input::get('day')\n ],\n [\n 'group' => 'required',\n 'description' => 'required',\n 'start-date' => 'date',\n 'end-date' => 'date',\n 'start-time' => 'required|date_format:H:i',\n 'end-time' => 'required|date_format:H:i',\n 'title' => 'required'\n ]\n );\n\n if ($validator->fails()) {\n return Redirect::route('event.edit', $id)->withInput()->withErrors($validator);\n } else {\n $title = e(Input::get('title'));\n $description = e(Input::get('description'));\n $location = e(Input::get('location'));\n $group_id = Input::get('group');\n $start_date = e(Input::get('start-date'));\n $end_date = e(Input::get('end-date'));\n $start_time = e(Input::get('start-time'));\n $end_time = e(Input::get('end-time'));\n $parents = Input::get('par');\n\n // TODO: Handle All day events, or decide to remove it alltogether\n // TODO: Update date/time if needed\n // If the event isn't the whole day, determine the end date/time\n //$event->allday = false;\n\n // Handle datetime\n if(!$start_date) {\n $validator->getMessageBag()->add(\n 'end',\n Lang::get('validation.required', ['attribute ' => 'start-date '])\n );\n\n return Redirect::back()->withErrors($validator)->withInput();\n } else {\n $sd = new DateTime($start_date . ' ' . $start_time);\n\n if ($end_date == '') {\n $end_date = $start_date;\n }\n $ed = new DateTime($end_date . ' ' . $end_time);\n\n // Check if end date is before start date, if so, return with error\n if ($sd >= $ed) {\n\n $validator->getMessageBag()->add(\n 'end',\n Lang::get('validation.after', ['attribute ' => 'end-date ', 'date' => Input::get('start-date')])\n );\n\n // Redirect back with inputs and validator instance\n return Redirect::back()->withErrors($validator)->withInput();\n }\n }\n\n // Recurring events handling\n if ($event->parent_id) {\n if($parents) {\n $parent = AppParent::find($event->parent_id);\n // Update parent event\n $parent->title = $title;\n $parent->description = $description;\n $parent->location = $location;\n $parent->group_id = $group_id;\n $parent->save();\n\n Appointment::where('parent_id', $parent->id)->update([\n 'title' => $title,\n 'description' => $description,\n 'location' => $location,\n 'group_id' => $group_id\n ]);\n } else {\n // If event had a parent_id, but the checkbox was unchecked, unlink event from parent\n $event->parent_id = null;\n }\n }\n\n $event->title = $title;\n $event->description = $description;\n $event->location = $location;\n $event->group_id = $group_id;\n $event->start_date = $sd;\n $event->end_date = $ed;\n $event->save();\n\n return Redirect::route('calendar.index');\n }\n } else {\n // If no permissions, redirect the user to the calendar index page\n return Redirect::route('calendar.index');\n }\n } else {\n return Redirect::route('landing');\n }\n }", "public function updateEvent(Request $request){\n try {\n $token = $request->get('token');\n $eventId = $request->get('eventId');\n $status = $request->get(\"status\");\n if ((is_null($token))\n ||(is_null($eventId))\n ||(is_null($status))){\n return Response::json([\"No content. Fill all the details\",HttpResponse::HTTP_NO_CONTENT]);\n }\n $parent = JWTAuth::toUser($token);\n $parentId = $parent->id;\n $parentDetails = UserDetails::where('user_id',$parentId)->first();\n $parentName = $parentDetails->name;\n }catch (TokenExpiredException $e){\n return Response::json (['Token expired'],498);\n }catch (TokenInvalidException $e){\n return Response::json (['Token invalid']);\n }\n $appointmentSlot = TeacherAppointmentSlots::where('calendarEventsId',$eventId)->first();\n $appointmentSlotId = $appointmentSlot->id;\n $appointmentRequest = AppointmentRequest::where('teacherAppointmentsSlot_id',$appointmentSlotId)->first();\n $appointmentRequestId = $appointmentRequest->id;\n //confirmed\n if($status ==2){\n try {\n $parentContact = $request->get('parentContact');\n if (is_null($parentContact)){\n return Response::json([\"Partial content. Fill all the details\",HttpResponse::HTTP_PARTIAL_CONTENT]);\n }\n DB::beginTransaction();\n DB::table('appointmentRequests')\n ->where('id', $appointmentRequestId)\n ->update(\n ['isApproved' => 1,\n 'isCancel' => 0,\n 'isAwaited' => 0,\n 'parentContact'=>$parentContact\n ]);\n $appointmentLog = new AuditAppointments();\n $appointmentLog->eventId = $eventId;\n //Appointment Request confirmation state\n $appointmentLog->Appointmentstate = 2;\n $appointmentLog->triggeredBy = $parentName;\n $appointmentLog->save();\n }catch (Exception $e){\n DB::rollback();\n $httpStatus = HttpResponse::HTTP_CONFLICT;\n return Response::json([\"Conflict in Confirmation\",$httpStatus]);\n }\n DB::commit();\n $httpStatus = HttpResponse::HTTP_OK;\n return Response::json([\"Success in Confirmation\",$httpStatus]);\n }\n //cancelled\n elseif ($status==3){\n $cancellationReason = $request->get('cancellationReason');\n if (is_null($cancellationReason)){\n return Response::json([\"Partial content. Fill all the details\",HttpResponse::HTTP_PARTIAL_CONTENT]);\n }\n try {\n DB::beginTransaction();\n DB::table('appointmentRequests')\n ->where('id', $appointmentRequestId)\n ->update([\n 'isApproved' => 0,\n 'isCancel' => 1,\n 'isAwaited' => 0,\n 'cancellationReason'=>$cancellationReason\n ]);\n DB::table('teacherAppointmentsSlots')\n ->where('id', $appointmentSlotId)\n ->update(['isBooked' => 0]);\n $appointmentLog = new AuditAppointments();\n $appointmentLog->eventId = $eventId;\n //Appointment Request cancellation state\n $appointmentLog->Appointmentstate = 3;\n $appointmentLog->triggeredBy = $parentName;\n $appointmentLog->save();\n }catch (Exception $e){\n DB::rollback();\n $httpStatus = HttpResponse::HTTP_CONFLICT;\n return Response::json([\"Conflict in Cancellation\",$httpStatus]);\n }\n DB::commit();\n $httpStatus = HttpResponse::HTTP_OK;\n return Response::json([\"Success in Cancellation\",$httpStatus]);\n }\n else{\n return Response::json([\"invalid status\"]);\n }\n }", "public function update(Request $request, $id)\n {\n $validate = Validator::make($request->all(),[\n 'edit_event'=>'required',\n 'edit_venue'=>'required',\n 'edit_date_of_event'=>'required',\n 'edit_start_of_event'=>'required',\n 'edit_end_of_event'=>'required',\n 'edit_time_in_allowance'=>'required',\n 'edit_time_out_allowance'=>'required',\n ]);\n\n if($validate->fails()){\n return response()->json(array('success'=>false, 'messages'=>'Please input valid data!'));\n }else{\n // try {\n // DB::beginTransaction();\n\n $department = $this->getDepartment(\\Auth::user())->department_position['department_id'];\n $status = ($department == '1')? true : false;\n\n $event = Event::findOrFail($id);\n\n $old_summary = EventSummary::where('event_id', '=', $event->id)->where('status', '=', '1')->first();\n\n /* update title on attendance if update title on event */\n if($event->title != convertData($request['edit_event']) && $old_summary->required_attendance == '1'){\n $attendance = Attendance::where('event_id', '=', $id)->first();\n $attendance->title = convertData($request['edit_event']);\n $attendance->save();\n }\n\n /* event */\n $event->title = convertData($request['edit_event']);\n $event->description = convertData($request['edit_description']);\n $event->department_id = ($status)? $request['department']: $department;\n $changes = $event->getDirty();\n $event->save();\n // dd($request['edit_event_type']);\n\n /* event summaries */\n $old_summary->exclusive = !empty($request['edit_event_type'])? $request['edit_event_type']: '0';\n $old_summary->required_attendance = !empty($request['edit_required_attendance'])? $request['edit_required_attendance']: '0';\n $old_summary->save();\n\n\n /* create attendance if update required_attendance to true */\n if($old_summary->required_attendance === '1'){\n\n $attendance = Attendance::where('event_id', '=', $id)->where('status', '=', '0')->first();\n if(!empty($attendance)){\n $attendance->status = '1';\n $attendance->save();\n }else{\n $attendance = new Attendance;\n $attendance->title = $event->title;\n $attendance->attendance_code = $event->event_code;\n $attendance->event_id = $event->id;\n $attendance->status = '1';\n $attendance->save();\n }\n }else{\n $attendance = Attendance::where('event_id', '=', $id)->where('status', '=', '1')->first();\n if(!empty($attendance)){\n $attendance->status = '0';\n $attendance->save();\n }\n }\n\n\n /* event summaries */\n if($old_summary->date_of_event != $request['edit_date_of_event'] ||\n $old_summary->time_of_event_from != $request['edit_start_of_event'] ||\n $old_summary->time_of_event_to != $request['edit_end_of_event'] ||\n $old_summary->attendees_capacity != $request['edit_attendees_capacity'] ||\n $old_summary->time_in_allowance != $request['edit_time_in_allowance'] ||\n $old_summary->time_out_allowance != $request['edit_time_out_allowance'] ||\n $old_summary->venue != $request['edit_venue']){\n\n $old_summary->status = '0';\n $old_summary->reasons = $request['edit_reason'];\n $old_summary->save();\n\n $summary = new EventSummary;\n $summary->event_id = $event->id;\n $summary->venue = convertData($request['edit_venue']);\n $summary->date_of_event = $request['edit_date_of_event'];\n $summary->time_of_event_from = $request['edit_start_of_event'];\n $summary->time_of_event_to = $request['edit_end_of_event'];\n $summary->attendees_capacity = $request['edit_attendees_capacity'];\n $summary->time_in_allowance = $request['edit_time_in_allowance'];\n $summary->time_out_allowance = $request['edit_time_out_allowance'];\n $summary->required_attendance = $request['edit_required_attendance'];\n $summary->exclusive = $old_summary['exclusive'];\n $summary->required_attendance = $old_summary['required_attendance'];\n $summary->reasons = '';\n $summary->exclusive = $old_summary->exclusive;\n $summary->required_attendance = $old_summary->required_attendance;\n $summary->status = '1';\n $changes = array_merge($changes, $summary->getDirty());\n $summary->save();\n }\n\n // DB::commit();\n\n /* logs */\n action_log('Event Mngt', 'Update', array_merge(['id' => $event->id], $changes));\n\n return response()->json(array('success'=>true, 'messages'=>'Record successfully updated!'));\n // } catch (\\PDOException $e) {\n // DB::rollBack();\n // return response()->json(array('success'=> false, 'error'=>'SQL error!', 'messages'=>'Transaction failed!'));\n // }\n }\n }", "public function attendEvent(Request $request)\n {\n// $id retrieved as Array\n $id = $request->id;\n\n// for each value in $id value are updated\n foreach ($id as $id)\n {\n// update function, massive update can only be done using query\n DB::table('registrations')\n ->where('id', $id)\n ->update(['status'=> 'attended']);\n }\n\n// return redirect back to previous page\n return redirect()->back();\n }", "public function update($meeting)\n {\n\n }", "public function update(Request $request, $id)\n {\n incident::findOrFail($id)->update($request->all());\n\n $adjust_delete = DB::table('adjust_link')\n ->where('incident_id',$id)\n ->get();\n\n for( $i = 0 ; count($adjust_delete) > $i ; $i++ ){\n $delete = prepayrollAdjust::where('id',$adjust_delete[$i]->adjust_id)->get();\n $delete[0]->is_delete = 1;\n $delete[0]->save();\n }\n\n $adjust_delete = DB::table('adjust_link')\n ->where('incident_id',$incident->id)\n ->delete();\n\n $dateI = Carbon::parse($request->start_date);\n $dateS = Carbon::parse($request->end_date);\n \n $diferencia = ($dateI->diffInDays($dateS));\n \n for($i = 0 ; $diferencia >= $i ; $i++){\n $adjust = new prepayrollAdjust();\n $adjust->employee_id = $request->employee_id;\n $adjust->dt_date = $dateI->toDateString();\n $adjust->minutes = 0;\n $adjust->apply_to = 2;\n $adjust->comments = $request->comentarios;\n $adjust->is_delete = 0;\n $adjust->adjust_type_id = 7;\n $adjust->apply_time = 0;\n $adjust->created_by = session()->get('user_id');\n $adjust->updated_by = session()->get('user_id');\n $adjust->save();\n \n if($request->sincomentarios == 1){\n $link = new adjust_link();\n $link->adjust_id = $adjust->id;\n $link->is_incident = 1;\n $link->incident_id = $incident->id;\n $link->save();\n }\n \n \n $dateI->addDay();\n }\n\n return redirect('incidents')->with('mensaje', 'Incidente actualizado con exito');\n }", "public function update() {\n $hasduedate = isset($this->mumie->duedate) && $this->mumie->duedate > 0;\n if (!$this->event && $hasduedate) {\n $this->create_calendar_event(\n self::EVENT_TYPE,\n $this->mumie->duedate\n );\n } else if ($this->event && $hasduedate) {\n $update = new \\stdClass();\n $update->name = $this->title;\n $update->timestart = $this->mumie->duedate;\n $this->event->update($update, false);\n } else if ($this->event && !$hasduedate) {\n $this->event->delete();\n }\n }", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, $id)\n {\n\n\n $request->validate([\n 'event-title' => 'required',\n 'event-message' => 'required',\n 'eventStart-date' => 'required',\n 'event-time' => 'required'\n\n ]);\n\n $event = Event::find($id);\n if(Auth::check()){\n $logged_in_user = Auth::user()->name;\n }\n $registra = $event->event_registra;\n \n if(Gate::allows('update-event',$registra)){\n\n $title = request('event-title');\n $startDate = request('eventStart-date');\n $endDate = request('eventEnd-date');\n $time = request('event-time');\n $event_description = request('event-message');\n\n $event_description = preg_replace(\"/^<p.*?>/\", \"\", $event_description);\n $event_description = preg_replace(\"|</p>$|\", \"\", $event_description);\n $time = preg_replace('/\\s+/', '', $time) ;\n\n\n\n $event_details = $this->getEventdetails($id);\n foreach($event_details as $data)\n {\n $this->old_title = $data->title;\n $this->old_content = $data->description;\n $this->old_sdate = $data->start_date;\n $this->old_edate = $data->end_date;\n $this->old_stime = $data->start_time;\n }\n \n switch(true){\n case($title != $this->old_title):\n $changes[] = \"changed \".$this->old_title.\"\";\n break;\n case($startDate != $this->old_sdate):\n $changes[] = \"changed \".$this->old_sdate.\"\";\n break;\n case($endDate != $this->old_edate):\n $changes[] = \"changed \".$this->old_edate.\"\";\n break;\n case($time != $this->old_stime):\n $changes[] = \"changed \".$this->old_stime.\"\";\n break;\n }\n\n \n\n $event->title = $title;\n $event->start_date = $startDate;\n $event->end_date = $endDate;\n $event->start_time = $time;\n $event->description = $event_description;\n $event->event_registra = $logged_in_user;\n $registraEmail = Auth::user()->email;\n $registraPhone = Auth::user()->contact;\n $subject = \"Updated Event \".$this->old_title.\"\";\n\n $event_update_status = $event->save();\n\n if($event_update_status){\n\n $users = User::all();\n\n ($endDate == \"\")?\n $endDate_of_event = \"the same day\" : $endDate_of_event = $endDate;\n\n\n $data = array(\n 'title' => $title,\n 'description' => $event_description,\n 'start_date' => $startDate,\n 'end_date' => $endDate_of_event,\n 'time' => $time,\n 'registra' => $logged_in_user,\n 'registra_email' => $registraEmail,\n 'registraMobileNo' => $registraPhone,\n 'subject' => $subject,\n );\n\n $action = \"Updated an event with the title '\".$title.\"'\";\n LogsController::logger($action, $this->date_of_action);\n\n $notified = Notification::send($users, new EventNotifier($data));\n \n $central = new CentralController();\n\n if($central->is_connectedToInternet() == 1)\n {\n Mail::send('pages.mail.mail_event', $data, function($message) use ($title,$event_description, $startDate,$endDate_of_event,\n $time, $logged_in_user,$registraEmail,$registraPhone,$subject)\n { \n $message->from($registraEmail, 'Dallington');\n $message->to($registraEmail, 'Henry')->subject($subject);\n }); \n\n if(Mail::failures()){\n return redirect('events')->with('event-success','Event has been updated successfully and all users of the system have been notified with in the app notification but not via email because of internet connection issues');\n\n } \n\n else{\n\n return redirect('events')->with('event-success','Event has been updated successfully & all users of the system have been notified within the app notification & email'); \n }\n\n }\n\n else if($central->is_connectedToInternet() == 0)\n {\n return redirect('events')->with('event-success','Event has been updated successfully and all users of the system have been notified only in app notification');\n\n }\n\n\n\n }\n else\n {\n return redirect('events')->with('event-fail','Event has not been updated!');\n}\n\n}\n else\n {\n return redirect('/events')->with('event-fail','You cannot edit this event since you are not the one who created it!');\n}\n\n}", "public function updateAdvent($advent, $data, $user)\n {\n DB::beginTransaction();\n\n try {\n if(AdventCalendar::where('name', $data['name'])->where('id', '!=', $advent->id)->exists()) throw new \\Exception(\"The name has already been taken.\");\n if(!$data['start_at']) throw new \\Exception ('A start time is required.');\n if(!$data['end_at']) throw new \\Exception ('An end time is required.');\n\n // Check if there are participants that have claimed days greater than the new duration\n if($advent->participants()->count()) {\n $startAt = Carbon::create($data['start_at']); $endAt = Carbon::create($data['end_at']);\n if($advent->participants()->pluck('day')->max() > ($startAt->startOf('day')->diffInDays($endAt->endOf('day'))+1)) throw new \\Exception('The new duration is shorter than the number of days the advent has already run for.');\n }\n\n // Process and encode prize information\n if(isset($data['item_ids'])) {\n // Check prizes for each day\n for($day = 1; $day <= $advent->days; $day++) {\n if(isset($data['item_ids'][$day])) {\n // Check that the item exists\n $item = Item::find($data['item_ids'][$day]);\n if(!$item) throw new \\Exception('One or more of the items selected is invalid.');\n\n $data['data'][$day] = [\n 'item' => $data['item_ids'][$day],\n 'quantity' => isset($data['quantities'][$day]) ? $data['quantities'][$day] : 1\n ];\n }\n }\n\n // Process bonus prize, if set\n if(isset($data['item_ids']['bonus'])) {\n // Check that the item exists\n $item = Item::find($data['item_ids']['bonus']);\n if(!$item) throw new \\Exception('One or more of the items selected is invalid.');\n\n $data['data']['bonus'] = [\n 'item' => $data['item_ids']['bonus'],\n 'quantity' => isset($data['quantities']['bonus']) ? $data['quantities']['bonus'] : 1\n ];\n }\n\n // Encode the prize data\n $data['data'] = json_encode($data['data']);\n }\n\n $advent->update(Arr::only($data, ['name', 'display_name', 'summary', 'start_at', 'end_at', 'data']));\n\n return $this->commitReturn($advent);\n } catch(\\Exception $e) {\n $this->setError('error', $e->getMessage());\n }\n return $this->rollbackReturn(false);\n }", "public function update(Request $request, $id)\n {\n $event = Event::find($id); \n $event->name = $request->name;\n $event->description = $request->description;\n $event->start = $request->start;\n $event->end = $request->end;\n $event->save();\n\n $adress = $event->adresses;\n\n $adress->line1 = $request->line1;\n $adress->city = $request->city;\n $adress->ZIP = $request->ZIP;\n $adress->country = $request->country;\n\n $event->adresses->save($adress);\n }", "function updateAttendeesStatus($attendees, $event) {\n\tforeach($attendees as $attendee) {\n\t\t$rr = civicrm_api3('Participant', 'create', [\n\t\t 'event_id' => $event,\n\t\t 'id' => $attendee['participant_id'],\n\t\t 'status_id' => \"Attended\",\n\t\t]);\n\t}\n}", "public function update(Request $request, $id)\n {\n $eventID = $id;\n\n $this->validate($request, [\n 'meal_name' => 'required|string|max:255',\n 'meal_description' => 'required|string',\n 'available_places' => 'required|integer',\n 'event_price' => 'required|integer',\n ]);\n\n // CUSTOM MESSAGES => VALIDATION.PHP\n\n $mealname = $request->meal_name;\n $mealdescription = $request->meal_description;\n $eventplaces = $request->available_places;\n $eventprice = $request->event_price;\n $eventdate = $request->event_date;\n\n $eventmealID = DB::table('events')\n ->where('id', '=', $eventID)\n ->value('meal_id');\n\n\n // UPDATE MEAL NAME\n if ($mealname != null && !empty($mealname)) {\n DB::table('meals')\n ->where('id', '=', $eventmealID)\n ->update(['meal_name' => $mealname]);\n }\n\n // UPDATE MEAL DESCRIPTION\n if ($mealdescription != null && !empty($mealdescription)) {\n DB::table('meals')\n ->where('id', '=', $eventmealID)\n ->update(['meal_description' => $mealdescription]);\n }\n\n // UPDATE EVENT PLACES\n if ($eventplaces != null && !empty($eventplaces)) {\n DB::table('events')\n ->where('id', '=', $eventID)\n ->update(['event_places' => $eventplaces]);\n }\n\n // UPDATE MEAL PRICE\n if ($eventplaces != null && !empty($eventplaces)) {\n DB::table('meals')\n ->where('id', '=', $eventmealID)\n ->update(['price' => $eventprice]);\n }\n\n // UPDATE EVENT DATE\n if ($eventdate != null && !empty($eventdate)) {\n DB::table('events')\n ->where('id', '=', $eventID)\n ->update(['event_date' => $eventdate]);\n }\n\n return Redirect::to('/events/' . $eventID)\n ->with('successmessage', 'Jouw event werd succesvol gewijzigd.');\n }", "public function update(Request $request, Eventpartners $eventpartners)\n {\n //\n }", "function bbbWriteMeetings($meeting){\n global $DB;\n $future_id = $DB->get_field_sql(\"SELECT max(id) FROM {bbb_attendance}\")+1;\n $bbb_id = explode('-',$meeting->meetingID)[2];\n $bbb_course = explode('-',$meeting->meetingID)[1];\n \n if(empty($future_id)){\n $future_id = 0;\n }\n\n\n if(empty($bbb_id)){\n $bbb_id = 0;\n }\n \n if(empty($bbb_course)){\n $bbb_course = 0;\n }\n \n $sql = \"INSERT INTO {bbb_attendance} \n (id,courseid,bigbluebuttonid,timestamp)\n values (\".$future_id.\",\".$bbb_course.\",\".$bbb_id.\",\".time().\")\";\n \n $DB->execute($sql);\n echo sizeof($meeting->attendees->attendee);\n \n if(sizeof($meeting->attendees->attendee) > 1){\n $atendees = $meeting->attendees->attendee;\n //print_r($atendees);\n foreach ($atendees as $atendee){\n //print_r($atendee);\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n }\n }else{\n $atendees = $meeting->attendees;\n foreach ($atendees as $atendee){\n if(empty($atendee->userID)){\n $atendee->userID = 0;\n \n }\n //print_r($atendee);\n // echo \"<br>zapisuju\".$atendee->userID;\n $sql = \"INSERT INTO {bbb_attendance_users} \n (bbb_attendance_id,userid)\n values (\".$future_id.\",\".$atendee->userID.\")\";\n $DB->execute($sql); \n \n }\n }\n $state = 'wroten '.time().' - courseid:'.$bbb_course. '';\n return ($state);\n\n}", "public function editappointment($id = null){\n $appointments_table = TableRegistry::get('Appointments');\n $users_table = TableRegistry::get('Users');\n $appointment = $appointments_table->get($id, [\n 'contain' => []\n ]);\n if ($this->request->is(['patch', 'post', 'put'])) {\n $appointment_time = $this->request->getData('appointment_time');\n $appointment_date = $this->request->getData('appointment_date');\n $time = $appointment_date.' '.$appointment_time;\n $appointment = $appointments_table->patchEntity($appointment, $this->request->getData());\n $appointment->appointment_date = date('Y-m-d H:i A', strtotime($time));\n if ($appointments_table->save($appointment)) {\n $userscontroller = new UsersController();\n $ip = $userscontroller->get_client_ip();\n $userscontroller->makeLog('Updated Appointment', $this->Auth->user('id'), 'Doctor Edited an appointment', $ip, 'Edit');\n $this->Flash->success(__('The appointment has been updated.'));\n\n return $this->redirect(['action' => 'viewappointments']);\n }\n $this->Flash->error(__('The appointment could not be updated. Please, try again.'));\n }\n $doctors = $users_table->find('list', ['limit' => 200])->where(['role_id'=>2]);\n $patients = $appointments_table->Patients->find('list', ['limit' => 200]);\n $this->set(compact('appointment', 'doctors', 'patients'));\n \n $this->viewBuilder()->setLayout('backend');\n }", "public function edit($id)\n {\n $findstaff=DB::table('tblLeaves')->where('LeaveNum',$id)->first();\n echo $findstaff->Staff;\n if ($findstaff->CasualLeave==!NULL){\n \n DB::table('tblStaff')->where('StaffNum',$findstaff->Staff)->decrement('CasualLeaveAccrued',$findstaff->CasualLeave);\n \n }\n if($findstaff->EarnedLeave==!NULL){\n DB::table('tblStaff')->where('StaffNum',$findstaff->Staff)->decrement('EarnedLeaveAccrued',$findstaff->EarnedLeave);\n }\n \n DB::table('tblleaves')\n ->where('LeaveNum', $id)\n ->update(['Status' => 1]);\n DB::table('tblleaves')\n ->where('LeaveNum', $id)\n ->update(['Status' => 1]);\n\n /* Mail::send('tickets.emails.tickets',array('ticketsCurrentNewId'=>\n'hhjj','ticketsCurrentSubjectId'=>'hhjkkk','ticketsCurrentLocationsObj'=>'jjkkk'), function($message)\n{\n//$message->from('your@gmail.com');\n$message->to('sherubrangdrel@rtc.bt', 'Amaresh')->subject(`Welcome!`);\n});*/\n \n return back()->with('success', 'approved');\n\n }", "public function updated(Apartment $apartment)\n {\n //\n }", "public function orderAssignEvents() {\n\n $orders = DB::table('Orders')->select('outletId','deliveryAddressId','userId','id as orderId', 'providerEarnings')\n ->where(['orderStatus'=>Constant::UNASSIGNED])\n ->orwhere('orderStatus',Constant::ASSIGNED)\n ->whereNull('acceptedTime')\n ->get();\n\n\n\n Log::info('Showing user profile for user: '.$orders);\n\n \n\n\n\n foreach ($orders as $order) {\n\n\n\n $deliveryStaff = DB::table('DeliveryStaff')->select('id','name','latitude as lat','longitude as lng','s2Key','s2CellId as s2Id','fcmtoken as deviceToken','os', 'totalAmount', 'balanceAmount', 'tripStatus')\n ->where('tripStatus',0)\n ->where('status',1)\n ->where('id',6)\n ->first(); \n // if (!empty($deliveryStaff)) {\n // $totalAmount = $deliveryStaff->totalAmount + $order->providerEarnings;\n // $balanceAmount = $deliveryStaff->balanceAmount + $order->providerEarnings; \n // }\n\n\n // $staffEarningsupdate = DB::table('DeliveryStaff')->where('id',$date(format) eliveryStaff->id)\n // ->update(['totalAmount'=> $totalAmount,'balanceAmount'=> $balanceAmount]);\n\n if (!empty($deliveryStaff)) {\n\n // print_r($deliveryStaff);\n\n\n // if ($deliveryStaff->tripStatus === 1) {\n $update = DB::table('Orders')->where('id',$order->orderId)\n ->update(['deliveryStaffId'=>$deliveryStaff->id,'orderStatus'=>Constant::ASSIGNED,'assignedTime'=>NOW()]);\n \n \n \n \n $title =__('validation.assignOrder');\n $notificationData = array();\n $notificationData['message'] = $deliveryStaff->name .__('validation.assignOrder');\n $notificationData['os'] = $deliveryStaff->os;\n // $notificationData['body'] = [\n // 'image' => \"NULL\",\n // 'title' => $title,\n // 'notification_type'=>'assign',\n // 'extraKey' => 'orderId',\n // 'extraValue' =>'Null',\n // ];\n $notificationData['body'] = 'assign'; \n $notificationData['deviceToken'] =$deliveryStaff->deviceToken;\n \n $pushNotification = new FCMPushNotificationServiceProvider();\n $pushNotification->setTitle($title);\n file_put_contents('/var/www/html/foodapp/app/Http/Utility/assignevent.log', $deliveryStaff->deviceToken,FILE_APPEND);\n \n $status =$pushNotification->sendPushNotification($notificationData);\n\n $staffEarningsupdate = DB::table('DeliveryStaff')->where('id',$deliveryStaff->id)\n ->update(['tripStatus'=> 1 ]);\n\n file_put_contents('/var/www/html/foodapp/app/Http/Utility/assignevent.log',$status,FILE_APPEND);\n\n // }\n \n }\n \n // $update = DB::table('Orders')->where('id',$order->orderId)\n // ->update(['deliveryStaffId'=>$deliveryStaff->id,'orderStatus'=>Constant::ASSIGNED,'assignedTime'=>NOW()]);\n\n // $staffEarningsupdate = DB::table('DeliveryStaff')->where('id',$deliveryStaff->id)\n // ->update(['tripStatus'=> 1 ]);\n\n\n\n\n\n\n\n\n \n\n\n // print_r($deliveryStaff);\n \n }\n\n }", "public function postEdit($id)\n\t{\n $sectors = \"'\" . implode(\"','\", Sector::lists('name')) . \"'\";\n $areas = $this->getArea();\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, Idea::$rules);\n\n // If validation fails, we'll exit the operation now.\n if ($validation->fails()) {\n // Ooops.. something went wrong\n return Redirect::back()->withInput()->withErrors($validation);\n }\n \t$idea = $this->idea->find($id);\n\n $input['area_id'] = $input['area_id']?$input['area_id']:'-1';\n $input['office_id'] = $input['office_id']?$input['office_id']:'-1';\n\n $input = $this->get_domain_parent($input,$input['area_id']);\n $input = $this->get_domain_parent($input,$input['office_id']);\n// var_dump($input);\n// return;\n\t\t// Was the blog tweet updated?\n if ($idea->update($input)) {\n $user = Sentry::getUser();\n $applicant = Sentry::findGroupByName('Applicant');\n if ($user->inGroup($applicant)){\n if($idea->is_draft==1){\n return Redirect::route('myideas')->with('success', Lang::get('ideas/message.update.success'));\n }else{\n return View::make('frontend.account.editidea', compact('idea','sectors','area'))->with('success', Lang::get('ideas/message.update.success'));\n //return Redirect::back()->withInput();\n }\n }\n else{\n if($idea->is_draft==1){\n return Redirect::route('ideas')->with('success', Lang::get('ideas/message.update.success'));\n }else{\n return View::make('ideas.edit', compact('idea','sectors','area'))->with('success', Lang::get('ideas/message.update.success'));\n //return Redirect::back()->withInput();\n }\n }\n }\n\n // Redirect to the ideas management page\n return Redirect::to(\"ideas/$id/edit\")->with('error', Lang::get('tweets/message.update.error'));\n\t}", "public function update(Request $request, $id)\n {\n //validation happens here\n $this->validate($request, array(\n 'description' => 'required',\n 'eventtype' => 'required',\n 'venuename' => 'required',\n 'eventdatetime' => 'required',\n 'organizer' => 'required',\n 'invitees' => 'required'\n ));\n\n //get school details i.e source address;\n $schoolDetails = Event::getSchoolDetails(auth()->user()->email);\n\n //get distance and time\n $distanceTime = Helper::getDistanceTime($schoolDetails->address, $request->input('venuename'));\n\n //update event and save into database\n $event = Event::find($id);\n $event->description = $request->input('description');\n $event->eventtype = $request->input('eventtype');\n $event->venue = $request->input('venuename');\n $event->evendatetime = $request->input('eventdatetime');\n $event->distancefromschool = $distanceTime['distance'];\n $event->duration = $distanceTime['duration'];\n $event->save();\n\n DB::table('invitees')->where('eventid', $event->eventid)->delete();\n \n //update the data into invitees\n Invitees::insertIntoInvitees($event->eventid, $request);\n \n return redirect('/dashboard')->with('success', 'Event Updated');\n }", "public function update(Request $request, Meeting $meeting)\n {\n //\n }", "public function decline()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/decline', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has declined');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "public function editEvent() {\n\n /* Searching the event */\n $event = EventDCI::find(Input::get('id'));\n\n if(is_null($event)) {\n Mail::send('errors.editevent',\n array(\n 'error' => 'No existe el evento especificado',\n 'user' => json_encode(Auth::user()),\n 'event' => json_encode(Input::all()),\n ),\n function($message) {\n $message->to('sjaca10@gmail.com')->subject('Error al editar evento - DCI');\n $message->to('jesuslink00@gmail.com')->subject('Error al editar evento - DCI');\n }\n\n );\n\n return Redirect::to('dashboard')\n ->with('alert', 'No existe el evento especificado')\n ->with('FORM_ENABLED','true')\n ->with('action', 'edit')\n ->withInput();\n }\n\n /* Validating that the event belongs to the user login user */\n if($event->user_id != Auth::user()->id) {\n return Redirect::to('dashboard')\n ->with('alert', 'Usted no tiene permisos para modificar el evento especificado')\n ->with('FORM_ENABLED','true')\n ->with('action', 'edit')\n ->withInput();\n }\n\n /* Verifying that event has a correct and valid data */\n $validation = $this->validateEvent();\n\n if(!$validation['isValid']) {\n return Redirect::to('dashboard')\n ->with('alert', $validation['message'])\n ->with('FORM_ENABLED','true')\n ->with('action', 'edit')\n ->withInput();\n }\n\n /* Updating the event */\n $event->name = Input::get('name');\n $event->start_day = Input::get('start_day');\n $event->end_day = Input::get('end_day');\n $event->time = Input::get('time');\n $event->place = Input::get('place');\n $event->link = Input::get('link');\n $event->directed_to = Input::get('directed_to');\n $event->has_cost = !Input::has('has_cost');\n $event->description = Input::get('description');\n $event->save();\n\n $now = new DateTime();\n\n /* Getting old services, resources sources and witeness to the event */\n $old_services = $event->services()->get();\n $old_resources_sources = $event->resources_sources()->get();\n $old_witnesses = $event->witnesses()->get();\n $old_pdi_programs = $event->pdi_programs()->get();\n\n /* Deactivating old services */\n foreach ($old_services as $old_service) {\n $event->services()->updateExistingPivot($old_service->id, array('deleted_at' => $now));\n }\n\n /* Deactivateing old resources sources */\n foreach ($old_resources_sources as $old_resource_source) {\n $event->resources_sources()->updateExistingPivot($old_resource_source->id, array('deleted_at' => $now));\n }\n\n /* Deactivateing old resources sources */\n foreach ($old_witnesses as $old_witness) {\n $event->witnesses()->updateExistingPivot($old_witness->id, array('deleted_at' => $now));\n }\n\n /* Deactivateing old PDI programs */\n foreach ($old_pdi_programs as $old_pdi_program) {\n $event->pdi_programs()->updateExistingPivot($old_pdi_program->id, array('deleted_at' => $now));\n }\n\n /* Getting information about diffusion */\n if(Input::has('services')) {\n\n /* Getting new services to the event */\n $new_services = Input::get('services');\n\n /* Updating old services and adding new services */\n foreach ($new_services as $new_service) {\n if($this->validateArrayElement($new_service, 'string')) {\n $service_exist = false;\n foreach ($old_services as $old_service) {\n if($old_service['original']['pivot_service_id'] == $new_service) {\n $service_exist = true;\n $event->services()->updateExistingPivot($old_service->id, array('deleted_at' => NULL));\n break;\n }\n }\n if(!$service_exist) {\n $data_services = array(\n 'start_service' => Input::get('start_day'),\n 'end_service' => Input::get('end_day'),\n );\n\n $event->services()->attach($new_service, $data_services);\n }\n }\n else {\n return Redirect::to('dashboard')\n ->with('alert', 'Los servicios actualizados no son válidos')\n ->with('FORM_ENABLED','true')\n ->with('action','edit')\n ->withInput();\n }\n }\n\n /* Sending email to all boss that have relation with the services */\n $departments_sended_mail = array();\n foreach ($event->services()->wherePivot('deleted_at', '=', NULL)->get() as $service) {\n /* Getting the departments associated to the services */\n $department = $service->department()->first();\n\n if(!in_array($department->id, $departments_sended_mail)) {\n /* Getting the users associated to a department that they are bosses */\n $bosses = $department->users()->where('user_type_id', '=', 3)->where('status', '=', 1)->get();\n\n if($bosses->isEmpty()) {\n /* Getting the admin users */\n $admins = User::where('user_type_id', '=', 4)->where('status', '=', 1)->get();\n\n /* Sending email to admins */\n foreach ($admins as $admin) {\n Mail::send('emails.notification.editeventnoboss',\n array(\n 'event' => $event->name,\n 'department' => $department->name,\n ),\n function($message) use($admin) {\n $message->to($admin->email)->subject('Evento editado (Revisar detalle) - DCI');\n }\n\n );\n }\n }\n else {\n /* Sending email to bosses */\n foreach ($bosses as $boss) {\n Mail::send('emails.notification.editevent',\n array(\n 'event' => $event->name,\n ),\n function($message) use($boss) {\n $message->to($boss->email)->subject('Evento editado - DCI');\n }\n\n );\n }\n }\n\n array_push($departments_sended_mail, $department->id);\n }\n }\n\n /* Updating support material to the event */\n $support_materials_aux = Input::get('support_materials');\n $new_support_materials = empty($support_materials_aux) ? array() : Input::get('support_materials');\n $old_support_materials = $event->support_materials()->get();\n\n /* Soft deleting to files deleted by user */\n foreach ($old_support_materials as $old_support_material) {\n if(!in_array($old_support_material->file, $new_support_materials)) {\n $old_support_material->delete();\n }\n }\n\n /* Inserting new files added by user */\n if(Input::hasFile('files')) {\n $files = Input::file('files');\n\n foreach ($files as $file) {\n $new_name = str_random(20).'.'.$file->getClientOriginalExtension();\n $file->move('./support_materials', $new_name);\n\n $support_material_data = array(\n 'original_name' => $file->getClientOriginalName(),\n 'file' => 'support_materials/'.$new_name,\n );\n\n $support_material = new SupportMaterial($support_material_data);\n $event->support_materials()->save($support_material);\n }\n }\n\n }\n\n if(Input::has('resources_sources')) {\n\n /* Getting new resources sources to the event */\n $new_resources_sources = Input::get('resources_sources');\n\n /* Updating old resources sources and adding new resources sources */\n foreach ($new_resources_sources as $new_resource_source) {\n if($this->validateArrayElement($new_resource_source, 'string')) {\n $resource_source_exist = false;\n foreach ($old_resources_sources as $old_resource_source) {\n if($old_resource_source['original']['pivot_resource_source_id'] == $new_resource_source) {\n $resource_source_exist = true;\n $event->resources_sources()->updateExistingPivot($old_resource_source->id, array('deleted_at' => NULL));\n break;\n }\n }\n if(!$resource_source_exist) {\n $event->resources_sources()->attach($new_resource_source);\n }\n }\n else {\n return Redirect::to('dashboard')\n ->with('alert', 'Las fuentes de recursos actualizadas no son válidas')\n ->with('FORM_ENABLED','true')\n ->with('action','edit')\n ->withInput();\n }\n }\n\n }\n\n if(Input::has('witnesses')) {\n\n /* Getting new resources sources to the event */\n $new_witnesses = Input::get('witnesses');\n\n /* Updating old resources sources and adding new resources sources */\n foreach ($new_witnesses as $new_witness) {\n if($this->validateArrayElement($new_witness, 'string')) {\n $witnesses_exist = false;\n foreach ($old_witnesses as $old_witness) {\n if($old_witness['original']['pivot_witness_id'] == $new_witness) {\n $witnesses_exist = true;\n $event->witnesses()->updateExistingPivot($old_witness->id, array('deleted_at' => NULL));\n break;\n }\n }\n if(!$witnesses_exist) {\n $event->witnesses()->attach($new_witness);\n }\n }\n else {\n return Redirect::to('dashboard')\n ->with('alert', 'Los testigos actualizados no son válidos')\n ->with('FORM_ENABLED','true')\n ->with('action','edit')\n ->withInput();\n }\n }\n }\n\n if(Input::has('pdi_programs')) {\n\n /*Getting new PDI programs to the event*/\n $new_pdi_programs = Input::get('pdi_programs');\n\n /* Updating old PDI programs and adding new PDI programs */\n foreach ($new_pdi_programs as $new_pdi_program) {\n if($this->validateArrayElement($new_pdi_program, 'string')) {\n $pdi_programs_exist = false;\n foreach ($old_pdi_programs as $old_pdi_program) {\n if($old_pdi_program['original']['pivot_pdi_program_id'] == $new_pdi_program) {\n $pdi_programs_exist = true;\n $event->pdi_programs()->updateExistingPivot($old_pdi_program->id, array('deleted_at' => NULL));\n break;\n }\n }\n if(!$pdi_programs_exist) {\n $event->pdi_programs()->attach($new_pdi_program);\n }\n }\n else {\n return Redirect::to('dashboard')\n ->with('alert', 'Los testigos actualizados no son válidos')\n ->with('FORM_ENABLED','true')\n ->with('action','edit')\n ->withInput();\n }\n }\n\n }\n\n return Redirect::to('dashboard')->with('alert', 'Evento editado exitosamente ' . $event->id_dci);\n\n }", "public function attended(EventAttendanceUpdatePost $request, $id)\n {\n $eventParticipant = EventParticipant::findOrFail($id);\n\n\n /* Set the event as attended */\n $eventParticipant->setAsAttended(true);\n\n return response()->json([\n 'response' => 1,\n 'attendance' => $eventParticipant->hasAttended,\n 'message' => $eventParticipant->renderAttendance(),\n ]);\n }", "function edit($app_num='')\n\t{\n\t\t$this->auth_is('pce_da5');\n\t\t$data = array();\n\t\t$data['app_details'] = $this->edc_booking_model->get_booking_details($app_num);\n\t\t$data['room_booking_details'] = $this->edc_booking_model->get_rooms_for_application($app_num);\n\n\t\t//get user_id against the app_num\n\t\t$data['user_id'] = $this->edc_booking_model->get_request_user_id($app_num);\n\n//-->\t//the code below finds out the groups and rooms associated to each group\n\t\t$res = $this->edc_booking_model->get_guest_groups($app_num);\n\t\t$data['guest_details'] = array();\n\t\t$sno = 0;\n\t\tforeach($res as $row)\n\t\t{\n\t\t\t$data['guest_details'][$sno] = $row;\n\t\t\t$room_res = $this->edc_booking_model->get_guest_rooms($row['app_num'], $row['name'], $row['check_in']); //got the room id\n\t\t\t$i = 0;\n\t\t\t//now get the room details\n\t\t\tforeach($room_res as $room_row)\n\t\t\t{\n\t\t\t\t$room_info = $this->edc_allotment_model->get_room_details($room_row['room_alloted']);\n\t\t\t\tif($room_info)\n\t\t\t\t$data['guest_details'][$sno]['rooms'][$i++] = ucfirst($room_info['building']).' - '.ucfirst($room_info['floor']).' - '.$room_info['room_no'].' - '.ucfirst($room_info['room_type']);\n\t\t\t\telse $data['guest_details'][$sno]['rooms'][$i++] = 'Room Info Unavailable!';\n\t\t\t}\n\t\t\t$sno++;\n\t\t}\n//-->\n\t\t//to show guest number in drop down menu for number of guests, need to find out how many guests are entered for the app_num\n\t\t//depending on how many guests are left to checkin, it'll show the number of guests for group tab\n\t\t$data['count_guest']=count($this->edc_booking_model->get_guest_details($app_num));\n\n\t\t//to show only available rooms from list of allotted rooms,\n\t\t// -> get list of allotted rooms\n\t\t// -> get rooms that are not full\n\t\t$allotted_rooms = $this->edc_allotment_model->get_allocated_room_details($app_num);\n\t\t$data['no_of_rooms'] = count($allotted_rooms);\n\t\t$sno = 0;\n\t\t$data['rooms_left'] = 0;\n\t\tforeach($allotted_rooms as $allotted_room)\n\t\t{\n\t\t\t$type = $this->edc_allotment_model->get_room_details($allotted_room['room_id'])['room_type'];\n\t\t\t$entries = $this->edc_booking_model->get_guest_entries($app_num, $allotted_room['room_id']);\n\t\t\t//echo $type.' - '.$allotted_room['room_id'].' - '.$entries.'<br/>';\n\t\t\tif(($type == 'AC Suite' && $entries == 1) || ($type == 'Double Bedded AC' && $entries == 2)) //if room is full then skip this room\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\t//add current room to list of available rooms\n\t\t\t\t//echo 'adding -> '.$allotted_room['room_id'].'<br/>';\n\t\t\t\t$data['rooms'][$sno++] = $this->edc_allotment_model->get_room_details($allotted_room['room_id']);\n\t\t\t\t$data['rooms_left']++;\n\t\t\t}\n\t\t}\n\n\t\t$this->drawHeader('Add Guest Details');\n\t\t$this->load->view('edc_booking/add_checkin_checkout',$data);\n\t\t$this->drawFooter();\n\n\t}", "public function update(Request $request, $id)\n {\n $data = NonFacultyPayslipDetails::find($id);\n\n $request->validate([\n 'recordsFrom' => 'required',\n 'recordsTo' => 'required',\n 'emp_id' => 'required',\n ]);\n\n $startdate = $request->get('recordsFrom');\n $enddate = $request->get('recordsTo');\n $empids = $request->get('emp_id');\n\n $whereNumbers = [\n '7','9'\n ];\n\n $absentTable = DB::Table('att_day_summary')\n ->join('hr_employee','hr_employee.id','=','att_day_summary.employee_id')\n ->whereDate('recordsFrom', '>=', $startdate)\n ->whereDate('recordsTo', '<=', $enddate)\n ->where('emp_pin','=',$empids)\n ->select('item_id','item_results')\n ->whereIn('item_id',$whereNumbers)\n //->get();\n ->sum('item_results');\n\n \n //dd($empids);\n\n $data->update(['absence'=> $absentTable]);\n \n Alert::success('Update', 'Update Absent Successfully');\n\n return redirect()->route('NonFaculty.index');\n }", "public function update(Request $request, $id)\n {\n $time = explode(\" - \", $request->input('time'));\n \n // $adminevent=$request->all();\n // dd($adminevent);\n $adminevent = Event::find($id);\n $adminevent->title = $request->title;\n $adminevent->start =$request ->start;\n $adminevent->end =$request ->end;\n $adminevent->color = $request->color;\n $adminevent->save();\n \n $request->session()->flash('success', 'The event was successfully edit!');\n return redirect('/adminevent');\n }", "public function updateMeeting(Request $request, $id = null)\n {\n $data = $request->all();\n Meeting::where(['id'=>$id])->update(['finished'=>$data['finished']]);\n return redirect()->back()->with('flash_message_success', 'Meeting status changed Successfully !');\n }", "public function endTask()\n\t{\n\t\trequire_once 'message_class.php';\n\t\t\n\t\t$this->unsetActive();\n\t\t$this->winnerid = $this->getBidLeaderID();\n\n\t\tif ($this->winnerid == null) //bid ended but nobody bid\n\t\t{\n\t\t\t$notifymessage = new message();\n\t\t\t$messageinfo = array();\n\t\t\t$messageinfo['taskID'] = $this->taskid;\n\t\t\t$messageinfo['content'] = \"Sorry! Bidding has ended for your task <a href='/ViewTask.php?id=\".$this->taskid.\"'>\".$this->title.\"</a>, but nobody bid on it!\";\n\t\t\t$messageinfo['receiverID'] = $this->userid;\n\t\t\t$messageinfo['isSystem'] = true;\n\t\t\t$notifymessage->send($messageinfo);\n\t\t}\n\t\telse //notify winner and lister\n\t\t{\n\t\t\t//notify winner\n\t\t\t$notifymessage = new message();\n\t\t\t$messageinfo = array();\n\t\t\t$messageinfo['taskID'] = $this->taskid;\n\t\t\t$messageinfo['content'] = \"Congratulations! You have won the bidding for the task <a href='/ViewTask.php?id=\".$this->taskid.\"'>\".$this->title.\"</a>!\";\n\t\t\t$messageinfo['receiverID'] = $this->winnerid;\n\t\t\t$messageinfo['isSystem'] = true;\n\t\t\t$notifymessage->send($messageinfo);\n\t\t\t\n\t\t\t//notify winner\n\t\t\t$notifymessage = new message();\n\t\t\t$messageinfo = array();\n\t\t\t$messageinfo['taskID'] = $this->taskid;\n\t\t\t$messageinfo['content'] = \"Heads up! Bidding has ended for your task <a href='/ViewTask.php?id=\".$this->taskid.\"'>\".$this->title.\"</a>!\";\n\t\t\t$messageinfo['receiverID'] = $this->userid;\n\t\t\t$messageinfo['isSystem'] = true;\n\t\t\t$notifymessage->send($messageinfo);\n\t\t}\n\t\t\n\t}", "public function updateEntryDetails() {\n\t\t\n\t\t//NOTE: Replace sample data with get/post/session/db\n\t\t$user_entry_id=1;\n\t\t$friend_ids='12,9,16';\t\t\n\t\t\n\t\tif($user_entry_id != ''\n\t\t\t&& $friend_ids != '')\n\t\t{\n\t\t\t//first delete old friend reference from user_entry_details table\n\t\t\t$this->deleteEntryDetails($user_entry_id=1,$friend_ids='12,9,16');\t\n\n\t\t\t//now replace new friends lists\n\t\t\t$this->replaceEntryDetails();\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public function deleteEvent() {\n $event = EventDCI::find(Input::get('id'));\n if($event->user_id == Auth::user()->id) {\n /* Sending email to all boss that have relation with the services */\n $departments_sended_mail = array();\n foreach ($event->services()->wherePivot('deleted_at', '=', NULL)->get() as $service) {\n /* Getting the departments associated to the services */\n $department = $service->department()->first();\n\n if(!in_array($department->id, $departments_sended_mail)) {\n /* Getting the users associated to a department that they are bosses */\n $users = $department->users()->where('user_type_id', '=', 3)->where('status', '=', 1)->get();\n\n if($users->isEmpty()) {\n /* Getting the admin users */\n $users = User::where('user_type_id', '=', 4)->where('status', '=', 1)->get();\n }\n\n /* Sending email to bosses or admins (users) */\n foreach ($users as $user) {\n Mail::send('emails.notification.deleteevent',\n array(\n 'event' => $event->name,\n ),\n function($message) use($user) {\n $message->to($user->email)->subject('Evento eliminado - DCI');\n }\n\n );\n }\n\n array_push($departments_sended_mail, $department->id);\n }\n }\n $event->delete();\n return Redirect::to('dashboard')->with('alert', 'Evento eliminado exitosamente ' . $event->id_dci);\n }\n else {\n return Redirect::to('dashboard')->with('alert', 'Usted no tiene permisos para eliminar este evento' . $event->id_dci);\n }\n\n }", "protected function composeAndSendUpdateBookingMailToParticipant($a_participant_id) {\r\n\t\t$this->composeUpdatingBookingMailForParticipant($a_participant_id);\r\n\t\tparent::sendMail(array( $a_participant_id ), array( 'system' ), is_numeric($a_participant_id));\r\n\t}", "public function afterUpdate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"admin@gamanads.com\" => \"Admin GamanAds\"],\"Update Adspace\", 'updateadspace',\n // [ 'emailBody'=> \"Update Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }", "function AfterDelete($where,&$deleted_values,&$message,&$pageObject)\n{\n\n\t\tglobal $conn;\n\n$attend_id=$deleted_values['attend_id'];\n\n//select shecdule ID from timetable\n$sql_at= \"SELECT scheduleID,courseID,date,(end_time-start_time) AS hour FROM schedule_timetable WHERE id='$attend_id'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$scheduleID=$row_at['scheduleID'];\n\n//select related schedule id from schedule\n$sql_at2= \"SELECT programID,batchID,groupID FROM schedule WHERE scheduleID='$scheduleID'\";\n$query_at2=db_query($sql_at2,$conn);\n$row_at2=db_fetch_array($query_at2);\n\n$program=$row_at2['programID'];\n$batch=$row_at2['batchID'];\n$class=$row_at2['groupID'];\n\n//update program , batch, class to student_attendance table\n$date=$row_at['date'];\n$hour=$row_at['hour'];\n$course=$row_at['courseID'];\n$id=$keys['id'];\n$sql_up= \"Update student_attendance set programID ='$program', batchID='$batch',class='$class',course='$course',date='$date',hour='$hour' where id='$id'\";\n$query_up=db_exec($sql_up,$conn);\n\n//query the total hour for this module\n$sql_th= \"SELECT total_hour FROM program_course WHERE programID='$program' && CourseID=$course\";\n$query_th=db_query($sql_th,$conn);\n$row_th=db_fetch_array($query_th);\n\n$totalhour=$row_th['total_hour'];\n//the percentage wight of absentee ( $hour/$totalhour)\n$weight_absent=($hour/$totalhour*100);\n\n//query current attendance status for this student, program , module\n$studentID=$deleted_values['StudentID'];\n$sql_at3=\"SELECT Attendance FROM student_course WHERE StudentID=$studentID AND programID=$program AND CourseID=$course AND Exam_Remark IS NULL\";\n$query_at3=db_query($sql_at3,$conn);\n$row_at3=db_fetch_array($query_at3);\n\n$current_attendance=$row_at3['Attendance'];\n//update student_course attendance\n\n$net_attendance=$current_attendance+$weight_absent;\n\n$sql_ups= \"Update student_course SET Attendance='$net_attendance' where StudentID='$studentID' && programID='$program' && CourseID=$course AND Exam_Remark IS NULL\";\n$query_ups=db_exec($sql_ups,$conn);\n\n;\t\t\n}", "protected function realSave($attendee){\n /*** ****************************************************** ***\n 1: Property names must match field names in base table(s)\n 2: The following fields should only be updated by the email process\n $a->email_sent = $attendee->emailSent;\n $a->email_send_date = $attendee->emailSendDate;\n ************************************************************ ***/\n $rec = array();\n $a = null;\n try{\n $rec = entity_load($this->entityName, array($attendee->attendeeId,));\n if (empty($rec)){\n $a = entity_create($this->entityName, array('attendee_id' => $attendee->attendeeId,));\n }else{\n $a = reset($rec);\n }\n $a->event_id = $attendee->eventId;\n $a->order_id = $attendee->orderId;\n $a->ticket_class_id = $attendee->ticketClassId;\n $a->create_date = $attendee->createDate;\n $a->change_date = $attendee->changeDate;\n $a->email_address = $attendee->emailAddress;\n $a->last_name = self::no_overflow($attendee->lastName,50);\n $a->first_name = self::no_overflow($attendee->firstName,50);\n $a->category = $attendee->category;\n// $a->category_nid = $attendee->categoryNid;\n $a->order_type = $attendee->orderType;\n $a->reg_type = $attendee->regType;\n $a->region_name = $attendee->regionName;\n $a->contestant_last_name = self::no_overflow($attendee->contestantLastName,50);\n $a->contestant_first_name = self::no_overflow($attendee->contestantFirstName,50);\n $a->gender = $attendee->gender;\n $a->grade = $attendee->grade;\n $a->school = self::no_overflow($attendee->school,255);\n $a->year_of_birth = $attendee->yearOfBirth;\n $a->month_of_birth = $attendee->monthOfBirth;\n $a->day_of_birth = $attendee->dayOfBirth;\n $a->home_address_line_1 = self::no_overflow($attendee->homeAddressLine1,255);\n $a->home_address_line_2 = self::no_overflow($attendee->homeAddressLine2,255);\n $a->home_city = self::no_overflow($attendee->homeCity,100);\n $a->home_prov_state = $attendee->homeProvState;\n $a->home_postal_zip = self::no_overflow($attendee->homePostalZip,20);\n $a->home_phone_1 = self::no_overflow($attendee->homePhone1,20);\n $a->home_phone_2 = self::no_overflow($attendee->homePhone2,20);\n $a->email_consent = $attendee->emailConsent;\n $a->additional_info = self::no_overflow($attendee->additionalInfo,2500);\n $a->ts_create_date = strtotime($attendee->createDate);\n $a->ts_change_date = strtotime($attendee->changeDate);\n $a->category_nid = $this->getCategoryNodeId($attendee->category, $attendee->eventId, $attendee->language);\n $a->language = $attendee->language;\n $a->link_nid = $this->getLinkNodeId($attendee->category, $attendee->eventId, $attendee->ticketClassId, $attendee->language);\n\n $a->save();\n }catch(Exception $e){\n watchdog_exception(EBConsts::EBS_APP_NAME_MAIN, $e);\n }\n\n return $a;\n }", "public function update(Request $request, $apt_id){\n // return $request->all();\n // return $request->tooth_record[0][\"itm_id\"];\n\n // $apt_url= url(\"\").\"/Appointments\"; //http://klinik.com:8080\n //return url()->previous();\n //$q_url=url()->previous();//http://klinik.com:8080/Dashboard\n $Appointments_dr_ptn_success=0;\n $Appointments_cahanges_success=0;\n\n $now= Carbon::now();\n $the_apt_date= ($request->apt_date.\" \".$request->apt_time);\n\n $date=Carbon::parse($the_apt_date)->format(\"Y-m-d H:i:s\");// change the format as the db format\n if($date>=$now){\n\n // $date=Carbon::parse($the_apt_date)->format(\"Y-m-d H:i:s\");// change the format as the db format\n $date_e= Carbon::parse($the_apt_date);\n $date_end=$date_e->addHour(1); // slot time\n\n $new_doctor_id=$request->doctor;//it may new doctor or the exist doctor\n $previous_doctor_id=$request->prev_doctor;//it may previous doctor or the exist doctor\n\n if($apt_id!=null && $new_doctor_id!=null && $previous_doctor_id!=null) {\n if($request->apt_time==null ){\n return redirect()->back()->with(\"warning\",\"Saat bilgisi alınamadı\");\n }\n if($request->apt_date==null ){\n return redirect()->back()->with(\"warning\",\"Tarih bilgisi alınamadı\");\n }\n\n if($new_doctor_id==$previous_doctor_id && $request->apt_date==$request->prev_date && $request->prev_time==$request->apt_time ){\n Appointments::where(['id'=>$apt_id])->update([\n // 'doctors_id' => $new_doctor_id,\n //'apt_date' => $date,\n //'apt_date_end' => $date_end,\n //'apt_time' => $request->apt_time,\n 'apt_status' => $request->apt_status,\n 'apt_reason' => $request->apt_rsn,\n ]);\n $Appointments_cahanges_success=1;\n }\n $chk_if_exist = Appointments::where(['doctors_id' => $new_doctor_id, 'patients_id' => $request->patient_id])->where(\"id\",\"!=\",$apt_id)->where(\"apt_date\",\"=\",$date)->first();\n // return $chk_if_exist = Appointments::where(['apt_date'=>$date])->first();\n if ( $chk_if_exist == null ) { //if not exist same patient infos at another doctor page\n Appointments::where(['id'=>$apt_id])->update([//, 'patients_id' => $patient_id, 'doctors_id' => $previous_doctor_id\n 'doctors_id' => $new_doctor_id,\n 'apt_date' => $date,\n 'apt_date_end' => $date_end,\n 'apt_time' => $request->apt_time,\n 'apt_status' => $request->apt_status,\n 'apt_reason' => $request->apt_rsn,\n ]);\n $Appointments_dr_ptn_success=1;\n if(Auth::user()->the_role()!=\"Doktor(Master)\"){\n if($new_doctor_id!=$previous_doctor_id ){\n if(url(\"\").\"/Dashboard\"!=url()->previous())\n return redirect()->to(\"Appointments\")->with(\"success\",\"Doktor değişikliğine gidildiği için; Randevu anasayfasına yönlendirildiniz!\");\n }\n }\n }\n\n\n\n /*****clinic problems ******/\n $the_clinic_problems = Clinic_Problems::where(['apt_problmes_id'=>$apt_id])->get();\n $data_prob=array();\n if(!empty($request->problems)) {\n foreach ( $request->problems as $prob_id => $val ) {\n // return \"id:\".$prob_id.\" Problem:\".$val;\n $data_prob[] = $prob_id;// collect all items(problems) at data array\n }\n }\n if($the_clinic_problems!=null){\n foreach ($the_clinic_problems as $item_prob){// search the db data at items, if not match just delete it\n if(in_array($item_prob->id,$data_prob)==false){// false=if data removed from web\n Clinic_Problems::where('id',$item_prob->id)->delete();\n }\n }\n }\n\n if( !empty($request->notes['notes']['problem'])) { //if there is a new data then create it at db\n foreach ( $request->notes[ 'notes' ][ 'problem' ] as $val ) {\n Clinic_Problems::create([\n 'apt_problmes_id' => $apt_id, //appointments_id\n 'problems' => $val,\n ]);\n }\n }\n /*****End clinic problems ******/\n\n /*****End clinic observations ******/\n $the_clinic_observations = Clinic_Observations::where(['apt_observations_id'=>$apt_id])->get();\n $data_obs=array();\n if(!empty($request->observations)) {\n foreach ( $request->observations as $obs_id => $val_obs ) {\n // return \"id:\".$prob_id.\" Problem:\".$val;\n $data_obs[] = $obs_id;// collect all request items(problems) at data array\n }\n }\n if($the_clinic_observations!=null){\n foreach ( $the_clinic_observations as $item_obs ) {// search the db data at request items, if not match just delete it\n if ( in_array($item_obs->id, $data_obs) == false ) {\n Clinic_Observations::where('id', $item_obs->id)->delete();\n }\n }\n }\n\n if(!empty($request->notes['notes']['observation'])) { //if there is a data create it at db\n foreach ( $request->notes['notes'][ 'observation'] as $val_obs ) {\n Clinic_Observations::create([\n 'apt_observations_id' => $apt_id, // appointments_id\n 'observations' => $val_obs,\n ]);\n }\n }\n\n /*****End clinic observations ******/\n\n /*****End clinic diagnosis(teşhis) ******/\n $the_clinic_diagnosis = Clinic_Diagnosis::where(['apt_diagnoses_id'=>$apt_id])->get();\n $data_diag=array();\n if(!empty($request->diagnosis)) {\n foreach ( $request->diagnosis as $diag_id => $val_diag ) {\n // return \"id:\".$prob_id.\" Problem:\".$val;\n $data_diag[] = $diag_id;// collect all request items(problems) at data array\n }\n }\n if($the_clinic_diagnosis!=null){\n foreach ( $the_clinic_diagnosis as $item_diag ) {// search the data at request items, if not match just delete it from db\n if ( in_array($item_diag->id, $data_diag) == false ) {\n Clinic_Diagnosis::where('id', $item_diag->id)->delete();\n }\n }\n }\n if(!empty($request->notes['notes']['diagnosis'])) { //if there is a new data then create it at db\n foreach ( $request->notes['notes'][ 'diagnosis'] as $val_diag ) {\n Clinic_Diagnosis::create([\n 'apt_diagnoses_id' => $apt_id, //appointments_id\n 'diagnoses' => $val_diag,\n ]);\n }\n }\n\n /*****End clinic diagnosis(araştırma) ******/\n\n /***** clinic investigations ******/\n $the_clinic_investigations = Clinic_Investigations::where(['apt_investigations_id'=>$apt_id])->get();\n $data_invt=array();\n if(!empty($request->investigations)){\n foreach ($request->investigations as $invt_id=>$val_invt){\n // return \"id:\".$prob_id.\" Problem:\".$val;\n $data_invt[]=$invt_id;// collect all request items(problems) at data array\n }\n }\n if($the_clinic_investigations!=null){\n foreach ($the_clinic_investigations as $item_invt){// search the db data at request items, if not match just delete it\n if(in_array($item_invt->id,$data_invt)==false){\n Clinic_Investigations::where('id',$item_invt->id)->delete();\n }\n }\n }\n if(!empty($request->notes['notes']['investigation'])) { //if there is a new data just create it at db\n foreach ( $request->notes['notes'][ 'investigation'] as $val_invt ) {\n Clinic_Investigations::create([\n 'apt_investigations_id' => $apt_id,// appointments_id\n 'investigations' => $val_invt,\n ]);\n }\n }\n /*****End clinic investigations ******/\n\n /***** clinic notes advices ******/\n $the_clinic_note_advices = clinicNotes_advices::where(['apt_notes_adv_id'=>$apt_id])->get();\n $data_note=array();\n if(!empty($request->notes_advices)){\n foreach ($request->notes_advices as $note_id=>$val_note){\n // return \"id:\".$prob_id.\" Problem:\".$val;\n $data_note[]=$note_id;// collect all request items(problems) at data array\n }\n }\n if($the_clinic_note_advices!=null){\n foreach ($the_clinic_note_advices as $item_note){// search the db data at request items, if not match just delete it\n if(in_array($item_note->id,$data_note)==false){\n clinicNotes_advices::where('id',$item_note->id)->delete();\n }\n }\n }\n if(!empty($request->notes['notes']['notes'])) { //if there is a data create it at db\n foreach ( $request->notes['notes']['notes'] as $val_note ) {\n clinicNotes_advices::create([\n 'apt_notes_adv_id' => $apt_id, // appointments_id\n 'notes_advices' => $val_note,\n ]);\n }\n }\n\n /*****End clinic notes advices ******/\n\n /****Teeth Processes *****/\n $teeth_arr=array();\n if(!empty($request->tooth_record)){\n foreach ($request->tooth_record as $tt){\n Teeth_Process::where(\"id\",$tt[\"id\"])->update([\n \"prc_name\"=>$tt[\"name\"],\n \"itm_id\"=>$tt[\"itm_id\"],\n \"piece\"=>$tt[\"piece\"],\n \"itm_type\"=>$tt[\"type\"],\n \"exp_prc\"=>$tt[\"exp\"],\n \"teeth_num\"=>$tt[\"tooth\"],\n ]);\n $teeth_arr[]=$tt[\"id\"]; //set at array all exist ids which at web side\n /*--update teeth of product--*/\n /* $data_product= Product_Stocks::where(\"id\",$tt[\"itm_id\"])->first();\n Product_Stocks::where(\"id\",$tt[\"itm_id\"])->update([\n \"have_products\"=>($data_product->have_products-$tt[\"piece\"]),\n ]); */\n /*--End.update teeth of product--*/\n }\n }\n $teeth_data= Teeth_Process::where(\"apt_id\",$apt_id)->get();\n if($teeth_data!=null){ // if exist data at db\n foreach ($teeth_data as $dd){\n if(in_array($dd->id,$teeth_arr)==false){\n Teeth_Process::where(\"id\",$dd->id)->delete();\n }\n }\n }\n\n if(!empty($request->teeth[\"tooth\"])){ //for new line\n foreach ( $request->teeth[\"tooth\"] as $value){\n if(empty($value[\"itm_id\"])){\n return redirect()->back()->with(\"warning\",\"Yapılan işlemler sayfasında İşlem Adı Bilgisi Alınamadı, Lütfen Açılan Listeden BirSeçim Yapınız!\");\n }\n Teeth_Process::create([\n \"apt_id\"=>$apt_id,\n \"prc_name\"=>$value[\"name\"],\n \"itm_id\"=>$value[\"itm_id\"],\n \"piece\"=>$value[\"piece\"],\n \"itm_type\"=>$value[\"type\"],\n \"exp_prc\"=>$value[\"exp\"],\n \"teeth_num\"=>$value[\"tooth\"],\n ]);\n\n /*___*/\n /*---update parent table of product---*/\n /* $data_product0=Product_Stocks::where([\"id\"=>$value[\"itm_id\"],\"type\"=>0])->first();\n if($data_product0!=null){\n Product_Stocks::where([\"id\"=>$value[\"itm_id\"],\"type\"=>0])->update([\n \"have_products\"=>($data_product0->have_products-$value[\"piece\"]),\n ]);\n } */\n /*---End.update parent table of product---*/\n $data_product1=Product_Stocks::where([\"id\"=>$value[\"itm_id\"],\"type\"=>0])->first(); //as updated\n $data_his_product=product_history::where([\"apt_id\"=>$apt_id,\"product_id\"=>$value[\"itm_id\"]])->first();\n if($data_his_product!=null){\n /* product_history::where([\"apt_id\"=>$apt_id,\"product_id\"=>$value[\"itm_id\"]])->update([\n \"process_date\" =>Carbon::now(),\n \"sold\"=>($data_his_product->sold+$value[\"piece\"]),\n \"remaining\"=>($data_his_product->remaining-$value[\"piece\"]),\n ]); */\n }elseif($data_his_product==null){ //$data_his_product->sold+\n /* product_history::create([\n \"apt_id\"=>$apt_id,\n \"process_date\" =>Carbon::now(),\n \"product_id\"=>$value[\"itm_id\"],\n \"ptn_id\"=>$request->patient_id,\n \"Explanation\"=>$request->patient_name,\n \"sold\"=>$value[\"piece\"],\n \"remaining\"=>$data_product1->have_products\n ]);*/\n }\n /*____*/\n }\n }\n /****End. Teeth Processes *****/\n\n /**** Prescripton *****/\n $pres_arr=array();\n if(!empty($request->pres)){\n foreach ($request->pres as $tt){\n Prescriptions::where(\"id\",$tt[\"id\"])->update([\n \"mdc_name\"=>$tt[\"name\"],\n \"mdc_generic\"=>$tt[\"generic\"],\n \"mdc_dose\"=>$tt[\"dose\"],\n \"mdc_duration\"=>$tt[\"duration\"],\n \"mdc_instruction\"=>$tt[\"instruction\"],\n ]);\n $pres_arr[]=$tt[\"id\"]; //set at array all exist ids which at web side\n }\n }\n $pres_data= Prescriptions::where(\"apt_id\",$apt_id)->get();\n if($pres_data!=null){ // if exist data at db\n foreach ($pres_data as $dd){\n if(in_array($dd->id,$pres_arr)==false){\n Prescriptions::where(\"id\",$dd->id)->delete();\n }\n }\n }\n if(!empty($request->prescription[\"medicine\"])){\n foreach ( $request->prescription[\"medicine\"] as $value){\n Prescriptions::create([\n \"apt_id\"=>$apt_id,\n \"mdc_name\"=>$value[\"name\"],\n \"mdc_generic\"=>$value[\"generic\"],\n \"mdc_dose\"=>$value[\"dose\"],\n \"mdc_duration\"=>$value[\"duration\"],\n \"mdc_instruction\"=>$value[\"instruction\"],\n ]);\n }\n }\n /****End. Prescripton *****/\n\n if($Appointments_cahanges_success==1){\n return redirect()->back()->with(\"success\",\"Değişiklikler Kaydedildi\");\n }elseif( $Appointments_dr_ptn_success==1){\n return redirect()->back()->with(\"success\",\"Randevu ile ilgili değişiklikler başarıyla kaydedilmiştir!\");\n }else{\n return redirect()->back()->with(\"warning\",\"Belirtilen hasta için randevu tarihi daha önce alınmıştır!\");\n }\n }else{\n return redirect()->back()->with(\"warning\",\"Kayıt düzenlemesi için gerekli bilgiler alınamadı.\");\n }\n\n\n }else{\n return redirect()->back()->with(\"warning\",\"Geçmiş bir tarih için randevu işlemleri yapılamaz.\");\n }\n // return $request->prescription['medicine'][0]['name'];\n //return $request->all();\n }", "public function officer_view($id = null)\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n $this->assignUserToView($id); //user\n \n $allRsvps = $this->Event->EventsUser->find('all', array(\n 'conditions' => array('user_id' => $id)\n ));\n \n //returns all events to the view\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC')\n ));\n \n $this->set('rsvps', $allRsvps);\n \n $numOfEvents = 0;\n $numOfMisses = 0;\n $numOfHours = 0;\n \n //count number of events, hours, and missed events\n foreach($allRsvps as $rsvp):\n if($rsvp['EventsUser']['present'] == TRUE)\n {\n $numOfEvents++;\n foreach($eventdata as $event):\n if($event['Event']['id'] == $rsvp['EventsUser']['event_id'])\n $numOfHours += $event['Event']['hours'];\n endforeach;\n }\n else\n {\n foreach($eventdata as $event):\n if($event['Event']['id'] == $rsvp['EventsUser']['event_id'] && $event['Event']['closed'])\n $numOfMisses++;\n endforeach;\n } \n endforeach;\n \n $this->set('allRsvps', $allRsvps);\n $this->set('numOfEvents', $numOfEvents);\n $this->set('numOfHours', $numOfHours);\n $this->set('numOfMisses', $numOfMisses); \n $this->set('events', $eventdata);\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "public function update(Request $request, $id)\n {\n\n \n if($request->get('check') == null){\n \n if($request->tipo==null){\n return back()->with('error','Debe ingresar un tipo de incidente');; \n }\n $incidente = Incidente::find($id);\n $incidente->nombre=$request->get('nombre');\n $incidente->tipo_id=$request->get('tipo');\n $incidente->caracter=$request->get('caracter');\n if(Auth::user()->rol <> '3'){\n $incidente->estado= $request->get('estado');\n }\n if($incidente->estado <> 'Finalizado'){\n $incidente->finalizado = null;\n }\n $incidente->detalle=$request->get('detalle');\n \n $detalleInci = new DetalleDeIncidente;\n $detalleInci->incidente_id = $id;\n $detalleInci->send_id = Auth::user()->id;\n\n \n\n $detalleInci->observaciones = $request->get('observaciones');\n \n if($request->get('finalizar') == '0'){\n\n $detalleInci->estado = 'Finalizado';\n $incidente->estado = 'Finalizado';\n $incidente->finalizado = Carbon::now();\n $incidente->resolver_id = Auth::user()->id;\n\n }else{\n\n if($request->get('sector') <> null){\n $detauxs = DetalleDeIncidente::where('incidente_id',$id)->get();\n $detaux = $detauxs->last();\n $detaux->estado ='Reenviado';\n $detaux->update();\n $detalleInci->sector_id = $request->get('sector');\n $detalleInci->estado ='Enviado';\n }else{\n return back()->with('error','Debe ingresar un sector o finalizar el incidente');; \n }\n \n }\n\n\n $detalleInci->save(); \n $incidente->update();\n\n return redirect()->route('incidente.index');\n\n }else{\n\n $detalle = DetalleDeIncidente::where('incidente_id', $id)->where('estado','Enviado')->first();\n $detalle->estado = 'Recibido';\n $detalle->recived_id = Auth::user()->id;\n $detalle->hora_de_recibido = Carbon::now(); \n $detalle->update();\n\n $inci = Incidente::find($id);\n $inci->estado = 'En Proceso';\n $inci->update();\n\n return redirect()->route('incidente.index');\n }\n }", "public function CleanUpAction() {\n if ($this->isPost()) {\n $cnt = 0;\n foreach (esf_Auctions::$Auctions as $item => $auction) {\n if ($auction['ended']) {\n esf_Auctions::Delete($item, FALSE);\n $cnt = $cnt+1;\n }\n }\n Messages::Success(\n ( $cnt\n ? Translation::get('Auction.DeletedEnded', $cnt)\n : Translation::get('Auction.NoDeletedEnded') )\n );\n // redirect in case of inline editing\n $this->Request('ajax') && $this->redirect('auction');\n }\n $this->forward();\n }", "public function deleteAnnouncement(){\n $this->status = 0;\n $this->announcement = null;\n $this->save();\n }", "public function renderEvent(Request $request)\n {\n if ($request->id != '') {\n\n $cur_user = Auth::user();\n $user_timezone = User::where('id', $cur_user->id)->get()->toArray();\n $coach_timezone = $user_timezone[0]['timezone'];\n $cur_user = Auth::user();\n $client = Client::where('user_id', '=', $cur_user->id)->with('coach.user')->first();\n $booked_for = '';\n if (Auth::user()->is_gratuate == 'y') {\n $booked_for = 'g';\n } else {\n $booked_for = 'f';\n }\n $schedule = CoachSchedule::where(\"deleted\", \"0\")\n ->with(['coachschedulebooked' => function ($query) {\n $query->whereNull('session_status')->where('booked_slot', '>', 0);\n }])\n ->where('status', '=', 'booked')\n ->where('id', '=', $request->id)\n ->where('created_user_id', '=', $client->coach->user->id)\n ->get(['id', 'start_datetime', 'end_datetime']);\n $booked_id = CoachSceduleBooked::where(\"coach_schedules_id\", $schedule[0]['id'])->get(['meeting_type'])->toArray();\n $meeting_type = $booked_id[0]['meeting_type'];\n $final_date = Carbon::createFromFormat('Y-m-d H:i:s', $schedule[0]['start_datetime'])->format('Y/m/d');\n $booked_slot_val = $schedule[0]['coachschedulebooked']->booked_slot;\n if ($booked_slot_val > 0) {\n if ($booked_slot_val == 1) {\n $start_time = Carbon::createFromFormat('Y-m-d H:i:s', $schedule[0]['start_datetime'])->format('H:i a');\n $start = Carbon::createFromFormat('Y-m-d H:i:s', $schedule[0]['start_datetime'])->format('H:i');\n $end_time = Carbon::parse($start)->addMinutes(20)->format('H:i a');\n $total_time = $start_time . \"-\" . $end_time;\n } elseif ($booked_slot_val == 2) {\n $start_time = Carbon::parse($schedule[0]['start_datetime'])->addMinutes(20)->format('H:i a');\n $start = Carbon::parse($schedule[0]['start_datetime'])->addMinutes(20)->format('H:i');\n $end_time = Carbon::parse($start)->addMinutes(20)->format('H:i a');\n $total_time = $start_time . \"-\" . $end_time;\n } elseif ($booked_slot_val == 3) {\n $start_time = Carbon::parse($schedule[0]['start_datetime'])->addMinutes(40)->format('H:i a');\n $end_time = Carbon::createFromFormat('Y-m-d H:i:s', $schedule[0]['end_datetime'])->format('H:i a');\n $total_time = $start_time . \"-\" . $end_time;\n }\n }\n if ($cur_user->user_type == 'client') {\n $client_user_timezone = $client->user->timezone;\n\n if ($client_user_timezone == '') {\n $client_user_timezone = 'UTC';\n }\n $coach_user_timezone = ($client->coach->user->timezone);\n if ($coach_user_timezone == '') {\n $coach_user_timezone = 'UTC';\n }\n\n }\n view()->share('coach_user_timezone', $coach_user_timezone);\n $coach_user_time = Carbon::createFromFormat('Y-m-d H:i:s', Carbon::now()->toDateTimeString(), $client_user_timezone)->setTimezone($coach_user_timezone);\n view()->share('coach_timezone', $coach_timezone);\n view()->share('total_time', $total_time);\n view()->share('final_date', $final_date);\n view()->share('meeting_type', $meeting_type);\n view()->share('coach_user_time', $coach_user_time->toDateTimeString());\n view()->share('coach_user_name', $client->coach->user->name);\n view()->share('client_user_timezone', $client_user_timezone);\n return view('bookfreeschedule.index', compact('schedule'));\n }\n }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function update(Request $request, $id)\n {\n //Approval of the Leave Request \n\n //First the User Who approves a request should be an admin\n if (Auth::user()->is_admin) {\n\n //Validate the incoming Request Data\n //Validating for the incoming Request\n\n $response = array(\n 'response' => ''\n );\n\n //Validator\n $validator = Validator::make($request->all(), [\n 'approval_status' => 'required',\n\n ]);\n if ($validator->fails()) {\n $response['response'] = $validator->messages();\n return response()->json([\n 'errors' => $response,\n\n ], 422);\n }\n\n //Proceeding the Approve the Request\n $find_user_by_id = leaverequest::find($id);\n\n if (!$find_user_by_id) {\n return response()->json([\n 'data' => \"Please Put in a user with a valid Leave request ID \",\n 'status' => 404,\n\n ], 404);\n }\n\n //Executing save\n $find_user_by_id = leaverequest::find($id);\n $find_user_by_id->approval_status = true;\n $find_user_by_id->admin_feedback = $request->admin_feedback;\n if ($find_user_by_id->save()) {\n //Send a noticiation email\n\n $find_user_by_id = leaverequest::where('id', $id)->with('user')->first();\n $request_reason = $find_user_by_id->request_reason;\n $admin_feedback = $find_user_by_id->admin_feedback;\n $starting_date = $find_user_by_id->starting_date;\n $ending_date = $find_user_by_id->ending_date;\n $username = $find_user_by_id->user->username;\n $useremail = $find_user_by_id->user->email;\n\n $adminFeedBackDetailsArray = ['request_reason' => $request_reason, 'admin_feedback' => $admin_feedback, 'starting_date' => $starting_date, 'ending_date' => $ending_date, 'username' => $username];\n\n Mail::to($useremail)->send(new LeaveRequestApprovalMail($adminFeedBackDetailsArray));\n return response()->json([\n \"message\" => \"Congratulations!You Have Successfully given feedback to the user and an email sent to them\",\n \"data\" => $find_user_by_id,\n \"status\" => 200\n ]);\n } else {\n //Error during the Request\n\n return response()->json([\n 'message' => 'Please try again later!There was an error during submission of your request',\n 'status ' => 500\n ], 500);\n }\n // Not reapproving the request Validation\n\n } else {\n\n //Error during the Request\n\n return response()->json([\n 'message' => 'You are forbidden to make this Request since you are not an admin',\n 'status ' => 403\n ], 403);\n }\n }", "protected function updateApptDetails($args) {\n\n if ($args['ent_appnt_id'] == '' || $args['ent_drop_addr_line1'] == '' || $args['ent_distance'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $getApptDetQry = \"select a.status, a.appt_lat, a.appt_long, a.payment_type, a.drop_lat, a.drop_long, a.address_line1, a.address_line2, a.drop_addr1, a.drop_addr2, a.created_dt, a.arrive_dt, a.start_dt, a.appointment_dt, a.amount, a.appointment_id, a.last_modified_dt, a.user_device, \";\n $getApptDetQry .= \"(select email from slave where slave_id = a.slave_id) as pas_email, \";\n $getApptDetQry .= \"(select wt.price_per_km from workplace_types wt, workplace w, master d where w.type_id = wt.type_id and w.workplace_id = d.workplace_id and d.mas_id = a.mas_id) as price_per_km, \";\n $getApptDetQry .= \"(select wt.price_per_min from workplace_types wt, workplace w, master d where w.type_id = wt.type_id and w.workplace_id = d.workplace_id and d.mas_id = a.mas_id) as price_per_min, \";\n $getApptDetQry .= \"(select wt.basefare from workplace_types wt, workplace w, master d where w.type_id = wt.type_id and w.workplace_id = d.workplace_id and d.mas_id = a.mas_id) as base_fare, \";\n $getApptDetQry .= \"(select avg(star_rating) from master_ratings where mas_id = a.mas_id) as avg_rating from appointment a where a.appointment_id = '\" . $args['ent_appnt_id'] . \"'\";\n\n $apptDet = mysql_fetch_assoc(mysql_query($getApptDetQry, $this->db->conn));\n\n if ($apptDet['status'] != '8')\n return $this->_getStatusMessage(91, $getApptDetQry);\n\n $duration_in_mts_old = round(abs(strtotime($this->curr_date_time) - strtotime($apptDet['start_dt'])) / 60, 2);\n\n $duration_in_mts = ((int) $duration_in_mts_old == 0) ? 1 : $duration_in_mts_old;\n\n $distance_in_mts = $args['ent_distance']; //0\n\n $dis_in_km = (float) ($distance_in_mts / 1000);\n\n $avgSpeed = $dis_in_km / ($duration_in_mts / 60);\n\n// if ($avgSpeed > $this->avgSpeedForDistanceCalculationInKms)\n $amount = $dis_in_km * $apptDet['price_per_km'];\n// else\n// $amount = $duration_in_mts * $apptDet['price_per_min'];\n\n $newFare = $amount + $apptDet['base_fare'];\n\n $finalAmount = ($newFare > $apptDet['amount']) ? $newFare : $apptDet['amount'];\n\n $updateDetailsQry = \"update appointment set apprxAmt = '\" . $finalAmount . \"',amount = '\" . $finalAmount . \"', duration = '\" . $duration_in_mts . \"', distance_in_mts = '\" . $args['ent_distance'] . \"', drop_addr1 = '\" . $args['ent_drop_addr_line1'] . \"', drop_addr2 = '\" . $args['ent_drop_addr_line2'] . \"', drop_lat = '\" . $args['ent_drop_lat'] . \"', drop_long = '\" . $args['ent_drop_long'] . \"',complete_dt = '\" . $this->curr_date_time . \"' where appointment_id = '\" . $apptDet['appointment_id'] . \"'\";\n mysql_query($updateDetailsQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(3, $updateDetailsQry);\n\n// $mail = new sendAMail($this->host);\n\n $speed_in_mts = $dis_in_km / ($duration_in_mts / 60);\n\n $apptDet['invoice_id'] = 'RY' . str_pad($apptDet['appointment_id'], 6, '0', STR_PAD_LEFT);\n\n $apptDet['speed_in_mts'] = $speed_in_mts;\n\n $apptDet['appt_duration'] = $duration_in_mts;\n\n $apptDet['appt_distance'] = $dis_in_km;\n\n// $pasData = $this->_getEntityDet($apptDet['pas_email'], '2');\n// $invoMail = $mail->sendInvoice($this->User, $pasData, $apptDet);\n\n $errMsgArr = $this->_getStatusMessage(88, 1);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'apprAmount' => $finalAmount, 'dis' => round(($args['ent_distance'] / $this->distanceMetersByUnits), 2), 'avgSpeed' => round($avgSpeed, 2), 'qr' => $updateDetailsQry); //, 'calculatedAmount' => $amount\n }", "public function setAttendee($value)\n {\n $this->attendee = $value;\n }", "private function set_details() {\n if ($this->type != 'delivery') {\n $meetup = $this->retrieve([\n 'where' => [\n 'id' => $this->type,\n ],\n 'table' => 'meetups'\n ]);\n \n $this->time = \"{$meetup[0]['day']} {$meetup[0]['start_time']} - {$meetup[0]['end_time']}\";\n\n $this->update([\n 'time' => $this->time,\n ]);\n }\n }", "public function walk_in_reservation(Request $request, GuestDetail $guest_detail)\n {\n $guest_detail = new GuestDetail;\n $guest_detail->last_name = $request['last_name'];\n $guest_detail->first_name = $request['first_name'];\n $guest_detail->mi = $request['mi'];\n $guest_detail->email_address = $request['email_address'];\n $guest_detail->address = $request['address'];\n $guest_detail->contact_number = $request['contact_number'];\n $guest_detail->purpose = $request['purpose'];\n $guest_detail->gender = $request['gender'];\n $guest_detail->nationality = $request['nationality'];\n $guest_detail->check_in_date = date('Y-m-d', strtotime($request['check_in']));\n $guest_detail->check_out_date = date('Y-m-d', strtotime($request['check_out']));\n $guest_detail->save();\n\n $guest_id = DB::table('guest_details')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $date_start = date('Y-m-d', strtotime($request['check_in']));\n $date_end = date('Y-m-d', strtotime($request['check_out']));\n $interval = Carbon::parse($date_end)->diffInDays($date_start);\n\n $bookings = new Booking;\n $bookings->guest_id = $guest_id;\n $bookings->number_of_rooms = $request['number_of_rooms'];\n $bookings->grand_total = $interval;\n $bookings->payment_mode = 'Unpaid';\n $bookings->paid_status = 0;\n $bookings->viewed_status = 0;\n $bookings->save();\n\n for($i=0; $i < $request['number_of_rooms']; $i++)\n { \n $booking_id = DB::table('bookings')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $booking_details = new BookingDetail;\n \n $booking_details->booking_id = $booking_id;\n $booking_details->room_cat_id = $request['room_cat_id'];\n $booking_details->room_no = $request['room_no'];\n $booking_details->room_rate = $request['room_rate'];\n $booking_details->status = 'occupied';\n $booking_details->check_in = date('Y-m-d', strtotime($request['check_in']));\n $booking_details->check_out = date('Y-m-d', strtotime($request['check_out']));\n $booking_details->nights = $interval;\n $booking_details->total = ($request['room_rate']) * $interval;\n // $booking_details->total = ($request['room_rate'] * $request['number_of_rooms']) * $interval;\n $booking_details->save();\n\n $grand_total = BookingDetail::where('booking_id', $booking_id)->sum('total');\n $bookings = Booking::findOrFail($booking_id);\n $bookings->grand_total = $grand_total;\n $bookings->save();\n\n $accept_booking = new ConfirmedBooking;\n\n $accept_booking->booking_id = $booking_id;\n $accept_booking->room_cat_id = $request['room_cat_id'];\n $accept_booking->room_no = $request['room_no'];\n $accept_booking->room_rate = $request['room_rate'];\n $accept_booking->status = 'occupied';\n $accept_booking->check_in = date('Y-m-d', strtotime($request['check_in']));\n $accept_booking->check_out = date('Y-m-d', strtotime($request['check_out']));\n $accept_booking->nights = $interval;\n $accept_booking->total = ($request['room_rate']) * $interval;\n $accept_booking->save();\n\n }\n\n return ['bookings' => $bookings];\n }", "public function update($id){\n\t\tif( Authority::can('update', 'Event') ){\n\t\t\t$input = Input::all();\n\t\t\t$memory = $this->memory->update($id, $input);\n\t\t\treturn Redirect::route('memories.show', $memory->id);//->with('success', 'The new deceased has been created');\n\t\t}\n throw new NotAllowedException();\n\t}", "public function update(Request $request, $id)\n {\n $status = 'confirmed';\n $alert = 'status';\n $alertmessage = \"See you on the event\";\n\n if (isset($request->decline)) {\n $status = 'declined';\n $alertmessage = \"We're sad that you decline\";\n $alert = \"status_warning\";\n }\n if (isset($request->cancel)) {\n $status = 'canceled';\n $alertmessage = \"We're sad that you cancel\";\n $alert = \"status_warning\";\n }\n\n $data = [\n 'user_id' => Auth::id(),\n 'event_id' => $id,\n 'status' => $status\n ];\n\n $result = Attendance::checkUser(Auth::id(), $id);\n\n if (! is_null($result) and $result->count() == 1) {\n $attendance = Attendance::find($result->id);\n $attendance->status = $status;\n if ($attendance->save()) {\n return back()\n ->with([\n $alert => $alertmessage\n ]);\n }\n } else {\n $attendance = Attendance::create($data);\n if ($attendance->wasRecentlyCreated) {\n return back()\n ->with([\n $alert => $alertmessage\n ]);\n }\n }\n }", "public function disapprove(EventDisapproveAttendancePost $request, $id)\n {\n $eventParticipant = EventParticipant::findOrFail($id);\n\n\n /*\n | @Begin Transaction\n |---------------------------------------------*/\n \\DB::beginTransaction();\n\n\n /* Disapprove the event participant */\n if($eventParticipant->disapprove($request->input('reason'))) {\n\n $event = $eventParticipant->event;\n $user = $eventParticipant->participant;\n\n \n /* Notify the user */\n $user->notify(new EventParticipantWasDisapproved($event, $user, $request->input('reason')));\n\n\n /*\n | @End Transaction\n |---------------------------------------------*/\n \\DB::commit();\n\n\n return response()->json([\n 'response' => 1,\n 'status' => $eventParticipant->status,\n 'message' => $eventParticipant->renderStatus(),\n ]);\n }\n\n return response()->json([\n 'response' => 0,\n 'message' => 'There seems to be a problem disapproving the request'\n ]); \n }", "function checkinCheckoutAttendee($userId, $eventId, $checkedIn)\r\n{\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n \r\n $sqlCon = openDatabase();\r\n //$adminId = getLoggedInAdminId();\r\n \r\n // Make sure we can retrieve user session's admin id\r\n \r\n/*\r\n if (!$adminId) {\r\n $response['ok'] = false;\r\n $response['msg'] = \"Failed to retrieve logged in user id\";\r\n }\r\n else\r\n*/ {\r\n // TODO If checkin, then update TIMESTAMP as current timestamp\r\n // TODO If not checkin, set TIMESTAMP to NULL\r\n $checkinTime = $checkedIn ? \"now()\" : \"NULL\";\r\n $query = sprintf(\"UPDATE eventcheckin SET checked_in='%s', checkin_time=%s WHERE attendee_id=%s AND event_id=%s;\",\r\n SQLE($checkedIn), $checkinTime, SQLE($userId), SQLE($eventId));\r\n $result = mysql_query($query);\r\n\r\n $modifiedOk = (1 == mysql_affected_rows($sqlCon)); \r\n $response['ok'] = $modifiedOk;\r\n $response['msg'] = $modifiedOk ? \"OK\" : \"Error updating data\";\r\n }\r\n closeDatabase();\r\n \r\n return $response;\r\n}", "function UpdateEvents() {\n\t\tforeach ($this->data as $i => $row) {\n\t\t\tif (!is_null($row['EventId'])) {\n\t\t\t\t//check wheter event is assigned to calculated event. If it is take the calculated rating, otherwise set the rating to -0.5\n\t\t\t\tif (array_key_exists($i, $this -> rating)) {\n\t\t\t\t\t$rating = $this -> rating[$i];\n\t\t\t\t} else {\n\t\t\t\t\t$rating = -0.5;\n\t\t\t\t}\n\t\t\t\t//update all events\n\t\t\t\t$sql = \"UPDATE Event SET rating=\" . $rating . \" WHERE EventId=\" . $row['EventId'];\n\t\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\t\tif ($stmt -> execute()) {\n\t\t\t\t} else {\n\t\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\t\tnew Email('failed', 'to update event rating with EventId=' . $row['EventId'], $this -> id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this -> updateTask();\n\n\t}", "public function index(){\n\n\t\t//echo \"index\";\n\t\t//exit;\n\t\t//$leads = '{\"error\":false,\"member\":[{\"id\":\"1\",\"firstName\":\"first\",\"lastName\":\"last\",\"phoneNumber\":\"0987654321\",\"email\":\"email@yahoo.com\",\"owner\":{\"id\":\"10\",\"firstName\":\"first\",\"lastName\":\"last\"}}]}';\n\n\t\tSession::forget('AppUpdateSuccess');\n\t\tSession::forget('AppUpdateError');\n\t\t$inputArray = $cinputArray = array();\n\n\t\t//$input = $request->all();\n\t\t//$inputArray = $request->all();\n\n\t\tif(!empty($id)){\n\t\t\t$cinputArray['eventId'] = $id;\n\t\t}\n\t\tif(!empty($cinputArray)){\n\t\t\t$results = SELF::EditEventPost(\"http://106.51.0.187:8090/cgwfollowon/findevent\",$cinputArray);\n\t\t}\n\n\t\t$responseArray = array();\n\t\tif(!empty($results)){\n\t\t\t$responseArray = json_decode($results);\n\t\t}\n\n\t\t//print\"<pre>\";\n\t\t//print_r($responseArray);\n\t\t//exit;\n\n \t$userId = session()->get('userId');\n\n\t\tif(!empty($userId)){\n\t\t\treturn view('admin.event.event_edit');\n\t\t\t//return view('admin.users.add_user')->with('leads', json_decode($leads, true));\n\t\t}\n\t\telse{\n\t\t\treturn redirect('admin/login_user');\n\t\t}\n }", "public function update(Request $request, $id)\n {\n $announcement = Announcement::find($id);\n if ($announcement != null) {\n if (date($announcement->planned_time) < now()) {\n return redirect()->route('announcements.index');\n } else {\n if ($request->get('planned_time_on') == true) {\n $date = new DateTime($request->get('planned_time'));\n $hours = new DateTime($request->get('planned_time_time'));\n $planned_time = $date->format('Y-m-d') . ' ' . $hours->format('H:i:s');\n $request->merge(['planned_time' => $planned_time]);\n } else {\n $request->merge(['planned_time' => date_create('now')->format('Y-m-d H:i:s')]);\n $request->merge(['planned_time_on' => false]);\n }\n $request->merge(['user_id' => $request->user()->id]);\n $request->validate(['body' => 'required|string|max:65535', 'planned_time' => 'required_unless:planned_time_on,false|date_format:Y-m-d H:i:s|sometimes', 'planned_time_on' => 'boolean']);\n $announcement->update($request->all());\n return redirect()->route('announcements.index')->with('success', 'Announcement Edited successfully!');\n\n }\n }\n return abort('404', 'Announcement Not Found!');\n }", "public static function updateGroupEvent($request, $id, $event){\n $allDay = false;\n $start = \"\";\n $end = \"\";\n\n\n if($request->has('allDay')){\n $allDay = true;\n }else{\n $allDay = false;\n }\n\n\n if($request->eventStartDate == null && !$request->eventEndDate == null){\n $start = $request->oldStart;\n $end = $request->eventEndDate;\n }else if(!$request->eventStartDate == null && $request->eventEndDate == null){\n $start = $request->eventStartDate;\n $end = $request->oldEnd;\n }else if($request->eventStartDate == null && $request->eventEndDate == null){\n $start = $request->oldStart;\n $end = $request->oldEnd;\n }else{\n $start = $request->eventStartDate;\n $end = $request->eventEndDate;\n }\n\n\n\n $time_start = new DateTime($start);\n $time_end = new DateTime($end);\n $query = GroupEvents::where('user_id', $id)\n ->where('id', $event)\n ->update([\n 'event_title' => $request->eventTitle,\n 'event_description' => $request->eventDesc,\n 'full_day' => $allDay,\n 'time_start' => $time_start,\n 'time_end' => $time_end,\n 'color' => $request->eventColor,\n 'location' => $request->eventLocation,\n ]);\n }", "function customRegisterAttendee($attendee){\n $attendee_id = $attendee['user_id'];\n\n\t$result = mysql_query(\"DELETE FROM `\".DB_SCHEMA.\"`.`eventcheckin` WHERE \n`attendee_id`='\".$attendee_id.\"';\");\n\n if ($attendee['am']){\n $result = mysql_query(\"\n INSERT INTO `\".DB_SCHEMA.\"`.`eventcheckin` (`attendee_id`, \n`event_id`)\n VALUES (\".$attendee_id.\", 56);\n \");\n }\n if ($attendee['pm']){\n $result = mysql_query(\"\n INSERT INTO `\".DB_SCHEMA.\"`.`eventcheckin` (`attendee_id`, \n`event_id`)\n VALUES (\".$attendee_id.\", 57);\n \");\n }\n\n}", "public function enviteAttendee (Attendee $attendee) {\n\t\t\tif($this->isStillValid() == false) { return \"VipCode '{$this->vipCode}' já não é válido\"; }\n\t\t\t$attendee->setVipCode($this);\n\t\t\ttry {\n\t\t\t\t$attendee->saveEnvite();\n\t\t\t}\n\t\t\tcatch(Exception $error) {\n\t\t\t\t//write the logs in the application logs\n\t\t\t\t$error->getTrace();\n\t\t\t}\n\t\t}", "public function update(Request $input, $id)\n {\n $this->validate($input, [\n 'meeting_date'=>'required', \n 'meeting_start_time'=>'required',\n 'meeting_end_time'=>'required',\n 'purpose'=>'required',\n 'meeting_room'=>'required',\n ]);\n $bookingUpdate = bookings::find($id);\n $bookingUpdate->meeting_date = $input->meeting_date;\n $bookingUpdate->meeting_start_time = $input->meeting_start_time;\n $bookingUpdate->meeting_end_time = $input->meeting_end_time;\n $bookingUpdate->purpose = $input->purpose;\n $bookingUpdate->meeting_room = $input->meeting_room;\n // echo $post;\n $bookingUpdate->save();\n $bookings = bookings::all();\n if (Auth::user()->role=='user'){\n return view('welcome')->with('bookings', $bookings);\n }elseif (Auth::user()->role=='teamlead') {\n return view('teambookings')->with('bookings', $bookings);\n }else{\n return view('admindashboard')->with('bookings', $bookings);\n }\n // echo \"string\";\n }", "public function update(Request $request,WeekHolidayMaster $week_holiday_master)\n { \n DB::table('week_holiday')->where('week_holiday_master_id', $week_holiday_master->id)->delete();\n\n $week_holiday_master->update($request->all()); \n foreach ($request->checked_days as $key => $value) {\n WeekHoliday::create([\n 'day_name_id'=>intval($value),\n 'week_holiday_master_id'=>$week_holiday_master->id\n ]);\n }\n\n $request->session()->flash('status', 'Task was successful!');\n return redirect('/week_holiday');\n }", "public function update(Request $request, Appointment $appointment)\n {\n $id = Auth::id();\n if($appointment->user_id != $id){\n\n $appointment->user_id = $id;\n $appointment->statuses_id = 2;\n $appointment->save();\n session()->flash('message', 'Reservering succesvol geplaatst.');\n return redirect()->route('appointments.index');\n }else{\n\n $appointment->user_id = NULL;\n $appointment->statuses_id = 1;\n $appointment->save();\n session()->flash('message', 'Reservering succesvol geanulleerd.');\n return redirect()->route('appointments.index');\n }\n\n }", "public function postEventedit();", "function updateGameDetails( $dbData, $tournamentID ) {\n\n/* ... write the update back to the DB */\n $this->db->where( 'TournamentID', $tournamentID );\n $this->db->update( 'Tournament', $dbData );\n\n/* ... time to go */\n return;\n }", "public function updateEventData($data, $event_id, $main_organizers, $impl_partners) {\r\n$this->db->where('event_id', $event_id);\r\n$success = $this->db->update('events', $data);\r\nif ($success == 1) {\r\nif (count($main_organizers) > 0) {\r\n$this->saveMainOrganizer($event_id, $main_organizers);\r\n}\r\nif (count($impl_partners) > 0) {\r\n$this->saveImplPartners($event_id, $impl_partners);\r\n}\r\n}\r\nreturn $success;\r\n}", "public function update(Request $request, Appointments $appointments)\n {\n //\n }", "public function editAppointMent(appointmentClass $info,$id)\n { \n $values = array();\n $sqlUpdate=\"UPDATE appointment SET customer_name='\".$info->getCustomerName().\"',customer_mail='\".$info->getCustomerMail().\"',customer_id='\".$info->getCustomerID().\"',appointment_time='\".$info->getAppointment_time().\"',appointment_date='\".$info->getAppointment_date().\"' WHERE appointment_id='\".$id.\"'\";\n $this->execute($sqlUpdate,$values);\n }", "public function leave_exception(){\n $this->layout = 'dashboard';\n $user_id = $this->Session->read('LOGEDID');\n if($user_id==1){\n \n $staff_data = $this->Staff->find('all',array('fields'=>array('Staff.id','Staff.staff_name')));\n $this->set('staff_listing_excemption',$staff_data);\n }\n \n }", "function workshop_view_attendees_list() {\n // Allow Attendees to be deleted\n if ( isset( $_GET['action'], $_GET[id], $_GET['_wpnonce'] ) && 'delete' == $_GET['action'] ) {\n // Make sure the user is who they say they are\n if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'attendee-delete' ) ) {\n wp_die( esc_html__( \"Tsk, tsk. You can't do that.\", 'workshop' ) );\n }\n\n // Make sure the guest author actually exists\n } else {\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"icon-users\"><br></div>';\n echo '<h2>' . __( 'Attendees', 'workshop' );\n // @todo caps check for creating a new user\n $add_new_link = admin_url( \"post-new.php?post_type=attendee\" );\n echo '<a href=\"' . esc_url( $add_new_link ) . '\" class=\"add-new-h2\">' . esc_html__( 'Add New', 'workshop' ) . '</a>';\n echo '</h2>';\n $attendee_list_table = new Workshop_Attendees_WP_List_Table();\n $attendee_list_table->prepare_items();\n echo '<form id=\"workshop-attendees-filter\" action=\"\" method=\"GET\">';\n echo '<input type=\"hidden\" name=\"page\" value=\"view-workshop-attendees\" />';\n $attendee_list_table->display();\n echo '</form>';\n echo '</div>';\n }\n}", "public function update(Request $request, $id)\n {\n\n\n $training = Training::findOrFail($id);\n\n if($request->trainer){\n $trainer_id = $request->trainer;\n }else{\n $trainer_id = $training->user_id;\n }\n\n\n $schedule = $request->get('schedule');\n $splitHours = explode(\"-\",$schedule);\n\n $start = new Carbon($splitHours[0]);\n $end = new Carbon($splitHours[1]);\n \n $trainings = Training::where('day' , $request->day)->where('id' , '!=' , $training->id)->get();\n\n $flag = true;\n\n foreach($trainings as $trainingAll){\n $arrayHours = $this->comprobationArray($trainingAll->start , $trainingAll->end);\n $flag = $this->coincideHours($arrayHours , $start , $end);\n if(!$flag){\n $notification = 'Imposible editar entreno, las horas coindicen con otro entreno. Por favor, escoja otro horario.';\n return redirect('/trainings/'.$training->id.'/edit')->with(compact('notification'));\n }\n }\n\n if($flag){\n $data = $request->only('day', 'capacity' , 'description') + [ 'user_id' => $trainer_id , 'start' => $splitHours[0] , 'end' => $splitHours[1] ];\n\n $training->fill($data);\n $training->save(); \n\n $notification = 'El entreno se ha actualizado correctamente.';\n return redirect('/trainings')->with(compact('notification'));\n } \n\n }", "function attendees()\n {\n if( $this->input->post('event') !== null )\n {\n $data['title'] = 'Cadet Attendance';\n $this->load->model('attendance_model');\n $this->load->model('cadetevent_model');\n\n $data['attendees'] = $this->attendance_model->get_event_attendance( $this->input->post('event') );\n $data['event'] = $this->cadetevent_model->get_cadetevent( $this->input->post('event') );\n $data['test'] = $this->input->post('event');\n\n // Loads the home page \n $this->load->view('templates/header', $data);\n $this->load->view('pages/viewattendees.php');\n $this->load->view('templates/footer'); \n }\n else\n {\n show_error('You must select an event to view the attendees of that event.');\n }\n }", "public function actionSaveAttendee()\n {\n \t$this->requirePostRequest();\n\n \tforeach (craft()->request->getPost() as $key => $value) {\n \t\t// Cleanse the data as much as possible\n \t\t$encodedValue = mb_convert_encoding($value, 'UTF-8', 'UTF-8');\n \t\t$encodedValue = htmlspecialchars($value, ENT_QUOTES);\n \t\t$encodedValue = htmlentities($encodedValue);\n\n \t\t$data[substr($key, 9)] = $encodedValue;\n \t}\n\n\t\t$attendee = new MightyEvents_AttendeeModel();\n\t\t$attendee->name = $data['name'];\n\t\t$attendee->email = $data['email'];\n\t\t$attendee->event_id = $data['event_id'];\n\t\t$attendee->seats = $data['seats'];\n\n\t\t// You need to declare a rules() method in your model for the\n\t\t// validate method to work.\n\t\tif ($attendee->validate()) {\n\t\t\tcraft()->mightyEvents_attendees->SaveAttendee($attendee);\n\t\t\tcraft()->userSession->setNotice('Your reservation was successful!');\n\t\t\treturn;\n\t\t}\n\n\t\tcraft()->userSession->setError('Something wasn\\'t right about your reservation. Try submitting it again.');\n\t\tcraft()->urlManager->setRouteVariables(array(\n\t\t\t'attendee' => $attendee\n\t\t));\n\n\t\t$this->redirectToPostedUrl();\n }", "public function actionUpdate($id) {\n $model_appointment = Appointment::findOne(['id' => $id]);\n $model = PortCallData::findOne(['appointment_id' => $id]);\n $model_draft = PortCallDataDraft::findOne(['appointment_id' => $id]);\n $model_rob = PortCallDataRob::findOne(['appointment_id' => $id]);\n $model_additional = PortCallDataAdditional::findAll(['appointment_id' => $id]);\n\n $model_imigration = ImigrationClearance::findOne(['appointment_id' => $id]);\n $model_port_break = PortBreakTimings::findAll(['appointment_id' => $id]);\n if (empty($model_appointment))\n throw new \\yii\\web\\HttpException(404, 'This Appointment could not be found.Eroor Code:1001');\n $model_add = new PortCallDataAdditional();\n\n if ($this->Check($id, $model, $model_draft, $model_rob, $model_imigration)) {\n $model = PortCallData::findOne(['appointment_id' => $id]);\n $model_draft = PortCallDataDraft::findOne(['appointment_id' => $id]);\n $model_rob = PortCallDataRob::findOne(['appointment_id' => $id]);\n $model_imigration = ImigrationClearance::findOne(['appointment_id' => $id]);\n $model_port_break = PortBreakTimings::findAll(['appointment_id' => $id]);\n } else {\n\n throw new \\yii\\web\\HttpException(404, 'This Appointment could not be found.Eroor Code:1002');\n }\n\n if ($model->load(Yii::$app->request->post()) && $model_imigration->load(Yii::$app->request->post())) {\n $this->saveportcalldata($model, $model_imigration);\n $model_additional = PortCallDataAdditional::findAll(['appointment_id' => $id]);\n } else if ($model_rob->load(Yii::$app->request->post()) && $model_draft->load(Yii::$app->request->post())) {\n $this->saveportcalldraftrob($model_rob, $model_draft);\n }\n\n //$model_immigration = new ImigrationClearance();\n return $this->render('update', [\n 'model' => $model,\n 'model_draft' => $model_draft,\n 'model_rob' => $model_rob,\n 'model_add' => $model_add,\n 'model_imigration' => $model_imigration,\n 'model_appointment' => $model_appointment,\n 'model_additional' => $model_additional,\n 'model_port_break' => $model_port_break,\n ]);\n }", "public function update($id)\n\t{\n\t\t//\n\t\t$v = Validator::make(Request::all(), [\n 'name' => 'required|max:50', \n 'hall_id' => 'required',\n 'exhibition_id' => 'required', \n ]);\n \n\t if ($v->fails())\n\t {\n\t return redirect()->back()->withErrors($v->errors())\n\t \t\t\t\t\t\t ->withInput();\n\t }else{\n $id=Request::get('id');\n\t\t\t$exhibitionevent = ExhibitionEvent::find($id);\n\t\t $exhibitionevent->name = Request::get('name');\n\t\t $exhibitionevent->desc = Request::get('desc');\n\t\t $exhibitionevent->start_time = Request::get('start_time');\n\t\t $exhibitionevent->end_time = Request::get('end_time');\n\t\t // $exhibitionevent->hall_id = Request::get('hall_id');\n\t\t $exhibitionevent->exhibition_id = Request::get('exhibition_id');\n\t\t\t$exhibitionevent->save();\n\n\t\t\t$exhibitioneventhall=ExhibitionEventHall::find($id); \n\t\t\t$exhibitioneventhall->hall_id=Request::get('hall_id');\n\t\t\t$exhibitioneventhall->save();\n\n\n\t\t\treturn redirect('exhibitionevents');\n\t }\n\t}", "public function updateDeliveries()\n {\n $userId = Authorizer::getResourceOwnerId();\n $agent = Agent::where('user_id', $userId)->first();\n if(!$agent)\n return Response::json(\"Error\", 400);\n\n $deliveriesJSON = Input::get('deliveries');\n\n if(!empty($deliveriesJSON)) {\n\n $deliveries = json_decode($deliveriesJSON, true);\n\n if($deliveries !== null && count($deliveries) > 0)\n {\n foreach ($deliveries as $id => $updates)\n {\n $delivery = Delivery::find(intval($id));\n\n if($delivery)\n {\n // An agent can modify just his own deliveries\n if($delivery->agent_id != $agent->id)\n return Response::json(\"Error\", 403);\n\n // Estimated times\n\n $notifySender = false;\n $notifyRecipient = false;\n\n\n if(!empty($updates[\"estimated_pickup\"]))\n {\n if(static::validateDate($updates[\"estimated_pickup\"])){\n\n if($delivery->estimated_pickup != $updates[\"estimated_pickup\"])\n {\n if(static::dateDifference($delivery->estimated_pickup, $updates[\"estimated_pickup\"]) > 300)\n {\n $notifySender = true;\n }\n $delivery->estimated_pickup = $updates[\"estimated_pickup\"];\n }\n\n }\n }\n\n if(!empty($updates[\"estimated_delivery\"]))\n {\n if(static::validateDate($updates[\"estimated_delivery\"])){\n if ($delivery->estimated_delivery != $updates[\"estimated_delivery\"])\n {\n if(static::dateDifference($delivery->estimated_delivery, $updates[\"estimated_delivery\"]) > 300)\n {\n $notifyRecipient = true;\n }\n $delivery->estimated_delivery = $updates[\"estimated_delivery\"];\n }\n }\n }\n\n // Actual times\n if(!empty($updates[\"pickup_time\"]))\n {\n if(static::validateDate($updates[\"pickup_time\"]))\n {\n $delivery->pickup_time = $updates[\"pickup_time\"];\n\n if($delivery->state == 0) \n $delivery->state = 1;\n }\n }\n\n if(!empty($updates[\"delivery_time\"]))\n {\n if(static::validateDate($updates[\"delivery_time\"]))\n {\n $delivery->delivery_time = $updates[\"delivery_time\"];\n\n if($delivery->state < 2) \n $delivery->state = 2;\n }\n }\n\n // // Delivery state (explicit)\n // if($updates[\"state\"] != null)\n // {\n // $state = intval($updates[\"state\"]);\n // if($state < 0 || $state > 2)\n // return Response::json(\"Error\", 400);\n\n // $delivery->state = $state;\n // }\n\n $delivery->save();\n\n if($notifySender) {\n $estimated_pickup = (new DateTime($delivery->estimated_pickup))->format('H:i');\n Mail::queue('emails.updatesender', ['tracking_code' => $delivery->tracking_code, 'estimated_pickup' => $estimated_pickup], function($message) use($delivery)\n {\n $message->from('support@bikeponyexpress.me', 'BikePonyExpress');\n $message->to($delivery->sender_email)->subject('BikePonyExpress: Pickup time updated!');\n });\n }\n\n if($notifyRecipient) {\n $estimated_delivery = (new DateTime($delivery->estimated_delivery))->format('H:i');\n Mail::queue('emails.updaterecipient', ['tracking_code' => $delivery->tracking_code, 'estimated_delivery' => $estimated_delivery], function($message) use($delivery)\n {\n $message->from('support@bikeponyexpress.me', 'BikePonyExpress');\n $message->to($delivery->recipient_email)->subject('BikePonyExpress: Delivery time updated!');\n });\n }\n }\n else\n {\n return Response::json(\"Error\", 400);\n }\n }\n\n $updatedDeliveries = $agent->deliveries()->where('state', '<', 2)->orderBy('updated_at', 'desc')->get();\n return !$updatedDeliveries? Response::json(\"Error\", 400) : $updatedDeliveries;\n }\n }\n\n return Response::json(\"Error\", 400);\n }", "function wpbs_update_booking($booking_id, $data)\n{\n\n return wp_booking_system()->db['bookings']->update($booking_id, $data);\n\n}", "public function updateStep3(Request $request, $id)\n {\n $this->validate($request, [\n 'prog1' => 'required',\n 'dateArrive' => 'required',\n 'dateStartClass' => 'required',\n 'dateFinishClass' => 'required',\n //'dateHomestay' => 'required',\n ]);\n\n $advisoryEnroll = AdvisoryEnrollment::find($id);\n $advisoryEnroll->opcion1_asesoria_informacion_enviada_id = $request->input('prog1'); \n $advisoryEnroll->opcion2_asesoria_informacion_enviada_id = $request->input('prog2'); \n $advisoryEnroll->opcion3_asesoria_informacion_enviada_id = $request->input('prog3'); \n $advisoryEnroll->fecha_llegada = date(\"Y-m-d\", strtotime( $request->input('dateArrive'))); \n $advisoryEnroll->fecha_inicio_clases = date(\"Y-m-d\", strtotime( $request->input('dateStartClass'))); \n $advisoryEnroll->fecha_fin_clases = date(\"Y-m-d\", strtotime( $request->input('dateFinishClass'))); \n $advisoryEnroll->fecha_inicio_homestay = $request->input('dateHomestay') != '' ? date(\"Y-m-d\", strtotime( $request->input('dateHomestay'))) : null; \n $advisoryEnroll->save();\n\n $advisory = Advisory::find($advisoryEnroll->asesoria_id);\n $student = Student::find($advisory->estudiante_id);\n $advStudent = $this->resolveFullName($student);\n\n $advisory_state_code = $request->input('advStateCod');\n\n $progs = $this->getDocuments($advisoryEnroll->asesoria_id)->pluck('nombre', 'asesoria_informacion_enviada_id');\n\n\n return view('advisory.editStep3', [\n 'advisoryEnroll'=>$advisoryEnroll,\n 'progs'=>$progs->all(),\n 'advState'=>$advisory_state_code,\n 'advStudent'=>$advStudent\n ]);\n }", "public function update(Request $request, appointment $appointment)\n {\n //\n }", "public function save_appointment_outcomes ()\n {\n if (post_data('appointment_id') == NULL)\n {\n return;\n }\n $table_data = array();\n\n $app_return_response = $app_status = array();\n\n $table_data['id'] = post_data('id') != NULL ? post_data('id') : 0;\n $table_data['appointment_id'] = post_data('appointment_id');\n\t\t\n /*--------------------Updating third party's API----------------------------------------*/\n /*Updating Refferal conclusion*/\n\t\tif (post_data('patient_reference') != NULL)\n\t\t{\n\t\t\t$table_data['outcome_description']['patient_reference'] = post_data('patient_reference') != NULL ? post_data('patient_reference') : NULL;\n\t\t\t$app_return_response['referal_response'] = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n\t\t\t\t\"action\" => \"postoutcome\",\n\t\t\t\t\"patientid\" => post_data('patient_id'),\n\t\t\t\t\"appointmentid\" => post_data('appointment_id'),\n\t\t\t\t\"outcomemaincode\" => post_data('patient_reference'),\n\t\t\t)));\n\t\t}\n\t\t\n\t\t/*Updating appointment conclusion*/\n\t\tif (post_data('appointment_conclusion') != NULL)\n\t\t{\n\t\t\t$table_data['outcome_description']['appointment_conclusion'] = post_data('appointment_conclusion') != NULL ? post_data('appointment_conclusion') : NULL;\n\t\t\t$app_return_response['outcome_response'] = post_curl_request(THIRD_PARTY_API_URL, json_encode(array(\n\t\t\t\t\"action\" => \"postoutcome\",\n\t\t\t\t\"patientid\" => post_data('patient_id'),\n\t\t\t\t\"appointmentid\" => post_data('appointment_id'),\n\t\t\t\t\"outcomemaincode\" => post_data('appointment_conclusion'),\n\t\t\t)));\n\t\t}\n\t\t/*-------------------------Updating third party's Database Ends-------------------------*/\n\t\tif (!empty($app_return_response))\n\t\t{\n\t\t\tforeach ($app_return_response as $key => $val)\n\t\t\t{\n\t\t\t\tif (!empty($val) && json_decode($val) && !empty(json_decode($val)->Status) && json_decode($val)->Status == 1)\n\t\t\t\t{\n\t\t\t\t\t$app_status[$key] = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$app_status[$key] = FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$table_data['outcome_description'] = !empty($table_data['outcome_description']) ? json_encode($table_data['outcome_description']) : NULL;\n\t\t$presc_id = $this->appointment_model->save_prescription($table_data);\n \n exit(json_encode(array(\n 'presc_id' => $presc_id,\n 'app_status' => $app_status,\n )));\n }", "public function edit(Eventpartners $eventpartners)\n {\n //\n }", "public function update(Agenda $agenda)\n {\n //\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function onAfterDelete()\n {\n parent::onAfterDelete();\n $this->createAudit($this->owner->toMap());\n }", "public function update(Request $request, $id)\n {\n $user = Auth::user();\n\n if(!$request -> name && !$request -> schedule && !$request -> description && !$request -> image_name\n && !$request -> volunteer_id){\n \n flash('At least one field is required.') -> error();\n return redirect() -> route('shows.edit',['id' => $id]) \n -> with('user', $user -> name) \n -> with('sales', $this -> sales)\n -> with('events', $this -> events);\n }\n \n else{\n $show = Show::find($id);\n\n $update = array();\n try{\n if(!empty($request -> volunteer_id)){\n foreach($request -> volunteer_id as $id){\n $volunteer = Volunteer::find($id);\n if(empty($volunteer) && $request -> image_name){\n if(file_exists(public_path() . '/images/shows/' . $request -> image)){\n Storage::delete(public_path() . '/images/shows/' . $request -> image);\n }\n flash('This volunteer doesnt exists. Please update the event and add a valid volunteer.') -> error();\n return redirect() -> route('dashboard') \n -> with('user', $user -> name) \n -> with('sales', $this -> sales)\n -> with('events', $this -> events);\n }\n }\n foreach($request -> volunteer_id as $id){\n $show -> volunteers() -> attach($id);\n }\n }\n \n if(!empty($request -> name)){\n $update['name'] = $request -> name;\n }\n \n if(!empty($request -> schedule)){\n $update['schedule'] = $request -> schedule;\n }\n \n if(!empty($request -> description)){\n $update['description'] = $request -> description;\n }\n\n if($request -> image_name){\n if(file_exists(public_path() . '/images/shows/' . $show -> image)){\n Storage::delete(public_path() . '/images/shows/' . $show -> image);\n }\n $update['image'] = $request -> image_name;\n }\n\n $show -> update($update);\n }\n catch(QueryException $e){\n \\Log::error('Error updating show: '.$e);\n if($request -> image_name){\n if(file_exists(public_path() . '/images/shows/' . $request -> image)){\n Storage::delete(public_path() . '/images/shows/' . $request -> image);\n }\n }\n flash('Ops! An error has ocurred. Please try again.') -> error();\n return redirect() -> route('shows.index') \n -> with('user', $user -> name) \n -> with('sales', $this -> sales)\n -> with('events', $this -> events);\n }\n \n flash('The show has been updated correctly.') -> success();\n return redirect() -> route('dashboard') \n -> with('user', $user -> name) \n -> with('sales', $this -> sales)\n -> with('events', $this -> events);\n }\n }", "public function postUpdatetimeline(){\n\n\t\tif(!Session::has('room_id') || !Session::has('service_id')){\n\t\t\treturn 3;\n\t\t}\n\t\t$room = Session::get('room_id');\n\t\t$service = Session::get('service_id');\n\t\tSession::forget('room_id');\n\t\tSession::forget('service_id');\n\t\t\n\t\t$top_date = Input::get('sdate');\n\t\t$bottom_date = Input::get('edate');\n\t\t$from_date = date('Y-m-d', strtotime(Input::get('from').' 0 day'));\n\t\t$to_date = date('Y-m-d', strtotime(Input::get('to').' 0 day'));\n\n\t\t//reads the end date of editing time line block\n\t\t$end_date = DB::table('room_price_calenders')\n\t\t\t->where('start_date','=',$from_date)\n\t\t\t->where('room_type_id','=',$room)\n\t\t\t->where('service_id','=',$service)\n\t\t\t->get();\n\n\t\t//replacing existing time line with a single price and discount\n\n\t\tif($top_date >= $from_date && $bottom_date <= $to_date){\n\n\t\t\t//deletes ovelapping records\n\t\t\tDB::table('room_price_calenders')\n\t\t\t->where('room_type_id','=',$room)\n\t\t\t->where('service_id','=',$service)\n\t\t\t->delete();\n\n\t\t\t//read from date\n\t\t\t$date = Input::get('from');\t\n\n\t\t\t//convert from date to dateTime format\n\t\t\t$from = new DateTime($date );\n\t\t\t//convert to date to dateTime format\n\t\t\t$to = new DateTime(Input::get('to'));\n\n\t\t\t//finds the days between from and to dates\n\t\t\t$days = $to->diff($from)->format(\"%a\");\t\t\n\t\t\t\n\t\t\t//loop inserts new rows for all days between from and to dates\n\t\t\tfor ($i=0; $i <= $days; $i++) { \n\t\t\t\t$calendar = new Calendar;\n\t\t\t\t$calendar->room_type_id = $room;\n\t\t\t\t$calendar->service_id = $service;\n\t\t\t\t$calendar->start_date = $date;\n\t\t\t\t$calendar->end_date = new DateTime($to_date);\n\t\t\t\t$calendar->price = Input::get('price');\n\t\t\t\t$calendar->discount_rate = Input::get('discount');\t\t\t\n\t\t\t\t$calendar->save();\n\n\t\t\t\t//get next date\n\t\t\t\t$date = date('Y-m-d', strtotime($date.' +1 day'));\t\n\t\t\t}\n\n\t\t\treturn 1;\t\n\t\t}\n\n\t\t//replacing existing block(s) in time line\n\t\telseif($top_date < $from_date || $bottom_date > $to_date){\n\n\t\t\t\n\n\t\t\t//deletes ovelapping records\n\t\t\tDB::table('room_price_calenders')\n\t\t\t\t->where('room_type_id','=',$room)\n\t\t\t\t->where('service_id','=',$service)\n\t\t\t\t->where('start_date','>=',$from_date)\n\t\t\t\t->where('start_date','<=',$to_date)\n\t\t\t\t->delete();\n\t\t\t//read from date\n\t\t\t$date = $from_date;\t\n\n\t\t\t//convert from date to dateTime format\n\t\t\t$from = new DateTime($date );\n\t\t\t//convert to date to dateTime format\n\t\t\t$to = new DateTime(Input::get('to'));\n\n\t\t\t//finds the days between from and to dates\n\t\t\t$days = $to->diff($from)->format(\"%a\");\t\t\n\t\t\t\n\t\t\t//loop inserts new rows for all days between from and to dates\n\t\t\tfor ($i=0; $i <= $days; $i++) { \n\t\t\t\t$calendar = new Calendar;\n\t\t\t\t$calendar->room_type_id = $room;\n\t\t\t\t$calendar->service_id = $service;\n\t\t\t\t$calendar->start_date = $date;\n\t\t\t\t$calendar->end_date = new DateTime($to_date);\n\t\t\t\t$calendar->price = Input::get('price');\n\t\t\t\t$calendar->discount_rate = Input::get('discount');\t\t\t\n\t\t\t\t$calendar->save();\n\n\t\t\t\t//get next date\n\t\t\t\t$date = date('Y-m-d', strtotime($date.' +1 day'));\t\n\t\t\t}\n\n\n\t\t\t//change end_dates of existing block \n\t\t\tDB::table('room_price_calenders')\n\t\t\t\t->where('room_type_id','=',$room)\n\t\t\t\t->where('service_id','=',$service)\n\t\t\t\t->where('start_date','<',$from_date)\n\t\t\t\t->where('end_date','=', $end_date[0]->end_date)\n\t\t\t\t->update(['end_date'=>date('Y-m-d', strtotime($from_date.' -1 day'))]);\n\n\t\t\treturn 1;\n\t\t}else{\n\t\t\tif($top_date = $from_date){\n\t\t\t\t//deletes ovelapping records\n\t\t\t\tDB::table('room_price_calenders')\n\t\t\t\t\t->where('room_type_id','=',$room)\n\t\t\t\t\t->where('service_id','=',$service)\n\t\t\t\t\t->where('start_date','=',$top_date)\n\t\t\t\t\t->delete();\n\t\t\t}\n\t\t\tif ($bottom_date = $to_date) {\n\t\t\t\t//deletes ovelapping records\n\t\t\t\tDB::table('room_price_calenders')\n\t\t\t\t\t->where('room_type_id','=',$room)\n\t\t\t\t\t->where('service_id','=',$service)\n\t\t\t\t\t->where('start_date','=',$bottom_date)\n\t\t\t\t\t->delete();\n\n\t\t\t\t//change end_dates of existing block \n\t\t\t\tDB::table('room_price_calenders')\n\t\t\t\t\t->where('room_type_id','=',$room)\n\t\t\t\t\t->where('service_id','=',$service)\n\t\t\t\t\t->where('end_date','=', $to_date)\n\t\t\t\t\t->update(['end_date'=>date('Y-m-d', strtotime($to_date.' -1 day'))]);\n\t\t\t}\n\n\t\t\t//read from date\n\t\t\t$date = $from_date;\t\n\n\t\t\t//convert from date to dateTime format\n\t\t\t$from = new DateTime($date );\n\t\t\t//convert to date to dateTime format\n\t\t\t$to = new DateTime(Input::get('to'));\n\n\t\t\t//finds the days between from and to dates\n\t\t\t$days = $to->diff($from)->format(\"%a\");\t\t\n\t\t\t\n\t\t\t//loop inserts new rows for all days between from and to dates\n\t\t\tfor ($i=0; $i <= $days; $i++) { \n\t\t\t\t$calendar = new Calendar;\n\t\t\t\t$calendar->room_type_id = $room;\n\t\t\t\t$calendar->service_id = $service;\n\t\t\t\t$calendar->start_date = $date;\n\t\t\t\t$calendar->end_date = new DateTime($to_date);\n\t\t\t\t$calendar->price = Input::get('price');\n\t\t\t\t$calendar->discount_rate = Input::get('discount');\t\t\t\n\t\t\t\t$calendar->save();\n\n\t\t\t\t//get next date\n\t\t\t\t$date = date('Y-m-d', strtotime($date.' +1 day'));\t\n\t\t\t}\n\n\t\t\treturn 1;\n\n\t\t}\n\n\t\n\t\treturn 3;\t\n\t}", "public function update(Request $request, $id)\n {\n $date = explode(\" - \", request()->date_leave, 2);\n \n $dateStart = Carbon::parse($date[0]);\n $dateEnd = Carbon::parse($date[1]);\n $date1 = date('Y-m-d', strtotime($dateStart->toDateTimeString()));\n $date2 = date('Y-m-d', strtotime($dateEnd->toDateTimeString()));\n\n $period = CarbonPeriod::create($date1, $date2);\n\n // Iterate over the period\n $dates = [];\n foreach ($period as $date) {\n array_push($dates, $date->format('Y-m-d'));\n }\n\n $leave = Leave::find($id);\n $leave->users_id = request()->users_id;\n $leave->date_leave = json_encode($dates);\n $leave->amount = count($dates);\n $leave->status = request()->status;\n $leave->periode_id = request()->periode_id;\n\n // bersihkan data sebelumnya\n $leaveOld = Leave::findOrFail($id);\n foreach(json_decode($leaveOld->date_leave) as $date){\n $dateLeave = Carbon::parse($date);\n $getDays = Days::where('name_day', $dateLeave->format('l'))->first();\n $getSchedule = Schedule::where('users_id', $leave->users_id)->where('days_id', $getDays->id)->first();\n \n if($getSchedule){ // jika ada jadwalnya, maka create\n $dataAttendance = Attendance::whereDate('start',$date)->where('user_id', $leave->users_id)->first();\n if($dataAttendance){\n $dataAttendance->delete();\n }\n }\n }\n\n if(request()->status == 'approved'){\n foreach($dates as $date){\n $dateLeave = Carbon::parse($date);\n $getDays = Days::where('name_day', $dateLeave->format('l'))->first();\n $getSchedule = Schedule::where('users_id', $leave->users_id)->where('days_id', $getDays->id)->first();\n \n if($getSchedule){ // jika ada jadwalnya, maka create\n Attendance::create([\n \"user_id\" => $leave->users_id,\n // \"user_id\" => 1,\n \"start\" => Carbon::parse($date.' '.$getSchedule->clock_in)->addHour(7),\n \"end\" => Carbon::parse($date.' '.$getSchedule->clock_out)->addHour(7),\n \"is_on_area\" => \"0\",\n \"hours\" => $getSchedule->hours,\n \"note_start\" => '',\n \"note_end\" => '',\n \"status\" => 'cuti'\n ]);\n }\n }\n } else {\n foreach($dates as $date){\n $dateLeave = Carbon::parse($date);\n $getDays = Days::where('name_day', $dateLeave->format('l'))->first();\n $getSchedule = Schedule::where('users_id', $leave->users_id)->where('days_id', $getDays->id)->first();\n \n if($getSchedule){ // jika ada jadwalnya, maka create\n $dataAttend = Attendance::whereDate('start',$date)->where('user_id', $leave->users_id)->first();\n if($dataAttend){\n $dataAttend->delete();\n }\n }\n }\n }\n\n $leave->note = request()->note;\n $leave->request_to = 1;\n $leave->note_from_manager = 'note_from_manager';\n $leave->save();\n\n // update balance\n $leaveStaf = LeaveStaf::where('users_id', $leave->users_id)->where('periode_id', request()->periode_id)->first();\n \n if(request()->status == \"approved\"){\n $leaveStaf->balance = $leaveStaf->balance - $leave->amount;\n $leaveStaf->save();\n } else if(request()->status == \"rejected\") {\n $leaveStaf->balance = $leaveStaf->balance + $leave->amount;\n $leaveStaf->save();\n }\n\n if($leave){\n return redirect()->route('leave.index')->with('success','Data berhasil diedit!');\n }\n\n return redirect()->route('leave.create')->with('danger','Terjadi masalah!');\n }", "public function changeStatus($id, $statid, AppAssigned $mailer)\n {\n $user = Auth::user();\n $ticket = Ticket::where('id', $id)->first();\n $assignee = User::where('id', $ticket->assignee)->first();\n $created_by = User::where('id', $ticket->created_by)->first();\n //$mailer->sendStatusChanged($created_by);\n $supervisor = User::where('role', 1)->where('agency_id', $assignee->agency_id)->first();\n\n /*\n * In Process\n */\n if($statid == 2){\n if($ticket->status == 5 && ($user->role == 0 || $user->id == $supervisor->id)){\n $ticket->status = $statid;\n $ticket->save();\n //email\n $status = 'Reopened ticket';\n //$mailer->sendStatusChanged($created_by);\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' reopened ticket.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('in-process-tickets')->with('message', 'Successfully reopened ticket!');\n }\n else if($ticket->status != 5 && ($user->role == 0 || $user->id == $supervisor->id)){\n return redirect()->back()->with('error', 'The ticket you are reopening is not closed in the first place!');\n }\n else if($ticket->status == 3 && $user->role == 4){\n $ticket->status = $statid;\n\n $dept = Department::where('id', $ticket->dept_id)->first();\n $deptrep = User::where('id', $dept->dept_rep)->first();\n $ticket->assignee = $deptrep->id;\n\n $ticket->save();\n //email\n //$mailer->sendStatusChanged($created_by);\n\n //email\n //$mailer->sendStatusChanged($created_by);\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' of '.$dept->dept_name.' is now processing the ticket.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n\n //email\n $mailer->sendStatusChanged($created_by);\n return redirect()->back()->with('message', 'Ticket now in process.'); \n }\n if($ticket->status == 7 && $user->role < 4){\n if($ticket->assignee==$user->id){\n $ticket->status = $statid;\n $ticket->save();\n //email\n $status = 'Re-process ticket';\n //$mailer->sendStatusChanged($created_by);\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' re-process ticket.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('in-process-tickets')->with('message', 'Now re-processing ticket!');\n }\n else redirect()->back()->with('error', \"You don't have the permission to process this ticket!\");\n }\n else return redirect()->back()->with('error', \"You don't have the permission to reopen a ticket!\");\n }\n\n /*\n * Pending (Escalated)\n */\n else if($statid == 3){\n if($user->id == $ticket->assignee || $user->id == $supervisor->id){\n if($ticket->status == 2){\n $ticket->status = $statid;\n $ticket->save();\n //email\n //$mailer->sendStatusChanged($created_by);\n\n //$dept = Department::where('id', $ticket->dept_id)->first();\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' changed ticket status to pending.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('pending-tickets')->with('message', 'Successfully changed ticket status to pending!');\n }\n return redirect()->back()->with('error', \"This ticket's cannot be changed to pending. Only tickets in process can be changed.\");\n }\n else return redirect()->back()->with('error', \"You don't have the permission to change the status of this ticket!\");\n }\n\n /*\n * Cancel\n */\n else if($statid==4){\n if($user->role == 0){\n $ticket->status = $statid;\n $ticket->save();\n //email\n //$mailer->sendStatusChanged($created_by);\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' cancelled the ticket.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('/')->with('message', 'Successfully cancelled ticket!');\n }\n else return redirect()->back()->with('error', \"You have no permission to cancel this ticket!\");\n }\n\n /*\n * Close\n */\n /*else if($statid==5){\n if($user->id == $ticket->assignee || $user->role < 2){\n\n if($ticket->category==NULL)\n return redirect()->back()->with('error', 'Please set category first before closing the ticket!');\n\n $ticket->status = $statid;\n $ticket->save();\n //$mailer->sendStatusChanged($created_by);\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' closed the ticket.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('closed-tickets')->with('message', 'Successfully closed ticket!');\n }\n else return redirect()->back()->with('error', 'You have no permission to close this ticket!');\n }*/\n\n /*\n * Escalate\n */\n else if($statid==6){\n if($user->id == $ticket->assignee || $user->id == $supervisor->id){\n if($ticket->status == 1)\n return redirect()->back()->with('error', \"Ticket has to be assigned first before it can be escalated!\");\n else if($ticket->status == 2){\n $rep = User::where('agency_id', $ticket->dept_id)->where('role', 4)->get();\n\n if(count($rep)==0)\n return redirect()->back()->with('error', 'Ticket cannot be escalated since agency has no representative yet.');\n\n $ticket->assignee = NULL;\n $ticket->save();\n\n $dept = Department::where('id', $ticket->dept_id)->first();\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ' escalated the ticket to '.$dept->dept_name.'.',\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('in-process-tickets')->with('message', 'Successfully escalated ticket!');\n }\n else if($ticket->status > 2)\n return redirect()->back()->with('error', 'This ticket cannot be escalated. Only tickets in process can be escalated.');\n\n }\n else return redirect()->back()->with('error', \"You don't have the permission to escalate this ticket!\");\n }\n\n else if($statid==7){\n if($user->id == $ticket->assignee || $user->id == $supervisor->id){\n if($ticket->status == 1)\n return redirect()->back()->with('error', \"Ticket has to be assigned first before it can change status to pending!\");\n else if($ticket->status == 2){\n\n $ticket->status = 7;\n $ticket->save();\n\n $dept = Department::where('id', $ticket->dept_id)->first();\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => \" is now awaiting for \".$dept->dept_name.\"'s response.\",\n 'user_id' => $user->id,\n 'commenter_role' => $user->role,\n 'ticket_id' => $id,\n 'class' => 'fa-ticket'\n ]);\n\n return redirect('pending-tickets')->with('message', 'Now awaiting the agency for responses.');\n }\n else if($ticket->status > 2)\n return redirect()->back()->with('error', 'This ticket cannot change status to pending. Only tickets in process can do so.');\n\n }\n else return redirect()->back()->with('error', \"You don't have the permission to change this ticket's status!\");\n }\n\n }", "public function update(Request $request, AgendaItemSpeaker $agendaItemSpeaker)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $leads = Leads::find($id);\n\n if ($request->type != 'customer') {\n $this->validate(request(), [\n 'customer_id' => 'required',\n 'client_name' => '',\n 'contactno' => 'sometimes|nullable|numeric|regex:/^[91]{2}/|digits:12',\n // 'city' => 'required',\n 'instahandler' => '',\n 'rating' => 'required',\n 'status' => 'required',\n 'solophone' => '',\n 'comments' => '',\n 'userid' => '',\n 'created_at' => 'required|date_format:\"Y-m-d H:i\"',\n\n ]);\n }\n\n\n // if ( $request->input( 'assigned_user' ) != $leads->assigned_user && !empty($request->input( 'assigned_user' )) ) {\n //\n // NotificationQueueController::createNewNotification([\n // 'type' => 'button',\n // 'message' => $leads->client_name,\n // 'timestamps' => ['+0 minutes'],\n // // 'timestamps' => ['+0 minutes','+15 minutes','+30 minutes','+45 minutes'],\n // 'model_type' => Leads::class,\n // 'model_id' => $id,\n // 'user_id' => Auth::id(),\n // 'sent_to' => $request->input('assigned_user'),\n // 'role' => '',\n // ]);\n //\n // // NotificationQueueController::createNewNotification([\n // // 'message' => $leads->client_name,\n // // 'timestamps' => ['+45 minutes'],\n // // 'model_type' => Leads::class,\n // // 'model_id' => $id,\n // // 'user_id' => Auth::id(),\n // // 'sent_to' => Auth::id(),\n // // 'role' => '',\n // // ]);\n // }\n\n if ($request->type != 'customer') {\n $leads->customer_id = $request->customer_id;\n $leads->client_name = $request->get('client_name');\n $leads->contactno = $request->get('contactno');\n $leads->city = $request->get('city');\n $leads->source = $request->get('source');\n $leads->rating = $request->get('rating');\n $leads->solophone = $request->get('solophone');\n $leads->userid = $request->get('userid');\n $leads->email = $request->get('email');\n $leads->address = $request->get('address');\n $leads->leadsourcetxt = $request->get('leadsourcetxt');\n $leads->created_at = $request->created_at;\n $leads->whatsapp_number = $request->whatsapp_number;\n }\n\n\n if ($request->status != $leads->status) {\n $lead_status = (new status)->all();\n StatusChange::create([\n 'model_id' => $id,\n 'model_type' => Leads::class,\n 'user_id' => Auth::id(),\n 'from_status' => array_search($leads->status, $lead_status),\n 'to_status' => array_search($request->status, $lead_status)\n ]);\n }\n\n $leads->status = $request->get('status');\n $leads->comments = $request->get('comments');\n $leads->assigned_user = $request->get('assigned_user');\n\n $leads->multi_brand = $request->input('multi_brand') ? json_encode($request->get('multi_brand')) : null;\n // $leads->multi_category = json_encode($request->get('multi_category'));\n $leads->multi_category = $request->get('multi_category');\n\n $leads->selected_product = json_encode($request->input('selected_product'));\n\n $leads->save();\n\n $messages = Message::where('moduletype', 'leads')->where('moduleid', $leads->id)->get();\n\n foreach ($messages as $message) {\n $message->customer_id = $leads->customer_id;\n $message->save();\n }\n\n $chats = ChatMessage::where('lead_id', $leads->id)->get();\n\n foreach ($chats as $chat) {\n $chat->customer_id = $leads->customer_id;\n $chat->save();\n }\n\n $count = 0;\n foreach ($request->oldImage as $old) {\n if ($old > 0) {\n self::removeImage($old);\n } elseif ($old == -1) {\n foreach ($request->file('image') as $image) {\n $media = MediaUploader::fromSource($image)\n ->toDirectory('leads/' . floor($leads->id / config('constants.image_per_folder')))\n ->upload();\n $leads->attachMedia($media, config('constants.media_tags'));\n }\n } elseif ($old == 0) {\n $count++;\n }\n }\n\n if ($count > 0) {\n if ($request->hasFile('image')) {\n foreach ($request->file('image') as $image) {\n $media = MediaUploader::fromSource($image)\n ->toDirectory('leads/' . floor($leads->id / config('constants.image_per_folder')))\n ->upload();\n $leads->attachMedia($media, config('constants.media_tags'));\n }\n }\n }\n\n return redirect()->back()->with('success', 'Lead has been updated');\n }", "function _culturefeed_agenda_preprocess_event(&$variables) {\n\n $event = $variables['item']->getEntity();\n $event_detail = $event->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language());\n\n $variables['agefrom'] = check_plain($event->getAgeFrom());\n if (is_numeric($event->getAgeFrom()) && ($event->getAgeFrom() <= 12)) {\n $variables['forkids'] = TRUE;\n }\n $variables['location'] = culturefeed_agenda_get_location_of_event($event);\n\n $actor = NULL;\n\n // Contact information\n $variables['contact'] = array();\n if ($event->getContactInfo()) {\n\n $contact_info = $event->getContactInfo();\n\n // Mails.\n $mails = array();\n foreach ($contact_info->getMails() as $mail) {\n $mails[] = l($mail->getMailAddress(), 'mailto:' . $mail->getMailAddress(), array('attributes' => array('id' => 'cf-contact')));\n }\n $variables['contact']['mail'] = implode(', ', $mails);\n\n // Fax + phone numbers.\n $phones = array();\n $faxes = array();\n foreach ($contact_info->getPhones() as $phone) {\n if ($phone->getType() == CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE) {\n $phones[] = $phone->getNumber();\n }\n else {\n $faxes[] = $phone->getNumber();\n }\n }\n $variables['contact']['phone'] = implode(', ', $phones);\n $variables['contact']['fax'] = implode(', ', $faxes);\n\n // Reservation data.\n $variables['reservation'] = $contact_info->getReservationInfo();\n $reservation_info = $variables['reservation'];\n\n // Reservation mail\n if (isset($reservation_info['mails'])) {\n foreach ($reservation_info['mails'] as $mail) {\n $reservation_mails[] = l($mail, 'mailto:' . $mail, array('attributes' => array('id' => 'cf-reservation')));\n }\n $variables['reservation']['mail'] = implode(', ', $reservation_mails);\n }\n\n // Reservation phone\n if (isset($reservation_info['phone'])) {\n foreach ($reservation_info['phone'] as $phone) {\n $reservation_phones[] = $phone;\n }\n $variables['reservation']['phone'] = implode(', ', $reservation_phones);\n }\n\n // Reservation url\n if (isset($reservation_info['url'])) {\n foreach ($reservation_info['url'] as $url) {\n // clean up link text\n $url_text = str_replace('http://', '', $url);\n $url_text = str_replace('https://', '', $url_text);\n $reservation_urls[] = l(truncate_utf8($url_text, 40, FALSE, TRUE), $url, array('attributes' => array('id' => 'cf-reservation')));\n }\n $variables['reservation']['url'] = implode(', ', $reservation_urls);\n }\n\n // Coordinates.\n $addresses = $contact_info->getAddresses();\n if ($addresses) {\n $address = current($addresses);\n $coordinates = $address->getPhysicalAddress()->getGeoInformation();\n if ($coordinates) {\n $variables['coordinates'] = array(\n 'lat' => $coordinates->getYCoordinate(),\n 'lng' => $coordinates->getXCoordinate(),\n );\n }\n }\n\n }\n\n // Calendar.\n if ($calendar = $event->getCalendar()) {\n $variables['calendar'] = culturefeed_agenda_parse_calendar($calendar);\n }\n\n if ($event_detail) {\n\n // Link to detail.\n $variables['url'] = culturefeed_search_detail_url($variables['item']->getType(), $event->getCdbid(), $event_detail->getTitle());\n\n // When.\n $variables['when'] = check_plain($event_detail->getCalendarSummary());\n\n }\n\n // Personal calendar buttons.\n if (module_exists('culturefeed_calendar')) {\n $variables['personal_calendar_buttons'] = culturefeed_calendar_render_calendar_buttons($variables['item']);\n }\n}", "public function attend($event_id,$user_id)\n {\n if ($this->check_events_attend($event_id,$user_id))\n {\n $unset = DB::delete($this->_tableEventsAttendance)\n ->where('user_id','=',(int)$user_id)\n ->execute();\n }\n else\n {\n $set = DB::insert($this->_tableEventsAttendance, array('user_id','event_id'))\n ->values(array(\n (int)$user_id,\n (int)$event_id))\n ->execute(); \n }\n }", "public function update(Request $request, $stakeholder)\n {\n $data = explode('-', $stakeholder, 2);\n $stakeholder = Contact::where('ID','=',$data[0])->first();\n\n $stakeholder->Name = $request->Name;\n $stakeholder->Address = $request->Address;\n $stakeholder->Email = $request->EmailAddress;\n $stakeholder->Website = $request->Website;\n $stakeholder->TIN = $request->TIN;\n $stakeholder->CreditLimit = $request->CreditLimit;\n $stakeholder->PaymentTerm = $request->PaymentTerm;\n $stakeholder->Type = count($request->Type)>1?'B':$request->Type[0];\n $stakeholder->ContactPersons = json_encode($request->ContactPerson);\n $stakeholder->save();\n\n PhonebookEntry::where([\n ['ReferenceID','=',$stakeholder->ID],\n ['Type','=','C']\n ])->delete();\n\n if(count($request->ContactNumber)>0) {\n foreach($request->ContactNumber as $number){\n if($number!=null) {\n $contact = new PhonebookEntry();\n $contact->Type = 'C';\n $contact->Number = $number;\n $contact->ReferenceID = $stakeholder->ID;\n $contact->save();\n }\n }\n }\n\n $name = explode(' ', $stakeholder->Name);\n $name = implode('-',$name);\n return redirect()->to('/stakeholder/view/'.$stakeholder->ID.\"-\".$name);\n }", "public function updated(TenderParticipant $tenderParticipant)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'date_from' => 'required',\n 'time' => 'required',\n 'address' => 'required',\n 'difficulty' => 'required',\n 'time_total' => 'required',\n // 'cover' => 'required',\n ] , [\n 'title.required' => 'Ingresa el título del evento',\n 'description.required' => 'Ingresa la descripción del evento',\n 'date_from.required' => 'Ingresa la fecha del evento',\n 'time.required' => 'Ingresa la hora del evento',\n 'address.required' => 'Ingresa la dirección del evento',\n 'difficulty.required' => 'Selecciona la dificultad del evento',\n 'time_total.required' => 'Ingresa el tiempo de duración del evento',\n 'cover.required' => 'Ingresa la foto de portada del evento',\n ]);\n\n $date_from = DateTime::createFromFormat('d/m/Y', $request->date_from);\n\n $e = Event::find($id);\n $e->title = $request->title;\n $e->description = $request->description;\n $e->address = $request->address;\n $e->date_from = $date_from->format('Y-m-d');\n $e->time = $request->time;\n $e->difficulty = $request->difficulty;\n $e->time_total = $request->time_total;\n // $e->str_date = strtotime($date_from->format('Y-m-d'));\n\n if ($request->cover) {\n @unlink(public_path().'/files/events/'.$e->cover);\n $name_cover = md5($request->cover->getClientOriginalName()).'.'.$request->cover->getClientOriginalExtension();\n $request->cover->move(public_path().'/files/events' , $name_cover);\n $e->cover = $name_cover;\n }\n $e->save();\n return back()->with('msj' , 'Evento actualizado exitosamente');\n }", "public function edit($id)\n {\n $client = new Client([\"base_uri\" => \"https://evening-tundra-69683.herokuapp.com\"]);\n\n $response = $client->request(\"DELETE\", \"/nonAdmin/bookings/\".$id, [\n \"headers\" => [\"Authorization\" => Session::get(\"token\")],\n ]);\n\n\n $result = json_decode($response->getBody());\n // dd($result);\n $vehicle = $result->vehicle;\n $trip = $result->trip;\n $booking = $result->booking;\n $referenceNo = Str::limit($booking->_id, 7);\n $tripRef = Str::limit($trip->_id, 6);\n\n\n // dd($referenceNo);\n\n\n return view(\"nonAdmin.ticket\",compact('trip', 'booking', 'vehicle', 'referenceNo', 'tripRef'));\n }", "public static function notifyDepartmentHead() {\n $unrespondedToTickets = Self::getUnrespondedToTickets();\n\n if($unrespondedToTickets->count() > 0) {\n foreach($unrespondedToTickets as $ticket) {\n $team_lead = $ticket->department->team_lead;\n $vendor = $ticket->assignedTo;\n\n $message = \"<p>Dear {$team_lead->name}.<br/> {$vendor->name} is yet to respond to the ticket ID <a href='{{ route('tickets.vendor.show', ['ticket_id'=> $ticket->ticket_id]) }}''>#{{$ticket->ticket_id}}</p>. <p>To reassign this vendor, please log in on the admin dashboard or you could disregard this message.</p>\";\n $title = \"Ticket #{$ticket->ticket_id} is yet to receive a response\";\n send_email($team_lead->name, $team_lead->email, $message, route('tickets.admin.tickets.show', ['ticket_id'=> $ticket->ticket_id]), $title);\n\n }\n }\n }", "public function update(Request $request, Apartments $apartment)\n {\n //\n }", "public function updated(OnlineInquiry $onlineInquiry)\n {\n //\n }", "public function attend() {\n\n $attr = array(\n 'events' => $this->db->query(\"SELECT id, title\n FROM events\n WHERE DATE_FORMAT(event_date, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')\n ORDER BY event_date DESC\")->result(),\n 'department' => $this->db->query(\"SELECT CONCAT(IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')), ' (', team, ')') AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('t', ansena_team.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_team \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT JOIN ansena_department ON ansena_department.id = ansena_team.dept_id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t UNION ALL \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SELECT IF(is_pt = 1, CONCAT('PT. ', REPLACE(name, 'PT. ', '')), REPLACE(name, 'PT. ', '')) AS 'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CONCAT('d', ansena_department.id) AS 'id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM ansena_department \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t LEFT OUTER JOIN ansena_team ON ansena_team.dept_id = ansena_department.id \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE ansena_team.id IS NULL\")->result()\n \n );\n \n $this->layout_lib->template_with_custom_navbar('analisa/navbar-sub-attend', 'analisa/attend', $attr);\n \n }", "public function approve(EventApproveAttendancePost $request, $id)\n {\n $eventParticipant = EventParticipant::findOrFail($id);\n\n\n /*\n | @Begin Transaction\n |---------------------------------------------*/\n \\DB::beginTransaction();\n\n\n /* Approve the event participant */\n if($eventParticipant->approve()) {\n\n $event = $eventParticipant->event;\n $user = $eventParticipant->participant;\n\n\n /* Check participant limit */\n if($event->addAttending()) {\n \n\n /* Notify the participant & admin */\n $user->notify(new EventParticipantWasAdded($event, $user, true));\n $user->supervisor->notify(new EventParticipantWasAdded($event, $user, false)); \n\n } else {\n \n /* Notify for user */\n $user->notify(new EventParticipantWasInQueue($event, $user, true));\n $user->supervisor->notify(new EventParticipantWasInQueue($event, $user, false));\n }\n\n\n /*\n | @End Transaction\n |---------------------------------------------*/\n \\DB::commit();\n\n\n return response()->json([\n 'response' => 1,\n 'status' => $eventParticipant->status,\n 'message' => $eventParticipant->renderStatus(),\n ]);\n } \n\n\n return response()->json([\n 'response' => 0,\n 'message' => 'There seems to be a problem approving the request'\n ]);\n }" ]
[ "0.57101214", "0.56939656", "0.5632341", "0.5506178", "0.5430391", "0.5403705", "0.529279", "0.5285131", "0.5275577", "0.52619195", "0.5227121", "0.5196107", "0.5164425", "0.5149865", "0.5138622", "0.51153916", "0.5107444", "0.5105805", "0.50985116", "0.50972295", "0.5075981", "0.5070405", "0.50572217", "0.505443", "0.5052384", "0.50469023", "0.50429046", "0.50337297", "0.50301594", "0.5026017", "0.50223553", "0.5021587", "0.5018523", "0.5016668", "0.5003502", "0.49790564", "0.49652758", "0.49619317", "0.49396935", "0.49389303", "0.4937624", "0.49305767", "0.49248362", "0.4921468", "0.4920034", "0.49109486", "0.49083778", "0.49060842", "0.4906057", "0.49005812", "0.48986483", "0.48963615", "0.48918846", "0.4890049", "0.48810738", "0.48754475", "0.48748183", "0.48675027", "0.48663527", "0.48613992", "0.48516637", "0.48492202", "0.4844129", "0.4838257", "0.4835851", "0.48334035", "0.48284137", "0.48265752", "0.48206028", "0.48199704", "0.48182896", "0.48085442", "0.48079002", "0.48072058", "0.48048574", "0.47999087", "0.47997344", "0.47974855", "0.47949672", "0.4791006", "0.47838387", "0.47785366", "0.4776571", "0.47754693", "0.47708082", "0.47695243", "0.4769434", "0.4769187", "0.47667676", "0.47667488", "0.4766284", "0.47644174", "0.47618866", "0.47593352", "0.47575557", "0.4754192", "0.4750559", "0.47501287", "0.47499922", "0.47438124" ]
0.6872091
0
put your code here
public function incluirPedidoSolicitadoFacebook($empresa, $produtoSelecionado, $observacaoCliente, $trocoCliente, $nome, $sobrenome, $fb_id, $telefoneCliente, $sexo, $mapUrl, $messengerId, $bairro, $estado, $cep, $cidade, $endereco, $complementoEndereco, $formaPagamento){ $this->load->model("banco_gerencia/Cidade_model"); $this->load->model("banco_gerencia/Uf_model"); $this->load->model("banco_produto/Cliente_model"); $this->load->model("banco_produto/Pedido_model"); $this->load->model("banco_produto/Taxa_entrega_model"); $this->load->model("banco_produto/Item_pedido_model"); $this->load->model("banco_produto/Produto_model"); $this->db->trans_start(); if($sexo == "male"){ $sexo='M'; }else{ $sexo='F'; } $estado=$this->Uf_model->buscaEstadoPorNome($estado); $cidade=$this->Cidade_model->buscaCidadePorNome($cidade); $cliente = $this->Cliente_model->buscarClientesFBid($fb_id, $empresa); if($trocoCliente != 0){ $trocoCliente = "Levar troco para R$".$trocoCliente.". "; }else{ $trocoCliente = ""; } if($observacaoCliente != null && 0 == strnatcasecmp($observacaoCliente,"Nenhuma")){ $observacaoCliente=""; }else{ $observacaoCliente = " Observação do cliente: ".$observacaoCliente; } // verifica se cliente esta ativo ou seja nao esta bloquiado. if($cliente != null && $cliente["ativo_cliente"] != 1){ throw new Exception("Cliente: ".$cliente['nome_cliente']." está bloquiado para fazer pedido"); } if($cliente == null){ // inserir novo cliente $cliente = array( //"cpf_cliente" => "", "nome_cliente" => $nome." ".$sobrenome, //"email_cliente" => "", "id_facebook_cliente" => $fb_id, "telefone_cliente" => $telefoneCliente, "cep_cliente" => $cep, "endereco_cliente" => $complementoEndereco , "complemento_endereco_cliente" => $mapUrl, "cidade_cliente" => $cidade["codigo_cidade"], "uf_cliente" => $estado["codigo_uf"], "sexo_cliente" => $sexo, "referencia_endereco_cliente" => "",//$endereco, "empresa_cliente" => $empresa, "bairro_cliente" =>$bairro, "ativo_cliente" =>1 ); $this->Cliente_model->inserirCliente($cliente); } $cliente = $this->Cliente_model->buscarClientesFBid($fb_id, $empresa); $custoTotalPedido = $this->calcularValorTotalPedido($bairro, $produtoSelecionado, $empresa); $pedido = array( //"codigo_pedido" => "", "data_hora_pedido" => date('Y-m-d H:i:s'), "cliente_pedido" => $cliente["codigo_cliente"], "valor_total_pedido" => $custoTotalPedido[0], "forma_pagamento_pedido" => $formaPagamento, "observacao_pedido" => $trocoCliente.$observacaoCliente, "empresa_pedido" => $empresa, "telefone_pedido" => $telefoneCliente, "endereco_pedido" => $complementoEndereco , //"numero_endereco_pedido" => , //"complemento_endereco_pedido" => $mapUrl, "cidade_pedido" => $cidade["codigo_cidade"], "uf_pedido" => $estado["codigo_uf"], "referencia_endereco_pedido" => "",//$endereco, "bairro_pedido" => $bairro, "cep_pedido"=> $cep, "mapa_url_pedido" => $mapUrl, "status_pedido"=> 1 ); $pedido["codigo_pedido"] = $this->Pedido_model->inserirPedidoRetornadoCodigoInserido($pedido); $completo = explode("F",$produtoSelecionado); $a=1; for($i=0; $i < count($completo); $i++){ if($completo[$i] != null && $completo[$i] != ""){ $produtos = explode("@",$completo[$i]); $temp = $produtos[0]; for($p=0; $p < count($produtos); $p++){ $item = explode("q",$produtos[$p]); $itemAtual = $this->Produto_model->buscarProdutoPorCodigo($item[0], $empresa); $itemPedido = array(); if($itemAtual["preco_produto"] != null){ if($item[1] == 0){$item[1] = 1;} $itemPedido = array( "quantidade_item_pedido" => $item[1], "valor_subtotal_item_pedido"=> $itemAtual["preco_produto"]*$item[1], "pedido_item_pedido" => $pedido["codigo_pedido"], "produto_item_pedido" =>$item[0] ); }else{ $itemPedido = array( "quantidade_item_pedido" => $item[1], "valor_subtotal_item_pedido"=> 0, "pedido_item_pedido" => $pedido["codigo_pedido"], "produto_item_pedido" => $item[0] ); } if($itemPedido["quantidade_item_pedido"] == 0){$itemPedido["quantidade_item_pedido"] = 1;} $this->Item_pedido_model->inserirItemPedido($itemPedido); } } } //inserir taxa de entrega como item pedido $taxa = $this->Taxa_entrega_model->buscarTaxaEntregaPorBairro($empresa, $bairro); if($taxa == null){throw new Exception("buscarTaxaEntregaPorBairro nao retornou dados. Funcionalidade: pedidoPizzaria->incluirPedidoSolicitadoFacebook");} if($taxa != null){ $itemPedido = array( "quantidade_item_pedido" => 1, "valor_subtotal_item_pedido"=> $taxa["preco_taxa_entrega"], "pedido_item_pedido" => $pedido["codigo_pedido"] ); $this->Item_pedido_model->inserirItemPedido($itemPedido); } $this->db->trans_complete(); $inserido = 1; return $inserido; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "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.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index() { $account_id = Auth::id(); $user = User::where('id', $account_id)->first(); return view('homeorg.balance')->with('user', $user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function show()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77845055", "0.7759553", "0.75615275", "0.75149643", "0.74643844", "0.74642456", "0.7364247", "0.73505014", "0.7346846", "0.73411953", "0.7326109", "0.73154867", "0.7306794", "0.7287334", "0.72823006", "0.7272898", "0.7272898", "0.7272898", "0.7272898", "0.7251149", "0.7251149", "0.7251149", "0.7251149", "0.7251149", "0.72407955", "0.723657", "0.72350687", "0.72175324", "0.71982723", "0.7198151", "0.71906996", "0.7178409", "0.71698093", "0.7157068", "0.7145901", "0.71325856", "0.7132011", "0.7128996", "0.71233934", "0.7120204", "0.711678", "0.7109153", "0.7107863", "0.71064323", "0.7096738", "0.7080262", "0.70763993", "0.7074988", "0.7063381", "0.7054148", "0.7053587", "0.7050827", "0.7047432", "0.70428807", "0.70390075", "0.70195466", "0.70173585", "0.7013498", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.7008376", "0.6991156", "0.69789124", "0.6973553", "0.69731396", "0.69678116", "0.6967306", "0.6966836", "0.6964248", "0.6957916", "0.69446516", "0.6942682", "0.69421005", "0.6941928", "0.694065", "0.6938673", "0.69377136", "0.6936547", "0.6936547", "0.6926636", "0.6920605", "0.69066715", "0.69013566", "0.6881035", "0.6868616", "0.6866877", "0.6854833", "0.6846794", "0.6845246", "0.68394417", "0.6838777", "0.6832904", "0.6832319", "0.6830359", "0.6826521", "0.68126726" ]
0.0
-1
Add a product from a requisition list to cart.
public function execute(CartInterface $cart, CartItemInterface $cartItem);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAction()\n {\n $cart = $this->_getCart();\n $params = $this->getRequest()->getParams();\n// qq($params);\n try {\n if (isset($params['qty'])) {\n $filter = new Zend_Filter_LocalizedToNormalized(\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\n );\n $params['qty'] = $filter->filter($params['qty']);\n }\n\n $product = $this->_initProduct();\n $related = $this->getRequest()->getParam('related_product');\n $related_products = $this->getRequest()->getParam('related_products');\n $related_qty = $this->getRequest()->getParam('related_qty');\n /**\n * Check product availability\n */\n if (!$product) {\n $this->_goBack();\n return;\n }\n \n $in_cart = $cart->getQuoteProductIds();\n if($product->getTypeId() == 'cartproduct') {\n $cart_product_id = $product->getId();\n if(in_array($cart_product_id, $in_cart)) {\n $this->_goBack();\n return;\n }\n }\n\n if($params['qty']) $cart->addProduct($product, $params);\n \n if (!empty($related_qty)) {\n foreach($related_qty as $pid=>$qty){\n if(intval($qty)>0){\n $product = $this->_initProduct(intval($pid));\n $related_params['qty'] = $filter->filter($qty);\n if(isset($related_products[$pid])){\n if($product->getTypeId() == 'bundle') {\n $related_params['bundle_option'] = $related_products[$pid]['bundle_option'];\n// qq($related_params);\n// die('test');\n } else {\n $related_params['super_attribute'] = $related_products[$pid]['super_attribute'];\n }\n }\n $cart->addProduct($product, $related_params);\n }\n }\n }\n \n $collection = Mage::getModel('cartproducts/products')->getCollection()\n ->addAttributeToFilter('type_id', 'cartproduct')\n ->addAttributeToFilter('cartproducts_selected', 1)\n ;\n \n foreach($collection as $p)\n {\n $id = $p->getId();\n if(isset($in_cart[$id])) continue;\n \n $cart = Mage::getSingleton('checkout/cart');\n $quote_id = $cart->getQuote()->getId();\n \n if(Mage::getSingleton('core/session')->getData(\"cartproducts-$quote_id-$id\")) continue;\n \n $p->load($id);\n $cart->getQuote()->addProduct($p, 1);\n }\n \n if($cart->getQuote()->getShippingAddress()->getCountryId() == '') $cart->getQuote()->getShippingAddress()->setCountryId('US');\n $cart->getQuote()->setCollectShippingRates(true);\n $cart->getQuote()->getShippingAddress()->setShippingMethod('maxshipping_standard')->collectTotals()->save();\n \n $cart->save();\n \n Mage::getSingleton('checkout/session')->resetCheckout();\n\n\n $this->_getSession()->setCartWasUpdated(true);\n\n /**\n * @todo remove wishlist observer processAddToCart\n */\n Mage::dispatchEvent('checkout_cart_add_product_complete',\n array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())\n );\n\n if (!$this->_getSession()->getNoCartRedirect(true)) {\n if (!$cart->getQuote()->getHasError() && $params['qty'] ){\n $message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->htmlEscape($product->getName()));\n $this->_getSession()->addSuccess($message);\n }\n $this->_goBack();\n }\n } catch (Mage_Core_Exception $e) {\n if ($this->_getSession()->getUseNotice(true)) {\n $this->_getSession()->addNotice($e->getMessage());\n } else {\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\n foreach ($messages as $message) {\n $this->_getSession()->addError($message);\n }\n }\n\n $url = $this->_getSession()->getRedirectUrl(true);\n if ($url) {\n $this->getResponse()->setRedirect($url);\n } else {\n $this->_redirectReferer(Mage::helper('checkout/cart')->getCartUrl());\n }\n } catch (Exception $e) {\n $this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));\n Mage::logException($e);\n $this->_goBack();\n }\n }", "public function add()\n\t{\n\t\t$product = ORM::factory('product', $this->input->post('product_id'));\n\t\t$quantity = $this->input->post('quantity', 1);\n\t\t$variant = ORM::factory('variant', $this->input->post('variant_id'));\n\t\t\n\t\t$this->cart->add_product($product, $variant, $quantity);\n\t\t\n\t\turl::redirect('cart');\n\t}", "function addProduct(Product $product){\n \t$this->myCart ->add($product);\n }", "public function addToCart(): void\n {\n //añadimos un Item con la cantidad indicada al Carrito\n Cart::add($this->oferta->id, $this->product->name, $this->oferta->getRawOriginal('offer_prize'), $this->quantity);\n //emite al nav-cart el dato para que lo actualize\n $this->emitTo('nav-cart', 'refresh');\n }", "public function addProduct(Product $product, $quantity);", "private function add($product){\n $cart = ['qty'=>0,'price' => 0, 'product' => $product];\n if($this->items){\n if(array_key_exists($product->prod_id, $this->items)){\n $cart = $this->items[$product->prod_id];\n }\n }\n $cart['qty']++;\n $cart['price'] += $product->price;\n $this->items[$product->prod_id] = $cart;\n $this->totalQty++;\n $this->totalPrice += $product->price;\n }", "public function addAction() {\r\n $cart = $this->_getCart();\r\n $params = $this->getRequest()->getParams();\r\n try {\r\n if (isset($params['qty'])) {\r\n $filter = new Zend_Filter_LocalizedToNormalized(\r\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\r\n );\r\n $params['qty'] = $filter->filter($params['qty']);\r\n }\r\n\r\n $product = $this->_initProduct();\r\n $related = $this->getRequest()->getParam('related_product');\r\n\r\n /**\r\n * Check product availability\r\n */\r\n if (!$product) {\r\n $this->_goBack();\r\n return;\r\n }\r\n\r\n $cart->addProduct($product, $params);\r\n if (!empty($related)) {\r\n $cart->addProductsByIds(explode(',', $related));\r\n }\r\n\r\n $cart->save();\r\n\r\n $this->_getSession()->setCartWasUpdated(true);\r\n\r\n /**\r\n * @todo remove wishlist observer processAddToCart\r\n */\r\n $this->getLayout()->getUpdate()->addHandle('ajaxcart');\r\n $this->loadLayout();\r\n\r\n Mage::dispatchEvent('checkout_cart_add_product_complete', array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())\r\n );\r\n\r\n if (!$this->_getSession()->getNoCartRedirect(true)) {\r\n if (!$cart->getQuote()->getHasError()) {\r\n $message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($product->getName()));\r\n $this->_getSession()->addSuccess($message);\r\n }\r\n $this->_goBack();\r\n }\r\n } catch (Mage_Core_Exception $e) {\r\n $_response = Mage::getModel('ajaxcart/response');\r\n $_response->setError(true);\r\n\r\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\r\n $json_messages = array();\r\n foreach ($messages as $message) {\r\n $json_messages[] = Mage::helper('core')->escapeHtml($message);\r\n }\r\n\r\n $_response->setMessages($json_messages);\r\n\r\n $url = $this->_getSession()->getRedirectUrl(true);\r\n\r\n $_response->send();\r\n } catch (Exception $e) {\r\n $this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));\r\n Mage::logException($e);\r\n\r\n $_response = Mage::getModel('ajaxcart/response');\r\n $_response->setError(true);\r\n $_response->setMessage($this->__('Cannot add the item to shopping cart.'));\r\n $_response->send();\r\n }\r\n }", "function uc_order_edit_products_add($form, &$form_state) {\n $form_state['products_action'] = 'products_select';\n $form_state['refresh_products'] = TRUE;\n $form_state['rebuild'] = TRUE;\n $order = $form_state['build_info']['args'][0];\n\n $data = module_invoke_all('uc_add_to_cart_data', $form_state['values']['product_controls']);\n $product = uc_product_load_variant(intval($form_state['values']['product_controls']['nid']), $data);\n $product->qty = isset($form_state['values']['product_controls']['qty']) ? $form_state['values']['product_controls']['qty'] : $product->default_qty;\n\n drupal_alter('uc_order_product', $product, $order);\n uc_order_product_save($order->order_id, $product);\n $order->products[] = $product;\n\n uc_order_log_changes($order->order_id, array('add' => t('Added (@qty) @title to order.', array('@qty' => $product->qty, '@title' => $product->title))));\n\n // Decrement stock.\n if (module_exists('uc_stock')) {\n uc_stock_adjust_product_stock($product, 0, $order);\n }\n\n // Add this product to the form values for accurate tax calculations.\n $form_state['values']['products'][] = (array) $product;\n}", "public static function add($product)\n {\n session()->push('cart', $product);\n }", "public function add()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$parent_accessory_productid = $post['product_id'];\n\t\t$Itemid = JRequest::getVar('Itemid');\n\t\t$producthelper = new producthelper;\n\t\t$redhelper = new redhelper;\n\t\t$Itemid = $redhelper->getCartItemid();\n\t\t$model = $this->getModel('cart');\n\n\t\t// Call add method of modal to store product in cart session\n\t\t$userfiled = JRequest::getVar('userfiled');\n\n\t\tJPluginHelper::importPlugin('redshop_product');\n\t\t$dispatcher = JDispatcher::getInstance();\n\t\t$dispatcher->trigger('onBeforeAddProductToCart', array(&$post));\n\n\t\t$result = $this->_carthelper->addProductToCart($post);\n\n\t\tif (is_bool($result) && $result)\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errmsg = ($result) ? $result : JText::_(\"COM_REDSHOP_PRODUCT_NOT_ADDED_TO_CART\");\n\n\t\t\tif (AJAX_CART_BOX == 1)\n\t\t\t{\n\t\t\t\techo \"`0`\" . $errmsg;\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $post['product_id']);\n\n\t\t\t\tif (count($ItemData) > 0)\n\t\t\t\t{\n\t\t\t\t\t$prdItemid = $ItemData->id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$prdItemid = $redhelper->getItemid($post['product_id']);\n\t\t\t\t}\n\n\t\t\t\t$link = JRoute::_(\"index.php?option=\" . $option . \"&view=product&pid=\" . $post[\"product_id\"] . \"&Itemid=\" . $prdItemid, false);\n\t\t\t\t$app->Redirect($link, $errmsg);\n\t\t\t}\n\t\t}\n\n\t\t$session = JFactory::getSession();\n\t\t$cart = $session->get('cart');\n\n\t\tif (isset($cart['AccessoryAsProduct']))\n\t\t{\n\t\t\t$attArr = $cart['AccessoryAsProduct'];\n\n\t\t\tif (ACCESSORY_AS_PRODUCT_IN_CART_ENABLE)\n\t\t\t{\n\t\t\t\t$data['accessory_data'] = $attArr[0];\n\t\t\t\t$data['acc_quantity_data'] = $attArr[1];\n\t\t\t\t$data['acc_attribute_data'] = $attArr[2];\n\t\t\t\t$data['acc_property_data'] = $attArr[3];\n\t\t\t\t$data['acc_subproperty_data'] = $attArr[4];\n\n\t\t\t\tif (isset($data['accessory_data']) && ($data['accessory_data'] != \"\" && $data['accessory_data'] != 0))\n\t\t\t\t{\n\t\t\t\t\t$accessory_data = explode(\"@@\", $data['accessory_data']);\n\t\t\t\t\t$acc_quantity_data = explode(\"@@\", $data['acc_quantity_data']);\n\t\t\t\t\t$acc_attribute_data = explode(\"@@\", $data['acc_attribute_data']);\n\t\t\t\t\t$acc_property_data = explode(\"@@\", $data['acc_property_data']);\n\t\t\t\t\t$acc_subproperty_data = explode(\"@@\", $data['acc_subproperty_data']);\n\n\t\t\t\t\tfor ($i = 0; $i < count($accessory_data); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$accessory = $producthelper->getProductAccessory($accessory_data[$i]);\n\t\t\t\t\t\t$post = array();\n\t\t\t\t\t\t$post['parent_accessory_product_id'] = $parent_accessory_productid;\n\t\t\t\t\t\t$post['product_id'] = $accessory[0]->child_product_id;\n\t\t\t\t\t\t$post['quantity'] = $acc_quantity_data[$i];\n\t\t\t\t\t\t$post['category_id'] = 0;\n\t\t\t\t\t\t$post['sel_wrapper_id'] = 0;\n\t\t\t\t\t\t$post['attribute_data'] = $acc_attribute_data[$i];\n\t\t\t\t\t\t$post['property_data'] = $acc_property_data[$i];\n\t\t\t\t\t\t$post['subproperty_data'] = $acc_subproperty_data[$i];\n\n\t\t\t\t\t\t$result = $this->_carthelper->addProductToCart($post);\n\n\t\t\t\t\t\t$cart = $session->get('cart');\n\n\t\t\t\t\t\tif (is_bool($result) && $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$errmsg = ($result) ? $result : JText::_(\"COM_REDSHOP_PRODUCT_NOT_ADDED_TO_CART\");\n\n\t\t\t\t\t\t\tif (JError::isError(JError::getError()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$error = JError::getError();\n\t\t\t\t\t\t\t\t$errmsg = $error->message;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (AJAX_CART_BOX == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo \"`0`\" . $errmsg;\n\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $post['product_id']);\n\n\t\t\t\t\t\t\t\tif (count($ItemData) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prdItemid = $ItemData->id;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prdItemid = $redhelper->getItemid($post['product_id']);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$link = JRoute::_(\"index.php?option=\" . $option . \"&view=product&pid=\" . $post[\"product_id\"] . \"&Itemid=\" . $prdItemid, false);\n\t\t\t\t\t\t\t\t$app->Redirect($link, $errmsg);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!DEFAULT_QUOTATION_MODE || (DEFAULT_QUOTATION_MODE && SHOW_QUOTATION_PRICE))\n\t\t\t{\n\t\t\t\t$this->_carthelper->carttodb();\n\t\t\t}\n\n\t\t\t$this->_carthelper->cartFinalCalculation();\n\t\t\tunset($cart['AccessoryAsProduct']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!DEFAULT_QUOTATION_MODE || (DEFAULT_QUOTATION_MODE && SHOW_QUOTATION_PRICE))\n\t\t\t{\n\t\t\t\t$this->_carthelper->carttodb();\n\t\t\t}\n\n\t\t\t$this->_carthelper->cartFinalCalculation();\n\t\t}\n\n\t\tif (!$userfiled)\n\t\t{\n\t\t\tif (AJAX_CART_BOX == 1 && isset($post['ajax_cart_box']))\n\t\t\t{\n\t\t\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&ajax_cart_box=' . $post['ajax_cart_box'] . '&tmpl=component&Itemid=' . $Itemid, false);\n\t\t\t\t$app->Redirect($link);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (ADDTOCART_BEHAVIOUR == 1)\n\t\t\t\t{\n\t\t\t\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t\t\t\t$app->Redirect($link);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$link = JRoute::_($_SERVER['HTTP_REFERER'], false);\n\n\t\t\t\t\tif ($cart['notice_message'] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg = $cart['notice_message'] . \"<br>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$msg .= JTEXT::_('COM_REDSHOP_PRODUCT_ADDED_TO_CART');\n\t\t\t\t\t$app->Redirect($link, $msg);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$link = JRoute::_('index.php?option=' . $option . '&view=product&pid=' . $post['p_id'] . '&Itemid=' . $Itemid, false);\n\t\t\t$app->Redirect($link);\n\t\t}\n\t}", "public function rapidAdd($id){\n $product=Products::find($id);\n $cart= Cart::add([\n'id'=>$product->id,\n'name'=>$product->pro_name,\n'qty'=>1,\n'price'=>$product->pro_price,\n ]);\n Cart::associate($cart->rowId, 'App\\Models\\Products');\nreturn redirect('/cart')->with('info', 'Product added in cart');\n }", "public function redq_add_to_cart()\n {\n wc_get_template('single-product/add-to-cart/redq_rental.php', $args = array(), $template_path = '', REDQ_PACKAGE_TEMPLATE_PATH);\n }", "public function add_to_cart(Request $request){\n $product = Product::find($request->input('product_id'));\n //On s'assure qu'il y'a bien un produit qui est retourne\n if($product){\n //On enregistre la session cart dans une variable\n $cart = $request->session()->get('cart');\n //On verifie si la cle du produit est deja dans les produits dans la session avant de l'ajouter\n if(!isset($cart['products'][$product->id])){\n //On prepare comment ajouter le produit dans les sessions. Chaque produit dans la sessoin set enregistre dans une cle cart. cette cle contient un\n $cart['products'][$product->id] = ['name' => $product->name, 'price' => $product->price, 'quantite' => 1, \"total\" => $product->price];\n //On ajoute la variable $cart dans les sessions\n $request->session()->put('cart',$cart);\n }\n }\n return response()->json(['success' => true,], 200);\n }", "public function addAction()\n {\n /** @var $session */\n $session = $this->get('session');\n\n $cart = $session->get('cart');\n\n $productID = $_POST['product_id'];\n $quantity = $_POST['quantity'];\n\n // First addition to the shopping cart\n if (empty($cart)) {\n $cart[] = array(\n 'product_id' => $productID,\n 'quantity' => $quantity\n );\n } else {\n $existingItem = false;\n\n foreach ($cart as &$cartItem) {\n // If product already exists in cart\n if ($cartItem['product_id'] == $productID) {\n $existingItem= true;\n\n // add to existing quantity\n $cartItem['quantity'] += $quantity;\n }\n }\n\n // if brand new item\n if ($existingItem == false) {\n $cart[]= array(\n 'product_id' => $productID,\n 'quantity' => $quantity\n );\n }\n }\n\n $session->set('cart', $cart);\n\n\n return new RedirectResponse('/cart');\n }", "public function add(ProductInterface $product, $quantity = 1);", "public function add_to_cart() {\n if ( ! is_single() ) {\n return;\n }\n\n global $product;\n\n WC_Gokeep_JS::get_instance()->add_to_cart( $product , '.single_add_to_cart_button' );\n }", "public function add() {\n\t\t$this->load->language('checkout/cart');\n\n\t\t$json = array();\n\n\t\tif (isset($this->request->post['product_id'])) {\n\t\t\t$product_id = (int)$this->request->post['product_id'];\n\t\t} else {\n\t\t\t$product_id = 0;\n\t\t}\n\n\t\t$this->load->model('catalog/product');\n\n\t\t$product_info = $this->model_catalog_product->getProduct($product_id);\n\n\t\tif ($product_info) {\n\t\t\tif (isset($this->request->post['quantity']) && ((int)$this->request->post['quantity'] >= $product_info['minimum'])) {\n\t\t\t\t$quantity = (int)$this->request->post['quantity'];\n\t\t\t} else {\n\t\t\t\t$quantity = $product_info['minimum'] ? $product_info['minimum'] : 1;\n\t\t\t}\n\t\t\tif (isset($this->request->post['option'])) {\n\t\t\t\t$option = array_filter($this->request->post['option']);\n\t\t\t} else {\n\t\t\t\t$option = array();\n\t\t\t}\n\n\t\t\t$product_options = $this->model_catalog_product->getProductOptions($this->request->post['product_id']);\n\n\t\t\tforeach ($product_options as $product_option) {\n\t\t\t\tif ($product_option['required'] && empty($option[$product_option['product_option_id']])) {\n\t\t\t\t\t$json['error']['option'][$product_option['product_option_id']] = sprintf($this->language->get('error_required'), $product_option['name']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($this->request->post['recurring_id'])) {\n\t\t\t\t$recurring_id = $this->request->post['recurring_id'];\n\t\t\t} else {\n\t\t\t\t$recurring_id = 0;\n\t\t\t}\n\n\t\t\t$recurrings = $this->model_catalog_product->getProfiles($product_info['product_id']);\n\n\t\t\tif ($recurrings) {\n\t\t\t\t$recurring_ids = array();\n\n\t\t\t\tforeach ($recurrings as $recurring) {\n\t\t\t\t\t$recurring_ids[] = $recurring['recurring_id'];\n\t\t\t\t}\n\n\t\t\t\tif (!in_array($recurring_id, $recurring_ids)) {\n\t\t\t\t\t$json['error']['recurring'] = $this->language->get('error_recurring_required');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$json) {\n\t\t\t\tif(isset($this->session->data['cart'])) {\n$oldCart = $this->session->data['cart']; \n}\n$this->cart->add($this->request->post['product_id'], $quantity, $option, $recurring_id);\n\t\t\t\t/*\n\t\t\t\t // BOF - Betaout Opencart mod\n $this->load->model('tool/betaout');\n //$this->model_tool_betaout->track();\n $this->model_tool_betaout->trackEcommerceCartUpdate();\n // EOF - Betaout Opencart mod\n\t\t\t\t*/\n\n\t\t\t\t$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));\n\n$this->load->model('setting/setting');\n$giftTeaser = $this->model_setting_setting->getSetting('giftteaser', $this->config->get('config_store_id'));\nif (empty($giftTeaser['giftteaser']['Enabled']) || $giftTeaser['giftteaser']['Enabled'] == 'no') { } else {\n$this->load->language('extension/module/giftteaser');\n$addition = '';\nforeach ($this->cart->getProducts() as $key => $val) {\nif (!empty($val['gift_teaser']) && $val['gift_teaser']==true ) {\nif (!isset($this->session->data['success_addition'])) {\n$addition = $this->language->get('gift_added_to_cart');\n}\n}\n}\t\n$json['success'] .= $addition;\t\n}\n\n$this->register_abandonedCarts();\n\t\t\t\t// Unset all shipping and payment methods\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\tunset($this->session->data['shipping_methods']);\n\t\t\t\tunset($this->session->data['payment_method']);\n\t\t\t\tunset($this->session->data['payment_methods']);\n\n\t\t\t\t// Totals\n\t\t\t\t$this->load->model('extension/extension');\n\n\t\t\t\t$totals = array();\n\t\t\t\t$taxes = $this->cart->getTaxes();\n\t\t\t\t$total = 0;\n\t\t\n\t\t\t\t// Because __call can not keep var references so we put them into an array. \t\t\t\n\t\t\t\t$total_data = array(\n\t\t\t\t\t'totals' => &$totals,\n\t\t\t\t\t'taxes' => &$taxes,\n\t\t\t\t\t'total' => &$total\n\t\t\t\t);\n\n\t\t\t\t// Display prices\n\t\t\t\tif ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {\n\t\t\t\t\t$sort_order = array();\n\n\t\t\t\t\t$results = $this->model_extension_extension->getExtensions('total');\n\n\t\t\t\t\tforeach ($results as $key => $value) {\n\t\t\t\t\t\t$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_multisort($sort_order, SORT_ASC, $results);\n\n\t\t\t\t\tforeach ($results as $result) {\n\t\t\t\t\t\tif ($this->config->get($result['code'] . '_status')) {\n\t\t\t\t\t\t\t$this->load->model('extension/total/' . $result['code']);\n\n\t\t\t\t\t\t\t// We have to put the totals in an array so that they pass by reference.\n\t\t\t\t\t\t\t$this->{'model_extension_total_' . $result['code']}->getTotal($total_data);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$sort_order = array();\n\n\t\t\t\t\tforeach ($totals as $key => $value) {\n\t\t\t\t\t\t$sort_order[$key] = $value['sort_order'];\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_multisort($sort_order, SORT_ASC, $totals);\n\t\t\t\t}\n\n\t\t\t\t$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));\n\t\t\t} else {\n\t\t\t\t$json['redirect'] = str_replace('&amp;', '&', $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']));\n\t\t\t}\n\t\t}\n\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "public function addProduct($product)\n {\n \n $cart = $product->cart()->where('cart_id',$this->id)->wherePivot('deleted_at',null)->first();\n\n if(is_null($cart))\n {\n $this->product()->save($product);\n }\n else\n {\n\n $quantity = $cart->pivot->quantity;\n\n $quantity++;\n\n $cart->pivot->update(compact('quantity'));\n }\n\n }", "public function add($product, $quantity = 1)\n\t{\n\t\t$item = [\n\t\t\t'id' => $product->id,\n\t\t\t'name' => $product->name,\n\t\t\t'price' => ($product->promotionprice != 0) ? $product->promotionprice : $product->unitprice,\n\t\t\t'image' => $product->image,\n\t\t\t'quantity' => $quantity,\n\t\t];\n\n\t\tif(isset($this->items[$product->id])){\n\t\t\t$this->items[$product->id]['quantity'] += $quantity;\n\t\t}else{\n\t\t\t$this->items[$product->id] = $item;\n\t\t}\n\t\t\n\t\tsession(['cart' => $this->items]);\n\t\t//dd($this->items);\n\t}", "private function addProduct($product) \r\n\t{\r\n\t\t$this->newProducts[] = $product;\r\n\t}", "function addToCart($proID){\n $product = $this->product->getRows($proID);\n \n // Add product to the cart\n $data = array(\n 'id' => $product['pro_id'],\n 'qty' => 1,\n 'price' => $product['price'],\n 'name' => $product[\"name\"],\n 'image' => $product['image']\n );\n $this->cart->insert($data);\n \n // Redirect to the cart page\n redirect(base_url().'index.php/CCart');\n }", "public function addToCart() {\n\t\t$baseQuantity = 1;\n\t\t$result = $this->db->select();\n\t\twhile(($row = mysql_fetch_assoc($result)) != FALSE){\n\t\t\t$_SESSION['cart'][] = array($row['id'], $row['name'], $row['description'], $row['cost'], $baseQuantity);\n\t\t}\n\t}", "public function addToCart($product, $qtt){\n $this->lines[] = [\"product\" => $product, \"qtt\" => $qtt];\n }", "public function add($product, $quantity)\n {\n $this->loadItems();\n if (isset($this->items[$product->{$this->params['productFieldId']}])) {\n $this->plus($product->{$this->params['productFieldId']}, $quantity);\n } else {\n $this->items[$product->{$this->params['productFieldId']}] = new CartItem($product, $quantity,\n $this->params);\n ksort($this->items, SORT_NUMERIC);\n $this->saveItems();\n }\n }", "function AddToCart($token, $product_name, $product_id, $purchased_amount)\n {\n $order_number = $this->GetOrderNumber();\n $id = $this->GetUserId($token);\n // die();\n $order_number = md5($order_number . $id);\n $this->AddOrdertoCart($id, $order_number);\n $product_data = $this->CheckProductAvailability($product_name, $product_id, $purchased_amount);\n $product_remain = $product_data[0];\n $product_id = $product_data[1];\n if ($product_remain > -1) {\n $this->AddProducttoCart($order_number, $product_id, $purchased_amount, $product_remain, $token);\n } else {\n echo \" Required product is not available!\";\n }\n }", "function addToCart(){\n\t\tif(!isset($_POST['id'])) header(sprintf(\"Location: %s\", $this->Files['Cart']));\n\t\t// ---------- These are our posted variables --------------\t\t\n\t\t$TmpCart=array();\n\t\t$TmpCart['type'] \t= 1;\n\t\t$TmpCart['name'] \t= clean_variable($_POST['name'],true);\n\t\t$TmpCart['id']\t \t= clean_variable($_POST['id'],true);\n\t\t$TmpCart['qty'] \t= (is_int($_POST['qty']) && isset($_POST['qty']))?clean_variable($_POST['qty'],true):'1';\n\t\t$TmpCart['price'] = clean_variable($_POST['price'],true);\n\t\t\n\t\t// Process Products Specs and Attributes\n\t\t$SPC = \t\t\t(isset($_POST['spec'])) ? \n\t\t\t\t\t\t\t\t\t((!is_array($_POST['spec'])) ? array( $_POST['spec'] ) : $_POST['spec']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SPC)) foreach($SPC as &$v) clean_variable($v,true);\n\t\t\n\t\t$TmpStrg = '';\n\t\tif(count($SPC) > 0){ /* // Check the Specs of the product and get the price for that spec. If differant use that price\n\t\t\tforeach($SPC as $k => $v){ \n\t\t\t\t$getSpecs = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getSpecs->mysql(\"SELECT `att_price`, `att_sale`, `att_sale_exp` FROM `prod_link_prod_att` WHERE `att_id` = '$v' AND `prod_id` = '\".$TmpCart['id'].\"';\");\n\t\t\t\t$getSpecs->mssql(\"SELECT att_price, att_sale, att_sale_exp FROM prod_link_prod_att WHERE att_id = '$v' AND prod_id = '\".$TmpCart['id'].\"';\");\n\t\t\t\t$getSpecs = $getSpecs->Rows();\n\t\t\t\tif($getSpecs[0]['att_price'] > 0){\n\t\t\t\t\t$attSaleExp = ereg('[^A-Za-z0-9]', $getSpecs[0]['att_sale_exp']);\n\t\t\t\t\tif($attSaleExp == \"00000000000000\") $attprices += $getSpecs[0]['att_price'];\n\t\t\t\t\telse if ($attSaleExp > date(\"YmdHis\")) $attprices += $getSpecs[0]['att_sale'];\n\t\t\t\t\telse $attprices += $getSpecs[0]['att_price'];\n\t\t\t\t} else { $attprices = 0; }\n\t\t\t\t$TmpStrg .= ($TmpStrg == \"\") ? ($v.\".\".$attprices) : (\":\".$v.\".\".$attprices);\n\t\t\t} */\n\t\t}\n\t\t$TmpCart['spec'] = $TmpStrg;\n\t\t\n\t\t// Process Products Special Options\n\t\t$SPCL = \t\t(isset($_POST['special'])) ?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['special'])) ? array( $_POST['special'] ) : $_POST['special']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SPCL)) foreach($SPCL as &$v) clean_variable($v,true);\n\t\t$TmpCart['special'] = (is_array($SPCL) && count($SPCL) > 0) ? implode(\":\",$SPCL) : $SPCL;\n\t\t\n\t\t\n\t\t$SLCT = \t\t(isset($_POST['selections'])) ?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['selections'])) ? array( $_POST['selections'] ) : $_POST['selections']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SLCT)) foreach($SLCT as &$v) clean_variable($v,true);\n\t\t$TmpCart['selections'] = (is_array($SLCT) && count($SLCT) > 0) ? implode(\":\",$SLCT) : $SLCT;\n\t\t\n\t\t// Process Products Messages and Comments, mainly used for gift cards\n\t\t$MSG = \t\t\t(isset($_POST['message'])) \t\t\t? clean_variable($_POST['message'],true):'';\n\t\t$MSGTo = \t\t(isset($_POST['message_to'])) \t? clean_variable($_POST['message_to'],true):'';\n\t\t$MSGFrm = \t(isset($_POST['message_from'])) ? clean_variable($_POST['message_from'],true):'';\n\t\t\n\t\t$MSGEng = \t(isset($_POST['message']))?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['engraving']))? array( $_POST['engraving'] ) : $_POST['engraving'] ):\n\t\t\t\t\t\t\t\t'';\n\t\tif(is_array($MSGEng)) foreach($MSGEng as &$v) clean_variable($v,true);\n\t\t/*\n\t\t$getMsgs = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t$getMsgs->mysql(\"SELECT `prod_msg_type` FROM `prod_products` WHERE `prod_id` = '\".$TmpCart['id'].\"';\");\n\t\t$getMsgs->mssql(\"SELECT prod_msg_type FROM prod_products WHERE prod_id = '\".$TmpCart['id'].\"';\");\n\t\t$getMsgs = $getMsgs->Rows();\n\t\t$Msgs = $getMsgs[0]['prod_msg_type'];\n\t\t*/\n\t\t$Msgs='';\n\t\tif(strlen(trim($Msgs)) > 0) $Msgs = unserialize(urldecode($Msgs));\n\t\telse $Msgs = array(); $Tarray = array();\n\t\tif(count($Msgs) > 0){\n\t\t\tforeach($Msgs as $k => $v){\n\t\t\t\tswitch($k){\n\t\t\t\t\tcase \"Cmnts\": if(strlen(trim($MSG)) > 0) $Tarray['Cmnts'][0] = $MSG; break; // Straight Comment for the Product\n\t\t\t\t\tcase \"ToFrm\":\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// To From comments for Gift Cards Ect.\n\t\t\t\t\t\tif(strlen(trim($MSGTo)) > 0){\n\t\t\t\t\t\t\t$Tarray['ToFrm'][0] = $MSGTo;\n\t\t\t\t\t\t\t$Tarray['ToFrm'][1] = $MSGFrm;\n\t\t\t\t\t\t} break;\n\t\t\t\t\tcase \"Engv\":\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Engravings for the product allows for multiple lines\n\t\t\t\t\t\tif(intval($v)>1){ if(strlen(trim($MSGEng)) > 0) $Tarray['Engv'][0] = $MSGEng;\n\t\t\t\t\t\t} else { $n=0; foreach($MSGEng as $v){\n\t\t\t\t\t\t\t\tif(strlen(trim($v)) > 0) $Tarray['Engv'][$n] = $v; $n++;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t} break;\n\t\t\t\t}\n\t\t\t} $TmpCart['msgs'] = $Tarray;\n\t\t} else { $TmpCart['msgs'] = 0; }\n\t\t\n\t\t$TmpCart['attnd']\t= \t(isset($_POST['attendee']))? array(clean_variable($_POST['attendee'],true)) : array(0);\n\t\t\n\t\t$this->updateCart($TmpCart); // Update our cart with our new information\n\t\t\n\t\theader(sprintf(\"Location: %s\", $this->Files['Cart'] )); // Go to page to dispaly Cart -- Do this to prevent double insertion of product via refresh button\n\t}", "public function testAddProductToCart()\n {\n $this->browse(function (Browser $browser) {\n // Home Page\n $browser->visit(new HomePage);\n\n // Get Collection Name\n $collectionName = $browser->text('.thumbnail .caption a');\n\n // Products Page\n $browser->clickLink($collectionName)\n ->assertSee($collectionName);\n\n // Get Product Name\n $productName = $browser->text('.thumbnail .caption a');\n\n $browser->clickLink($productName)\n // Product Page\n ->assertSee($productName)\n ->press('Add To Cart')\n ->assertSee('Product has been added to your cart.')\n // Cart Page\n ->visit('/cart')\n ->assertSee($productName);\n });\n }", "public function addProduct(Product $product): CurrentCart;", "public function addToCart()\n {\n\n $id = $_POST['id'];\n $quantity = intval($_POST['quantity']);\n\n $model = new ProductModel();\n $dice = $model->getProductByID($id);\n $diceToAdd = [\n 'product' => $dice,\n 'quantity' => $quantity\n ];\n\n // if cart is empty, initialize empty cart\n if (empty($_SESSION['shoppingCart'])) {\n $_SESSION['shoppingCart'] = [];\n }\n\n // item already in cart ? no\n $found = false;\n\n // if product is already in the cart, adding to quantity\n for ($i = 0; $i < count($_SESSION['shoppingCart']); $i++) {\n if ($_SESSION['shoppingCart'][$i]['product']['id'] == $id) {\n $_SESSION['shoppingCart'][$i]['quantity'] += $quantity;\n $_SESSION['totalInCart'] += $quantity;\n\n $found = true;\n }\n }\n\n //if not, adding product and quantity\n if ($found == false) {\n array_push($_SESSION['shoppingCart'], $diceToAdd);\n $_SESSION['totalInCart'] += $diceToAdd['quantity'];\n }\n\n header('Location: ./shop');\n exit;\n }", "public function add_to_cart($params) {\n if ($params[0]) {\n $_REQUEST['id_item'] = $params[0];\n $_REQUEST['quantity'] = 1;\n }\n\n $hash = self::getHash();\n $cart = $this->NeoCartModel->getCart($hash);\n\n //hai sa bagam produsul in shopping cart\n $this->NeoCartModel->addToCart($_REQUEST, $cart);\n\n controller::set_alert_message(\"<br/>Produsul a fost adaugat in cos\");\n header(\"Location: \" . $this->getRefPage());\n exit();\n }", "function add_product($voucher_id, $prod_id, $seq=NULL)\n\t{\n\t\t// get the next seq\n\t\tif(is_null($seq))\n\t\t{\n\t\t\t$seq = $this->get_next_sequence($voucher_id);\n\t\t}\n\t\t\t\n\t\t\t\n\t\t$this->db->insert('vouchers_products', array('voucher_id'=>$voucher_id, 'product_id'=>$prod_id, 'sequence'=>$seq));\t\n\t}", "public function addItem($id){\n \t$product = Product::findOrFail($id);\n \tCart::add($id, $product->product_name, 1, $product->product_price, 550, ['img'=>$product->image, \"stock\" => $product->stock]);\n \treturn back();\n }", "public function addToCart(){\n\t\t// if the user has accepted to use cookies, they will be stored\n\t\tif(isset($_COOKIE['isUsingCookies']) && $_COOKIE['isUsingCookies'] == true){\n\t\t\t$expirationTime = time()+60*60*24*62;\n\t\t}else{\n\t\t\t$expirationTime = 0;\n\t\t}\n\n\t\t// unset unused attributes from variable\n\t\tunset($_POST['_token']);\n\n\t\t// add the product to the current cart or increase the quantity if it is already in the cart\n\t\tif(isset($_COOKIE['cart'])){\n\t\t\t$previousCart = json_decode($_COOKIE['cart'],true);\n\t\t\tforeach ($previousCart as $key => $product) {\n\t\t\t\tvar_dump($product);\n\t\t\t\techo'<br>';\n\n\t\t\t\tif($_POST['id_product'] == $product['id_product']){\n\t\t\t\t\t$previousCart[$key]['quantity'] += 1;\n\t\t\t\t\tsetcookie('cart', json_encode($previousCart), $expirationTime);\n\t\t\t\t\treturn redirect()->route('cart');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tarray_push($previousCart, ['id_product' => $_POST['id_product'], 'quantity' => '1', 'price' => $_POST['price'], 'picture_url' => $_POST['picture_url'], 'name' => $_POST['name'], 'picture_alt' => $_POST['picture_alt'], 'stock' => $_POST['stock'], 'item_sold' => $_POST['item_sold'], 'name_category' => $_POST['name_category']]);\n\t\t\t$newCart = json_encode($previousCart);\n\n\t\t\tsetcookie('cart', $newCart, $expirationTime);\n\t\t}else{\n\t\t\tsetcookie('cart', json_encode([['id_product' => $_POST['id_product'], 'quantity' => '1', 'price' => $_POST['price'], 'picture_url' => $_POST['picture_url'], 'name' => $_POST['name'], 'picture_alt' => $_POST['picture_alt'], 'stock' => $_POST['stock'], 'item_sold' => $_POST['item_sold'], 'name_category' => $_POST['name_category']]]), $expirationTime);\n\t\t}\n\t\treturn redirect()->route('cart');\n\t}", "public function add()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare')?$this->View()->getSession('compare'):array();\n\n if (!in_array($product_id, $compareProducts)) {\n $compareProducts[] = $product_id;\n }\n // set products to session\n $this->View()->setSession('compare', $compareProducts);\n\n // for ajax request\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_set'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }", "public function add(Request $request, $product_id){\n\n $product = Product::find($product_id);\n\n // data validator \n $validator = Validator::make($request->all(), [\n 'quantity' => 'required|integer|min:1',\n ]);\n\n // case validator fails\n if($validator->fails()){\n return redirect()->back()->with('error', 'You have to add at least one item in your cart');\n }\n\n // check if product exists\n if($product){\n \n if(Auth::user()){\n\n $cartItems = Auth::user()->cartItems;\n foreach($cartItems as $item){\n if($item->product_id == $product->id){\n // case product already exists in cart\n $item->quantity += $request->quantity;\n $item->save();\n \n return redirect()->back()->with('success', 'Product added to cart');\n }\n }\n \n $cartItem = new CartItem;\n $cartItem->quantity = $request->quantity;\n $cartItem->product_id = $product_id;\n $cartItem->user_id = Auth::user()->id;\n $cartItem->save();\n\n }else{\n \n // if there are products in this session\n if(Session::has('cartItems')){\n foreach(Session::get('cartItems') as $item){\n if($item->product_id == $product->id){\n // case product already exists in cart\n $item->quantity += $request->quantity;\n \n return redirect()->back()->with('success', 'Product added to cart');\n }\n }\n\n $cartItem = new \\stdClass();\n $cartItem->quantity = $request->quantity;\n $cartItem->product_name = $product->name;\n $cartItem->product_id = $product->id;\n $cartItem->product_price = $product->price;\n\n $cartItems = Session::get('cartItems');\n array_push($cartItems, $cartItem);\n Session::put('cartItems', $cartItems);\n\n }else{\n\n $cartItem = new \\stdClass();\n $cartItem->quantity = $request->quantity;\n $cartItem->product_name = $product->name;\n $cartItem->product_id = $product->id;\n $cartItem->product_price = $product->price;\n\n Session::put('cartItems', array());\n $cartItems = Session::get('cartItems');\n array_push($cartItems, $cartItem);\n Session::put('cartItems', $cartItems);\n\n }\n\n } \n\n return redirect()->back()->with('success', 'Product added to cart');\n\n }\n\n // case product not found\n return redirect()->back()->with('error', 'Product not found');\n\n }", "public function store(Request $request)\n {\n $user = Auth::User();\n $cart = DB::table('orders')\n ->select('id')\n ->where('status_id', '=', 1)\n ->where('user_id', '=', $user->id)\n ->value('id');\n\n if(empty($cart)) {\n $order = new Order;\n $order->user_id = $user->id;\n $order->status_id = 1;\n $order->save();\n\n $orderProduct = new OrderProduct;\n $orderProduct->order_id = $order->id;\n $orderProduct->product_id = $request->product_id;\n $orderProduct->quantity = $request->quantity;\n $orderProduct->save();\n } else {\n // if you already have this product in your cart just add the next quantity to the same line item\n if (OrderProduct::where('order_id', $cart)->where('product_id', $request->product_id)->exists() ){\n $repeatOrderProduct = OrderProduct::where('order_id', $cart)->where('product_id', $request->product_id)->first();\n $orderProduct = OrderProduct::find($repeatOrderProduct->id);\n $orderProduct->product_id = $request->product_id;\n $orderProduct->quantity = $request->quantity + $orderProduct->quantity;\n $orderProduct->save();\n }\n // else make a new line item for this new item\n else {\n $orderProduct = new OrderProduct;\n $orderProduct->order_id = $cart;\n $orderProduct->product_id = $request->product_id;\n $orderProduct->quantity = $request->quantity;\n $orderProduct->save();\n }\n }\n\n Activity::log('Saved an item to their cart.', $user->id);\n\n $request->session()->flash('status', 'Product was saved to cart.');\n\n return Redirect::action('CartController@index');\n\n }", "function old_pushCart($product_id,$quantity,$transport) \n {\n $conn=connect();\n $query= \"INSERT INTO shopping_cart(user_id,delivery,product_id,quantity) VALUES (\".$this->user_id.\",\".$transport.\",\".$product_id.\",\".$quantity.\")\"; //obtain information about a product\n if($results = mysqli_query($conn, $query)) //to add to the cart\n {\n $last_id =mysqli_insert_id($conn);\n $this->cart->addProduct($last_id, $product_id,$transport,$quantity);\n }\n mysqli_close($conn);\n \n \n }", "public function addselectedtocartAction() {\n $messages = array();\n $urls = array();\n $wishlistIds = array();\n $notSalableNames = array(); // Out of stock products message\n\n\t\t$ids = Mage::helper('core')->htmlEscape($this->getRequest()->getParam('ids'));\n\t\t$qtys = Mage::helper('core')->htmlEscape($this->getRequest()->getParam('qtys'));\n\t\t\n\t\t$ids_arr = explode(',', $ids);\n\t\t$qtys_arr = explode(',', $qtys);\n\t\t\n\t\t$i=0;\n\t\tforeach($ids_arr as $id)\n\t\t{\n\t\t\t$id = intval($id);\n\t\t\t$qty = intval($qtys_arr[$i]);\n\t\t\tif($id != '' && $qty != '')\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t$product = Mage::getModel('catalog/product')\n\t\t\t\t\t\t->load($id)\n\t\t\t\t\t\t->setQty($qty);\n\t\t\t\t\tif ($product->isSalable()) {\n\t\t\t\t\t\tMage::getSingleton('checkout/cart')->addProduct($product,$qty);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$notSalableNames[] = $product->getName();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception $e)\n\t\t\t\t{\n\t\t\t\t\t$url = Mage::getSingleton('checkout/session')->getRedirectUrl(true);\n\t\t\t\t\tif ($url)\n\t\t\t\t\t{\n\t\t\t\t\t\t$url = Mage::getModel('core/url')\n\t\t\t\t\t\t\t->getUrl('catalog/product/view', array(\n\t\t\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t\t\t'wishlist_next' => 1\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t$urls[] = $url;\n\t\t\t\t\t\t$messages[] = $e->getMessage();\n\t\t\t\t\t\t$wishlistIds[] = $id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//$item->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\t\t\t$i++;\n\t\t}\n\t\tMage::getSingleton('checkout/cart')->save();\n\n if (count($notSalableNames) > 0) {\n Mage::getSingleton('checkout/session')\n ->addNotice($this->__('Following product(s) is currently out of stock:'));\n array_map(array(Mage::getSingleton('checkout/session'), 'addNotice'), $notSalableNames);\n }\n\n if ($urls) {\n Mage::getSingleton('checkout/session')->addError(array_shift($messages));\n $this->getResponse()->setRedirect(array_shift($urls));\n\n Mage::getSingleton('checkout/session')->setWishlistPendingUrls($urls);\n Mage::getSingleton('checkout/session')->setWishlistPendingMessages($messages);\n Mage::getSingleton('checkout/session')->setWishlistIds($wishlistIds);\n }\n else {\n Mage::getSingleton('checkout/session')\n ->addNotice($this->__('Product(s) Added successfully'));\n $this->_redirect('wishlist/index');\n }\n }", "function add($product_id)\n\t{\n\t\t$product = $this->database->getProductbyId($product_id);\n\n\t\tif($product)\n\t\t{\n\t\t\t$this->_add_to_cart($product);\n\t\t}\n\t\t\n\t\t$this->_show_add_to_cart_comment($product['add_to_cart_comment']);\n\t\t\n\t\tredirect('cart');\n\t}", "public static function addItem($id_product, $id_item, $qty)\n {\n }", "public function add($product_id)\n {\n $product = Product::find($product_id);\n if(!$product)\n {\n abort(404);\n }\n Cart::associate('Product','App\\Models')->add($product_id, $product->name, 1, $product->price);\n return redirect()->route('cart.index');\n }", "private function addToCart () {\n }", "private function addToCart () {\n }", "public function addProduct($productInfo, $quantity, $request)\n { \n if (empty($this->cart[$productInfo->id])) {\n $product = ['product_id' => $productInfo->id, 'quantity' => $quantity, 'product_name' => $productInfo->product_name, 'product_desc' => $productInfo->product_description, 'product_price' => $productInfo->product_price];\n $this->cart[$productInfo->id] = $product;\n } else {\n $this->addProductCount($productInfo->id, $quantity);\n }\n\n $this->saveCart($request);\n }", "public function add_to_cart_quote($quote_request_id)\n {\n $this->load->model('bidding_model');\n $quote_request = $this->bidding_model->get_quote_request($quote_request_id);\n\n if (!empty($quote_request)) {\n $product = $this->product_model->get_product_by_id($quote_request->product_id);\n if (!empty($product)) {\n $cart = $this->session_cart_items;\n $item = new stdClass();\n $item->cart_item_id = generate_unique_id();\n $item->product_id = $product->id;\n $item->product_type = $product->product_type;\n $item->product_title = $quote_request->product_title;\n $item->options_array = array();\n $item->quantity = $quote_request->product_quantity;\n $item->unit_price = $quote_request->price_offered / $quote_request->product_quantity;\n $item->total_price = $quote_request->price_offered;\n $item->currency = $quote_request->price_currency;\n $item->product_vat = 0;\n $item->shipping_cost = $quote_request->shipping_cost;\n $item->is_stock_available = 1;\n $item->purchase_type = 'bidding';\n $item->quote_request_id = $quote_request->id;\n array_push($cart, $item);\n\n $this->session->set_userdata('mds_shopping_cart', $cart);\n return true;\n }\n }\n return false;\n }", "public function actionAddProductList()\n {\n\n $order_id = Yii::app()->request->getQuery('id');\n $model = $this->_loadModel($order_id);\n if ($order_id) {\n if (!Yii::app()->request->isAjaxRequest) {\n $this->redirect(array('/admin/cart/default/update', 'id' => $order_id));\n }\n }\n if (!Yii::app()->request->isAjaxRequest) {\n $this->redirect(array('/admin/cart/default/index'));\n }\n\n $dataProvider = new ShopProduct('search');\n\n if (isset($_GET['ShopProduct']))\n $dataProvider->attributes = $_GET['ShopProduct'];\n\n $this->renderPartial('_addProduct', array(\n 'dataProvider' => $dataProvider,\n 'order_id' => $order_id,\n 'model' => $model,\n ));\n }", "public function add_item($data)\n {\n $required = array(\n 'id' => 'Product id not passed',\n );\n $this->di['validator']->checkRequiredParamsForArray($required, $data);\n\n $cart = $this->getService()->getSessionCart();\n\n $product = $this->di['db']->getExistingModelById('Product', $data['id'], 'Product not found');\n\n //reset cart by default\n if (!isset($data['multiple']) || !$data['multiple']) {\n $this->reset();\n }\n\n return $this->getService()->addItem($cart, $product, $data);\n }", "public function addProduct($prod) {\n\t\t\t$this->products[$this->pid] = $prod;\n\t\t\t$this->pid ++;\n\t\t}", "public function addToCart($prod_id){\n\t\t$product = Product::find($prod_id);\n $this->cartConstruct();\n $this->add($product);\n Session::put('cart',$this);\n return redirect()->route('cart');\n\t}", "public function addProduct($coupon_id, $prod_id, $seq=NULL)\n {\n // get the next seq\n if(is_null($seq))\n {\n $seq = $this->getNextSequence($coupon_id);\n }\n \n \n CI::db()->insert('coupons_products', array('coupon_id'=>$coupon_id, 'product_id'=>$prod_id, 'sequence'=>$seq)); \n }", "public function add(Product $product) {\n\t\t$this->products[] = $product;\n\t}", "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "public function AddProduct () {\n $piece1 = '(';\n \t$piece2 = '';\n\t\t\n\t\tif(isset($SKU)) {\n\t\t\t$piece1 .= 'ProductSKU,';\n\t\t\t$piece2 .= \"'\" . $this->SKU . \"'\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: SKU Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$productTable = 'Products';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $productResults = OrderData::InsertData($productTable, $productPiece);\n\t\t\n\t\tif($productResults === false)\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tif(isset($Qty)) {\n\t\t\t$piece1 .= 'TotalAMT,';\n\t\t\t$piece2 .= \"\" . $this->initialquantityStock . \"\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: Quantity Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$piece1 .= 'CommittedAMT,';\n\t\t$piece2 .= $this->committedStock . ',';\n\n \t\t$piece1 .= 'AvailableAMT';\n $piece2 .= $this->availableStock . ')';\n\t\t\n\t\t$piece1 .= ') VALUES (';\n\n $inventoryPiece = $piece1 . $piece2;\n\t\t\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $inventoryResults = OrderData::InsertData($inventoryTable, $inventoryPiece);\n\t\t\n\t\tif($inventoryResults === false)\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}", "function get_list_product_add_to_cart() {\n\n global $product; \n \n echo apply_filters( 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok.\n \tsprintf( '<div><a href=\"%s\" data-quantity=\"%s\" class=\"uk-button uk-width-1-1 uk-button-primary %s\" %s>%s</a></div>',\n \t\tesc_url( $product->add_to_cart_url() ),\n \t\tesc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),\n \t\tesc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ),\n \t\tisset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '',\n \t\tesc_html( $product->add_to_cart_text() )\n \t),\n $product, $args );\n\n }", "public function addItemToCart(Request $request,$id){\n \n //get product\n $product=Product::with('get_images')->findOrFail($id);\n\n\n //check if the quantity entered is null or 0\n\n if($request->quantity==null || $request->quantity==0){\n return back()->withInput($request->input())->withErrors('Min unit needs to be 1');\n }\n //to check if the product exists in cart \n\n $cart_product=Cart::content()->groupBy('id')->get($id);\n\n //if not present check the quantity requested with the entered one. If present then compare with quantity requested and entered.\n\n if($cart_product==null){\n if($request->quantity>$product->quantity){\n return back()->withInput($request->input())->withErrors('Only '.$product->quantity.'units are available');\n }\n }\n else if(($request->quantity+($cart_product->first()->qty))>$product->quantity ){\n return back()->withInput($request->input())->withErrors('Only '.$product->quantity.'units are available');\n }\n if($product->special_price_from && $product->special_price_to){\n $date=date('Y-m-d');\n if($date<=$product->special_price_to && $date>=$product->special_price_from){\n \n $product->price=$product->special_price;\n\n }\n }\n Cart::add(['id'=>$product->id,'name'=>$product->name,'qty'=>$request->quantity,'price'=>$product->price,'options'=>['image'=>$product->get_images->first()->image_name]]);\n session(['cart_total'=>round((float)str_replace(',', '', Cart::total()),2)]);\n\n Session::flash('success','Item added to cart!');\n return back();\n\n }", "function gc_template_loop_add_to_cart( $args = array() ) {\n\t\tglobal $product;\n\n\t\tif ( $product ) {\n\t\t\t$defaults = array(\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'class' => implode( ' ', array_filter( array(\n\t\t\t\t\t\t'btn btn-outline-secondary gc-add-to-cart',\n\t\t\t\t\t\t'product_type_' . $product->get_type(),\n\t\t\t\t\t\t$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',\n\t\t\t\t\t\t$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',\n\t\t\t\t) ) ),\n\t\t\t);\n\n\t\t\t$args = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );\n\n\t\t\twc_get_template( 'loop/add-to-cart.php', $args );\n\t\t}\n\t}", "function uc_order_edit_products_add_blank($form, &$form_state) {\n $form_state['refresh_products'] = TRUE;\n $form_state['rebuild'] = TRUE;\n\n $order = $form_state['build_info']['args'][0];\n\n $product = new stdClass();\n $product->qty = 1;\n $product->order_id = $order->order_id;\n uc_order_product_save($order->order_id, $product);\n\n $order->products[] = $product;\n\n uc_order_log_changes($order->order_id, array('add' => t('Added new product line to order.')));\n}", "public function addToSession($product)\n {\n $session = $this->session;\n\n if ($session->has('cart')) {\n $products = (array)$session->get('cart');\n array_push($products, $product->getHash());\n $session->set('cart', $products);\n } else {\n $products = array($product->getHash());\n $session->set('cart', $products);\n }\n }", "public function addToCart()\n\t{\n\t\t$id \t= $this->request['item_id'];\n\t\t$number = intval($this->request['quantity']);\n\t\t\n\t\t#permission and enabled?\n\t\t$this->registry->ecoclass->canAccess('cart', false);\n\t\t\n\t\t#init\n\t\t$checks \t\t= array();\n\n\t\t#break up the item classification that we're adding to our cart\t\t\t \n\t\t$item_input_name = explode('_' , $id);\n\n\t\t$type \t\t\t= $item_input_name[0];\n\t\t$id \t\t\t= $item_input_name[1];\n\t\t$banktype \t\t= strtolower($item_input_name[2]);\n\n\t\t#loan hotfix\n\t\t$type\t\t\t= ( $banktype != 'loan' ) ? $type : $banktype;\n\t\t\n\t\t#grab this cart types class object\n\t\t$cartItemType = $this->registry->ecoclass->grabCartTypeClass($type);\n\n\t\t#format number a bit..\t\n\t\t$number = $this->registry->ecoclass->makeNumeric($number, true);\n\n\t\t#grab item from cache\n\t\t$theItem\t= $cartItemType->grabItemByID($id);\n\t\t\t\t\n\t\t#check for any illegal activity :shifty:\n\t\t$checks = $this->checkCartAdditions( $id, $type, $banktype, $number, $theItem, false, $cartItemType );\n\t\t\n\t\t#if after all that we have an error...\n\t\tif ( $checks['error'] )\n\t\t{\n\t\t\t$this->registry->output->showError( $checks['error'] );\n\t\t}\n\n\t\t#no error? Lets throw the item and number in our cart!\n\t\tif ( $checks['cartItem'] )\n\t\t{\n\t\t\t$add2Item = array('c_quantity' => $checks['cartItem']['c_quantity'] + $checks['number'] );\n\t\t\t\t\t\t\t\n\t\t\t$this->DB->update( 'eco_cart', $add2Item, 'c_member_id = ' .$this->memberData['member_id'].' AND c_id = '.$checks['cartItem'] ['c_id'] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$newItem = array( 'c_member_id' \t=> $this->memberData['member_id'],\n\t\t\t\t\t\t\t 'c_member_name'\t=> $this->memberData['members_display_name'],\n\t\t\t\t\t\t\t 'c_type' \t\t\t=> ( $type == 'loan' ) ? 'bank' : $type,\n\t\t\t\t\t\t\t 'c_type_id' \t\t=> $id,\n\t\t\t\t\t\t\t 'c_type_class' \t=> ( $type == 'bank' || $type == 'loan' ) ? $banktype : '',\n\t\t\t\t\t\t\t 'c_quantity'\t\t=> $checks['number'],\n\t\t\t\t\t\t\t);\n\t\t\t$this->DB->insert( 'eco_cart', $newItem );\n\t\t}\n\t\t\n\t\t#redirect message and show what we added\n\t\t$redirect_message = $cartItemType->add2CartRedirectMessage($checks, $theItem);\n\t\t\n\t\t$this->registry->output->redirectScreen( $redirect_message, $this->settings['base_url'] . \"app=ibEconomy&amp;tab=buy&amp;area=cart\" );\n\t}", "public function add()\n {\n if (Request::isMethod('post')) {\n\n $product_id = Request::get('id');\n $product = Product::find($product_id);\n Cart::add(\n [\n 'id' => $product_id,\n 'name' => $product->name,\n 'image' => $product->image,\n 'qty' => 1,\n 'price' => $product->price\n ]\n );\n }\n return redirect('/products');\n }", "public function addItemToCart($account_id, $item_id, $quantity = false);", "public function addProductToCart(Request $request): JsonResponse\n {\n\n // Check if request includes the product\n $product_id = $request->get('product');\n if (!$product_id) {\n return $this->errorResponse('You need to provide a product!', Response::HTTP_BAD_REQUEST);\n }\n\n // Check if product exists in the db\n $product = Product::find($product_id);\n if (!$product) {\n return $this->errorResponse('Couldnt find product', Response::HTTP_NOT_FOUND);\n }\n\n $this->orderHandler->updateCartProductSession($product_id);\n return $this->successResponse([], Response::HTTP_OK);\n }", "public function agregarProducto(){\n array_push($_SESSION['carrito'], array($this -> producto, $this -> cantidad));\n }", "public function addCartItem($rateplanId, $quantity){\r\n\t\terror_log('cart.php rateplanId is: ' . $rateplanId, 0);\r\n\t\terror_log('cart.php quantity is: ' . $quantity, 0);\r\n\t\t//$newCartItem = new Cart_Item($rateplanId, $quantity, $this->latestItemId);\r\n\r\n\r\n\r\n\t\t$newCartItem = new Cart_Item();\r\n\t\t$newCartItem->ratePlanId = $rateplanId;\r\n\t\terror_log('cart.php ratePlanId2 is: ' . $newCartItem->ratePlanId, 0);\r\n\t\t$newCartItem->itemId = $this->latestItemId++;\r\n\t\terror_log('cart.php itemId is: ' . $newCartItem->itemId, 0);\r\n\t\t$newCartItem->quantity = $quantity;\r\n\r\n\t\t//$plan = Catalog::getRatePlan($newCartItem->ratePlanId);\r\n\t\t$rpId = $newCartItem->ratePlanId;\r\n\r\n\t\r\n\r\n\r\n\t\t$catalog_groups = self::readCache();\t//should be in associative array already.\r\n\r\n\t\t$catalog_products = $catalog_groups->products;\t//returns enture product array.\r\n\t\t//error_log(print_r($catalog_products, true));\r\n\t\t//error_log(print_r($catalog_products[2], true));\t//returns a product array with productrateplan and productrateplancharges arrays embedded inside.\r\n\t\t$catalog_rateplans = $catalog_products[0]->productRatePlans;\r\n\t\t//error_log(print_r($catalog_rateplans, true));\r\n\r\n\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// foreach($catalog_groups as $group){\r\n\t\t// \t\r\n\t\t// \tforeach($group->products as $product){\r\n\t\t// \t\t\r\n\t\t// \t\tforeach($product->productRatePlans as $ratePlan){\r\n\t\t// \t\t\tif($ratePlan->id == $rpId){\r\n\t\t// \t\t\t\t$plan = $ratePlan;\r\n\t\t// \t\t\t}\r\n\t\t// \t\t}\r\n\t\t// \t}\r\n\t\t// }\r\n\t\t// $plan = NULL;\r\n\r\n\t/**\r\n\t * Given a RatePlan ID, retrieves all rateplan information by searching through the cached catalog file\r\n\t * @return RatePlan model\r\n\t */\r\n\t// public static function getRatePlan($rpId){\r\n\t// \t$catalog_groups = self::readCache();\r\n\t// \tforeach($catalog_groups as $group){\r\n\t// \t\tforeach($group->products as $product){\r\n\t// \t\t\tforeach($product->ratePlans as $ratePlan){\r\n\t// \t\t\t\tif($ratePlan->Id == $rpId){\r\n\t// \t\t\t\t\treturn $ratePlan;\r\n\t// \t\t\t\t}\r\n\t// \t\t\t}\r\n\t// \t\t}\r\n\t// \t}\r\n\t// \treturn NULL;\r\n\t// }\r\n\r\n\r\n/*\t\t//Not needed? no Uom. \r\n\t\tif(isset($plan->Uom)){\r\n\t\t\t$newCartItem->uom = $plan->Uom;\r\n\t\t} else {\r\n\t\t\t$newCartItem->uom = null;\t\t\t\r\n\t\t}\r\n*/\t\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->Name : 'Invalid Product';\r\n\t\t// $newCartItem->ProductName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\r\n\t\t//Commented out for DEMO\r\n\t\t// $newCartItem->ratePlanName = $plan!=null ? $plan->name : 'Invalid Product';\r\n\t\t// $newCartItem->productName = $plan!=null ? $plan->productName : 'Invalid Product';\r\n\t\tarray_push($this->cart_items, $newCartItem);\r\n\t}", "public function addToCart($product, $qty = 1){\n // Create Cart\n // if Product has in Cart, add + qty\n if(isset($_SESSION['cart'][$product->id])){\n $_SESSION['cart'][$product->id]['qty'] += $qty;\n } else { // if not in Cart, create\n $_SESSION['cart'][$product->id] = [\n 'qty' => $qty,\n 'name' => $product->name,\n 'price' => $product->price,\n 'img' => $product->img\n ];\n }\n // Total Qty\n // if isset Qty or if not\n $_SESSION['cart.qty'] = isset( $_SESSION['cart.qty'])\n ? $_SESSION['cart.qty'] + $qty\n : $qty;\n // Total Sum\n $_SESSION['cart.sum'] = isset($_SESSION['cart.sum'])\n ? $_SESSION['cart.sum'] + $qty * $product->price\n : $qty * $product->price;\n\n }", "public function addToCart()\n {\n $product = Cart::firstOrNew([\n 'user_id' => $this->student->id,\n 'product_id' => $this->id,\n 'product_type' => Enrollment::class\n ]);\n\n $product->save();\n return $product->id;\n }", "public function addToCart()\n\t{\n\t\t$recordId = $this->request->getInteger('record');\n\t\t$amount = $this->request->getInteger('amount', 1);\n\t\tif ($this->cart->has($recordId)) {\n\t\t\t$this->cart->add($recordId, $amount);\n\t\t} else {\n\t\t\t$this->cart->set($recordId, $amount, [\n\t\t\t\t'priceNetto' => (float) $this->request->get('priceNetto', 0.0),\n\t\t\t\t'priceGross' => (float) $this->request->get('priceGross', 0.0),\n\t\t\t]);\n\t\t}\n\t\t$this->saveCart();\n\t}", "public function addItem(string $sku, int $qty): Cart;", "public function add_to_cart($cartid=0, $prodid=0, $qty=0) {\n\t\t// otherwise create a new entry in cart for this prodid.\n\t\t\n\t\t$query = \"SELECT * FROM pivot_order-products WHERE order_id = ? AND product_id = ?\";\t\t\t\n\t\t$values = array($cartid,$prodid);\n\t\t$results = $this->db->query($query,$values);\n\n\t\tif($results) {\n\t\t\t$total = $results('quantity') + $qty;\n\t\t\t$query = \"UPDATE pivot_order-products SET quantity = ?, SET modified_on = NOW() WHERE order_id = ? AND product_id = ?\";\n\t\t\t$values = array($total, $cartid, $prodid);\n\n\t\t} else {\n\t\t\t$query = \"INSERT INTO pivot_order-products (order_id,product_id,quantity,created_on,modified_on) VALUES \";\n\t\t\t$query = \"(?,?,?,NOW(),NOW())\";\n\t\t\t$values = array($cartid, $prodid, $qty);\n\n\t\t}\n\t\treturn $this->db->query($query, $values);\n\t}", "public function add_product($project_id, $product_id, $quantity, $price)\n\t{\n\t\tif($this->projects_model->add_product($project_id, $product_id, $quantity, $price))\n\t\t{\n\t\t\tredirect('edit-project/'.$project_id);\n\t\t}\n\t}", "public function add($id_plate){\n\n $product = array_key_exists($id_plate,$this->cart) ? $this->cart[$id_plate] : new product([\n\n 'plate' => Plate::where('id', $id_plate)->get(),\n 'count' => 0,\n ]);\n $product->put('count',$product->get('count') + 1);\n //dd(json_decode($product['plate'],true));\n $this->cart['sum'] += json_decode($product['plate'],true)[0]['price'];\n $this->cart[$id_plate] = $product;\n return $this;\n }", "function addToCart($id, $format, $finition, $cadre, $prix) {\n $item = [\n 'id' => $id,\n 'format' => $format,\n 'finition' => $finition,\n 'cadre' => $cadre,\n 'prix' => $prix,\n 'quantity' => 1,\n ];\n\n $_SESSION['cart'][] = $item;\n}", "function add(&$d) {\r\n\t\t$cart \t\t\t\t= $_SESSION[\"cart\"];\r\n\t\t$quantity \t\t= $this->check_quantity($d[\"product_id\"],$d[\"quantity\"]);\r\n\t\t$updated \t\t\t= false;\r\n\t\t\r\n\t\t// Check for duplicate\r\n\t\tfor ($idx=0; $idx<sizeof($cart); $idx++) {\r\n\t\t\tif ($cart[$idx][\"product_id\"] == $d[\"product_id\"]){\r\n\t\t\t\t// update;\r\n\t\t\t\t$cart[$idx][\"quantity\"] = $quantity;\r\n\t\t\t\t$updated = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (!$updated) {\r\n\t\t // add\r\n\t\t $idx = sizeof($cart);\r\n\t\t\t$cart[$idx][\"quantity\"] \t= $quantity;\r\n\t\t\t$cart[$idx][\"product_id\"] = $d[\"product_id\"];\r\n\t\t\t$cart[$idx][\"label\"] \t\t\t= $d[\"label\"];\r\n\t\t\t$cart[$idx][\"company\"] \t\t= $d[\"company\"];\r\n\t\t\t$cart[$idx][\"region\"] \t\t= $d[\"region\"];\r\n\t\t}\r\n\t\t\r\n\t\t$_SESSION[\"cart\"][$idx] = $cart[$idx];\r\n\t\treturn True; \r\n\t}", "public function actionAdd() {\n $id = Yii::$app->request->get('id');\n $qty = (int)Yii::$app->request->get('qty');\n $qty = !$qty ? 1 : $qty;\n\n $product = Product::findOne($id);\n if (empty($product)) return false;\n $session = $this->session;\n $cart = new Cart();\n $cart->addToCart($product, $qty);\n if (!Yii::$app->request->isAjax) { // works if js is off and ajax request did not occur\n return $this->redirect(Yii::$app->request->referrer);\n }\n $this->layout = false; // loading only view file, without layout;\n $items_to_show = $this->getProductObject($session);\n return $this->render('cart-modal', compact('session', 'items_to_show'));\n }", "public function store(Request $request)\n {\n $request->validate([\n 'pid' => 'required|integer',\n\n ]);\n\n $pid = Product::find($request->pid);\n\n Cart::add([\n 'id'=> $pid->id,\n 'name'=> $pid->product,\n 'price'=> $pid->price,\n 'quantity' => $request->qty,\n 'attributes' => [\n 'image'=> $pid->image,\n ]\n\n ]);\n\n\n\n\n return redirect()->route('cart.show');\n\n }", "public function addToCart($request)\n\t{\n // Validation \n $this->attributes = $request;\n $this->user_id = 1;\n\n if(!$this->validate()){\n return false;\n }\n\n // Validation: Check Product Exist in Product Table \n $productModel = Products::findOne($this->product_id);\n if(!$productModel){\n $this->addError(\"Failed to Add\",\"Given Product (\".$this->product_id.\") is not Available\");\n return false;\n }\n\n // Check Product Already Exist. If already exist then update other wise add\n $cartProduct = Cart::find()->where([\"product_id\"=>$this->product_id])->one();\n\n if($cartProduct){\n $cartProduct->quantity = $cartProduct->quantity + $this->quantity; \n $isSaved = $cartProduct->save();\n return $isSaved ? $cartProduct->id : false; \n }else{\n $isSaved = $this->save(); \n return $isSaved ? $this->id : false; \n }\n }", "public function addtocartAction()\n\t{\n\t\trequire_once './app/Mage.php';\n\t\tMage::app('default');\n\n $params = array();\n\t\t$uid = $this->getRequest()->getPost('uid');\n $pid = $this->getRequest()->getPost('pid');\n\t\t$pqty = $this->getRequest()->getPost('qty');\n $size = $this->getRequest()->getPost('size');\n $params['cptions']['size_clothes'] = $size;\n\n $token = $this->getRequest()->getPost('token');\n\n if($this->tokenval() != $token)\n {\n $response['msg'] = 'You are not authorized to access this';\n $response['status'] = '1';\n echo json_encode($response);\n exit;\n }\n\n $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');\n\n $selectrows = \"SELECT `sales_flat_quote`.* FROM `sales_flat_quote` WHERE customer_id= \".$uid.\" AND is_active = '1' AND COALESCE(reserved_order_id, '') = ''\";\n\n $rowArray = $connectionRead->fetchRow($selectrows);\n\n $entity_id = $rowArray['entity_id'];\n\n $select = $connectionRead->select()\n ->from('sales_flat_quote_item', array('*'))\n ->where('quote_id=?', $entity_id)\n ->where('product_id=?', $pid);\n\n $rowItems = $connectionRead->fetchAll($select);\n\n $qtycount = 0;\n $items = array();\n foreach ($rowItems as $item) {\n if ($item['price'] != 0) {\n $qty2 = number_format($item['qty'],0);\n $qtycount += $qty2;\n }\n }\n\n $_product = Mage::getModel('catalog/product')->load($pid);\n\n $qty = 0;\n $min = (float)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getNotifyStockQty();\n\n if ($_product->isSaleable()) {\n if ($_product->getTypeId() == \"configurable\") {\n $associated_products = $_product->loadByAttribute('sku', $_product->getSku())->getTypeInstance()->getUsedProducts();\n foreach ($associated_products as $assoc){\n $assocProduct = Mage::getModel('catalog/product')->load($assoc->getId());\n $qty += (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($assocProduct)->getQty();\n }\n } elseif ($_product->getTypeId() == 'grouped') {\n $qty = $min + 1;\n } elseif ($_product->getTypeId() == 'bundle') {\n $associated_products = $_product->getTypeInstance(true)->getSelectionsCollection(\n $_product->getTypeInstance(true)->getOptionsIds($_product), $_product);\n foreach($associated_products as $assoc) {\n $qty += Mage::getModel('cataloginventory/stock_item')->loadByProduct($assoc)->getQty();\n }\n } else {\n $qty = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();\n }\n }\n\n $response = array();\n\n $checkqty = $qtycount + $pqty;\n\n /*if($checkqty > 2)\n {\n $response['msg'] = 'The maximum quantity allowed for purchase is 2';\n $response['status'] = '0';\n echo json_encode($response);\n exit;\n }*/\n\n $params['product_id'] = $pid;\n $params['qty'] = $pqty;\n\n if ($_product->getTypeId() == \"configurable\" && isset($params['cptions'])) {\n\n // Get configurable options\n $productAttributeOptions = $_product->getTypeInstance(true)\n ->getConfigurableAttributesAsArray($_product);\n\n foreach ($productAttributeOptions as $productAttribute) {\n $attributeCode = $productAttribute['attribute_code'];\n\n if (isset($params['cptions'][$attributeCode])) {\n $optionValue = $params['cptions'][$attributeCode];\n\n foreach ($productAttribute['values'] as $attribute) {\n if ($optionValue == $attribute['store_label']) {\n $params['super_attribute'] = array(\n $productAttribute['attribute_id'] => $attribute['value_index']\n );\n //$params['options'][$productAttribute['attribute_id']] = $attribute['value_index'];\n }\n }\n }\n else{\n foreach ($productAttribute['values'] as $attribute) {\n if (trim($size) == $attribute['store_label']) {\n $params['super_attribute'] = array(\n $productAttribute['attribute_id'] => $attribute['value_index']\n );\n }\n }\n }\n }\n }\n\n unset($params['cptions']);\n\n //$childProduct = Mage::getModel('catalog/product_type_configurable')->getProductByAttributes(151, $_product);\n\n try {\n\n $customerData = Mage::getModel('customer/customer')->load($uid)->getData();\n\n $connectionRead = Mage::getSingleton('core/resource')->getConnection('core_read');\n\n $selectrows = \"SELECT `sales_flat_quote`.* FROM `sales_flat_quote` WHERE customer_id= \".$uid.\" AND is_active = '1' AND COALESCE(reserved_order_id, '') = ''\";\n\n $rowArray = $connectionRead->fetchRow($selectrows);\n\n if(!empty($rowArray))\n {\n $entity_id = $rowArray['entity_id'];\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_read');\n $sqlQuerys = \"SELECT * FROM sales_flat_quote_item WHERE quote_id =\".$rowArray['entity_id'].\" AND product_id = \".$pid.\" ORDER BY item_id DESC\";\n $rowArrays = $db_write->fetchRow($sqlQuerys);\n\n if(!empty($rowArrays))\n {\n if($rowArrays['product_type'] == 'configurable')\n {\n $sqlQueryss = \"SELECT * FROM sales_flat_quote_item WHERE parent_item_id =\".$rowArrays['item_id'];\n $rowArrayss = $db_write->fetchRow($sqlQueryss);\n\n //check Quantity count\n //$sqlQuantity = \"SELECT * FROM sales_flat_quote_item WHERE item_id =\".$rowArrays['parent_item_id'];\n //$rowArrayqnt = $db_write->fetchRow($sqlQuantity);\n\n $checkqty = number_format($rowArrays['qty']) + $pqty;\n\n $oldsize = explode('(', $rowArrayss['name']);\n if(isset($oldsize[1])) {\n $newsize = str_replace(' )', '', $oldsize[1]);\n }\n else{\n $oldsize = explode('-', $rowArrayss['name']);\n if(isset($oldsize[1]))\n {\n $newsize = $oldsize[1];\n }\n else\n {\n $oldsize = explode('\\'', $rowArrayss['name']);\n if(isset($oldsize[1]))\n {\n $newsize = $size[1];\n }\n }\n }\n\n if(trim($newsize) == trim($size))\n {\n if($checkqty > 2)\n {\n $response['msg'] = 'The maximum quantity allowed for purchase is 2';\n $response['status'] = '0';\n echo json_encode($response);\n exit;\n }\n $connections = Mage::getSingleton('core/resource')->getConnection('core_write');\n $date = date('Y-m-d h:i:s');\n $totqty = $rowArrays['qty'] + $pqty;\n $totprice = $_product->getSpecialPrice() * $totqty;\n $connections->query(\"UPDATE `sales_flat_quote_item` SET `updated_at`='\".$date.\"',`qty`=\".$totqty.\",`row_total`=\".$totprice.\",`base_row_total`=\".$totprice.\",`price_incl_tax`=\".$totprice.\",`base_price_incl_tax`=\".$totprice.\",`row_total_incl_tax`=\".$totprice.\",`base_row_total_incl_tax`=\".$totprice.\" WHERE product_id =\".$pid.\" AND product_type ='configurable'\");\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n else\n {\n $connectionWrit = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $date = date('Y-m-d h:i:s');\n $sku = $_product->getSku();\n $name = $_product->getName();\n $price = $_product->getSpecialPrice() * $pqty;\n $connectionWrit->query(\"INSERT INTO `sales_flat_quote_item`(`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1','0','\".$sku.\"','\".$name.\"','1.0000',\".$pqty.\",\".$price.\",\".$price.\",\".$price.\",\".$price.\",'1.0000','configurable',\".$price.\",\".$price.\",\".$price.\",\".$price.\",'0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sqlQuery = \"SELECT item_id FROM sales_flat_quote_item ORDER BY item_id DESC LIMIT 1;\";\n $rowArrayes = $db_write->fetchRow($sqlQuery);\n $item_id = $rowArrayes['item_id'];\n\n $connectionWri = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sname = $name.'( '.$size.' )';\n $connectionWri->query(\"INSERT INTO `sales_flat_quote_item` (`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `parent_item_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1',\".$item_id.\",'0','\".$sku.\"','\".$sname.\"','1.0000',\".$pqty.\",'0.0000','0.0000','0.0000','0.0000','1.0000','simple','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $rowcount = $rowArray['items_count'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_count`=\".$rowcount.\", `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n }\n\n if($rowArrays['product_type'] == 'simple')\n {\n if($rowArrays['parent_item_id'] != NULL)\n {\n //check Quantity count\n $sqlQueryss = \"SELECT * FROM sales_flat_quote_item WHERE item_id =\".$rowArrays['parent_item_id'];\n $rowArrayss = $db_write->fetchRow($sqlQueryss);\n\n $checkqty = number_format($rowArrayss['qty']) + $pqty;\n\n $oldsize = explode('(', $rowArrays['name']);\n if(isset($oldsize[1])) {\n $newsize = str_replace(' )', '', $oldsize[1]);\n }\n else{\n $oldsize = explode('-', $rowArrays['name']);\n if(isset($oldsize[1]))\n {\n $newsize = $oldsize[1];\n }\n else\n {\n $oldsize = explode('\\'', $rowArrays['name']);\n if(isset($oldsize[1]))\n {\n $newsize = $size[1];\n }\n }\n }\n\n if(trim($newsize) == trim($size))\n {\n if($checkqty > 2)\n {\n $response['msg'] = 'The maximum quantity allowed for purchase is 2';\n $response['status'] = '0';\n echo json_encode($response);\n exit;\n }\n $connections = Mage::getSingleton('core/resource')->getConnection('core_write');\n $date = date('Y-m-d h:i:s');\n $totqty = $rowArrays['qty'] + $pqty;\n $totprice = $_product->getSpecialPrice() * $totqty;\n $connections->query(\"UPDATE `sales_flat_quote_item` SET `updated_at`='\".$date.\"',`qty`=\".$totqty.\",`row_total`=\".$totprice.\",`base_row_total`=\".$totprice.\",`price_incl_tax`=\".$totprice.\",`base_price_incl_tax`=\".$totprice.\",`row_total_incl_tax`=\".$totprice.\",`base_row_total_incl_tax`=\".$totprice.\" WHERE product_id =\".$pid.\" AND product_type ='configurable'\");\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n else\n {\n $connectionWrit = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $date = date('Y-m-d h:i:s');\n $sku = $_product->getSku();\n $name = $_product->getName();\n $price = $_product->getSpecialPrice() * $pqty;\n $connectionWrit->query(\"INSERT INTO `sales_flat_quote_item`(`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1','0','\".$sku.\"','\".$name.\"','1.0000',\".$pqty.\",\".$price.\",\".$price.\",\".$price.\",\".$price.\",'1.0000','configurable',\".$price.\",\".$price.\",\".$price.\",\".$price.\",'0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sqlQuery = \"SELECT item_id FROM sales_flat_quote_item ORDER BY item_id DESC LIMIT 1;\";\n $rowArrayes = $db_write->fetchRow($sqlQuery);\n $item_id = $rowArrayes['item_id'];\n\n $connectionWri = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sname = $name.'( '.$size.' )';\n $connectionWri->query(\"INSERT INTO `sales_flat_quote_item` (`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `parent_item_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1',\".$item_id.\",'0','\".$sku.\"','\".$sname.\"','1.0000',\".$pqty.\",'0.0000','0.0000','0.0000','0.0000','1.0000','simple','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $rowcount = $rowArray['items_count'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_count`=\".$rowcount.\", `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n }\n else\n {\n if($checkqty > 2)\n {\n $response['msg'] = 'The maximum quantity allowed for purchase is 2';\n $response['status'] = '0';\n echo json_encode($response);\n exit;\n }\n $connections = Mage::getSingleton('core/resource')->getConnection('core_write');\n $date = date('Y-m-d h:i:s');\n $totqty = $rowArrays['qty'] + $pqty;\n $totprice = $_product->getSpecialPrice() * $totqty;\n $connections->query(\"UPDATE `sales_flat_quote_item` SET `updated_at`='\".$date.\"',`qty`=\".$totqty.\",`row_total`=\".$totprice.\",`base_row_total`=\".$totprice.\",`price_incl_tax`=\".$totprice.\",`base_price_incl_tax`=\".$totprice.\",`row_total_incl_tax`=\".$totprice.\",`base_row_total_incl_tax`=\".$totprice.\" WHERE product_id =\".$pid.\" AND product_type ='simple'\");\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n\n }\n }\n else\n {\n if($_product->getTypeId() == \"configurable\")\n {\n $connectionWrit = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $date = date('Y-m-d h:i:s');\n $sku = $_product->getSku();\n $name = $_product->getName();\n $price = $_product->getSpecialPrice() * $pqty;\n $connectionWrit->query(\"INSERT INTO `sales_flat_quote_item`(`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1','0','\".$sku.\"','\".$name.\"','1.0000',\".$pqty.\",\".$price.\",\".$price.\",\".$price.\",\".$price.\",'1.0000','configurable',\".$price.\",\".$price.\",\".$price.\",\".$price.\",'0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n //$connectionWrit->query(\"UPDATE `sales_flat_quote_item` SET `quote_id`=\".$rowArray['entity_id'].\",`created_at`='\".$date.\"',`updated_at`='\".$date.\"',`product_id`=\".$pid.\",`store_id`=1,`parent_item_id`='',`is_virtual`=0,`sku`='\".$sku.\"',`name`='\".$name.\"',`description`='',`applied_rule_ids`='',`additional_data`='',`free_shipping`=0,`is_qty_decimal`=0,`no_discount`=0,`weight`='1.0000',`qty`=\".$pqty.\",`price`=\".$price.\",`base_price`=\".$price.\",`custom_price`='',`discount_percent`='0',`discount_amount`='0',`base_discount_amount`='0',`tax_percent`='0',`tax_amount`='0',`base_tax_amount`='0',`row_total`=\".$price.\",`base_row_total`=\".$price.\",`row_total_with_discount`='0',`row_weight`='1.0000',`product_type`='configurable',`base_tax_before_discount`='',`tax_before_discount`='',`original_custom_price`='',`redirect_url`='',`base_cost`='',`price_incl_tax`=\".$price.\",`base_price_incl_tax`=\".$price.\",`row_total_incl_tax`=\".$price.\",`base_row_total_incl_tax`=\".$price.\",`hidden_tax_amount`=0,`base_hidden_tax_amount`=0,`gift_message_id`='',`weee_tax_disposition`='0.0000',`weee_tax_row_disposition`='0.0000',`base_weee_tax_disposition`='0.0000',`base_weee_tax_row_disposition`='0.0000',`weee_tax_applied`='a:0:{}',`weee_tax_applied_amount`='0.0000',`weee_tax_applied_row_amount`='0.0000',`base_weee_tax_applied_amount`='0.0000',`base_weee_tax_applied_row_amnt`='' WHERE 1\");\n\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sqlQuery = \"SELECT item_id FROM sales_flat_quote_item ORDER BY item_id DESC LIMIT 1;\";\n $rowArrayes = $db_write->fetchRow($sqlQuery);\n $item_id = $rowArrayes['item_id'];\n\n $connectionWri = Mage::getSingleton('core/resource')->getConnection('core_write');\n $sname = $name.'( '.$size.' )';\n $connectionWri->query(\"INSERT INTO `sales_flat_quote_item` (`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `parent_item_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1',\".$item_id.\",'0','\".$sku.\"','\".$sname.\"','1.0000',\".$pqty.\",'0.0000','0.0000','0.0000','0.0000','1.0000','simple','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n //$connectionWri->query(\"UPDATE `sales_flat_quote_item` SET `quote_id`=\".$rowArray['entity_id'].\",`created_at`='\".$date.\"',`updated_at`='\".$date.\"',`product_id`=\".$pid.\",`store_id`=1,`parent_item_id`='',`is_virtual`=0,`sku`='\".$sku.\"',`name`='\".$sname.\"',`description`='',`applied_rule_ids`='',`additional_data`='',`free_shipping`=0,`is_qty_decimal`=0,`no_discount`=0,`weight`='1.0000',`qty`=\".$pqty.\",`price`='0',`base_price`='0',`custom_price`='',`discount_percent`='0',`discount_amount`='0',`base_discount_amount`='0',`tax_percent`='0',`tax_amount`='0',`base_tax_amount`='0',`row_total`='0',`base_row_total`='0',`row_total_with_discount`='0',`row_weight`='0.0000',`product_type`='simple',`base_tax_before_discount`='',`tax_before_discount`='',`original_custom_price`='',`redirect_url`='',`base_cost`='',`price_incl_tax`='',`base_price_incl_tax`='',`row_total_incl_tax`='',`base_row_total_incl_tax`='',`hidden_tax_amount`='',`base_hidden_tax_amount`='',`gift_message_id`='',`weee_tax_disposition`='0.0000',`weee_tax_row_disposition`='0.0000',`base_weee_tax_disposition`='0.0000',`base_weee_tax_row_disposition`='0.0000',`weee_tax_applied`='a:0:{}',`weee_tax_applied_amount`='0.0000',`weee_tax_applied_row_amount`='0.0000',`base_weee_tax_applied_amount`='0.0000',`base_weee_tax_applied_row_amnt`='' WHERE 1\");\n }\n\n if($_product->getTypeId() == \"simple\")\n {\n $connectionWrit = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $date = date('Y-m-d h:i:s');\n $sku = $_product->getSku();\n $name = $_product->getName();\n $price = $_product->getSpecialPrice() * $pqty;\n\n $connectionWrit->query(\"INSERT INTO `sales_flat_quote_item`(`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `weight`, `qty`, `price`, `base_price`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES (\".$rowArray['entity_id'].\",'\".$date.\"','\".$date.\"',\".$pid.\",'1','0','\".$sku.\"','\".$name.\"','1.0000',\".$pqty.\",\".$price.\",\".$price.\",\".$price.\",\".$price.\",'1.0000','simple',\".$price.\",\".$price.\",\".$price.\",\".$price.\",'0.0000','0.0000','0.0000','0.0000','a:0:{}','0.0000','0.0000','0.0000','')\");\n\n //$connectionWrit->query(\"UPDATE `sales_flat_quote_item` SET `quote_id`=\".$rowArray['entity_id'].\",`created_at`='\".$date.\"',`updated_at`='\".$date.\"',`product_id`=\".$pid.\",`store_id`=1,`parent_item_id`='',`is_virtual`=0,`sku`='\".$sku.\"',`name`='\".$name.\"',`description`='',`applied_rule_ids`='',`additional_data`='',`free_shipping`=0,`is_qty_decimal`=0,`no_discount`=0,`weight`='1.0000',`qty`=\".$pqty.\",`price`=\".$price.\",`base_price`=\".$price.\",`custom_price`='',`discount_percent`='0',`discount_amount`='0',`base_discount_amount`='0',`tax_percent`='0',`tax_amount`='0',`base_tax_amount`='0',`row_total`=\".$price.\",`base_row_total`=\".$price.\",`row_total_with_discount`='0',`row_weight`='1.0000',`product_type`='configurable',`base_tax_before_discount`='',`tax_before_discount`='',`original_custom_price`='',`redirect_url`='',`base_cost`='',`price_incl_tax`=\".$price.\",`base_price_incl_tax`=\".$price.\",`row_total_incl_tax`=\".$price.\",`base_row_total_incl_tax`=\".$price.\",`hidden_tax_amount`=0,`base_hidden_tax_amount`=0,`gift_message_id`='',`weee_tax_disposition`='0.0000',`weee_tax_row_disposition`='0.0000',`base_weee_tax_disposition`='0.0000',`base_weee_tax_row_disposition`='0.0000',`weee_tax_applied`='a:0:{}',`weee_tax_applied_amount`='0.0000',`weee_tax_applied_row_amount`='0.0000',`base_weee_tax_applied_amount`='0.0000',`base_weee_tax_applied_row_amnt`='' WHERE 1\");\n }\n\n $rowqty = $rowArray['items_qty'] + $pqty;\n $rowcount = $rowArray['items_count'] + $pqty;\n $connectionquote = Mage::getSingleton('core/resource')->getConnection('core_write');\n $connectionquote->query(\"UPDATE `sales_flat_quote` SET `items_count`=\".$rowcount.\", `items_qty`=\".$rowqty.\" WHERE `entity_id`=\".$rowArray['entity_id']);\n }\n }\n else\n {\n $cart = Mage::getModel('checkout/cart');\n $cart->init();\n $cart->addProduct($_product, $params);\n $cart->save();\n\n $db_write = Mage::getSingleton('core/resource')->getConnection('core_read');\n $sqlQuery = \"SELECT quote_id FROM sales_flat_quote_item ORDER BY item_id DESC LIMIT 1;\";\n $rowArray = $db_write->fetchRow($sqlQuery);\n $entity_id = $rowArray['quote_id'];\n\n $connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n //Update customer Id\n $date = date('Y-m-d h:i:s');\n $connectionWrite->query(\"update sales_flat_quote set customer_id = '\".$uid.\"', customer_email = '\".$customerData['email'].\"',customer_firstname = '\".$customerData['firstname'].\"',customer_lastname = '\".$customerData['lastname'].\"',customer_gender = '\".$customerData['gender'].\"', updated_at = '\".$date.\"' WHERE entity_id = \".$entity_id);\n }\n\n $connectionWrites = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $connectionWrites->query(\"update sales_flat_quote_address set customer_id = '\".$uid.\"', email = '\".$customerData['email'].\"',firstname = '\".$customerData['firstname'].\"',lastname = '\".$customerData['lastname'].\"' WHERE quote_id = \".$entity_id);\n\n $response['msg'] = 'Product added in cart';\n $response['status'] = 1;\n }\n catch (Exception $e) {\n\n $response['msg'] = $e->getMessage();\n $response['status'] = 0;\n }\n\n\n\t\techo json_encode($response);\n\t}", "public function addToCart() : void\n {\n $this->VIEW = false;\n $this->Cart->addToCart($_SESSION['Auth']->id, $_POST);\n }", "public function actionAddProductList()\n\t{\n\t\t$order_id=Yii::app()->request->getQuery('id');\n\t\t$model = $this->_loadModel($order_id);\n\t\t$dataProvider = new StoreProduct('search');\n\n\t\tif(isset($_GET['StoreProduct']))\n\t\t\t$dataProvider->attributes = $_GET['StoreProduct'];\n\n\t\t$this->renderPartial('_addProduct', array(\n\t\t\t'dataProvider' => $dataProvider,\n\t\t\t'order_id' => $order_id,\n\t\t\t'model' => $model,\n\t\t));\n\t}", "function add_to_cart(item $item) {\n \\Cart::session(auth()->id())->add(array(\n 'id' => $item->id,\n 'name' => $item->name,\n 'price' => $item->price,\n 'quantity' => 1,\n 'attributes' => array(),\n 'associatedModel' => $item\n ));\n return redirect('/cart');\n }", "function uc_order_pane_products_add($form, &$form_state) {\n $form_state['products_action'] = 'add_product';\n $form_state['node'] = node_load($form_state['values']['product_controls']['nid']);\n unset($form_state['refresh_products']);\n $form_state['rebuild'] = TRUE;\n}", "public function addToCart($product_row_id) { \n\t\t//echo date('Y-F/j h:i:s a');\n\t\t\n $tracking_number = Session::getId();\n\t\t\t\n\t\t$data['product_details'] = DB::table('products')->where('product_row_id', $product_row_id)->first();\n\n\t \n\t //$count = DB::table('temp_orders')->where([ ['product_row_id', $product_row_id], ['tracking_number', $tracking_number] ])->count();\n\t\t\n\t\n\t DB::table('temp_orders')->insert([ 'product_row_id' => $data['product_details']->product_row_id, 'tracking_number' => $tracking_number, 'product_price' => $data['product_details']->product_price, 'product_qty' => 1, 'product_total_price' => $data['product_details']->product_price, 'created_at' => date('Y-m-d H:i:s'), ]);\n\t\t\n \n return redirect('/mycart'); \n \n }", "public function add($product_id, $quantity)\n {\n $product = Product::find((int) $product_id);\n if (!$product) {\n return back()->with('error', self::ERROR_ITEM_NOT_EXISTS);\n }\n\n $quantity = (int) $quantity;\n // Check availability\n if (!$product->isQuantityAvailable($quantity)) {\n return back()->with('error', 'The product is not available in the specified quantity.');\n }\n\n $cart_item = Cart::add($product->id, $product->name, $quantity, $product->unit_price);\n $cart_item->associate(Product::class);\n\n return back()->with('success', 'The product has been added to your invoice.');\n }", "public function add(Product $product)\n\t{\t\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t//\tSi el producto ya esta en el carro se le suma 1 a la cantidad.\n \tif (array_key_exists($product->id, $cart)){\n \t\t$ops = $cart[$product->id]->cantidad;\n \t\t$product->cantidad = $ops+1;\n \t}\n \t//\tSi el producto no estaba su cantidad es 1.\n \telse{\n \t $product->cantidad = 1;\t\n \t}\n \t$cart[$product->id] = $product;\n \t//\tAgregando el producto.\n\t\t\\Session::put('cart',$cart);\n\n\t\treturn redirect()->route('cart-show');\n\n\t}", "public function addNewItem($product, $buyRequest = null, $forciblySetQty = false)\n {\n /*\n * Always load product, to ensure:\n * a) we have new instance and do not interfere with other products in wishlist\n * b) product has full set of attributes\n */\n if ($product instanceof Mage_Catalog_Model_Product) {\n $productId = $product->getId();\n // Maybe force some store by wishlist internal properties\n $storeId = $product->hasWishlistStoreId() ? $product->getWishlistStoreId() : $product->getStoreId();\n } else {\n $productId = (int) $product;\n if ($buyRequest->getStoreId()) {\n $storeId = $buyRequest->getStoreId();\n } else {\n $storeId = Mage::app()->getStore()->getId();\n }\n }\n\n /* @var $product Mage_Catalog_Model_Product */\n $product = Mage::getModel('catalog/product')\n ->setStoreId($storeId)\n ->load($productId);\n\n if ($buyRequest instanceof Varien_Object) {\n $_buyRequest = $buyRequest;\n } elseif (is_string($buyRequest)) {\n $_buyRequest = new Varien_Object(unserialize($buyRequest));\n } elseif (is_array($buyRequest)) {\n $_buyRequest = new Varien_Object($buyRequest);\n } else {\n $_buyRequest = new Varien_Object();\n }\n\n $cartCandidates = $product->getTypeInstance(true)\n ->processConfiguration($_buyRequest, $product);\n\n /**\n * Error message\n */\n if (is_string($cartCandidates)) {\n return $cartCandidates;\n }\n\n /**\n * If prepare process return one object\n */\n if (!is_array($cartCandidates)) {\n $cartCandidates = array($cartCandidates);\n }\n\n $errors = array();\n $items = array();\n\n foreach ($cartCandidates as $candidate) {\n if ($candidate->getParentProductId()) {\n continue;\n }\n $candidate->setWishlistStoreId($storeId);\n\n $qty = $candidate->getQty() ? $candidate->getQty() : 1; // No null values as qty. Convert zero to 1.\n $item = $this->_addCatalogProduct($candidate, $qty, $forciblySetQty);\n $items[] = $item;\n\n // Collect errors instead of throwing first one\n if ($item->getHasError()) {\n $errors[] = $item->getMessage();\n }\n }\n\n Mage::dispatchEvent('wishlist_product_add_after', array('items' => $items));\n\n return $item;\n }", "public function addToCart($id)\n {\n $product = Product::find($id);\n if (!$product) {\n abort(404);\n }\n $cart = session()->get('cart');\n\n // if cart is empty then this the first product\n if (!$cart) {\n $cart = [\n $id => [\n 'name' => $product->name,\n 'quantity' => 1,\n 'price' => $product->price,\n 'photo' => $product->image\n ]\n ];\n session()->put('cart', $cart);\n\n return redirect()->back()->with('success', 'Product added to cart successfully');\n }\n // if cart not empty then check if this product exist then increment quantity\n if (isset($cart[$id])) {\n $cart[$id]['quantity']++;\n\n session()->put('cart', $cart);\n\n return redirect()->back()->with('success', 'Product added to cart successfully');\n }\n // if item not exist in cart then add to cart with quantity = 1\n $cart[$id] = [\n 'name' => $product->name,\n 'quantity' => 1,\n 'price' => $product->price,\n 'photo' => $product->image\n ];\n session()->put('cart', $cart);\n\n return redirect()->back()->with('success', 'Product added to cart successfully');\n }", "function add_product_to_order($id_order,$id_product,$sauce){\r\n $bdd = Database3Splus::getinstance();//connexion();\r\n $amount = 1;\r\n $req = \"INSERT INTO order_details VALUES (:id_order, :id_product, :amount, :sauce)\";\r\n $result = $bdd->prepare($req);\r\n $result->bindParam(':id_order', $id_order);\r\n $result->bindParam(':id_product', $id_product);\r\n $result->bindParam(':amount', $amount);\r\n $result->bindParam(':sauce', $sauce);\r\n $result->execute();\r\n $count = $result->rowCount();\r\n\t\tif($count != 0){return TRUE;}\r\n\t\telse{return FALSE;}\r\n\t}", "public function addItem(Cart $cart, CartItem $item);", "public function addProduct(Mage_Catalog_Model_Product $product)\n {\n $this->_products[$product->getId()] = $product;\n }", "public function addToCart($id){\n $produk=Product::findOrFail($id);\n Auth::loginUsingId(1);\n $user = Auth::user()->id;\n $addToCart = Cart::create(['product_id'=>$produk->id,\n 'user_id'=>$user]);\n return 'Berhasil Memasukan data ke cart list';\n }", "function add_to_cart() {\n\t\n\tglobal $cxn;\n\t\n\t$the_count= $_POST['the_count'];\n\t$part_id=$_POST['part_id'];\n\t$product_id=$_POST['product_id'];//id of the product in the database\n\t$product_name=$_POST['product_name'];\n\t$price=$_POST['price'];\n\t$the_session_id=$_POST['session_id'];\n\t$door_id=$_POST['feature_door_id'];\n\t$door_cost=$_POST['door_price'];\n\tif(isset($_POST['quantity'])&&trim($_POST['quantity']==\"\"))\n\t{\n\t\t$quantity=1;\n\t}\n\telse\n\t{\n\t\t$quantity=trim($_POST['quantity']);\n\t}\n\t\n\t$the_product_cost=$price * $quantity;\n\n\t$sql=\"select id from cart where session_id='$the_session_id'\";\n\t$query=$cxn->query($sql);\n\t$cart_count=mysqli_num_rows($query);\n\t\n\t//brand new user and item\n\tif($cart_count==0)\n\t{\n\t\t\n\t\t//add what's just been posted to the cart under current session id\n\t\t//start with the basics (door_id, session_id, etc. be aware of if the door is on sale)\n\t\t//your first entry is the door_id and the door_cost irrespective of the product_id. That way you can delete any product and still be able to define the color\n\t\t\n\t\t$sql_5=\"insert into cart(session_id, door_id, product_id, door_cost, sequence) values('$the_session_id', '$door_id', '$product_id', '$door_cost', '1')\";\n\t\t//echo $sql_5;\n\t\tif(!$query_5=$cxn->query($sql_5))\n\t\t{\n\t\t\t$err_5='your course list didn\\'t happen because: '\n\t\t\t.'ERRNO: '\n\t\t\t.$cxn->errno\n\t\t\t.' ERROR: '\n\t\t\t.$cxn->error\n\t\t\t.' for this query: '\n\t\t\t.$query_5\n\t\t\t.PHP_EOL;\n\t\t\ttrigger_error($err_5, E_USER_WARNING);\t\t\t\n\t\t}\n\t\n\t\t//insert your door_id alongside your product_id so you can keep track of those products that are the same, but have a different finish / color\n\t\t$sql_2=\"insert into cart (session_id, product_id, product_cost, door_id, quantity, sequence) values ('$the_session_id', '$product_id', '$the_product_cost', '$door_id', '$quantity','2')\";\n\t\t//echo $sql_2;\n\t\tif(!$query_2=$cxn->query($sql_2))\n\t\t{\n\t\t\t$err='your course list didn\\'t happen because: '\n\t\t\t.'ERRNO: '\n\t\t\t.$cxn->errno\n\t\t\t.' ERROR: '\n\t\t\t.$cxn->error\n\t\t\t.' for this query: '\n\t\t\t.$query_2\n\t\t\t.PHP_EOL;\n\t\t\ttrigger_error($err, E_USER_WARNING);\n\t\t}\n\t\t\n\t\t//now you're going through all of the features that were just posted\n\t\t\n\t\tfor($x=1; $x<=$the_count; $x++)\n\t\t{\n\t\t\tif(isset($_POST['select_'.$x])&&trim($_POST['select_'.$x])<>\"\")\n\t\t\t{\n\t\t\t\t$pieces=explode(\"_\", $_POST['select_'.$x]);\n\t\t\t\t//$pieces[0] - this is the option_name_id in your feature table, if there's a cost, it will show up here\n\t\t\t\t//$pieces[1] - this is the id of of the option as it appears in the features table\n\t\t\t\t//$pieces[2] - this is the cost including any adjustment that's been made if the corresponding door is on sale\n\t\t\t\t$sql_3=\"insert into cart (session_id, product_id, option_id, feature_id, feature_cost, door_id) VALUES ('$the_session_id', '$product_id', '$pieces[0]', '$pieces[1]', '$pieces[2]', '$door_id')\"; \n\t\t\t\tif(!$query_3=$cxn->query($sql_3))\n\t\t\t\t{\n\t\t\t\t\t$err_3='your course list didn\\'t happen because: '\n\t\t\t\t\t.'ERRNO: '\n\t\t\t\t\t.$cxn->errno\n\t\t\t\t\t.' ERROR: '\n\t\t\t\t\t.$cxn->error\n\t\t\t\t\t.' for this query: '\n\t\t\t\t\t.$query\n\t\t\t\t\t.PHP_EOL;\n\t\t\t\t\ttrigger_error($err, E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t//next is what happens when the user's session id is already in the cart\n\t}\n\telse\n\t{\n\t//figure out what the sequence number needs to be \n\t$sql_8=\"select sequence from cart where session_id='$the_session_id' and quantity>'0' order by sequence DESC LIMIT 1\";\n\t$query_8=$cxn->query($sql_8);\n\t$row_8=$query_8->fetch_object();\n\t$new_sequence=$row_8->sequence+1;\n\n\t//figure out if user is adding a different door. If so, add it here\n\n\t\t$sql_3=\"insert into cart (session_id, door_id, product_id, door_cost, sequence) values ('$the_session_id', '$door_id', '$product_id', '$door_cost', '$new_sequence')\";\n\t\tif(!$query_3=$cxn->query($sql_3))\n\t\t{\n\t\t\t$err_3='your course list didn\\'t happen because: '\n\t\t\t.'ERRNO: '\n\t\t\t.$cxn->errno\n\t\t\t.' ERROR: '\n\t\t\t.$cxn->error\n\t\t\t.' for this query: '\n\t\t\t.$query\n\t\t\t.PHP_EOL;\n\t\t\ttrigger_error($err, E_USER_WARNING);\n\t\t}\n\t\t//increase the sequence value by 10px\n\t\t$new_sequence=$new_sequence+1;\n\t\t\n\t\t//the user is adding another door, so go ahead and enter whatever products they just inserted according to the same sequence number\t\n\t\t$sql_5=\"insert into cart (session_id, product_id, product_cost, quantity, sequence, door_id) values ('$the_session_id', '$product_id', '$the_product_cost','$quantity', '$new_sequence', '$door_id')\";\n\t\t//echo $sql_5;\n\t\tif(!$query_5=$cxn->query($sql_5))\n\t\t{\n\t\t\t$err_5='your course list didn\\'t happen because: '\n\t\t\t.'ERRNO: '\n\t\t\t.$cxn->errno\n\t\t\t.' ERROR: '\n\t\t\t.$cxn->error\n\t\t\t.' for this query: '\n\t\t\t.$query\n\t\t\t.PHP_EOL;\n\t\t\ttrigger_error($err, E_USER_WARNING);\n\t\t}\n\t\t//features\n\t\tfor($x=1; $x<=$the_count; $x++)\n\t\t{\n\t\t\tif(isset($_POST['select_'.$x])&&trim($_POST['select_'.$x])<>\"\")\n\t\t\t{\n\t\t\t\t$pieces=explode(\"_\", $_POST['select_'.$x]);\n\t\t\t\t//$pieces[0] - this is the option_name_id in your feature table, if there's a cost, it will show up here\n\t\t\t\t//$pieces[1] - this is the id of of the option as it appears in the features table\n\t\t\t\t//$pieces[2] - this is the cost including any adjustment that's been made if the corresponding door is on sale\n\t\t\t\t//we don't worry about sequence here because all of the options/features are tied to a product id\n\t\t\t\t\t\n\t\t\t\t//option doesn't exist\n\t\t\t\t$sql_7=\"insert into cart (session_id, product_id, option_id, feature_id, feature_cost, door_id) VALUES ('$the_session_id', '$product_id', '$pieces[0]', '$pieces[1]', '$pieces[2]', '$door_id')\"; \n\t\t\t\tif(!$query_7=$cxn->query($sql_7))\n\t\t\t\t{\n\t\t\t\t\t$err_7='your course list didn\\'t happen because: '\n\t\t\t\t\t.'ERRNO: '\n\t\t\t\t\t.$cxn->errno\n\t\t\t\t\t.' ERROR: '\n\t\t\t\t\t.$cxn->error\n\t\t\t\t\t.' for this query: '\n\t\t\t\t\t.$query\n\t\t\t\t\t.PHP_EOL;\n\t\t\t\t\ttrigger_error($err, E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} \n}", "public function store(Request $request)\n {\n \n $duplicata=Cart::search(function ($cartItem, $rowId) use($request) {\n return $cartItem->id == $request->pid;\n });\n if($duplicata->isNotEmpty()){\n return redirect()->back()->with('success','Sorry the item is already added');\n }\n $product=Product::find($request->pid);\n Cart::add($product->pid,$product->name,1,$product->price)\n ->associate('card/store');\n return redirect('/')->with('success','the product added to card succesfully');\n }", "private function addProduct($productId, $quantity = 1) {\n $this->_registry->checkVarInSession('productPage', 'products');\n if (!$this->_model->isChecked() == true) {\n $this->_model->checkBasket();\n }\n // calling addProduct method from basket model and make note of the response it returns\n $response = $this->_model->addProduct($productId, $quantity);\n if ($response == 'success') {\n $this->_session->flash('message', '<p class=\"stock success\">The product has been added to your basket.</p>');\n $this->_registry->redirectToProduct();\n } elseif ($response == 'stock') {\n $this->_session->flash('message', '<p class=\"stock\">Product is currently out of stock!</p>');\n $this->_registry->redirectToProduct();\n } elseif ($response == 'noproduct') {\n $this->_session->flash('message', '<p class=\"stock\">Product not found.</p>');\n $this->_registry->redirectTo();\n }\n }", "public function createCartProduct($request, $product_id)\n {\n $cart = Cart::create([\n 'user_id' => $request->input('user_id'),\n 'quantity' => $request->input('quantity'),\n ]);\n $cart_item = Cart::find($cart->id);\n $cart_item->state = 'direct-buy';\n $cart_item->save();\n DB::table('product_cart')->insert([\n 'product_id' => $product_id,\n 'cart_id' => $cart->id,\n ]);\n }", "function add_to_cart($id,$qty){\r\n\r\n $row = $this->Web_model->get_by_id($id);\r\n $kategori = $this->Web_model->get_by_idkat($row->id_kategori);\r\n if ($row) {\r\n $datas= array(\r\n 'id' => $row->id_menu,\r\n 'name' => $row->nama_menu,\r\n 'price' => $row->harga,\r\n 'qty' => $qty, \r\n 'id_kategori' => $row->id_kategori,\r\n 'gambar' => $row->foto_menu,\r\n 'nama_kategori' => $kategori->nama_kategori,\r\n );\r\n $this->cart->product_name_rules = '[:print:]';\r\n $this->cart->insert($datas);\r\n echo(count($this->cart->contents()));\r\n }\r\n }", "public function addToCart()\n {\n $id = intval($_GET[\"id\"]);\n if ($id > 0) {\n if ($_SESSION['cart'] != \"\") {\n $cart = json_decode($_SESSION['cart'], true);\n $found = false;\n for ($i = 0; $i < count($cart); $i++)\n {\n if ($cart[$i][\"product\"] == $id)\n {\n $cart[$i][\"quantity\"] = $cart[$i][\"quantity\"] + 1;\n $found = true;\n break;\n }\n }\n if (!$found)\n {\n $line = new stdClass;\n $line->product = $id;\n $line->quantity = 1;\n $cart[] = $line;\n }\n $_SESSION['cart'] = json_encode($cart);\n }\n else\n {\n $line = new stdClass;\n $line->product = $id;\n $line->quantity = 1;\n $cart[] = $line;\n $_SESSION['cart'] = json_encode($cart);\n }\n }\n }", "public function addProduct(Product $product)\n {\n $this->products[] = $product;\n $this->price += $product->getPrice();\n if($this->hasPromotion()){\n $this->applyPromotion();\n }\n }", "public function add_inventory($productName,$quantity){\r\n // math\r\n $conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n $preSql = \"Select quantity from inventory where productName = '$productName'\";\r\n $preResult = $conn->query($preSql);\r\n $preRow = $preResult->fetch_assoc();\r\n $total = $preRow[\"quantity\"] + $quantity;\r\n // query\r\n $sql = \"Update inventory SET quantity = '$total' WHERE productName = '$productName'\";\r\n $conn->query($sql);\r\n }", "public function add(\\Webshop\\Products\\Product $product)\n {\n $this->redis->zAdd('prd', $product->getId(), serialize($product));\n }", "public function addItemToCart($id)\n {\n\n //$this->db->query(\"insert into koszyk (id_produktu, id_klienta, ilosc)\");\n\n return $this->getProductById($id);\n }", "public function addCart($id, Request $request)\n {\n $carts = empty(Session::get('carts')) ? [] : Session::get('carts');\n //dd($carts);\n // trùng product\n $quantity = $request->quantity;\n if (!empty($carts)) {\n foreach ($carts as $cart) {\n if($cart['id'] == $id){\n $newQuantity = $cart['quantity'];\n $quantity += $newQuantity;\n }\n }\n }\n else{\n $quantity = $request->quantity;\n }\n // dd( $quantityNew);\n\n //// get quantity from Form Request\n // $quantity = $request->quantity;\n\n // get quantity from data\n $product = Product::findOrFail($id);\n $quantityDB = $product->quantity;\n\n if ($quantity <= $quantityDB) {\n $Product = [\n 'id' => $id,\n 'quantity' => $quantity,\n 'price_id' => $request->price_id,\n 'promotion_id' => $request->promotion_id\n ];\n\n $carts[$id] = $Product;\n // set data for SESSION\n session(['carts' => $carts]);\n //dd($carts);\n return redirect()->route('cart.cart-info')\n ->with('success', 'Add Product to Cart successful!');\n\n }else{\n return redirect()->back()->with('error','Please re-enter the quantity!');\n }\n }" ]
[ "0.6836447", "0.6802206", "0.6760033", "0.672991", "0.6717883", "0.6689724", "0.6684676", "0.6623106", "0.6621723", "0.6528304", "0.64878523", "0.64807695", "0.64745766", "0.64693886", "0.6448302", "0.64470226", "0.6428081", "0.6407918", "0.63971066", "0.63478863", "0.63450146", "0.63328063", "0.63094413", "0.6291055", "0.6280806", "0.62775576", "0.62452257", "0.6235504", "0.6201816", "0.61870474", "0.61556345", "0.61447096", "0.6144075", "0.61376125", "0.61353844", "0.6126576", "0.61230046", "0.6107205", "0.60983545", "0.60692674", "0.6062932", "0.6059764", "0.6059764", "0.6054915", "0.60467476", "0.6037569", "0.60352105", "0.6020168", "0.6007831", "0.60007745", "0.59998256", "0.59916025", "0.59864146", "0.5985988", "0.5983509", "0.598293", "0.59702855", "0.596438", "0.5963499", "0.5949684", "0.59456694", "0.59399843", "0.5938163", "0.5935162", "0.5933408", "0.5932345", "0.59222156", "0.5915352", "0.5913199", "0.5905695", "0.5902587", "0.5895506", "0.586883", "0.58594245", "0.5858776", "0.58358854", "0.5830745", "0.5829162", "0.5827013", "0.58173877", "0.5814481", "0.5807648", "0.580758", "0.5806909", "0.58031607", "0.57986397", "0.57934433", "0.5786385", "0.5786381", "0.5785498", "0.57838374", "0.57816875", "0.5778521", "0.5778448", "0.5776727", "0.57734483", "0.5752252", "0.57406116", "0.57279503", "0.571555", "0.57119447" ]
0.0
-1
Create a Report from a SimpleXMLElement object
public function __construct($data){ $this->id = $data->id; $this->name = (string)$data->name; $this->date = (string)$data->date; $this->time = (string)$data->time; $this->information = (string)$data->information; $this->dailycomment = (string)$data->dailycomment; $this->status['code'] = (string)$data->status->code; $this->status['openingdate'] = (string)$data->status->openingdate; $this->status['updatetime'] = (string)$data->status->updatetime; $this->snow['base'] = (string)$data->snow->mindepth; //min $this->snow['upperbase'] = (string)$data->snow->base; //max $this->snow['latestfall'] = (string)$data->snow->latestfall; $this->snow['latestfalldate'] = (string)$data->snow->latestfalldate; $this->snow['detail'] = (string)$data->snow->detail; $this->road['code'] = (string)$data->road->code; $this->road['brief'] = (string)$data->road->brief; $this->road['detail'] = (string)$data->road->detail; $this->weather['detail'] = (string)$data->weather->detail; $this->weather['brief'] = (string)$data->weather->brief; $this->weather['temperature'] = (string)$data->weather->temperature; $this->facilityTypes = new ArrayList(); foreach($data->facilities->facilitytype as $type) { $t = FacilityType::createFromXMLElement($type);//mostly just to get this viewable in template, and display it's name $t->facilities = new ArrayList(); foreach($type as $name=>$facility){ if ($name === 'facility'){//avoid the facility type's name and ID $f = Facility::createFromXMLElement($facility); $t->facilities->push($f); } } $this->facilityTypes->push($t); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromXML($xmlElement)\n {\n $this->contact = new ReportContact();\n $this->contact->fromXML($xmlElement->contact);\n\n if (isset($xmlElement->mailing_id)) $this->mailingId = $xmlElement->mailing_id;\n if (isset($xmlElement->timestamp)) $this->timestamp = $xmlElement->timestamp;\n if (isset($xmlElement->last_type)) $this->lastType = $xmlElement->last_type;\n if (isset($xmlElement->count)) $this->count = $xmlElement->count;\n if (isset($xmlElement->count_hard)) $this->countHard = $xmlElement->count_hard;\n if (isset($xmlElement->count_soft)) $this->countSoft = $xmlElement->count_soft;\n }", "public function fromXML($xmlElement)\n {\n $this->contact = new ReportContact();\n $this->contact->fromXML($xmlElement->contact);\n\n if (isset($xmlElement->mailing_id)) {\n $this->mailingId = $xmlElement->mailing_id;\n }\n if (isset($xmlElement->timestamp)) {\n $this->timestamp = $xmlElement->timestamp;\n }\n if (isset($xmlElement->transaction_id)) {\n $this->transactionId = $xmlElement->transaction_id;\n }\n }", "abstract public function buildReport();", "public function makeReport()\n {\n }", "function makeReport()\n {\n $records = $this->baseRecordType()->records();\n $report = new Report();\n $report->documentRevision()->associate($this);\n $report->report_type_sid = $this->sid;\n\n foreach ($records as $record) {\n try {\n $recordReport = $this->recordReport($record);\n } catch (ReportingException $e) {\n $titleMaker = new TitleMaker();\n throw new ReportingException(\"In record \" . $titleMaker->title($record) . \": \" . $e->getMessage(), 0, $e);\n }\n $report->setRecordReport($record->sid, $recordReport);\n }\n\n return $report;\n }", "public static function createReport($title = \"\")\n {\n assert(is_string($title), 'Wrong type for argument 1. String expected');\n $content = \"\";\n if (!empty($title)) {\n $content = \"<title>$title</title>\";\n }\n return new self(\"<report>$content</report>\");\n }", "public function load_xml_string(string $jrxml): self\n {\n $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_NOCDATA);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDVALID);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDLOAD);\n // $obj = simplexml_load_string($jrxml);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_HTML_NOIMPLIED);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_HTML_NODEFDTD);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_DTDATTR);\n // $obj = simplexml_load_string($jrxml,SimpleXMLElement::class,LIBXML_COMPACT);\n // echo gettype($obj);\n $this->pageproperties = $this->prop($obj);\n $this->columnWidth=$this->pageproperties['columnWidth'] ?? $this->pageproperties['pageWidth'];\n $this->columnCount=$this->pageproperties['columnCount']??1;\n $this->printOrder = $this->pageproperties['printOrder']?? 'Vertical' ;\n foreach ($obj as $k=>$out)\n { \n $setting = $this->prop($out);\n $name= isset($setting['name']) ? $setting['name'] : ''; \n switch($k)\n {\n case 'property':\n $this->pageproperties[$name]=$setting; \n break;\n case 'field': \n case 'parameter':\n case 'variable':\n $attributename = $k.'s'; \n foreach($out as $key=>$value)\n {\n $setting[$key]=(string)$value;\n }\n $setting['datatype']=$this->getDataType($setting);\n \n if($k=='variable')\n {\n // print_r($setting);\n if(empty($setting['variableExpression']))\n {\n die(\"variable $name undefined expression\");\n }\n $setting['value']=null;\n }\n else if($k=='parameter')\n {\n $setting['value']=null;\n }\n $this->$attributename[$name]=$setting; \n break; \n case 'scriptlet':\n $this->scriptlets[$name]=(string)$out->scriptletDescription;\n break;\n case 'sortField':\n $this->sortFields[$name]=$setting;\n break;\n case 'queryString':\n $this->setQueryString($out);\n break;\n case \"subDataset\":\n $this->addSubDataSets($name,$out);\n break;\n case 'group': \n $this->addGroup($out); \n break;\n //all bands\n case 'background':\n case 'title':\n case 'pageHeader':\n case 'columnHeader':\n case 'detail':\n case 'columnFooter':\n case 'pageFooter':\n case 'lastPageFooter':\n case 'summary':\n case 'noData':\n $this->addBand($k,$out);\n break;\n case 'style':\n $this->addStyle($name,$out);\n break;\n default: \n echo \"$k is not supported, rendering stop\\n\"; \n die;\n break;\n }\n } \n return $this;\n }", "public function createXML() {}", "public function fromXML($xmlElement)\n {\n if (isset($xmlElement->timestamp)) {\n $this->timestamp = $xmlElement->timestamp;\n }\n if (isset($xmlElement->timestamp_sql)) {\n $this->timestampSql = $xmlElement->timestamp_sql;\n }\n if (isset($xmlElement->contact_id)) {\n $this->contactId = $xmlElement->contact_id;\n }\n if (isset($xmlElement->contact_email)) {\n $this->contactEmail = $xmlElement->contact_email;\n }\n if (isset($xmlElement->contact_external_id)) {\n $this->contactExternalId = $xmlElement->contact_external_id;\n }\n if (isset($xmlElement->value)) {\n $this->value = $xmlElement->value;\n }\n if (isset($xmlElement->mailing_sent_date)) {\n $this->mailingSentTimestamp = $xmlElement->mailing_sent_date;\n }\n if (isset($xmlElement->mailing_sent_date_sql)) {\n $this->mailingSentTimestampSql = $xmlElement->mailing_sent_date_sql;\n }\n if (isset($xmlElement->mailing_id)) {\n $this->mailingId = $xmlElement->mailing_id;\n }\n if (isset($xmlElement->mailing_name)) {\n $this->mailingName = $xmlElement->mailing_name;\n }\n if (isset($xmlElement->site_id)) {\n $this->siteId = $xmlElement->site_id;\n }\n if (isset($xmlElement->site_name)) {\n $this->siteName = $xmlElement->site_name;\n }\n if (isset($xmlElement->goal_id)) {\n $this->goalId = $xmlElement->goal_id;\n }\n if (isset($xmlElement->goal_name)) {\n $this->goalName = $xmlElement->goal_name;\n }\n if (isset($xmlElement->link_id)) {\n $this->linkId = $xmlElement->link_id;\n }\n if (isset($xmlElement->link_url)) {\n $this->linkUrl = $xmlElement->link_url;\n }\n }", "public function getReport() {}", "public function getReport() {}", "function getReport() ;", "public function fromXML($xml)\n\t{\n\t\t$xml = new SimpleXMLElement($xml);\n\n\t\t$this->ContactID = Xero::xpath($xml, '/Contact/ContactID ');\n\t\t$this->ContactStatus = Xero::xpath($xml, '/Contact/ContactStatus ');\n\t\t$this->Name = Xero::xpath($xml, '/Contact/Name ');\n\t\t$this->FirstName = Xero::xpath($xml, '/Contact/FirstName ');\n\t\t$this->LastName = Xero::xpath($xml, '/Contact/LastName ');\n\t\t$this->EmailAddress = Xero::xpath($xml, '/Contact/EmailAddress ');\n\t\t$this->SkypeUserName = Xero::xpath($xml, '/Contact/SkypeUserName ');\n\t\t$this->BankAccountDetails = Xero::xpath($xml, '/Contact/BankAccountDetails ');\n\t\t$this->TaxNumber = Xero::xpath($xml, '/Contact/TaxNumber ');\n\t\t$this->AccountsReceivableTaxType = Xero::xpath($xml, '/Contact/AccountsReceivableTaxType ');\n\t\t$this->AccountsPayableTaxType = Xero::xpath($xml, '/Contact/AccountsPayableTaxType ');\n\t\t$this->UpdatedDateUTC = Xero::xpath($xml, '/Contact/UpdatedDateUTC ');\n\t\t$this->IsSupplier = Xero::xpath($xml, '/Contact/IsSupplier ');\n\t\t$this->IsCustomer = Xero::xpath($xml, '/Contact/IsCustomer ');\n\t\t$this->DefaultCurrency = Xero::xpath($xml, '/Contact/DefaultCurrency ');\n\t}", "private function generateXMLReport() {\n\t\t// Adds Date Block.\n\t\t$this->XML_addDate();\n\n\t\t// Adds Resource Block.\n\t\t$this->XML_addResource($this->taskResultSet->getResourceURL(), $this->taskResultSet->getResourceIP(), $this->taskResultSet->getServerBanner() );\n\n\t\t// Adds Complex Security Level Block.\n\t\t$this->XML_addSecurityLevel($this->securityLevel);\n\n\t\t// Adds block which contains Info about tested vulnerabilities.\n\t\t$this->XML_addTestedVulnerabilities();\n\n\t\t// Adds block which contains details about scan.\n\t\t$this->XML_addScanDetails();\n\n\t\t// Adds all blocks in the general xml-container.\n\t\t$this->xmlHandler->appendChild($this->xmlRoot);\n\n\t\t// Generating and saving the XML File.\n\t\t$xmlReportFilePath = $this->savePath . DIRECTORY_SEPARATOR . $this->generateReportFilePrefix() . '.xml';\n\n\n\t\t$xmlReportFileLink = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $xmlReportFilePath;\n\t\t$xmlReportFileLink = str_replace('\\\\', '/', $xmlReportFileLink);\n\n\n\t\t$this->xmlHandler->save($xmlReportFilePath);\n\n\t\treturn $xmlReportFileLink;\n\t}", "abstract public function extractReportDatas();", "public function model()\n {\n return new Report;\n }", "public function __construct(Report $report)\n {\n $this->report = $report;\n }", "public function __construct(Report $report)\n {\n $this->report = $report;\n }", "public static function fromJson($obj) {\n if ($obj === null) {\n return null;\n }\n\n return new Report(array(\n \"id\" => isset($obj->id) ? $obj->id : null,\n \"name\" => isset($obj->name) ? $obj->name : null,\n \"content\" => isset($obj->content) ? $obj->content : null,\n \"defaultformat\" => isset($obj->defaultformat) ? $obj->defaultformat : null,\n \"description\" => isset($obj->description) ? $obj->description : null,\n \"emailbcc\" => isset($obj->emailbcc) ? $obj->emailbcc : null,\n \"emailcc\" => isset($obj->emailcc) ? $obj->emailcc : null,\n \"emailrecipients\" => isset($obj->emailrecipients) ? $obj->emailrecipients : null,\n \"emailschedule\" => isset($obj->emailschedule) ? $obj->emailschedule : null,\n \"emailscheduledayofmonth\" => isset($obj->emailscheduledayofmonth) ? $obj->emailscheduledayofmonth : null,\n \"emailscheduledayofweek\" => isset($obj->emailscheduledayofweek) ? $obj->emailscheduledayofweek : null,\n \"emailschedulehourofday\" => isset($obj->emailschedulehourofday) ? $obj->emailschedulehourofday : null,\n \"emailschedulequery\" => isset($obj->emailschedulequery) ? $obj->emailschedulequery : null,\n \"options\" => isset($obj->options) ? ReportOptions::fromJson($obj->options) : null,\n \"reporttypeid\" => isset($obj->reporttypeid) ? $obj->reporttypeid : null,\n \"subtitles\" => isset($obj->subtitles) ? $obj->subtitles : null,\n \"translations\" => isset($obj->translations) ? $obj->translations : null,\n \"usagetypeid\" => isset($obj->usagetypeid) ? $obj->usagetypeid : null,\n \"createdts\" => isset($obj->createdts) ? Json::unpackTimestamp($obj->createdts) : null,\n \"lastupdatets\" => isset($obj->lastupdatets) ? Json::unpackTimestamp($obj->lastupdatets) : null,\n ));\n }", "private function initReport()\n {\n $this->report = new \\stdClass();\n\n $this->searchDiffs();\n }", "public function getReport()\n {\n switch(isset($_REQUEST[\"report_format\"])?$_REQUEST[\"report_format\"]:\"pdf\")\n {\n case \"pdf\":\n $report = new PDFReport(\n isset($_REQUEST[\"page_orientation\"]) ? \n $_REQUEST[\"page_orientation\"] : \n PDFReport::ORIENTATION_LANDSCAPE,\n isset($_REQUEST[\"paper_size\"]) ? \n $_REQUEST[\"paper_size\"] :\n PDFReport::PAPER_A4\n );\n break;\n case \"html\":\n $report = new HTMLReport();\n $report->htmlHeaders = true;\n break;\n case \"html-no-headers\":\n $report = new HTMLReport();\n break;\n case \"xls\":\n $report = new XLSReport();\n break;\n case \"doc\":\n $report = new MSWordReport();\n break;\n case \"json\":\n $report = new JSONReport();\n break;\n }\n return $report;\n }", "public function getRecord() {\n $dailyrecord = new DailyRecordOB();\n $Record = $this->domDocument->getElementById(\"RID1\");\n if (!$Record) {\n throw new Exception(\"Error, something went wrong, XML or things not found.\"); \n }\n \n $dailyrecord->setOrderPaid($Record->getElementsByTagName(\"OrderPaid\")->item(0)->nodeValue);\n $dailyrecord->setDate($Record->getElementsByTagName(\"Date\")->item(0)->nodeValue);\n $dailyrecord->setAmountPaid($Record->getElementsByTagName(\"AmountPaid\")->item(0)->nodeValue);\n $dailyrecord->setPickupCount($Record->getElementsByTagName(\"PickupCount\")->item(0)->nodeValue);\n $dailyrecord->setDeliveryCount($Record->getElementsByTagName(\"DeliveryCount\")->item(0)->nodeValue);\n $dailyrecord->setOrderCanceled($Record->getElementsByTagName(\"OrderCanceled\")->item(0)->nodeValue);\n \n return $dailyrecord;\n }", "public static function getReport() {\n\t\t//IDs of the ski fields we want from the feed\n\t\t$targets = array(13); //Broken River's feed ID\n\t\t$feed = file_get_contents('https://api@brokenriver.co.nz:ycKNH6C287WQzyuk@www.snowhq.com/nz/canterbury/broken-river/broken-river-snow-report/xml');\n\t\tif ($feed) {\n\t\t\t$xml = simplexml_load_string($feed);\n\t\t\t\n\t\t\t$report = null;\n\t\t\tforeach($xml->skiareas->skiarea as $data){\n\t\t\t\tif (in_array($data->id, $targets)) {\n\t\t\t\t\tif ($data->id == 13){//BR\n\t\t\t\t\t\t//$data->status->code = 5;\n\t\t\t\t\t\t$report = new Report($data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $report;\n\t\t}\n\t}", "public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $event = new Event();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n case 'availablefrom':\n $method = 'setAvailableFrom';\n $value = new \\DateTime($value);\n break;\n case 'availableto':\n $method = 'setAvailableTo';\n $value = new \\DateTime($value);\n break;\n case 'creationdate':\n $method = 'setCreationDate';\n $value = new \\DateTime($value);\n break;\n case 'lastupdated':\n $method = 'setLastUpdated';\n $value = new \\DateTime($value);\n break;\n case 'pctcomplete':\n $method = 'setPercentageComplete';\n $value = (int) $value;\n break;\n case 'isparent':\n $method = 'setIsParent';\n $value = ((string) $value == 'true');\n break;\n case 'published':\n case 'private':\n $value = ((string) $value == 'true');\n break;\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n call_user_func(array($event, $method), $value);\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'calendar':\n $value = Calendar::createFromXML($element);\n break;\n case 'categories':\n if (isset($element->category)) {\n foreach ($element->category as $category) {\n $event->addCategory(\n Category::createFromXML($category)\n );\n }\n }\n break;\n case 'contactinfo':\n $value = ContactInfo::createFromXML($element);\n break;\n case 'eventdetails':\n if (isset($element->eventdetail)) {\n foreach ($element->eventdetail as $eventDetail) {\n $event->addEventDetail(\n EventDetail::createFromXML($eventDetail)\n );\n }\n }\n break;\n case 'languages':\n if (isset($element->language)) {\n foreach ($element->language as $language) {\n $event->addLanguage(\n Language::createFromXML($language)\n );\n }\n }\n break;\n case 'location':\n $value = Location::createFromXML($element);\n break;\n case 'organiser':\n $value = Organiser::createFromXML($element);\n break;\n case 'agefrom':\n $value = (int) $value;\n break;\n case 'bookingperiod':\n $value = Period::createFromXML($element);\n break;\n default:\n $value = (string) $value;\n break;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($event, $method), $value);\n }\n }\n }\n\n return $event;\n }", "public function asXML();", "protected function parseXML($xml)\n {\n if (! $xml) {\n return false;\n }\n\n foreach ($xml->children() as $key => $x) {\n $i = $this->index;\n if ($key == 'Count') {\n $this->count = (string) $x;\n $this->log(\"Successfully canceled $this->count report requests.\");\n }\n if ($key != 'ReportRequestInfo') {\n continue;\n }\n\n $this->reportList[$i]['ReportRequestId'] = (string) $x->ReportRequestId;\n $this->reportList[$i]['ReportType'] = (string) $x->ReportType;\n $this->reportList[$i]['StartDate'] = (string) $x->StartDate;\n $this->reportList[$i]['EndDate'] = (string) $x->EndDate;\n $this->reportList[$i]['Scheduled'] = (string) $x->Scheduled;\n $this->reportList[$i]['SubmittedDate'] = (string) $x->SubmittedDate;\n $this->reportList[$i]['ReportProcessingStatus'] = (string) $x->ReportProcessingStatus;\n $this->reportList[$i]['GeneratedReportId'] = (string) $x->GeneratedReportId;\n $this->reportList[$i]['StartedProcessingDate'] = (string) $x->StartedProcessingDate;\n $this->reportList[$i]['CompletedProcessingDate'] = (string) $x->CompletedProcessingDate;\n\n $this->index++;\n }\n }", "public function testInstantiation()\n {\n $this->fixture = new ValidationReport(\n array( // results\n new ValidationResult(\n $this->nodeFactory->createNamedNode('http://focusNode/'),\n $this->nodeFactory->createNamedNode('http://resultPath/'),\n new Severity('sh:Warning'),\n $this->nodeFactory->createNamedNode('sh:MinMaxCountConstraintComponent'),\n $this->nodeFactory->createNamedNode('http://value')\n )\n )\n );\n\n $this->assertTrue($this->fixture->conforms());\n }", "public function __construct($report)\n {\n $this->report=$report;\n }", "private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }", "public function createXmlNode(\\SimpleXMLElement $node): \\SimpleXMLElement\n {\n \\Logger::getLogger(\\get_class($this))->debug(__METHOD__);\n if (!\\is_string($this->getDriver()) || \\trim($this->getDriver()) === \"\") {\n $msg = \"Database driver must be set\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__ . \" '%s'\", $msg));\n throw new SerializeReportException($msg);\n }\n if (!\\is_string($this->getConnectionString()) || \\trim($this->getConnectionString()) === \"\") {\n $msg = \"Database connection string must be set\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__ . \" '%s'\", $msg));\n throw new SerializeReportException($msg);\n }\n\n\n $databaseNode = $node->addChild(\"database\");\n AReport::cdata(\n $databaseNode->addChild(\"connectionString\"),\n $this->getConnectionString()\n );\n\n AReport::cdata($databaseNode->addChild(\"driver\"), $this->getDriver());\n\n AReport::cdata(\n $databaseNode->addChild(\"user\"),\n $this->getUser() === null\n ? \"\"\n : $this->getUser()\n );\n\n AReport::cdata(\n $databaseNode->addChild(\"password\"),\n $this->getPassword() === null\n ? \"\"\n : $this->getPassword()\n );\n\n return $databaseNode;\n }", "public function __construct(DevReport $report)\n {\n $this->report = $report;\n }", "protected function buildDomainObject($row) {\n $practitionerId = $row['practitioner_id'];\n $practitioner = $this->practitionerDAO->find($practitionerId);\n\n // Find the associated user\n $visitorId = $row['visitor_id'];\n $visitor = $this->visitorDAO->find($visitorId);\n\n $report = new Report();\n $report->setId($row['report_id']);\n $report->setAssessment($row['assessment']);\n $report->setDate($row['reporting_date']);\n $report->setPurpose($row['purpose']);\n $report->setPractitioner($practitioner);\n $report->setVisitor($visitor);\n return $report;\n }", "public function toXML()\n {\n $xmlString = \"<?xml version=\\\"1.0\\\"?><conversion></conversion>\";\n $xml = new \\SimpleXMLElement($xmlString);\n\n if (isset($this->timestamp)) {\n $xml->addChild(\"timestamp\", $this->timestamp);\n }\n if (isset($this->timestamp_sql)) {\n $xml->addChild(\"timestamp_sql\", $this->timestampSql);\n }\n if (isset($this->contact_id)) {\n $xml->addChild(\"contact_id\", $this->contactId);\n }\n if (isset($this->contact_email)) {\n $xml->addChild(\"contact_email\", $this->contactEmail);\n }\n if (isset($this->contact_external_id)) {\n $xml->addChild(\"contact_external_id\", $this->contactExternalId);\n }\n if (isset($this->value)) {\n $xml->addChild(\"value\", $this->value);\n }\n if (isset($this->mailing_sent_date)) {\n $xml->addChild(\"mailing_sent_date\", $this->mailingSentTimestamp);\n }\n if (isset($this->mailing_sent_date_sql)) {\n $xml->addChild(\"mailing_sent_date_sql\", $this->mailingSentTimestampSql);\n }\n if (isset($this->mailing_id)) {\n $xml->addChild(\"mailing_id\", $this->mailingId);\n }\n if (isset($this->mailing_name)) {\n $xml->addChild(\"mailing_name\", $this->mailingName);\n }\n if (isset($this->site_id)) {\n $xml->addChild(\"site_id\", $this->siteId);\n }\n if (isset($this->site_name)) {\n $xml->addChild(\"site_name\", $this->siteName);\n }\n if (isset($this->goal_id)) {\n $xml->addChild(\"goal_id\", $this->goalId);\n }\n if (isset($this->goal_name)) {\n $xml->addChild(\"goal_name\", $this->goalName);\n }\n if (isset($this->link_id)) {\n $xml->addChild(\"link_id\", $this->linkId);\n }\n if (isset($this->link_url)) {\n $xml->addChild(\"link_url\", $this->linkUrl);\n }\n\n return $xml;\n }", "public function addReport($title = \"\")\n {\n assert(is_string($title), 'Wrong type for argument 1. String expected');\n $report = null;\n if ($this->getName() === 'report') {\n $report = $this->addChild(\"report\");\n if (!empty($title)) {\n $report->addChild(\"title\", (string) $title);\n }\n }\n return $report;\n }", "function create($object, $xmlFile = null){\r\n\t\tif($xmlFile == null)\r\n\t\t\t$xmlFile = constant(\"OBJECT_XML\");\t\t\r\n\t\t\r\n\t\t$xml = simplexml_load_file($xmlFile);\r\n\t\t$xml = $object->addToXML($xml);\r\n\t\t$xml->asXML($xmlFile);\r\n\t}", "public static function fromXml(SimpleXMLElement $xml): Statistics {\n\t\t$statistics = new self();\n\t\t$properties = $xml->xpath('/environet:UploadStatistics/environet:PropertyStatistics');\n\n\t\t$statistics->setInputPropertiesCount((int) ($xml->xpath('/environet:UploadStatistics/environet:InputPropertiesCount')[0] ?? null));\n\t\t$statistics->setDate(new DateTime((string) $xml->xpath('/environet:UploadStatistics/environet:Date')[0] ?? null));\n\t\t$statistics->setMonitoringPointId((string) $xml->xpath('/environet:UploadStatistics/environet:MonitoringPointId')[0] ?? null);\n\n\t\tforeach ($properties as $property) {\n\t\t\t$symbol = (string) $property->xpath('environet:Symbol')[0] ?? null;\n\t\t\tif (!$symbol) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$minTime = $property->xpath('environet:MinTime')[0] ?? null;\n\t\t\t$maxTime = $property->xpath('environet:MaxTime')[0] ?? null;\n\t\t\t$statistics->addProperty($symbol);\n\t\t\t$statistics->setPropertyValuesCount($symbol, (int) $property->xpath('environet:ValuesCount')[0] ?? 0);\n\t\t\t$statistics->setPropertyInserts($symbol, (int) $property->xpath('environet:Inserts')[0] ?? 0);\n\t\t\t$statistics->setPropertyUpdates($symbol, (int) $property->xpath('environet:Updates')[0] ?? 0);\n\t\t\t$statistics->setPropertyNoChanges($symbol, (int) $property->xpath('environet:NoChanges')[0] ?? 0);\n\t\t\t$statistics->setPropertyMinTime($symbol, $minTime ? DateTime::createFromFormat(DateTimeInterface::ISO8601, $minTime) : null);\n\t\t\t$statistics->setPropertyMaxTime($symbol, $maxTime ? DateTime::createFromFormat(DateTimeInterface::ISO8601, $maxTime) : null);\n\t\t}\n\n\t\treturn $statistics;\n\t}", "protected function createOfx(SimpleXMLElement $xml)\n {\n return new InvestmentOfx($xml);\n }", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public static function fromXML($xml){\n //self::$strxml = file_get_contents($xml);\n // echo self::$xmldoc != null;\n\n $bool = self::$xmldata = self::$xmldoc->loadXML($xml);\n $newXML = self::$xmldoc->saveXML();\n // echo $newXML;\n }", "public function __construct(\\SimpleXMLElement $element) {\n\t\t$this->values = $this->simplexml2array($element);\n\t}", "public function toXML();", "public function __construct(\\SimpleXMLElement $xml)\n {\n foreach ($xml->attributes() as $name => $value) {\n switch ($name) {\n case 'variable':\n $this->variable = (string) $value;\n break;\n case 'sort':\n $this->sort = (string) $value;\n break;\n }\n }\n\n }", "function toXML()\n\t{\n\t\tinclude_once(\"./Services/Xml/classes/class.ilXmlWriter.php\");\n\t\t$a_xml_writer = new ilXmlWriter;\n\t\t// set xml header\n\t\t$a_xml_writer->xmlHeader();\n\t\t$attrs = array(\n\t\t\t\"xmlns:xsi\" => \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t\"xsi:noNamespaceSchemaLocation\" => \"http://www.ilias.de/download/xsd/ilias_survey_4_2.xsd\"\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"surveyobject\", $attrs);\n\t\t$attrs = array(\n\t\t\t\"id\" => $this->getSurveyId(),\n\t\t\t\"title\" => $this->getTitle()\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"survey\", $attrs);\n\t\t\n\t\t$a_xml_writer->xmlElement(\"description\", NULL, $this->getDescription());\n\t\t$a_xml_writer->xmlElement(\"author\", NULL, $this->getAuthor());\n\t\t$a_xml_writer->xmlStartTag(\"objectives\");\n\t\t$attrs = array(\n\t\t\t\"label\" => \"introduction\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getIntroduction(), TRUE, TRUE, $attrs);\n\t\t$attrs = array(\n\t\t\t\"label\" => \"outro\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getOutro(), TRUE, TRUE, $attrs);\n\t\t$a_xml_writer->xmlEndTag(\"objectives\");\n\n\t\tif ($this->getAnonymize())\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"0\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"anonymisation\", $attribs);\n\t\t$a_xml_writer->xmlStartTag(\"restrictions\");\n\t\tif ($this->getAnonymize() == 2)\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"free\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"restricted\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"access\", $attribs);\n\t\tif ($this->getStartDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\t\t\t\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getStartDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"startingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\t\t}\n\t\tif ($this->getEndDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getEndDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"endingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\n\t\t}\n\t\t$a_xml_writer->xmlEndTag(\"restrictions\");\n\t\t\n\t\t// constraints\n\t\t$pages =& $this->getSurveyPages();\n\t\t$hasconstraints = FALSE;\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t{\n\t\t\t\t\t$hasconstraints = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hasconstraints)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"constraints\");\n\t\t\tforeach ($pages as $question_array)\n\t\t\t{\n\t\t\t\tforeach ($question_array as $question)\n\t\t\t\t{\n\t\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// found constraints\n\t\t\t\t\t\tforeach ($question[\"constraints\"] as $constraint)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$attribs = array(\n\t\t\t\t\t\t\t\t\"sourceref\" => $question[\"question_id\"],\n\t\t\t\t\t\t\t\t\"destref\" => $constraint[\"question\"],\n\t\t\t\t\t\t\t\t\"relation\" => $constraint[\"short\"],\n\t\t\t\t\t\t\t\t\"value\" => $constraint[\"value\"],\n\t\t\t\t\t\t\t\t\"conjunction\" => $constraint[\"conjunction\"]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$a_xml_writer->xmlElement(\"constraint\", $attribs);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$a_xml_writer->xmlEndTag(\"constraints\");\n\t\t}\n\t\t\n\t\t// add the rest of the preferences in qtimetadata tags, because there is no correspondent definition in QTI\n\t\t$a_xml_writer->xmlStartTag(\"metadata\");\n\n\t\t$custom_properties = array();\n\t\t$custom_properties[\"evaluation_access\"] = $this->getEvaluationAccess();\n\t\t$custom_properties[\"status\"] = $this->getStatus();\n\t\t$custom_properties[\"display_question_titles\"] = $this->getShowQuestionTitles();\n\t\t$custom_properties[\"pool_usage\"] = (int)$this->getPoolUsage();\n\t\t\n\t\t$custom_properties[\"own_results_view\"] = (int)$this->hasViewOwnResults();\n\t\t$custom_properties[\"own_results_mail\"] = (int)$this->hasMailOwnResults();\n\t\t\n\t\t$custom_properties[\"mode_360\"] = (int)$this->get360Mode();\n\t\t$custom_properties[\"mode_360_self_eval\"] = (int)$this->get360SelfEvaluation();\n\t\t$custom_properties[\"mode_360_self_rate\"] = (int)$this->get360SelfRaters();\n\t\t$custom_properties[\"mode_360_self_appr\"] = (int)$this->get360SelfAppraisee();\n\t\t$custom_properties[\"mode_360_results\"] = $this->get360Results();\n\t\t$custom_properties[\"mode_360_skill_service\"] = (int)$this->get360SkillService();\n\t\t\n\t\t\n\t\t// :TODO: skills?\n\t\t\t\t\n\t\t// reminder/tutor notification are (currently?) not exportable\n\t\t\n\t\tforeach($custom_properties as $label => $value)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, $label);\n\t\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $value);\n\t\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t}\n\n\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, \"SCORM\");\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md = new ilMD($this->getId(),0, $this->getType());\n\t\t$writer = new ilXmlWriter();\n\t\t$md->toXml($writer);\n\t\t$metadata = $writer->xmlDumpMem();\n\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $metadata);\n\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t\n\t\t$a_xml_writer->xmlEndTag(\"metadata\");\n\t\t$a_xml_writer->xmlEndTag(\"survey\");\n\n\t\t$attribs = array(\"id\" => $this->getId());\n\t\t$a_xml_writer->xmlStartTag(\"surveyquestions\", $attribs);\n\t\t// add questionblock descriptions\n\t\t$obligatory_states =& $this->getObligatoryStates();\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$attribs = array(\"id\" => $question_array[0][\"question_id\"]);\n\t\t\t\t$attribs = array(\"showQuestiontext\" => $question_array[0][\"questionblock_show_questiontext\"],\n\t\t\t\t\t\"showBlocktitle\" => $question_array[0][\"questionblock_show_blocktitle\"]);\n\t\t\t\t$a_xml_writer->xmlStartTag(\"questionblock\", $attribs);\n\t\t\t\tif (strlen($question_array[0][\"questionblock_title\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"questionblocktitle\", NULL, $question_array[0][\"questionblock_title\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (strlen($question[\"heading\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"textblock\", NULL, $question[\"heading\"]);\n\t\t\t\t}\n\t\t\t\t$questionObject =& $this->_instanciateQuestion($question[\"question_id\"]);\n\t\t\t\tif ($questionObject !== FALSE) $questionObject->insertXML($a_xml_writer, FALSE, $obligatory_states[$question[\"question_id\"]]);\n\t\t\t}\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$a_xml_writer->xmlEndTag(\"questionblock\");\n\t\t\t}\n\t\t}\n\n\t\t$a_xml_writer->xmlEndTag(\"surveyquestions\");\n\t\t$a_xml_writer->xmlEndTag(\"surveyobject\");\n\t\t$xml = $a_xml_writer->xmlDumpMem(FALSE);\n\t\treturn $xml;\n\t}", "public function formatData(){\n $from = $this->dataObject->getFrom();\n\n // prepare array for counterxmlbuild with vendor informations\n $data = array(\n 'Report' => array (\n 0 => array(\n // Report attributes\n 'Created' => date('Y-m-d\\TH:i:s'),\n 'ID' => 'ID01', //TODO\n 'Version' => $this->dataObject->getVersion(),\n 'Name' => $this->dataObject->getReportName(),\n 'Title' => $this->dataObject->getReportTitle(),\n // Vendor node\n 'Vendor' => array(\n 'Name' => VENDOR_NAME,\n 'ID' => VENDOR_ID,\n 'Contact' => array(\n 0 => array(\n 'Contact' => VENDOR_CONTACT_NAME,\n 'E-mail' => VENDOR_CONTACT_MAIL\n ),\n ),\n 'WebSiteUrl' => VENDOR_WEBSITEURL,\n 'LogoUrl' => VENDOR_LOGOURL,\n ),\n ),\n ),\n );\n\n // prepare with customer informations\n $data['Report'][0]['Customer'][0] = $this->dataObject->getCustomerInfo();\n\n $j=0; // ReportItem\n $y=0; // ItemPerfomance\n $previousIdentifier = '';\n $count = 0;\n\n foreach ($this->dataObject->getData() as $row) {\n if (!($row['identifier'] == $previousIdentifier)) {\n // next Reportitem\n $j++;\n // reset ItemPerfomance\n $y=0;\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPlatform'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemDataType'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemName'] = $row['identifier'];\n }\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['Begin'] = date('Y-m-d', strtotime($row['date']));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['End'] = date('Y-m-d', strtotime('last day of this month', strtotime($row['date'])));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Category'] = 'TODO'; //TODO\n\n // check for different counts\n $x=0; // Instance\n\n // TODO: implement/translate format for different metric types\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['MetricType'] = 'ft_total';\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['Count'] = $row['counter'];\n\n $y++; //next ItemPerformance\n $previousIdentifier = $row['identifier'];\n $count++;\n }\n\n $counterxmlbuild = new CounterXMLBuilder();\n $counterxmlbuild->setIndentString(\"\\t\");\n $counterxmlbuild->start();\n $counterxmlbuild->add_reports($data);\n $counterxmlbuild->done();\n return $this->formattedData = $counterxmlbuild->outputMemory();\n }", "function __construct($xml)\n\t{\n\t\tparent::__construct($xml);\n\t\t$this->infolog = new infolog_bo();\n\t}", "public function toXml(): SimpleXMLElement {\n\t\t// Create xml root\n\t\t$xmlNamespaces = 'xmlns:environet=\"environet\"';\n\t\t$xmlHeader = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><environet:UploadStatistics ' . $xmlNamespaces . '></environet:UploadStatistics>';\n\t\t$xml = new SimpleXMLElement($xmlHeader);\n\n\n\t\t$xml->addChild('InputPropertiesCount', $this->getInputPropertiesCount());\n\t\t$xml->addChild('Date', $this->getDate()->format('c'));\n\t\t$xml->addChild('MonitoringPointId', $this->getMonitoringPointId());\n\n\t\tforeach ($this->getProperties() as $property) {\n\t\t\t$xmlProperty = $xml->addChild('PropertyStatistics');\n\t\t\t$xmlProperty->addChild('Symbol', $property);\n\t\t\t$xmlProperty->addChild('ValuesCount', $this->getPropertyValuesCount($property));\n\t\t\t$xmlProperty->addChild('Inserts', $this->getPropertyInserts($property));\n\t\t\t$xmlProperty->addChild('Updates', $this->getPropertyUpdates($property));\n\t\t\t$xmlProperty->addChild('NoChanges', $this->getPropertyNoChanges($property));\n\t\t\t$xmlProperty->addChild('MinTime', $this->getPropertyMinTimeFormatted($property));\n\t\t\t$xmlProperty->addChild('MaxTime', $this->getPropertyMaxTimeFormatted($property));\n\t\t}\n\n\t\treturn $xml;\n\t}", "public function getReport() {\n\t\t$xmlReportFileLink = $this->generateXMLReport();\n\n\t\t$JSONMiniReport = $this->generateJSONMiniReport($xmlReportFileLink);\n\n\t\treturn $JSONMiniReport;\n\t}", "function Reports() {\n //$objCore = new Core();\n //default constructor for this class\n }", "public function processReports();", "protected function __construct($xml) {\n if ( isset($xml->object) ) {\n foreach ( $xml->object as $window ) {\n $this->_traverseWindow($window);\n }\n }\n }", "public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $weekScheme = new WeekScheme();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($weekScheme, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($weekScheme, $method), $value);\n }\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $skip = false;\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'weekscheme':\n foreach ($element as $day) {\n $className = '\\\\TijsVerkoyen\\\\UitDatabank\\\\Entities\\\\Event\\\\Calendar\\\\WeekScheme\\\\' . ucfirst($day->getName());\n $weekScheme->addDay(\n call_user_func(array($className, 'createFromXML'), $day)\n );\n }\n $skip = true;\n break;\n default:\n $value = (string) $element;\n break;\n }\n\n if (!$skip) {\n if (!method_exists($weekScheme, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($weekScheme, $method), $value);\n }\n }\n }\n }\n\n return $weekScheme;\n }", "public function actionParseReport()\n {\n //->addUpdate([\n // [\n // 'date_delivered' => ['$not' => ['$exists' => true]],\n // 'status' => 'sended',\n // ],\n // ], ['status' => 'sendedddd'])->executeBatch(Message_Phone_List::collectionName());\n\n $vm = ViberMessage::find()->where(['in', 'status', ['wait', 'process']])->one();\n if (! $vm) {\n echo 'No distribution messages';\n\n return;\n }\n $pf = new ProviderFactory();\n $provider = $pf->createProvider($vm);\n $provider->answer = $this->getReportData2();\n $provider->parseDeliveryReport();\n }", "protected function buildXml()\n\t{\n\t\t$xml = new DOMDocument('1.0', 'utf8');\n\t\t$cra_inquiry = $xml->createElement('LoanRecord');\n\t\t$cra_inquiry->appendChild($this->buildData($xml));\n\t\t\n\t\t$xml->appendChild($cra_inquiry);\n\t\t\n\t\treturn $xml;\n\t}", "abstract protected function grabReport( $report_id );", "public static function create_xrd() {\n $xrd = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n $xrd .= '<XRD xmlns=\"http://docs.oasis-open.org/ns/xri/xrd-1.0\">'.\"\\n\";\n $xrd .= ' <Subject>'.site_url(\"/\").'</Subject>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/vendor\">'.get_bloginfo('name').'</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/title\">'.get_bloginfo('description').'</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/name\">\"Press This\" bookmarklet</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/prompt\">Press This</Property>'.\"\\n\";\n $xrd .= ' <Link rel= \"icon\" href=\"'.OExchangePlugin::get_icon_url(16).'\" />'.\"\\n\";\n $xrd .= ' <Link rel= \"icon32\" href=\"'.OExchangePlugin::get_icon_url(32).'\" />'.\"\\n\";\n $xrd .= ' <Link rel= \"http://www.oexchange.org/spec/0.8/rel/offer\" href=\"'.admin_url('press-this.php').'\" type=\"text/html\"/>'.\"\\n\";\n $xrd .= '</XRD>';\n\n return $xrd;\n }", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Transaction_History_Report_Query($this->server);\n\n\t\t\t$data = new stdClass();\n\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'specific_date_MM' => $this->request->specific_date_month,\n\t\t\t 'specific_date_DD' => $this->request->specific_date_day,\n\t\t\t 'specific_date_YYYY' => $this->request->specific_date_year,\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'loan_type' => $this->request->loan_type\n\t\t\t);\n\n\t\t\t$_SESSION['reports']['transaction_history']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['transaction_history']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['transaction_history']['url_data'] = array('name' => 'Transaction History', 'link' => '/?module=reporting&mode=transaction_history');\n\n\t\t\t// Start date\n\t\t\t$start_date_YYYY = $this->request->specific_date_year;\n\t\t\t$start_date_MM\t = $this->request->specific_date_month;\n\t\t\t$start_date_DD\t = $this->request->specific_date_day;\n\t\t\tif(!checkdate($start_date_MM, $start_date_DD, $start_date_YYYY))\n\t\t\t{\n\t\t\t\t//return with no data\n\t\t\t\t$data->search_message = \"Start Date invalid or not specified.\";\n\t\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$start_date_YYYYMMDD = 10000 * $start_date_YYYY\t+ 100 * $start_date_MM + $start_date_DD;\n\n\t\t\t$data->search_results = $this->search_query->Fetch_Transaction_History_Data( $start_date_YYYYMMDD,\n\t\t\t\t $this->request->loan_type,\n\t\t\t\t $this->request->company_id);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['transaction_history']['report_data'] = $data;\n\t}", "public function testConstructValidXML()\n {\n $parser = new Parser($this->createTwig(), '<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig(), __DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addXmlContent('<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addFileContent(__DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n }", "public function createXML($xml) {\n\n\t\t\t$xml = parent::createXML($xml);\n\t\t\t$xml->addChild(\"company-id\",$this->getCompanyId());\n\t\t\t$xml->addChild(\"company-name\",$this->getCompanyName());\n\t\t\t$xml->addChild(\"first-name\",$this->getFirstName());\n\t\t\t$xml->addChild(\"last-name\",$this->getLastName());\n\t\t\treturn $xml;\n\t\t}", "public function _construct()\n {\n $this->_init('visitorreport/visitorreport', 'id_visitorreport');\n }", "public function fromXML(SimpleXMLElement $xml) {\n\t\tthrow new Exception(__CLASS__ . ' cannot be loaded from XML');\n\t}", "function getReport() {\n\t\t$severity = get_option( 'accessibility_severity' );\n\t\t$problems = $this->guideline->getReport();\n\t\tif(is_array($problems)) {\n\t\t\tforeach($problems as $testname => $test) {\n\t\t\t\tif($severity[$test['severity']] && is_array($test)) {\n\t\t\t\t\tforeach($test as $k => $problem) {\n\t\t\t\t\t\tif(is_object($problem) && property_exists($problem, 'element') && is_object($problem->element)) {\n\t\t\t\t\t\t\t$existing = $problem->element->getAttribute('class');\n\t\t\t\t\t\t\t$problem->element->setAttribute('class', \n\t\t\t\t\t\t\t$existing .' '. $this->classnames[$test['severity']]);\n\t\t\t\t\t\t\t$link = $this->dom->createElement('a');\n\t\t\t\t\t\t\t$link = $problem->element->parentNode->insertBefore($link, $problem->element);\n\t\t\t\t\t\t\t$link->setAttribute('href', 'edit.php?page=accessibility&type=test&test='. $testname);\n\t\t\t\t\t\t\t$link->setAttribute('class', 'error-hover');\n\t\t\t\t\t\t\t$image = $this->dom->createElement('img');\n\t\t\t\t\t\t\t$image = $link->appendChild($image);\n\t\t\t\t\t\t\t$image->setAttribute('alt', $test['title']);\n\t\t\t\t\t\t\t$image->setAttribute('src', '../wp-content/plugins/accessible-helper/images/'. \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->images[$test['severity']]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn $this->dom->saveHTML();\n\t}", "function get_auditlog_xml($args=array())\n{\n\n // makes sure user has appropriate license level\n licensed_feature_check();\n\n // get values passed in GET/POST request\n $reportperiod = grab_array_var($args, \"reportperiod\", grab_request_var(\"reportperiod\", \"last24hours\"));\n $startdate = grab_array_var($args, \"startdate\", grab_request_var(\"startdate\", \"\"));\n $enddate = grab_array_var($args, \"enddate\", grab_request_var(\"enddate\", \"\"));\n $search = grab_array_var($args, \"search\", grab_request_var(\"search\", \"\"));\n $source = grab_array_var($args, \"source\", grab_request_var(\"source\", \"\"));\n $type = grab_array_var($args, \"type\", grab_request_var(\"type\", \"\"));\n $user = grab_array_var($args, \"user\", grab_request_var(\"user\", \"\"));\n $ip_address = grab_array_var($args, \"ip_address\", grab_request_var(\"ip_address\", \"\"));\n $records = grab_array_var($args, \"records\", grab_request_var(\"records\", \"\"));\n $details = grab_request_var(\"details\", 'hide');\n\n // fix search\n if ($search == _(\"Search...\"))\n $search = \"\";\n\n\n // determine start/end times based on period\n get_times_from_report_timeperiod($reportperiod, $starttime, $endtime, $startdate, $enddate);\n\n // get XML data from backend - the most basic example\n // this will return all records (no paging), so it can be used for CSV export\n $args = array(\n \"starttime\" => $starttime,\n \"endtime\" => $endtime,\n );\n if ($source != \"\")\n $args[\"source\"] = $source;\n if ($user != \"\")\n $args[\"user\"] = $user;\n if ($type != \"\")\n $args[\"type\"] = $type;\n if ($ip_address != \"\")\n $args[\"ip_address\"] = $ip_address;\n if ($search) {\n $args[\"message\"] = \"lk:\" . $search . \";source=lk:\" . $search . \";user=lk:\" . $search . \";ip_address=lk:\" . $search . \";details=lk:\" . $search;\n }\n\n if ($records != \"\") {\n $args[\"records\"] = $records;\n }\n\n $xml = get_xml_auditlog($args);\n return $xml;\n}", "public function parse($payload)\n {\n return new SimpleXMLElement($payload);\n }", "public function getReport() \n {\n return $this->report;\n }", "public function setReport($val)\n {\n $this->_propDict[\"report\"] = $val;\n return $this;\n }", "public function setXML(SimpleXMLElement $xml);", "public function __construct($report)\n {\n // $this->onQueue('audits');\n $this->report = $report;\n // $this->report = $report;\n }", "public function createReport()\n {\n foreach($this->_data as $data)\n {\n //$data must have id and data elements\n //$data may also have config, header, footer, group\n\n $id=$data['id'];\n $format=isset($data['format'])?$data['format']:array();\n $config=isset($data['config'])?$data['config']:array();\n $group=isset($data['group'])?$data['group']:array();\n\n $configHeader=isset($config['header'])?$config['header']:$config;\n $configData=isset($config['data'])?$config['data']:$config;\n $configFooter=isset($config['footer'])?$config['footer']:$config;\n\n $config=array(\n 'header'=>$configHeader,\n 'data'=>$configData,\n 'footer'=>$configFooter\n );\n\n //set the group\n $this->_group=$group;\n\n $loadCollection=array();\n\n $nextRow=$this->objWorksheet->getHighestRow();\n if($nextRow>1)\n $nextRow++;\n $colIndex=-1;\n\n //form the header for data\n if(isset($data['header']))\n {\n $headerId='HEADER_'.$id;\n foreach($data['header'] as $k=>$v)\n {\n $colIndex++;\n $tag=\"{\".$headerId.\":\".$k.\"}\";\n $this->objWorksheet->setCellValueByColumnAndRow($colIndex,$nextRow,$tag);\n if(isset($config['header'][$k]['width']))\n $this->objWorksheet->getColumnDimensionByColumn($colIndex)->setWidth(pixel2unit($config['header'][$k]['width']));\n if(isset($config['header'][$k]['align']))\n $this->objWorksheet->getStyleByColumnAndRow($colIndex,$nextRow)->getAlignment()->setHorizontal($config['header'][$k]['align']);\n }\n\n if($colIndex>-1)\n {\n $this->objWorksheet->getStyle(PHPExcel_Cell::stringFromColumnIndex(0).$nextRow.':'.PHPExcel_Cell::stringFromColumnIndex($colIndex).$nextRow)->applyFromArray($this->_headerStyleArray);\n }\n\n //add header row to load collection\n $loadCollection[]=array('id'=>$headerId,'data'=>$data['header']);\n\n //move to next row for data\n $nextRow++;\n }\n\n\n //form the data repeating row\n $dataId='DATA_'.$id;\n $colIndex=-1;\n\n //form the template row\n if(count($data['data'])>0)\n {\n //we just need first row of data, to see array keys\n $singleDataRow=$data['data'][0];\n foreach($singleDataRow as $k=>$v)\n {\n $colIndex++;\n $tag=\"{\".$dataId.\":\".$k.\"}\";\n $this->objWorksheet->setCellValueByColumnAndRow($colIndex,$nextRow,$tag);\n if(isset($config['data'][$k]['align']))\n $this->objWorksheet->getStyleByColumnAndRow($colIndex,$nextRow)->getAlignment()->setHorizontal($config['data'][$k]['align']);\n }\n }\n\n //add this row to collection for load but with repeating\n $loadCollection[]=array('id'=>$dataId,'data'=>$data['data'],'repeat'=>true,'format'=>$format);\n $this->enableStripRows();\n\n //form the footer row for data if needed\n if(isset($data['footer']))\n {\n $footerId='FOOTER_'.$id;\n $colIndex=-1;\n $nextRow++;\n\n //formiraj template\n foreach($data['footer'] as $k=>$v)\n {\n $colIndex++;\n $tag=\"{\".$footerId.\":\".$k.\"}\";\n $this->objWorksheet->setCellValueByColumnAndRow($colIndex,$nextRow,$tag);\n if(isset($config['footer'][$k]['align']))\n $this->objWorksheet->getStyleByColumnAndRow($colIndex,$nextRow)->getAlignment()->setHorizontal($config['footer'][$k]['align']);\n }\n if($colIndex>-1)\n {\n $this->objWorksheet->getStyle(PHPExcel_Cell::stringFromColumnIndex(0).$nextRow.':'.PHPExcel_Cell::stringFromColumnIndex($colIndex).$nextRow)->applyFromArray($this->_footerStyleArray);\n }\n\n //add footer row to load collection\n $loadCollection[]=array('id'=>$footerId,'data'=>$data['footer'],'format'=>$format);\n }\n\n $this->load($loadCollection);\n $this->generateReport();\n }\n }", "public static function instantiate($row)\n {\n if (get_called_class() !== 'reportmanager\\models\\Reports') {\n return new static;\n }\n\n $class = static::$module->reportModelClass;\n\n if (! $class) {\n throw new \\yii\\base\\ErrorException('You need to specify reportModelClass variable in model ReportClass configuration.');\n }\n\n $rc = new \\ReflectionClass($class);\n if (! $rc->isSubClassOf('\\reportmanager\\models\\Reports')) {\n throw new \\yii\\base\\ErrorException('The reportModelClass must be a child of \\reportmanager\\models\\Reports.');\n }\n\n return $class::instantiate($row);\n }", "public function __construct() {\n\n $this->sizeField['width'] = '500';\n $this->sizeField['height'] = '500';\n \n $this->gridObject = new SimpleXMLElement('<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"500px\" height=\"500px\"></svg>');\n }", "function _factoryDocument($node_id, $plan_category_id, $output_type = 'p') {\n $this->load->library('PHPExcel');\n $sheet = $this->phpexcel->setActiveSheetIndex(0);\n $sheet->setTitle('Results');\n $planTable = Doctrine_Core::getTable('Plan');\n $plans = $planTable->retrieveByNodeExport($node_id);\n\n $sheet->setCellValue('A1', $this->translateTag('General', 'version'))\n ->setCellValue('B1', $this->translateTag('General', 'description'))\n ->setCellValue('C1', $this->translateTag('General', 'category'))\n ->setCellValue('D1', $this->translateTag('General', 'charger'))\n ->setCellValue('E1', $this->translateTag('General', 'creation'))\n ->setCellValue('F1', $this->translateTag('General', 'commentary'));\n\n\n $rcount = 1;\n\n foreach ($plans as $plan) {\n $rcount++;\n $sheet->setCellValueExplicit('A' . $rcount, $plan->plan_version, PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValueExplicit('B' . $rcount, $plan->plan_description, PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValueExplicit('C' . $rcount, $plan->PlanCategory->plan_category_name, PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValueExplicit('D' . $rcount, $plan->User->user_name, PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValueExplicit('E' . $rcount, $plan->plan_datetime, PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValueExplicit('F' . $rcount, $plan->plan_comments, PHPExcel_Cell_DataType::TYPE_STRING);\n }\n\n $sheet->getStyle('A1:F1')->getFont()->applyFromArray(array(\n 'bold' => true\n ));\n\n $sheet->getStyle('A1:F1')->getFill()->applyFromArray(array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array(\n 'rgb' => 'd9e5f4'\n )\n ));\n\n $sheet->getStyle('A1:F' . $rcount)->getBorders()->applyFromArray(array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array(\n 'rgb' => '808080'\n )\n )\n ));\n\n if ($output_type == 'e') {\n $sheet->getColumnDimension('A')->setAutoSize(true);\n $sheet->getColumnDimension('B')->setAutoSize(true);\n $sheet->getColumnDimension('C')->setAutoSize(true);\n $sheet->getColumnDimension('D')->setAutoSize(true);\n $sheet->getColumnDimension('E')->setAutoSize(true);\n $sheet->getColumnDimension('F')->setAutoSize(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($this->phpexcel, 'Excel5');\n $extension = '.xls';\n } else {\n $sheet->getColumnDimension('A')->setWidth(20);\n $sheet->getColumnDimension('B')->setWidth(20);\n $sheet->getColumnDimension('C')->setWidth(30);\n $sheet->getColumnDimension('D')->setWidth(25);\n $sheet->getColumnDimension('E')->setWidth(35);\n $sheet->getColumnDimension('F')->setWidth(25);\n\n $this->phpexcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n $objWriter = PHPExcel_IOFactory::createWriter($this->phpexcel, 'PDF');\n $extension = '.pdf';\n }\n $file_name = $this->input->post('file_name') . $extension;\n $objWriter->save($this->app->getTempFileDir($file_name));\n\n\n $this->syslog->register('export_list_plan', array(\n $file_name\n )); // registering log\n\n return $file_name;\n }", "function exportXML(&$a_xml_writer, $a_inst, &$expLog)\n\t{\n\t\tglobal $ilBench;\n\n\t\t$expLog->write(date(\"[y-m-d H:i:s] \").\"Structure Object \".$this->getId());\n\t\t$attrs = array();\n\t\t$a_xml_writer->xmlStartTag(\"StructureObject\", $attrs);\n\n\t\t// MetaData\n\t\t$ilBench->start(\"ContentObjectExport\", \"exportStructureObject_exportMeta\");\n\t\t$this->exportXMLMetaData($a_xml_writer);\n\t\t$ilBench->stop(\"ContentObjectExport\", \"exportStructureObject_exportMeta\");\n\n\t\t// StructureObjects\n\t\t$ilBench->start(\"ContentObjectExport\", \"exportStructureObject_exportPageObjects\");\n\t\t$this->exportXMLPageObjects($a_xml_writer, $a_inst);\n\t\t$ilBench->stop(\"ContentObjectExport\", \"exportStructureObject_exportPageObjects\");\n\n\t\t// PageObjects\n\t\t$this->exportXMLStructureObjects($a_xml_writer, $a_inst, $expLog);\n\n\t\t// Layout\n\t\t// not implemented\n\n\t\t$a_xml_writer->xmlEndTag(\"StructureObject\");\n\t}", "public function getReport()\n {\n return $this->report;\n }", "public function getReport()\n {\n return $this->report;\n }", "function __construct($trumpia_xml)\n\t{\n\t\techo \"xml string is valid<br>\";\n\t\t$this->time_stamp = date(\"m-d-Y H:i:s\");\n\t\t$this->push_id = $trumpia_xml->PUSH_ID[0];\n\t\t$this->inbound_id = $trumpia_xml->INBOUND_ID[0];\n\t\t$this->subscription_uid = $trumpia_xml->SUBSCRIPTION_UID[0];\n\t\t$this->phone_number = $trumpia_xml->PHONENUMBER[0];\n\t\t$this->keyword = $trumpia_xml->KEYWORD[0];\n\t\t$this->data_capture = $trumpia_xml->DATA_CAPTURE[0];\n\t\t$this->contents = $trumpia_xml->CONTENTS[0];\n\t\t$this->attachment = $trumpia_xml->ATTACHMENT[0];\n\t\t$this->dataset_id = $trumpia_xml->DATASET_ID[0];\n\t\t$this->dataset_name = $trumpia_xml->DATASET_NAME[0];\t\n\t}", "private function trackFromXMLObject($xmlObject)\n\t{\n\t\tif($xmlObject->xpath('/result/tracks/track')) // because SearchResult's constructor sends a differently structured XML object\n\t\t{\n\t\t\t$xmlObject = $xmlObject->xpath('/result/tracks/track');\n\t\t\t$xmlObject = $xmlObject[0];\n\t\t}\n\t\t\n\t\t$xmlArray = (array)$xmlObject;\n\n\t\t\n\t\t// store data in member variables\n\t\t$this->id = $xmlArray['id'];\n\t\t$this->name = $xmlArray['title'];\n\t\t$this->albumId = $xmlArray['album-id'];\n\t\t$this->albumName = $xmlArray['album'];\n\t\t$this->albumArtistId = $xmlArray['album-artist-id'];\n\t\t$this->albumArtistName = $xmlArray['album-artist'];\n\t\t$this->artistId = $xmlArray['artist-id'];\n\t\t$this->artistName = $xmlArray['artist'];\n\t\t$this->redirect = $xmlArray['redirect'];\n\t\t$this->length = $xmlArray['length'];\n\t\t$this->year = $xmlArray['year'];\n\t\t$this->trackNumber = $xmlArray['track-number'];\n\t\t$this->coverId = $xmlArray['cover'];\n\t\t$this->popularity = $xmlArray['popularity'];\n\t\t$this->externalIds = $xmlArray['external-ids'];\n\t\t\n\t\t\n\t\t// restrictions\n\t\t$this->allowedCountries = $xmlObject->xpath('restrictions/restriction/@allowed');\n\t\t$this->allowedCountries = explode(',', (string)$this->allowedCountries[0]);\n\t\t$this->allowedCatalogues = $xmlObject->xpath('restrictions/restriction/@catalogues');\n\t\t$this->allowedCatalogues = explode(',', (string)$this->allowedCatalogues[0]);\n\t\t\n\t\t// external ids\n\t\tif(!empty($this->externalIds))\n\t\t{\n\t\t\t$this->externalIds = $this->externalIds->xpath('/external-ids');\n\t\t}\n\n\t\t// files\n\t\t//$fileArray = $xmlArray['files'];\n\t\t$fileArray = $xmlObject->xpath('files/file');\n\t\tif(is_array($fileArray))\n\t\t{\n\t\t\tforeach($fileArray as $currentFile)\n\t\t\t{\n\t\t\t\tarray_push($this->files, new File($currentFile));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// clean up some weird values\n\t\tif(count($this->allowedCountries) == 1 && $this->allowedCountries[0] == '') // empty string\n\t\t{\n\t\t\t$this->allowedCountries = NULL;\n\t\t}\n\t\t\n\t\tif(count($this->allowedCatalogues) == 1 && $this->allowedCatalogues[0] == '') // empty string\n\t\t{\n\t\t\t$this->allowedCatalogues = NULL;\n\t\t}\n\t\t\n\t\t//}\n\t}", "function XML(){\n\t\t$this->__construct();\n\t\t$this->Set_Template( 'header', 'rss/header-xml.php' );\n\t\t$this->Set_Template( 'footer', 'rss/footer-xml.php' );\n\t}", "public function getquickCreateReport()\n\t{\n\t\tdate_default_timezone_set(config::$timezone);\n\t\t$today = date(\"Y-m-d\");\n\t\t$parameterr = array();\n\t\t$parameter['title'] = 'Today\\'s Created Orders';\n $parameter['orders'] = Order::where('from','=', $today)\n \t\t\t\t\t\t\t\t->get();\n\n\t\t$pdf = PDF::loadView('reports.order.getAllOrders',$parameter)\n\t\t\t\t\t->setPaper('a4')\n\t\t\t\t\t->setOrientation(config::$ORDER_REPORT_ORIENTATION)\n\t\t\t\t\t->setWarnings(false);\n\n\t\treturn $pdf->stream('Report On Today\\'s Created Orders.pdf');\n\t\t\n\t}", "private function xmlToBean($xmlContent, $class, $elements = null) {\n $returnArray = array();\n\n//Getting the annotation`s class\n $reflectionClass = new ReflectionAnnotatedClass($class);\n if ($reflectionClass->hasAnnotation('TagAnnotation')) {\n\n $tagName = $reflectionClass->getAnnotation('TagAnnotation')->tagName;\n\n//important thing: when has more than one tag with same name, we return an array:\n if ($elements == null) {\n $elements = $xmlContent->getElementsByTagName($tagName);\n } else {\n $elements = $elements->getElementsByTagName($tagName);\n }\n\n foreach ($elements as $element) {\n $instance = new $class;\n\n//getting the reflection`s field\n $vars = JasperReflection::getVars($instance);\n foreach ($vars as $name => $value) {\n\n//Getting the annotation`s field\n $reflectionProperty = new ReflectionAnnotatedProperty($instance, $name);\n if ($reflectionProperty->hasAnnotation('BeanAnnotation')) {\n $className = $reflectionProperty->getAnnotation('BeanAnnotation')->className;\n\n $instance->{$name} = $this->xmlToBean($xmlContent, $className, $element);\n } else {\n//if the annotation field doesn`t exists, we get the normal XML and put into the bean\n $val = $this->nodeToBean($name, $element);\n\n if (is_numeric($val) && $name != 'size') {\n $instance->{$name} = PixelUtils::pixeltoMm($val);\n } else {\n// $instance->{$name} = utf8_encode($val);\n $instance->{$name} = ($val);\n }\n }\n }\n\n array_push($returnArray, $instance);\n }\n } else {\n throw new JasperReaderException(\"There`s no tag specified in the class: \" . $class);\n }\n\n if (count($returnArray) > 1) {\n return $returnArray;\n } else {\n if (count($returnArray) == 0) {\n return null;\n//throw new JasperReaderException(\"There`s something wrong in the class: \" . $class);\n }\n\n return $returnArray[0];\n }\n }", "public function getReport()\n {\n if (array_key_exists(\"report\", $this->_propDict)) {\n if (is_a($this->_propDict[\"report\"], \"\\Beta\\Microsoft\\Graph\\Model\\SimulationReport\") || is_null($this->_propDict[\"report\"])) {\n return $this->_propDict[\"report\"];\n } else {\n $this->_propDict[\"report\"] = new SimulationReport($this->_propDict[\"report\"]);\n return $this->_propDict[\"report\"];\n }\n }\n return null;\n }", "protected function renderAsXML() {}", "public function __construct($xml) {\n $this->version = (string) $xml->Version;\n $this->processor = (string) $xml->Processor;\n $this->merchantID = (string) $xml->MerchantID;\n $this->terminalID = (string) $xml->TerminalID;\n $this->transType = (string) $xml->TransType;\n $this->trAmount = (string) $xml->TrAmount;\n $this->trCurrency = (string) $xml->TrCurrency;\n $this->dateAndTime = (string) $xml->DateAndTime;\n $this->PAN = (string) $xml->PAN;\n $this->RRN = (string) $xml->RRN;\n $this->transaction = (string) $xml->Transaction;\n $this->batch = (string) $xml->Batch;\n $this->cardAccId = (string) $xml->CardAccId;\n $this->cardAccTerminal = (string) $xml->CardAccTerminal;\n $this->cardAccName = (string) $xml->CardAccName;\n $this->authCode = (string) $xml->AuthCode;\n $this->actionCode = (string) $xml->ActionCode;\n $this->storeTerminal = (string) $xml->StoreTerminal;\n $this->cardType = (string) $xml->CardType;\n $this->message = (string) $xml->Message;\n }", "public static function fromXml(\n\t\t\\SimpleXMLElement $xml\n\t) {\n\t\t$entity = new static;\n\t\t$entity->setId((string) $xml->consignmentNumber);\n\t\t$entity->setTransportcoCode($xml->transportcoCode);\n\t\t$entity->setTransportcoDesc($xml->transportcoDesc);\n\n\t\tforeach ($xml->children() as $key => $value) {\n\t\t\t$entity->{$key} = (string) $value;\n\t\t}\n\n\t\tforeach ($xml->ConsignmentLines->ConsignmentLine as $consignment) {\n\t\t\t$entity->getLineItems()->push([\n\t\t\t\t'sku' => (string)data_get($consignment, 'sellcodeCode'),\n\t\t\t\t'quantity' => (string)data_get($consignment, 'quantity'),\n\t\t\t]);\n\t\t}\n\n\t\treturn $entity;\n\t}", "public function reports()\n\t{\n\t\treturn new Engine_ProxyObject($this, Engine_Api::_() -> getDbtable('reports', 'core'));\n\t}", "public function setData($xml) {}", "public function report()\n {\n return $this->hasOne('App\\Models\\Report');\n }", "public function report(): Report\n {\n $report_footer = \"======================================================\\n\\n\";\n\n $this->stopAll();\n\n $this->report->setIntervals($this->intervals);\n\n $this->report_dir = (string)$this->report_dir;\n $this->report_filename = (string)$this->report_filename;\n\n if (!empty($this->report_dir)) {\n if (!\\is_dir($this->report_dir) || !\\is_writable($this->report_dir)) {\n throw new Exceptions\\ReportException(\"Report dir not found or not writable\");\n } else {\n $this->report_dir = \\preg_replace(\"/([\\/\\\\\\])$/\", \"\", $this->report_dir);\n $this->report_dir .= DIRECTORY_SEPARATOR;\n }\n }\n\n if (!empty($this->report_dir) && !empty($this->report_filename)) {\n\n $this->report_filename = (string)$this->report_filename;\n\n $report_string = $this->report->toString();\n\n \\file_put_contents(\n $this->report_dir . $this->report_filename,\n ($this->report_file_append) ? $report_string . $report_footer : $report_string,\n ($this->report_file_append) ? FILE_APPEND : 0\n );\n\n }\n\n return $this->report;\n }", "private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }", "public function handle(): ReportDTO {\n\n if (!$this->isValid()){\n \n throw new \\Exception(\"Invalid fields.\");\n \n }\n \n\n $dto = new ReportDTO();\n\n $dto->customReportId = rand(0, 100);\n\n return $dto;\n \n\n }", "public function __construct( \\SimpleXMLElement $xml_definition ) {\n\t\t$this->xml_definition = $xml_definition;\n\t}", "public function renderReport($report) {\n $build = [];\n // The report header.\n $build['report_label'] = [\n '#type' => 'html_tag',\n '#tag' => 'h2',\n '#value' => $report->getLabel() . ' ',\n '#attributes' => [\n 'id' => $report->getPluginId(),\n ],\n 'percent' => [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#value' => $report->getPercent() . '%',\n '#attributes' => [\n 'class' => 'label label-' . $this->getPercentCssClass($report->getPercent()),\n ],\n ],\n ];\n\n $percent = $report->getPercent();\n\n if ($percent != SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO) {\n // Show percent.\n $build['report_label']['percent'] = [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#value' => $percent . '%',\n '#prefix' => ' ',\n '#attributes' => [\n 'class' => 'label label-' . $this->getPercentCssClass($percent),\n ],\n ];\n }\n else {\n $build['label']['info'] = [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#value' => $this->t('Info'),\n '#attributes' => [\n 'class' => 'label label-info',\n ],\n ];\n }\n\n if ($percent == 100) {\n $build['success'] = [\n '#type' => 'html_tag',\n '#tag' => 'p',\n '#value' => '<strong>' . $this->t('Well done!') . '</strong> ' . $this->t('No action required.'),\n '#attributes' => [\n 'class' => 'text-success',\n ],\n ];\n }\n\n if ($this->options['detail'] || $percent != 100) {\n foreach ($report->getCheckObjects() as $check) {\n $checkBuild = [];\n $score = $check->getScore();\n if ($this->options['detail'] || $score < SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS || $percent == SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO) {\n // Heading.\n $checkBuild['panel']['panel_heading'] = [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#value' => '<strong>' . $check->getLabel() . '</strong>',\n '#attributes' => [\n 'class' => 'panel-heading',\n ],\n ];\n\n if ($this->options['detail']) {\n $checkBuild['panel']['panel_heading']['description'] = [\n '#type' => 'html_tag',\n '#tag' => 'small',\n '#value' => '- ' . $check->getDescription(),\n ];\n }\n\n // Result.\n $checkBuild['#result'] = $check->getResult();\n if (is_array($check->getResult())) {\n $checkBuild['result'] = $check->getResult();\n $checkBuild['result']['#attributes']['class'] = 'well result';\n }\n else {\n $checkBuild['detail'] = [\n '#type' => 'html_tag',\n '#tag' => 'p',\n '#value' => $check->getResult(),\n '#attributes' => [\n 'class' => 'well result',\n ],\n ];\n }\n\n // Action.\n if ($action = $check->renderAction()) {\n $checkBuild['action'] = [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => 'well action',\n ],\n ];\n if (!is_array($action)) {\n $checkBuild['action']['text'] = [\n '#type' => 'html_tag',\n '#tag' => 'p',\n '#value' => $action,\n ];\n }\n else {\n $checkBuild['action']['rendered'] = $action;\n }\n }\n }\n $build[$check->getPluginId()] = [\n '#type' => 'html_tag',\n '#tag' => 'div',\n // '#value' => '<strong>' . $this->t('Well done!') . '</strong> ' . $this->t('No action required.'),.\n '#attributes' => [\n 'class' => 'panel panel-' . $this->getScoreCssClass($check->getScore()),\n ],\n $checkBuild,\n ];\n }\n }\n return $build;\n }", "function genexml2($matricule,$nom,$prenom,$datenaissance,$lieunaissance,$telephone,$montantdu,$anneeacademique,$statut,$etablissement,$filiere,$nationalite, $type){\n\t$xml = new DOMDocument('1.0', 'utf-8');\n\t//$items = $xml->createElement('id_dataTable');\n\t\t$item = $xml->createElement('etudiant');\n\t\t$db_item=[\"matricule\"=>$matricule,\"nom\"=>$nom,\"prenom\"=>$prenom,\"telephone\"=>$telephone,\"anneeacademique\"=>$anneeacademique,\"etablissement\"=>$etablissement,\"anneeEtude\"=>$filiere,\"nationalite\"=>$nationalite,\"statut\"=>$statut,\"montant\"=>$montantdu,\"categorie\"=>$type,\"datePaiement\"=>\"\",\"reftransaction\"=>\"\",\"intermediairePaiement\"=>\"\"];\n\t\tforeach($db_item as $key => $value){\n\t\t\t$node = $xml->createElement($key,$value);\n\t\t\t$item->appendChild($node);\n\t\t}\n\t\t//$items->appendChild($item);\n\t$xml->appendChild($item);\n\t$date=date(\"Y-m-d\");\n\t$date=convertdatebanque($date);\n\t\n\treturn $xml->saveXML();\n}", "private function basicReport()\n {\n $basic = new \\stdClass();\n foreach ($this->report as $key => $value)\n {\n $basic->$key = count($value);\n }\n\n return $basic;\n }", "function recordReport($record)\n {\n $recordReport = new RecordReport();\n foreach ($this->rules() as $rule) {\n // apply this rule to every possible context based on the route\n /** @var Rule $rule */\n try {\n $rule->apply($record, $recordReport);\n } catch (Exception $e) {\n $titleMaker = new TitleMaker();\n throw new ReportingException(\"In rule \" . $titleMaker->title($rule) . \": \" . $e->getMessage(), 0, $e);\n }\n }\n return $recordReport;\n }", "public function report()\n {\n return $this->hasOne('App\\Report');\n }", "public static function xml($data_xml)\n {\n $dom = new DOMDocument('1.0', 'utf-8');\n \n // Creazione del nodo Patient, cioè il nodo Root della risorsa\n $patient = $dom->createElement('Patient');\n // Valorizzo il namespace della risorsa e del documento XML, in questo caso la specifica FHIR\n $patient->setAttribute('xmlns', 'http://hl7.org/fhir');\n // Corrello l'elemento con il nodo superiore\n $patient = $dom->appendChild($patient);\n \n // Creazione del nodo ID sempre presente nelle risorse FHIR\n $id = $dom->createElement('id');\n // Il valore dell'ID è il valore dell'ID nella relativa tabella del DB\n $id->setAttribute('value', $data_xml[\"narrative\"][\"Id\"]);\n $id = $patient->appendChild($id);\n \n // Creazione della parte narrativa in XHTML e composta da tag HTML visualizzabili se aperto il file XML in un Browser\n $narrative = $dom->createElement('text');\n // Corrello l'elemento con il nodo superiore\n $narrative = $patient->appendChild($narrative);\n \n // Creazione del nodo status che indica lo stato della parte narrativa\n $status = $dom->createElement('status');\n // Il valore del nodo status è sempre generated, la parte narrativa è generato dal sistema\n $status->setAttribute('value', 'generated');\n $status = $narrative->appendChild($status);\n \n // Creazione del div che conterrà la tabella con i valori visualizzabili nella parte narrativa\n $div = $dom->createElement('div');\n // Link al value set della parte narrativa, cioè la codifica XHTML\n $div->setAttribute('xmlns', \"http://www.w3.org/1999/xhtml\");\n $div = $narrative->appendChild($div);\n \n // Creazione della tabella che conterrà i valori\n $table = $dom->createElement('table');\n $table->setAttribute('border', \"2\");\n $table = $div->appendChild($table);\n \n // Creazione del nodo tbody\n $tbody = $dom->createElement('tbody');\n $tbody = $table->appendChild($tbody);\n \n //Narrative\n foreach ($data_xml[\"narrative\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Contact\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n //Narrative Patient.Contact\n foreach ($data_xml[\"narrative_patient_contact\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Contact\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n // EXTENSIONS IN NARRATIVE\n \n foreach ($data_xml[\"extensions\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Language\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n // END EXTENSIONS IN NARRATIVE\n \n \n \n //EXTENSIONS\n //donatore organi\n $extension = $dom->createElement('extension');\n $extension->setAttribute('url', 'http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor');\n $extension = $patient->appendChild($extension);\n \n $valueBoolean = $dom->createElement('valueBoolean');\n $valueBoolean->setAttribute('value', $data_xml[\"extensions\"]['donatoreorgani']);\n $valueBoolean = $extension->appendChild($valueBoolean);\n \n \n //codice fiscale\n $extension1 = $dom->createElement('extension');\n $extension1->setAttribute('url', 'http://resp.local/resources/extensions/patient/codice-fiscale.xml');\n $extension1 = $patient->appendChild($extension1);\n \n $valueString1 = $dom->createElement('valueString');\n $valueString1->setAttribute('value', $data_xml[\"extensions\"]['codicefiscale']);\n $valueString1 = $extension1->appendChild($valueString1);\n \n \n //gruppo sanguigno\n $extension2 = $dom->createElement('extension');\n $extension2->setAttribute('url', 'http://resp.local/resources/extensions/patient/gruppo-sanguigno.xml');\n $extension2 = $patient->appendChild($extension2);\n \n $valueString2 = $dom->createElement('valueString');\n $valueString2->setAttribute('value', $data_xml[\"extensions\"]['grupposanguigno']);\n $valueString2 = $extension2->appendChild($valueString2);\n \n //END EXTENSIONS\n \n // Creazione del nodo identifier identificativo della risorsa Patient attraverso URI della risorsa\n $identifier = $dom->createElement('identifier');\n $identifier = $patient->appendChild($identifier);\n // Creazione del nodo use con valore fisso ad usual\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'official');\n $use = $identifier->appendChild($use);\n // Creazione del nodo system che identifica il namespace degli URI per identificare la risorsa\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'http://resp.local'); // RFC gestione URI\n $system = $identifier->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n \n // Do il valore all' URI della risorsa\n $value->setAttribute('value', $data_xml[\"narrative\"][\"Id\"]);\n $value = $identifier->appendChild($value);\n \n // Creazione del nodo active\n $active = $dom->createElement('active');\n $active->setAttribute('value', $data_xml[\"narrative\"][\"Active\"]);\n $active = $patient->appendChild($active);\n \n // Creazione del nodo per il nominativo del paziente\n $name = $dom->createElement('name');\n $name = $patient->appendChild($name);\n // Creazione del nodo use settato sempre al valore usual\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'usual');\n $use = $name->appendChild($use);\n // Creazione del nodo family\n $family = $dom->createElement('family');\n $family->setAttribute('value', $data_xml[\"patient\"]->paziente_cognome);\n $family = $name->appendChild($family);\n // Creazione del nodo given\n $given = $dom->createElement('given');\n $given->setAttribute('value', $data_xml[\"patient\"]->paziente_nome);\n $given = $name->appendChild($given);\n \n // Creazione del nodo telecom con il contatto telefonico del paziente\n $telecom = $dom->createElement('telecom');\n $telecom = $patient->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'phone');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $data_xml[\"patient\"]->getPhone());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use che indica la tipologia di numero di telefono\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'mobile');\n $use = $telecom->appendChild($use);\n \n // Creazione del nodo telecom con il contatto mail del paziente\n $telecom = $dom->createElement('telecom');\n $telecom = $patient->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'email');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $data_xml[\"patient\"]->getMail());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n \n // Creazione del nodo gender\n $gender = $dom->createElement('gender');\n $gender->setAttribute('value', $data_xml[\"patient\"]->getGender());\n $gender = $patient->appendChild($gender);\n \n // Creazione del nodo birthdate\n $birthDate = $dom->createElement('birthDate');\n $birthDate->setAttribute('value', $data_xml[\"patient\"]->getBirth());\n $birthDate = $patient->appendChild($birthDate);\n \n // Creazione del nodo deceasedBoolean\n $deceasedBoolean = $dom->createElement('deceasedBoolean');\n $deceasedBoolean->setAttribute('value', $data_xml[\"patient\"]->getDeceased());\n $deceasedBoolean = $patient->appendChild($deceasedBoolean);\n \n // Creazione del nodo address\n $address = $dom->createElement('address');\n $address = $patient->appendChild($address);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $address->appendChild($use);\n // Creazione del nodo line\n $line = $dom->createElement('line');\n $line->setAttribute('value', $data_xml[\"patient\"]->getLine());\n $line = $address->appendChild($line);\n // Creazione del nodo city\n $city = $dom->createElement('city');\n $city->setAttribute('value', $data_xml[\"patient\"]->getCity());\n $city = $address->appendChild($city);\n // Creazione del nodo country\n $country = $dom->createElement('state');\n $country->setAttribute('value', $data_xml[\"patient\"]->getCountryName());\n $country = $address->appendChild($country);\n // Creazione del nodo postalCode\n $postalCode = $dom->createElement('postalCode');\n $postalCode->setAttribute('value', $data_xml[\"patient\"]->getPostalCode());\n $postalCode = $address->appendChild($postalCode);\n \n // Creazione del nodo maritalStatus\n $maritalStatus = $dom->createElement('maritalStatus');\n $maritalStatus = $patient->appendChild($maritalStatus);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $maritalStatus->appendChild($coding);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', \"http://hl7.org/fhir/v3/MaritalStatus\"); // value set HL7\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $data_xml[\"patient\"]->getMaritalStatusCode());\n $code = $coding->appendChild($code);\n // Creazione del nodo dysplay\n $dysplay = $dom->createElement('display');\n // Do il valore all' attributo del tag\n $dysplay->setAttribute('value', $data_xml[\"patient\"]->getMaritalStatusDisplay());\n $dysplay = $coding->appendChild($dysplay);\n \n // Patient.Contact\n foreach ($data_xml[\"patient_contacts\"] as $pc) {\n // Creazione del nodo contact\n $contact = $dom->createElement('contact');\n $contact = $patient->appendChild($contact);\n // Creazione del nodo relationship\n $relationship = $dom->createElement('relationship');\n $relationship = $contact->appendChild($relationship);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $relationship->appendChild($coding);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'http://hl7.org/fhir/v2/0131');\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $pc->getRelationship());\n $code = $coding->appendChild($code);\n // Creazione del nodo name\n $name = $dom->createElement('name');\n $name = $contact->appendChild($name);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'official');\n $use = $name->appendChild($use);\n // Creazione del nodo family\n $family = $dom->createElement('family');\n $family->setAttribute('value', $pc->getSurname());\n $family = $name->appendChild($family);\n // Creazione del nodo given\n $given = $dom->createElement('given');\n $given->setAttribute('value', $pc->getName());\n $given = $name->appendChild($given);\n // Creazione del nodo telecom\n $telecom = $dom->createElement('telecom');\n $telecom = $contact->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'phone');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $pc->getTelephone());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n // Creazione del nodo rank\n $rank = $dom->createElement('rank');\n $rank->setAttribute('value', '1');\n $rank = $telecom->appendChild($rank);\n // Creazione del nodo telecom\n $telecom = $dom->createElement('telecom');\n $telecom = $contact->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'email');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $pc->getMail());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n }\n \n // Creazione del nodo communication\n $communication = $dom->createElement('communication');\n $communication = $patient->appendChild($communication);\n // Creazione del nodo language\n $language = $dom->createElement('language');\n $language = $communication->appendChild($language);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $language->appendChild($coding);\n // Creazione del nodo system in cui si indica il value set dell' IETF\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'urn:ietf:bcp:47');\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $data_xml[\"patient\"]->paziente_lingua);\n $code = $coding->appendChild($code);\n \n // Elimino gli spazi bianchi superflui per la viasualizzazione grafica dell'XML\n $dom->preserveWhiteSpace = false;\n // Formatto il documento per l'output\n $dom->formatOutput = true;\n $path = getcwd() . \"\\\\resources\\\\Patient\\\\\";\n // Salvo il documento XML nella cartella rsources dando come nome, l'id del paziente\n $dom->save($path . \"RESP-PATIENT-\" . $data_xml[\"narrative\"][\"Id\"] . \".xml\");\n return $dom->saveXML();\n }", "public function __construct(StatusReport $report)\n {\n parent::__construct();\n\n $this->report = $report;\n }", "public function createXmlNode(\\SimpleXMLElement $node): \\SimpleXMLElement\n {\n \\Logger::getLogger(\\get_class($this))->debug(__METHOD__);\n if (!\\is_string($this->getPath()) || \\trim($this->getPath() ?? \"\") === \"\") {\n $msg = \"The path of the keystore must be set\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__ . \" '%s'\", $msg));\n throw new SerializeReportException($msg);\n }\n\n if ($this->getCertificate() === null) {\n $msg = \"The keystore certificate must be set\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__ . \" '%s'\", $msg));\n throw new SerializeReportException($msg);\n }\n\n $keyStoreNode = $node->addChild(\"keystore\");\n AReport::cdata($keyStoreNode->addChild(\"path\"), $this->getPath());\n AReport::cdata($keyStoreNode->addChild(\"password\"), $this->getPassword());\n $this->getCertificate()->createXmlNode($keyStoreNode);\n return $keyStoreNode;\n }", "function generateSubmissionsReport($args) {\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\r\n\t\t$journal =& Request::getJournal();\r\n\t\t$journalId = $journal->getId();\r\n\t\t\r\n\t\t//Get user filter decision\r\n $submissionsAndCriterias = $this->_getFilteredSubmissions($journalId);\r\n $submissions = $submissionsAndCriterias[0];\r\n $criterias = $submissionsAndCriterias[1];\r\n \r\n $reportType = Request::getUserVar('reportType');\r\n \r\n switch($reportType){\r\n case 0:\r\n $this->_CSVReport($submissions, $criterias);\r\n break;\r\n case 1:\r\n $this->_simpleChart($submissions, $criterias, $reportType);\r\n break; \r\n case 2:\r\n $this->_simpleChart($submissions, $criterias, $reportType);\r\n break; \r\n default :\r\n break;\r\n }\r\n\t}", "public function getReport() {\n\t\treturn $this->report;\n\t}" ]
[ "0.6544936", "0.642039", "0.59514886", "0.58329636", "0.5653841", "0.55522126", "0.55090487", "0.5486101", "0.5442173", "0.54107744", "0.54107744", "0.5367522", "0.53589773", "0.53527343", "0.53513277", "0.5344797", "0.5291975", "0.5291975", "0.5291841", "0.525512", "0.52514464", "0.52454346", "0.5244808", "0.5230446", "0.5215464", "0.51686066", "0.51164746", "0.5114835", "0.5113322", "0.51127946", "0.5097719", "0.50426644", "0.5024476", "0.5022505", "0.5021019", "0.5020145", "0.5012772", "0.49842152", "0.49842152", "0.49754578", "0.4929494", "0.48974264", "0.4886986", "0.48529914", "0.48389763", "0.48288575", "0.48129067", "0.48108673", "0.48044634", "0.48025474", "0.47988427", "0.4779849", "0.47679996", "0.47589028", "0.475616", "0.4752794", "0.4749214", "0.47426265", "0.47368693", "0.47197062", "0.4709626", "0.4704641", "0.46989852", "0.4692775", "0.46831882", "0.46805042", "0.46656102", "0.46556634", "0.46514255", "0.46499833", "0.46381307", "0.4629251", "0.4626356", "0.46207085", "0.46207085", "0.46199098", "0.46165466", "0.46130875", "0.46020296", "0.45938998", "0.45890096", "0.45888144", "0.45870835", "0.4586721", "0.45827666", "0.45717028", "0.45631096", "0.4555819", "0.4551068", "0.45478994", "0.45394862", "0.45379296", "0.45328233", "0.4532673", "0.45304877", "0.4516083", "0.45160517", "0.451444", "0.45134848", "0.45108616", "0.45060113" ]
0.0
-1
Gets relevant ski fields from the feed by id
public static function getReport() { //IDs of the ski fields we want from the feed $targets = array(13); //Broken River's feed ID $feed = file_get_contents('https://api@brokenriver.co.nz:ycKNH6C287WQzyuk@www.snowhq.com/nz/canterbury/broken-river/broken-river-snow-report/xml'); if ($feed) { $xml = simplexml_load_string($feed); $report = null; foreach($xml->skiareas->skiarea as $data){ if (in_array($data->id, $targets)) { if ($data->id == 13){//BR //$data->status->code = 5; $report = new Report($data); } } } return $report; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getByStacklaFeedId($id);", "abstract protected function _getFeedFields();", "public function seriesDetails($id);", "public function getFindSpotData($id) {\n \n $findspotdata = $this->getAdapter();\n $select = $findspotdata->select()\n ->from($this->_name, array(\n 'county', 'district', 'parish',\n 'easting', 'northing', 'gridref',\n 'declat', 'declong', 'fourFigure',\n 'knownas', 'smrref', 'map25k',\n 'map10k', 'landusecode', 'landusevalue',\n 'id', 'old_findspotid', 'createdBy',\n 'description', 'comments', 'address',\n 'woeid', 'elevation', 'postcode',\n 'landowner', 'fourFigureLat', 'fourFigureLon',\n 'gridlen', 'woeid', 'geonamesID',\n 'districtID', 'countyID', 'regionID',\n 'parishID'\n ))\n ->joinLeft('finds','finds.secuid = findspots.findID', \n array('discmethod'))\n ->joinLeft(array('land1' => 'landuses'),\n 'land1.id = findspots.landusecode',\n array('landuse' => 'term'))\n ->joinLeft(array('land2' =>'landuses'),\n 'land2.id = findspots.landusevalue',\n array('landvalue' => 'term'))\n ->joinLeft('maporigins','maporigins.id = findspots.gridrefsrc',\n array('source' => 'term'))\n ->joinLeft('osRegions','findspots.regionID = osRegions.osID',\n array('region' => 'label'))\n ->joinLeft('osCounties', 'findspots.countyID = osCounties.osID', \n array('countyType' => 'type'))\n ->joinLeft('osDistricts', 'findspots.districtID = osDistricts.osID', \n array('districtType' => 'type'))\n ->joinLeft('osParishes', 'findspots.parishID = osParishes.osID', \n array(\n 'parishType' => 'type', \n 'centreLat' => 'lat', \n 'centreLon' => 'lon'\n ))\n ->joinLeft('people',$this->_name . '.landowner = people.secuid', \n array('landownername' => 'fullname'))\n ->joinLeft('discmethods','finds.discmethod = discmethods.id', \n array('method'))\n ->where('finds.id = ?', (int)$id)\n ->group('finds.id')\n ->limit('1');\n return $findspotdata->fetchAll($select);\n }", "public function getItemDetails($id)\n\t{\n\t\t$apicall = $this->endPoint. \"?callname=GetSingleItem&version=515\"\n . \"&appid=eBay3e085-a78c-4080-ac24-a322315e506&ItemID=$id\"\n . \"&responseencoding=\" .RESPONSE_ENCODING\n . \"&IncludeSelector=ShippingCosts,Details\"; \n \n \t$this->xmlResponse = simplexml_load_file($apicall);\n \t\n \t//print_r($this->xmlResponse);\n\n\t\tif ($this->xmlResponse->Item->PictureURL) \n\t\t{\n \t$this->bigPicUrl = $this->xmlResponse->Item->PictureURL;\n } else \n {\n \t$this->bigPicUrl = \"img/pic.gif\";\n }\n\t}", "function getFields($id){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/formtemplates/';\n\t\t$request = $baseUrl . $endpoint . $id . '/fields';\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "function acf_get_raw_fields($id = 0)\n{\n}", "public function getField($id)\r\n {\r\n return $this->_fetch($id);\r\n }", "public function show($id)\n {\n $skaters = Skater::find($id);\n return $skaters;\n }", "function getDetailsByXSDMF_ID($xsdmf_id)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n s1.*\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key as s1\r\n inner join \" . APP_TABLE_PREFIX . \"xsd_display_matchfields as x1\r\n on xsdmf_sek_id=sek_id\r\n WHERE\r\n xsdmf_id=\" . $db->quote($xsdmf_id, 'INTEGER');\r\n\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n if ($res['sek_id']) {\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n }\r\n return $res;\r\n }", "public function retrieve($id)\n {\n return Field::find($id);\n }", "function get_by_id($id)\n {\n $this->db->where('wsfeed_id', $id);\n $query = $this->db->get('fis_dworkshopseminar_feedbacks');\n return $query->row();\n }", "public function getEditData($id) {\n $findspotdata = $this->getAdapter();\n $select = $findspotdata->select()\n ->from($this->_name)\n ->where('findspots.id = ?', (int)$id)\n ->group($this->_primary)\n ->limit('1');\n return $findspotdata->fetchAll($select);\n }", "function acf_get_raw_field($id = 0)\n{\n}", "public function actionGetProductDetails($id=null)\n {\n\n $userData = User::find()->andFilterWhere(['u_id' => $id])->andWhere(['IS NOT', 'u_mws_seller_id', null])->all();\n\n foreach ($userData as $user) {\n \\Yii::$app->data->getMwsDetails($user->u_mws_seller_id, $user->u_mws_auth_token);\n\n $models = FbaAllListingData::find()->andWhere(['created_by' => $user->u_id])->all(); //->andWhere(['status' => 'Active'])\n\n foreach ($models as $model) {\n if ($model->asin1) {\n $productDetails = \\Yii::$app->api->getProductDimensions($model->asin1, true);\n if ($productDetails) {\n $model->image_url = (key_exists('SmallImage', $productDetails)) ? str_replace('._SL75_', '', $productDetails['SmallImage']['URL']) : null;\n /*if(key_exists('ListPrice', $productDetails)) {\n $model->buybox_price = (key_exists('Amount', $productDetails['ListPrice'])) ? $productDetails['ListPrice']['Amount'] : null;\n }*/\n\n if ($model->save(false)) {\n echo $model->asin1 . \" is Updated.\";\n }\n }\n }\n sleep(3);\n }\n }\n }", "public static function getFeatureDetails($id){\n $db = DemoDB::getConnection();\n ProjectModel::createViewCurrentIteration($db);\n $sql = \"select title, functionality,benefit,priority,user_role.name as user_name, iteration_id\n from feature\n INNER Join user_role on feature.user_role_id = user_role.id\n where feature.id = :id\";\n $stmt = $db->prepare($sql);\n $stmt->bindValue(\":id\", $id);\n $ok = $stmt->execute();\n if ($ok) {\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n }", "public function displayProductData($id)\n {\n return $this->getFirstBy('id', '=', $id, ['category', 'subcategory', 'reviews.user', 'brand']);\n }", "public function show($id)\n\t{\n\t\t$client = new Client();\n\t\tif (!$id) {\n\t\t\t$id = \"51288142\";\n\t\t}\n\t\t$url = 'http://www.rightmove.co.uk/property-for-sale/property-' . $id . '.html?showcase=false';\n\t\t$crawler = $client->request('GET', $url);\n\n\t\t$aPropData = array();\n\n\t\t$domCSSPath = 'div.property-header-bedroom-and-price > div > h1'; \n\t\t$aPropData[\"title\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\n\t\t$domCSSPath = 'div.property-header-bedroom-and-price > div > address'; \n\t\t$aPropData[\"address\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\t\t\n\t\t$domCSSPath = '#propertyHeaderPrice > small'; \n\t\t$aPropData[\"status\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\n\t\t$domCSSPath = '#propertyHeaderPrice > strong'; \n\t\t$aPropData[\"price\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\t\n\t\t$aDetails = array(); \n\t\t$domCSSPath = 'div.sect.key-features > ul > li';\n\t\t$aPropData[\"details\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\t\n\t\t});\n\n\t\t$aPropData = $this->optimize($aPropData);\n\t\t\n\t\t//images;\n\t\t$domXPath = '//*[contains(@id,\"thumbnail\")]/img';\n\t\t$aPropData[\"thumbs\"] = $crawler->filterXPath($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\t\t$domXPath = 'noscript > div > ul > li > a > img';\n\t\t$aPropData[\"images\"] = $crawler->filter($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\t\t$domXPath = '#floorplanTabs > noscript > img';\n\t\t$aPropData[\"floorplans\"] = $crawler->filter($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\n\t\techo json_encode($aPropData,JSON_UNESCAPED_UNICODE);\n\n\t}", "public function iN_GetStickerDetailsFromID($sID) {\n\t\t$sID = mysqli_real_escape_string($this->db, $sID);\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_stickers WHERE sticker_id = '$sID'\") or die(mysqli_error($this->db));\n\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t/*Return result if icon id exist or not*/\n\t\treturn $data;\n\t}", "public function byId($id)\n {\n return $this->cottage //->with('images', 'areas', 'features')\n ->find($id);\n }", "private function feedLoaderJS($id)\n {\n global $amwcore;\n\n $shopID = (int)$amwcore->shopID;\n if ((strlen($shopID) > 0) && ($shopID > 0))\n $shopIDClause = \" AND (shop_id = $shopID)\";\n else\n $shopIDClause = '';\n\n $db = JFactory::getDBO();\n $db->setQuery(\"SELECT * FROM #__cartproductfeed_feeds WHERE (id=$id) $shopIDClause\");\n $feed_details = $db->loadObject();\n\n if (!isset($feed_details) || !isset($feed_details->type) || strlen($feed_details->type) == 0) {\n $this->provider = '';\n $this->category_id = 0;\n $this->remote_category = 0;\n $this->filename = '';\n $this->url = '';\n $this->own_overrides = false;\n $this->feed_overrides = '';\n $this->title = '';\n return;\n }\n\n $this->id = $id;\n $this->provider = $feed_details->type;\n //$this->local_category = $feed_details->local_category;\n $this->category_id = $feed_details->category;\n $this->remote_category = $feed_details->remote_category;\n $this->filename = $feed_details->filename;\n $this->url = $feed_details->url;\n $this->own_overrides = $feed_details->own_overrides;\n $this->feed_overrides = $feed_details->feed_overrides;\n $this->title = $feed_details->title;\n\n //Load the categories\n $this->local_category = '';\n $my_categories = explode(',', $this->category_id);\n $db->setQuery('\n\t\t\tSELECT id, title\n\t\t\tFROM #__rapidcart_categories');\n $j_categories = $db->loadObjectList();\n foreach ($j_categories as $this_category)\n if (in_array($this_category->id, $my_categories))\n $this->local_category .= $this_category->title . ', ';\n //Strip trailing comma\n $this->local_category = substr($this->local_category, 0, -2);\n }", "function GetFields($s, &$form, $id, $data) {}", "protected function detail($id)\n {\n $show = new Show(SkuModel::findOrFail($id));\n\n $show->field('s_id', __('S id'));\n $show->field('sku_num', __('Sku num'));\n $show->field('goods_id', __('Goods id'));\n $show->field('sku_name', __('sku名称'));\n $show->field('sku_price', __('Sku price'));\n $show->field('sku_goods_repertory', __('Sku goods repertory'));\n $show->field('sku_goods_img', __('Sku goods img'));\n $show->field('created_at', __('Created at'));\n $show->field('updated_at', __('Updated at'));\n\n return $show;\n }", "public function tagDetails($id);", "function get_product_section_local_field( $id = '1234QWERasdf' ) {\n\treturn array(\n\n\t\t// Headline\n\t\tarray (\n\t\t\t'key' => $id . '_N121zN1cd48f3',\n\t\t\t'name' => 'headline',\n\t\t\t'label' => 'Headline',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_headline_local_field( $id ),\n\t\t),\n\n\t\t// Editor\n\t\tarray (\n\t\t\t'key' => $id . '_N121z7Ocd48f2',\n\t\t\t'name' => 'editor',\n\t\t\t'label' => 'Editor',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_editor_local_field( $id ),\n\t\t),\n\n\t\t// Horizontal line\n\t\tarray (\n\t\t\t'key' => $id . '_N1Viz71cHe8f0',\n\t\t\t'name' => 'line',\n\t\t\t'label' => 'Horizontal Line',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_hr_local_field( $id ),\n\t\t),\n\n\t\t// Testimonial\n\t\tarray (\n\t\t\t'key' => $id . '_Nj2j271cd48f0',\n\t\t\t'name' => 'testimonials',\n\t\t\t'label' => 'Testimonials',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_content_testimonial_local_field( $id ),\n\t\t),\n\n\t\t// Gallery\n\t\tarray (\n\t\t\t'key' => $id . '_Nj43251cd48f0',\n\t\t\t'name' => 'gallery',\n\t\t\t'label' => 'Gallery',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_gallery_local_field( $id ),\n\t\t),\n\n\t\t// Image card\n\t\tarray (\n\t\t\t'key' => $id . '_ICD3251cd48f0',\n\t\t\t'name' => 'image-card',\n\t\t\t'label' => 'Image Card',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_image_card_local_field( $id ),\n\t\t),\n\n\t\t// Video\n\t\tarray (\n\t\t\t'key' => $id . '_N1Viz71cd48f0',\n\t\t\t'name' => 'oembed',\n\t\t\t'label' => 'oEmbed Video',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_oembed_local_field( $id ),\n\t\t),\n\n\t\t// Trip details\n\t\tarray (\n\t\t\t'key' => $id . '_DRViip71cd48f0',\n\t\t\t'name' => 'trip-details',\n\t\t\t'label' => 'Trip Details',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_trip_details_local_field( $id ),\n\t\t),\n\n\t\t// Accordion\n\t\tarray (\n\t\t\t'key' => $id . '_HRhiip71cd48f1',\n\t\t\t'name' => 'accordion',\n\t\t\t'label' => 'Accordion',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_accordion_local_field( $id )\n\t\t),\n\n\t\t// Icons list\n\t\tarray (\n\t\t\t'key' => $id . '_HRhiip71cd48f0',\n\t\t\t'name' => 'icons-list',\n\t\t\t'label' => 'Icons list',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_icons_list_local_field( $id ),\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_A2982bc6o4CF73',\n\t\t\t'label' => 'Form',\n\t\t\t'name' => 'form',\n\t\t\t'display' => 'block',\n\t\t\t'sub_fields' => get_gform_local_field( $id )\n\t\t)\n\t);\n}", "public function getExtraFields(int $storeId): array;", "public static function fetch_field_data_for_id($table, $id, $id_field = 'id') {\n $sql = 'SELECT * FROM \\''.self::clean($table).'\\' WHERE `'.self::clean($id_field).'` = \\''.self::clean($id).'\\'';\n \n /** store query for debug * */\n self::$__querys[] = $sql;\n $result = mysqli_query(self::$__connection, $sql);\n $data = array();\n if ($result) {\n\n /* Get field information for all columns */\n $finfo = $result->fetch_fields();\n\n foreach ($finfo as $val) {\n $data[] = array('name'=>$val->name, 'type'=>$val->type, 'max_len'=>$val->max_length);\n }\n $result->close();\n }\n return $data;\n }", "function get_field_data_by_id($field_id, $contact)\n{\n if (isset($contact['custom_fields'])) {\n $out = array();\n\n foreach ($contact['custom_fields'] as $key => $value) {\n if ($value['id'] == $field_id) {\n foreach ($value['values'] as $key => $data) {\n $out[] = $data['value'];\n }\n }\n }\n }\n\n if (!empty($out)) {\n return $out;\n } else {\n return false;\n }\n}", "public function read($fields = null, $id = true) {\n\t\treturn $this->find('info', $id);\n\t}", "abstract protected function fetchFields($listId);", "public function read($id) {\n return $this->product->find($id);\n\t}", "public function get( $id ) {\n\t\treturn get_metadata( $this->type(), $id, $this->key, true );\n\t}", "function getDetail($id = null) {\n $query = $this->db->get_where('tbl_features', array('id' => $id));\n return $query->result();\n }", "public static function get_data_by_type_and_id( $type, $id ) {\n\t\tglobal $wpdb;\n\n\t\t$type = esc_sql( $type );\n\t\treturn $wpdb->get_results(\n\t\t\t$wpdb->prepare( \"\n\t\t\t\t\tSELECT * FROM `{$wpdb->prefix}spa_{$type}`\n\t\t\t\t\tWHERE `id` = '%d'\n\t\t\t\t\", $id ), ARRAY_A );\n\t}", "public function getSpecifics() {}", "public function getItem ($id);", "protected function detail($id)\n {\n $productSku = ProductSku::findOrFail($id);\n $show = new Show($productSku);\n\n $show->field('id', 'ID');\n $show->field('name', 'sku名称');\n $show->field('sku_number', 'sku编号');\n $show->field('description', 'sku描述');\n $show->field('product', '所属商品')->as(function ($product) {\n return $product->name;\n });\n $show->field('price', '原价');\n $show->field('stock', '库存量');\n $show->field('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']);\n $show->field('primary_picture', '商品主图');\n $show->field('retail_price', '零售价格');\n $show->field('is_promotion', '是否促销')->using([0 => '否', 1 => '是']);\n $show->field('promotion_price', '促销价格');\n\n return $show;\n }", "function basel_compare_get_field_name_by_id( $id ) {\n\t\t$fields = array(\n\t\t\t'description' => esc_html__( 'Description', 'basel' ),\n\t\t\t'sku' => esc_html__( 'Sku', 'basel' ),\n\t\t\t'availability' => esc_html__( 'Availability', 'basel' ),\n\t\t\t'weight' => esc_html__( 'Weight', 'basel' ),\n\t\t\t'dimensions' => esc_html__( 'Dimensions', 'basel' ),\n\t\t);\n\n\t\treturn isset( $fields[ $id ] ) ? $fields[ $id ] : '';\n\t}", "public function read($id);", "public function getStickerById($id) {\n $info = [\n 'success' => FALSE,\n ];\n\n $query = \"SELECT\n st.id,\n st.ident,\n st.name,\n st.team_album_id,\n st.url\n FROM \" . $this->__schema . \".sticker st\n WHERE \"\n . \"st.id = \" . $this->db()->quote($id);\n $sticker = $this->db()->getRow($query);\n if ($sticker) {\n $info['success'] = TRUE;\n $info['payload'] = $sticker;\n }\n return $info;\n }", "function acf_get_field($id = 0)\n{\n}", "public function getDataId($id)\n {\n $galeri = ModelGaleriNews::find($id);\n return $galeri;\n }", "private function _row_data($id) {\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"expenses\", $this->login_user->is_admin, $this->login_user->user_type);\n $options = array(\"id\" => $id, \"custom_fields\" => $custom_fields);\n $data = $this->Expenses_model->get_details($options)->row();\n return $this->_make_row_old($data, $custom_fields);\n }", "public function getLazyData($id);", "function sage_the_field( $key, $id=false ) {\n echo sage_get_field( $key, $id );\n}", "public function APIreport($id)\n {\n $processed_fields= Processed_field::where('id', $id)->with('field','tractor')->get();\n return Processed_fieldResource::collection($processed_fields);\n }", "private function getFeatures($id) {\n $repository = $this->getDoctrine()\n ->getRepository('AppBundle:Places');\n $features = $repository->findOneBy( array('id' => $id));\n\n return $features;\n }", "public function iN_GetQADetailsFromID($sID) {\n\t\t$sID = mysqli_real_escape_string($this->db, $sID);\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_landing_qa WHERE qa_id = '$sID'\") or die(mysqli_error($this->db));\n\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t/*Return result if icon id exist or not*/\n\t\treturn $data;\n\t}", "public function getItem( $id );", "function getInfo($id){\r\n\t\t$this->getQuestion($id);\r\n\t}", "private function stockData($id)\n {\n // ->join('products as b','b.product_id','=','a.product_id')\n // ->join('product_types as c','c.product_type_id','=', 'b.product_type_id')\n // ->join('prices as d','d.stock_id', '=', 'a.stock_id')\n // ->join('units as e','e.unit_id','=','d.unit_id')\n // ->join('srp as f','f.product_id','=','b.product_id')\n // ->where('a.stock_id','=', $id)\n // ->first();\n \n // return $products;\n }", "function get_by_id($id)\n {\n $this->db->where('tfselect_id', $id);\n $query = $this->db->get('fis_dtraining_feedback_selections');\n return $query->row();\n }", "function wprss_get_feed_items_for_source( $source_id ) {\n $args = apply_filters(\n 'wprss_get_feed_items_for_source_args',\n array(\n 'post_type' => 'wprss_feed_item',\n 'cache_results' => false, // Disable caching, used for one-off queries\n 'no_found_rows' => true, // We don't need pagination, so disable it\n 'posts_per_page' => -1,\n 'ignore_sticky_posts' => 'true',\n 'orderby' => 'date',\n 'order' => 'DESC',\n 'meta_query' => array(\n array(\n 'key' => 'wprss_feed_id',\n 'value' => $source_id,\n 'compare' => '=',\n ),\n ),\n 'suppress_filters' => 1\n ), $source_id\n );\n return new WP_Query( $args );\n }", "public function get( $id ){}", "function get_productinfo_by_id(){\n\tif(isset($_POST['pid']) && !empty($_POST['pid'] )){\n\t\tglobal $wpdb;\n\t\t$sale = $price = $width = $height = 0;\n\t\t/* \n\t\t$price = get_post_meta( $_POST['pid'], '_regular_price', true);\n\t\t$sale = get_post_meta( $_POST['pid'], '_sale_price', true);\t\t\n\t\t */\n\t\t\n\t\t$tcplugin_10_19 = get_post_meta($_POST['pid'],'tcplugin_10_19',TRUE); \n\t\t\n\t\t\n\t\t$sale = $tcplugin_10_19;\n\t\t\n\t\t$width = get_post_meta($_POST['pid'],'pr_width',TRUE);\n\t\t$height = get_post_meta($_POST['pid'],'pr_height',TRUE);\n\t\t\n\t\techo json_encode(array('sale'=>$sale,'price'=>$price,'width'=>$width,'height'=>$height));\n\t}\n\tdie();\n}", "function get_image_card_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5ZN1cd48f9',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_ImC1d6db6de3a',\n\t\t\t'label' => 'Image',\n\t\t\t'name' => 'image',\n\t\t\t'type' => 'image',\n\t\t\t'required' => 0,\n\t\t\t'return_format' => 'id',\n\t\t\t'preview_size' => 'full',\n\t\t\t'library' => 'all',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_ImC1d6db6de5a',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'content',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'required' => 0,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_Imc3zN11u48f6',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\t\t\n\t\tarray (\n\t\t\t'key' => $id . '_Imc3zN11u47y7',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_Imc1zN11u47f9',\n\t\t\t'label' => 'Layout',\n\t\t\t'name' => 'layout',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '15',\n\t\t\t),\n\t\t\t'choices' => array (\n\t\t\t\t'style-1' => 'Style 1',\n\t\t\t\t'style-2' => 'Style 2'\n\t\t\t),\n\t\t\t'default_value' => array (\n\t\t\t\t0 => 'style-1',\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_Imc1zN12u47f9',\n\t\t\t'label' => 'Style 1: Description',\n\t\t\t'name' => 'separator_1',\n\t\t\t'type' => 'message',\n\t\t\t'instructions' => '',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_Imc1zN11u47f9',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t'value' => 'style-1'\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '35',\n\t\t\t),\n\t\t\t'message' => 'Single column: Image -> Content',\n\t\t\t'new_lines' => '',\n\t\t\t'esc_html' => 0,\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_Imc1zN22u47f1',\n\t\t\t'label' => 'Style 2: Description',\n\t\t\t'name' => 'separator_2',\n\t\t\t'type' => 'message',\n\t\t\t'instructions' => '',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_Imc1zN11u47f9',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t'value' => 'style-2'\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t),\n\t\t\t'message' => 'Two columns: 1. Image; 2. Content',\n\t\t\t'new_lines' => '',\n\t\t\t'esc_html' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '35',\n\t\t\t),\n\t\t),\n\t);\n}", "function getItemInfo($id){\n $item = $this->order_model->getItemById($id);\n if($item == NULL) return $item;\n\n // get provider information\n $providerinfo = $this->user_model->getUserInfoByid($item->provider);\n $item->provider_id = $providerinfo->userid;\n $item->provider_name = $providerinfo->username;\n\n // get ship man information\n $shipman_info = $this->user_model->getUserInfoByid($item->ship_man);\n $item->shipman_name = isset($shipman_info->username) ? $shipman_info->username : '';\n $item->shipman_phone = isset($shipman_info->contact_phone) ? $shipman_info->contact_phone : '';\n\n // get activity information\n $activity = $this->activity_model->getItemById($item->activity_ids);\n $activity->products = json_decode($item->product_info);\n $activity->cnt = $item->activity_cnts;\n // $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n\n $item->activity = $activity;\n\n return $item;\n }", "function select($id)\n {\n $sparklingwine = new SparklingWine();\n $data = $sparklingwine->select($id);\n return $data;\n }", "function sage_get_field( $key, $id=false, $format=true ) {\n\n global $post;\n\n $key = trim( filter_var( $key, FILTER_SANITIZE_STRING ) );\n $result = '';\n\n if ( function_exists( 'get_field' ) ) {\n if ( isset( $post->ID ) && !$id )\n $result = get_field( $key, $post->ID, $format);\n else\n $result = get_field( $key, $id, $format );\n }\n\n return $result;\n}", "public static function findWithDetail($id) {\n \treturn Ride::select('start_time', 'price', 'source_city.city as source_city', \n 'dest_city.city as dest_city', 'preferences.*', 'rides.nb_seats_offered', \n 'rides.luggage_size', 'rides.id', 'rides.car_id', 'users.first_name as driver_first_name', 'users.last_name as driver_last_name')\n ->join('cities as source_city', 'rides.source_city_id', 'source_city.id')\n ->join('cities as dest_city', 'rides.dest_city_id', 'dest_city.id')\n ->join('cars', 'rides.car_id', 'cars.id')\n ->join('users', 'cars.user_id', 'users.id')\n ->join('preferences', 'preferences.user_id', 'users.id')\n ->findOrFail($id);\n }", "protected function getFieldsFromShowItem() {}", "public function getItem($id) {\n\t\n $this->setStandardFilters();\n\t //$this->addFilter('command', 'find_video_by_id');\n\t //$this->addFilter('video_id', $id);\n return $this->getParsedData();\n\t}", "static function getById($id)\n {\n global $objDatabase;\n\n if (!$id) return NULL;\n $arrSql = \\Text::getSqlSnippets(\n '`product`.`id`', FRONTEND_LANG_ID, 'Shop',\n array(\n 'name' => self::TEXT_NAME,\n 'short' => self::TEXT_SHORT,\n 'long' => self::TEXT_LONG,\n 'keys' => self::TEXT_KEYS,\n 'code' => self::TEXT_CODE,\n 'uri' => self::TEXT_URI,\n )\n );\n $query = \"\n SELECT `product`.`id`, `product`.`category_id`,\n `product`.`ord`, `product`.`active`, `product`.`weight`,\n `product`.`picture`,\n `product`.`normalprice`, `product`.`resellerprice`,\n `product`.`discountprice`, `product`.`discount_active`,\n `product`.`stock`, `product`.`stock_visible`,\n `product`.`distribution`,\n `product`.`date_start`, `product`.`date_end`,\n `product`.`manufacturer_id`,\n `product`.`b2b`, `product`.`b2c`,\n `product`.`vat_id`,\n `product`.`flags`,\n `product`.`usergroup_ids`,\n `product`.`group_id`, `product`.`article_id`, \n `product`.`minimum_order_quantity`, \".\n $arrSql['field'].\"\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products` AS `product`\".\n $arrSql['join'].\"\n WHERE `product`.`id`=$id\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult) return self::errorHandler();\n if ($objResult->RecordCount() != 1) return false;\n $id = $objResult->fields['id'];\n $strCode = $objResult->fields['code'];\n if ($strCode === null) {\n $strCode = \\Text::getById($id, 'Shop', self::TEXT_CODE)->content();\n }\n $strName = $objResult->fields['name'];\n if ($strName === null) {\n $strName = \\Text::getById($id, 'Shop', self::TEXT_NAME)->content();\n }\n $strShort = $objResult->fields['short'];\n if ($strShort === null) {\n $strShort = \\Text::getById($id, 'Shop', self::TEXT_SHORT)->content();\n }\n $strLong = $objResult->fields['long'];\n if ($strLong === null) {\n $strLong = \\Text::getById($id, 'Shop', self::TEXT_LONG)->content();\n }\n $strUri = $objResult->fields['uri'];\n if ($strUri === null) {\n $strUri = \\Text::getById($id, 'Shop', self::TEXT_URI)->content();\n }\n $strKeys = $objResult->fields['keys'];\n if ($strKeys === null) {\n $strKeys = \\Text::getById($id, 'Shop', self::TEXT_KEYS)->content();\n }\n $objProduct = new Product(\n $strCode,\n $objResult->fields['category_id'],\n $strName,\n $objResult->fields['distribution'],\n $objResult->fields['normalprice'],\n $objResult->fields['active'],\n $objResult->fields['ord'],\n $objResult->fields['weight'],\n $objResult->fields['id']\n );\n $objProduct->pictures = $objResult->fields['picture'];\n $objProduct->resellerprice = floatval($objResult->fields['resellerprice']);\n $objProduct->short = $strShort;\n $objProduct->long = $strLong;\n $objProduct->stock($objResult->fields['stock']);\n $objProduct->stock_visible($objResult->fields['stock_visible']);\n $objProduct->discountprice = floatval($objResult->fields['discountprice']);\n $objProduct->discount_active($objResult->fields['discount_active']);\n $objProduct->b2b($objResult->fields['b2b']);\n $objProduct->b2c($objResult->fields['b2c']);\n $objProduct->date_start($objResult->fields['date_start']);\n $objProduct->date_end($objResult->fields['date_end']);\n $objProduct->manufacturer_id = $objResult->fields['manufacturer_id'];\n $objProduct->uri = $strUri;\n $objProduct->vat_id = $objResult->fields['vat_id'];\n $objProduct->flags = $objResult->fields['flags'];\n $objProduct->usergroup_ids = $objResult->fields['usergroup_ids'];\n $objProduct->group_id = $objResult->fields['group_id'];\n $objProduct->article_id = $objResult->fields['article_id'];\n $objProduct->keywords = $strKeys;\n $objProduct->minimum_order_quantity = $objResult->fields['minimum_order_quantity'];\n // Fetch the Product Attribute relations\n $objProduct->arrRelations =\n Attributes::getRelationArray($objProduct->id);\n//die(\"dfhreh: \".$objProduct->category_id());\n return $objProduct;\n }", "function get_attributes($id, $color){\n $this->db->select('fld_location,fld_image');\n $this->db->where('fld_accessory_id',$id);\n $this->db->where('fld_color',$color);\n return $this->db->get('tbl_accessories_attributes')->row();\n }", "function getDetails($sek_id)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n if ($sek_id == \"0\") {\r\n return false;\r\n }\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n left join \" . APP_TABLE_PREFIX . \"xsd_display_matchfields\r\n on xsdmf_sek_id=sek_id\r\n WHERE\r\n sek_id= \" . $db->quote($sek_id);\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n $res['key_table_exists'] = Search_Key::checkIfKeyTableExists($res['sek_title_db'], $res['sek_relationship']);\r\n\r\n return $res;\r\n }", "function acf_get_sub_field($id, $field)\n{\n}", "public function getWidgetInfos($id){\t\n\t\t$query = 'SELECT '.DB_PREFIX.'widget_category.name AS \"category\", '.DB_PREFIX.'widget.alias AS \"alias\", '.DB_PREFIX.'widget.language_id AS \"language_id\", '.DB_PREFIX.'widget.id AS \"id\", '.DB_PREFIX.'widget.status AS \"status\", '.DB_PREFIX.'widget.category_id AS \"category_id\", '.DB_PREFIX.'widget.name AS \"name\", '.DB_PREFIX.'widget.data AS \"data\" FROM '.DB_PREFIX.'widget LEFT JOIN '.DB_PREFIX.'widget_category ON '.DB_PREFIX.'widget_category.id = '.DB_PREFIX.'widget.category_id WHERE '.DB_PREFIX.'widget.id = \"'.$id.'\" LIMIT 0,1;';\n\t\t$rs = $this->reg->get('db')->query($query);\n\t\tif($rs->num_rows){\n\t\t\treturn $rs->rows[0];\n\t\t\t}\n\t\treturn false;\n\t\t}", "public function read($id)\n {\n }", "public function read($id)\n {\n }", "public function getMyFanarts($id){\n $sql = \"SELECT f.title, f.pathFile, f.pubDate, f.id FROM fanart f\n WHERE f.author=\".intval($id).\" ORDER BY f.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $fanarts = mysqli_fetch_all($res);\n return $fanarts;\n }", "public function getSsalesDetails($id) {\n\t\n $registry = Zend_Registry::getInstance();\n\t\t$DB = $registry['DB'];\n $sql = \"SELECT * FROM `tbl_sales_commission` as sc WHERE sc.`deleted` = 0 AND sc.sales_id_prime = $id \";\n \t\t$result = $DB->fetchAssoc($sql);\n\t\treturn $result;\n\t\t\n }", "function get_shipping_by_weight($shipping_profile_id)\n\t{\n\t\t$shipping_profile_id = mysql_escape_string($shipping_profile_id);\n\t\t$sql = \"SELECT s.shipping_profile_id, s.account_id, sm.shipping_master_id, swp.rate, swp.other_charges, swp.shipment_rate, swp.unit_of_measure,sm.service_desc, sl.service_level_id, sl.service_level_name, r.region_name \n\t\t\tFROM nm_shipping_settings as s\n\t\t\tLEFT JOIN nm_shipping_master as sm ON sm.shipping_master_id = s.shipping_master_id\n\t\t\tLEFT JOIN nm_shipping_region as r ON sm.region_id = r.region_id\n\t\t\tLEFT JOIN nm_shipping_service_level as sl ON sm.service_level_id = sl.service_level_id\n\t\t\tRIGHT JOIN nm_shipping_weight_profile as swp ON sm.shipping_master_id = swp.shipping_master_id\n\t\t\tWHERE s.shipping_profile_id = $shipping_profile_id\";\t\n\t\t$result = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);\n \t\treturn $result;\n\t}", "function getData($id,$field='ben_id')\n\t{\n\t\t$sql=\"select \n\t\t `ben_id` `id`, `ben_name` `name`, `ben_detail` `detail`, `ben_modified` `modified`, `ben_created` `created`, `ben_status` `status`, `ben_howto` `howto`,ben_pos pos\n\t\tfrom {$this->table} where {$field}='$id'\";\n\t\tif($field=='ben_id'){\n\t\t\t$data=dbFetchOne($sql);\n\t\t}else{ \n\t\t\t$result=dbQuery($sql,1);\n\t\t\t$data=array();\n\t\t\t$i=0;\n\t\t\tforeach ($result->result_array() as $row){\n\t\t\t\t$data[]=$row;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function scrap($id){\n\t\trequire_once FCPATH . \"/core/InfestPromote/php/Scrap.php\";\n\t\t$sheet = $this->Model->SelectWhere(\"target\",array(\"fieldName\"=>\"_id\",\"condition\"=>\"=\",\"value\"=>$id));\n\t\t$scrap=new Scrap($sheet[0][\"user\"]);\n\t\t$scrap->scrap();\n\t\t$this->Model->Update(\"target\",array(\"fieldName\"=>\"_id\",\"condition\"=>\"=\",\"value\"=>$id),array(\"data\"=>$scrap->getResult()));\n\t}", "protected function getItemData($id){\n $query = \"SELECT * FROM `\".$this->current_module_table.\"` WHERE `id` = \".intval($id);\n return $this->main->db->assocItem($query);\n }", "function lf_email_util_get_campaign_details( $id ) {\n\n\tglobal $wpdb;\n\n\t$table_campaigns = $wpdb->prefix . 'lf_campaigns';\n\n\t// Set Query\n\t$sql = \"SELECT * FROM $table_campaigns WHERE id = $id\";\n\n\t// Get Results\n\t$results = $wpdb->get_results( $sql, ARRAY_A );\n\n\t// Format Results\n\t$details;\n\tif ( count( $results ) > 0 ) {\n\t\t$details = $results[0];\n\t} // end if\n\n\treturn $details;\n}", "public function getFeedsDetails($var)\r\n\t\t{\r\n\t\t\t\t$link = $this->connect();\r\n\t\t\t\t$query = \" SELECT DISTINCT feed_id,\r\n\t\t\t\t\t\t\tfeed_type,\r\n\t\t\t\t\t\t\tfeed_name\r\n\t\t\t\t\t\t\tFROM feeds \r\n\t\t\t\t\t\t\tWHERE feed_id = '\" . $var . \"'\";\r\n\t\t\t\t$result = mysqli_query($link, $query);\r\n\t\t\t\t$f = array();\r\n\t\t\t\t$f_arr = array();\r\n\t\t\t\twhile($row = mysqli_fetch_row($result)){\r\n\t\t\t\t\t$f['fid'] = $row[0];\r\n\t\t\t\t\t$f['ftype'] = $row[1];\r\n\t\t\t\t\t$f['fname'] = $row[2];\r\n\t\t\t\t\t$f_arr[] = $f;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\treturn $f_arr;\r\n\t\t\t\t\r\n\t\t}", "abstract public function retrieve($id);", "function getData($id)\n {\n return $this->objProductos->getInfoProducto($id);\n }", "function get_image_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T721ZN1cd48f3',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_Content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f2',\n\t\t\t'label' => 'Attach image',\n\t\t\t'name' => 'image',\n\t\t\t'type' => 'image',\n\t\t\t'required' => 0,\n\t\t\t'return_format' => 'id',\n\t\t\t'preview_size' => 'rpwe-thumbnail',\n\t\t\t'library' => 'all',\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T721zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T7MtzN1cd48f3',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f3',\n\t\t\t'label' => 'Shape',\n\t\t\t'name' => 'shape',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'circle' => 'Circle',\n\t\t\t\t'square' => 'Square'\n\t\t\t),\n\t\t\t'default_value' => 'auto',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f4',\n\t\t\t'label' => 'Url',\n\t\t\t'name' => 'url',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'placeholder' => 'http://example.com',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f5',\n\t\t\t'label' => 'New window',\n\t\t\t'name' => 'target',\n\t\t\t'type' => 'true_false',\n\t\t\t'required' => '',\n\t\t\t'message' => 'Yes, open there',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25'\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGz71cd48f6',\n\t\t\t'label' => 'Size',\n\t\t\t'name' => 'size',\n\t\t\t'type' => 'number',\n\t\t\t'required' => '',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'default_value' => '100',\n\t\t\t'placeholder' => '100',\n\t\t\t'append' => '%',\n\t\t\t'min' => '1',\n\t\t\t'max' => '100'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_NImGW71cd481w',\n\t\t\t'label' => 'Width',\n\t\t\t'name' => 'width',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'full' => 'Full'\n\t\t\t),\n\t\t\t'default_value' => 'auto',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t);\n}", "public function getItemInfo($id) {\n $stmt = $this->db->prepare(\"select * from product where id = :id;\");\n $stmt->bindValue(\"id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function get( $id );", "public function get($id)\n {\n return response()->json(Fields::find($id));\n }", "function getSingleFeed($feedID);", "function acf_search_fields($id, $fields)\n{\n}", "public function getIdentifyingData(FeedItemBase $item);", "function extras_short_data($id) {\r\n\t\t\t\t$this->db->select('extras_title,extras_desc');\r\n\t\t\t\t$this->db->where('extras_id', $id);\r\n\t\t\t\treturn $this->db->get('pt_extras')->result();\r\n\t\t}", "public function get(string $id);", "public function getNewsById($id)\r\n {\r\n\r\n $collection = $this->newsFactory->create();\r\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n $medialurl= $objectManager->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore()->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA);\r\n foreach($collection as $news){\r\n if($news['entity_id'] == $id){\r\n $array_get['id'] = $news['entity_id'];\r\n $array_get['name'] =$news['title'];\r\n $array_get['description'] =$news['content'];\r\n $array_get['image'] = $medialurl.$news['image'];\r\n $array_get['status'] = $news['is_active'];\r\n\r\n }\r\n else{\r\n $array_get['message'] = 'No news found with this id';\r\n }\r\n\r\n $array_tmp=$array_get;\r\n\r\n }\r\n \r\n return [$array_tmp];\r\n\r\n\r\n \r\n }", "public function getStaticFields(int $storeId): array;", "public function get_info($id)\n\t{\n\n\t\t$sel=$this->db->prepare(\"SELECT * from shop where id='$id'\");\n\n $sel->execute();\n\n return ($sel->fetchAll(PDO::FETCH_ASSOC));\n\t\t\n\n\n\n }", "public function loadFieldById($id)\r\n {\r\n return CrugeFactory::get()->getICrugeFieldLoadModel($id);\r\n }", "function get($id) {\n\t\t$query = $this->db->get_where('realisasi_skp',array('id'=>$id),1,0);\n\t\treturn $query->result() ? $query->result()[0] : NULL ;\t\t\n\t}", "private function load($id = null) {\n\n if (!is_null($id)) {\n\n return $this->search->getProduct($id);\n\n }\n\n return $this->search->getProducts($this->filters);\n\n }", "public function show($id)\n {\n return Shoe_specific::with(['shoe', 'color', 'size'])->find($id);\n }", "public function getSellerCollection($_id) {\r\n /** load collection based on seller id */\r\n return Mage::getModel ( 'marketplace/sellerprofile' )->load ( $_id, 'seller_id' );\r\n }", "function acf_get_fields_by_id($parent_id = 0)\n{\n}", "public function getCustomField($id)\n {\n return $this->customFields[$id];\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM shoppingcart_courseregcodeitemannotation WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "abstract public function get($id);", "abstract public function get($id);" ]
[ "0.61235195", "0.60033685", "0.57888997", "0.5773557", "0.5633423", "0.56164306", "0.5614547", "0.5587564", "0.5551447", "0.5526765", "0.55122066", "0.54545546", "0.54207325", "0.5415485", "0.5413413", "0.5367295", "0.53643334", "0.5355727", "0.5349054", "0.53433776", "0.53419", "0.53352123", "0.53234047", "0.53178287", "0.5315805", "0.53121316", "0.5303619", "0.530118", "0.52893287", "0.5280941", "0.52771187", "0.52570474", "0.52569115", "0.52537596", "0.52517515", "0.5240897", "0.52376246", "0.523481", "0.5227028", "0.5224989", "0.52225137", "0.51687855", "0.51669806", "0.51667607", "0.5154996", "0.5131928", "0.51312816", "0.51306576", "0.51188123", "0.5116864", "0.5114022", "0.5110724", "0.50978076", "0.5097169", "0.5096868", "0.5096657", "0.5091768", "0.50903475", "0.5087095", "0.50863826", "0.50804734", "0.50775063", "0.5064535", "0.5056713", "0.50544167", "0.50541013", "0.50539356", "0.504459", "0.504459", "0.504363", "0.50381136", "0.50378555", "0.50320405", "0.50316703", "0.50315183", "0.5026144", "0.50208163", "0.5020332", "0.50188464", "0.5011277", "0.50092703", "0.50089645", "0.5003557", "0.49962372", "0.49958944", "0.49939403", "0.49930823", "0.4991307", "0.49836123", "0.49814197", "0.49782765", "0.49741238", "0.49739718", "0.49734852", "0.49710217", "0.49633923", "0.49620247", "0.49614257", "0.4959454", "0.49559128", "0.49559128" ]
0.0
-1
Returns the appropriate string to display based on the status code
public function getStatus() { $code = $this->status['code']; if ($code === '0'){ return 'Closed'; }else if($code === '1'){ return 'On Hold'; }else if($code === '2'){ return 'Open'; }else if($code === '3'){ $openingDate = ($this->status['openingdate'] === '') ? 'soon' : date("j M", strtotime($this->status['openingdate'])); return 'Opening '.$openingDate; }else if($code === '4'){ return 'Closed For Season'; }else if($code === '5'){ $updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date("g:ia", strtotime($this->status['updatetime'])); return 'Delayed '.$updateTime; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getStatusMessage(){\n\t\t$status = array(\n\t\t\t\t100 => 'Continue', \n\t\t\t\t101 => 'Switching Protocols', \n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created', \n\t\t\t\t202 => 'Accepted', \n\t\t\t\t203 => 'Non-Authoritative Information', \n\t\t\t\t204 => 'No Content', \n\t\t\t\t205 => 'Reset Content', \n\t\t\t\t206 => 'Partial Content', \n\t\t\t\t300 => 'Multiple Choices', \n\t\t\t\t301 => 'Moved Permanently', \n\t\t\t\t302 => 'Found', \n\t\t\t\t303 => 'See Other', \n\t\t\t\t304 => 'Not Modified', \n\t\t\t\t305 => 'Use Proxy', \n\t\t\t\t306 => '(Unused)', \n\t\t\t\t307 => 'Temporary Redirect', \n\t\t\t\t400 => 'Bad Request', \n\t\t\t\t401 => 'Unauthorized', \n\t\t\t\t402 => 'Payment Required', \n\t\t\t\t403 => 'Forbidden', \n\t\t\t\t404 => 'Not Found', \n\t\t\t\t405 => 'Method Not Allowed', \n\t\t\t\t406 => 'Not Acceptable', \n\t\t\t\t407 => 'Proxy Authentication Required', \n\t\t\t\t408 => 'Request Timeout', \n\t\t\t\t409 => 'Conflict', \n\t\t\t\t410 => 'Gone', \n\t\t\t\t411 => 'Length Required', \n\t\t\t\t412 => 'Precondition Failed', \n\t\t\t\t413 => 'Request Entity Too Large', \n\t\t\t\t414 => 'Request-URI Too Long', \n\t\t\t\t415 => 'Unsupported Media Type', \n\t\t\t\t416 => 'Requested Range Not Satisfiable', \n\t\t\t\t417 => 'Expectation Failed', \n\t\t\t\t500 => 'Internal Server Error', \n\t\t\t\t501 => 'Not Implemented', \n\t\t\t\t502 => 'Bad Gateway', \n\t\t\t\t503 => 'Service Unavailable', \n\t\t\t\t504 => 'Gateway Timeout', \n\t\t\t\t505 => 'HTTP Version Not Supported');\n\t\treturn ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n\t}", "function _getStatusMessage(){\n $status = array(\n 200 => 'Ok' ,\n 201 => 'Created' ,\n 202 => 'deleted' ,\n 204 => 'No Content' ,\n 400 => 'Bad Request',\n 404 => 'Not Found' ,\n 405 => 'Not Allowed' ,\n 406 => 'Not Acceptable',\n\n );\n return ($status[$this->CodeHTTP] ? $status[$this->CodeHTTP] : $status[500]);\n }", "public function getStatusMessage($statusCode)\n {\n switch ($statusCode) {\n case 100:\n return 'Continue';\n case 101:\n return 'Switching Protocols';\n case 200:\n return 'OK';\n case 201:\n return 'Created';\n case 202:\n return 'Accepted';\n case 203:\n return 'Non-Authoritative Information';\n case 204:\n return 'No Content';\n case 205:\n return 'Reset Content';\n case 206:\n return 'Partial Content';\n case 300:\n return 'Multiple Choices';\n case 301:\n return 'Moved Permanently';\n case 302:\n return 'Found';\n case 303:\n return 'See Other';\n case 304:\n return 'Not Modified';\n case 305:\n return 'Use Proxy';\n case 306:\n return '(Unused)';\n case 307:\n return 'Temporary Redirect';\n case 400:\n return 'Bad Request';\n case 401:\n return 'Unauthorized';\n case 402:\n return 'Payment Required';\n case 403:\n return 'Forbidden';\n case 404:\n return 'Not found';\n case 405:\n return 'Method Not Allowed';\n case 406:\n return 'Not Acceptable';\n case 407:\n return 'Proxy Authentication Required';\n case 408:\n return 'Request Timeout';\n case 409:\n return 'Conflict';\n case 410:\n return 'Gone';\n case 411:\n return 'Length Required';\n case 412:\n return 'Precondition Failed';\n case 413:\n return 'Request Entity Too Large';\n case 414:\n return 'Request-URI Too Long';\n case 415:\n return 'Unsupported Media Type';\n case 416:\n return 'Requested Range Not Satisfiable';\n case 417:\n return 'Expectation Failed';\n case 500:\n return 'Internal Server Error';\n case 501:\n return 'Not Implemented';\n case 502:\n return 'Bad Gateway';\n case 503:\n return 'Service Unavailable';\n case 504:\n return 'Gateway Timeout';\n case 505:\n return 'HTTP Version Not Supported';\n default:\n return '';\n }\n }", "public function getReasonPhrase(): string\n {\n return StatusCode::MESSAGES_MAP[$this->status];\n }", "private static function _getStatusCodeMessage($status)\n {\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public function _getStatusCodeMessage($status) {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Oops! Something has gone wrong and the page you were looking for could not be found! Try the <a href=\"\" class=\"color-blue\">home page.</a>',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => \"We're sorry because something went wrong, please try again!\",\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n );\n return (isset($codes[$status])) ? $codes[$status] : 'Unknown Result';\n }", "private function _getStatusCodeMessage($status = 100)\n {\n return (isset($this->codes[$status])) ? $this->codes[$status] : '';\n }", "public static function getStatusCodeMessage($status)\n {\n// via parse_ini_file()... however, this will suffice\n// for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "private function _getStatusCodeMessage($status){\n\t\t// via parse_ini_file()... however, this will suffice\n\t\t// for an example\n\t\t$codes = Array(\n\t\t\t200 => 'OK',\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t);\n\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t}", "public function getStatusAsString(){\r\n $list = self::getStatusList();\r\n if (isset($list[$this->status]))\r\n return $list[$this->status];\r\n \r\n return 'Unknown';\r\n }", "private function _getStatusCodeMessage($status)\n{\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public static function get_status_code_message($status)\n {\n $codes = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 301 => 'Moved Permanently',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "private function send_status()\n {\n switch ($this->_status) \n {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($this->_status) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n\n header($protocol . ' ' . $this->_status . ' ' . $text);\n }", "private function _getStatusCodeMessage($status)\n {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public function printStatus()\n {\n switch ($this->status) {\n case $this::STATUS_INACTIVE:\n return \\Yii::t('app', 'Inactive');\n break;\n case $this::STATUS_ACTIVE_LOCKED:\n return \\Yii::t('app', 'Locked');\n break;\n case $this::STATUS_ACTIVE_UNLOCKED:\n return \\Yii::t('app', 'Unlocked');\n break;\n }\n\n return \\Yii::t('app', 'Unknown status');\n }", "public static function getStatusMessage()\n {\n switch(self::status())\n {\n case 'PLEXCEL_NO_CREDS':\n return \"no creds\";\n break;\n case 'PLEXCEL_PRINCIPAL_UNKNOW':\n return \"principal unknow\";\n break;\n case 'PLEXCEL_LOGON_FAILED':\n return \"logon failed\";\n break;\n default:\n return \"error :\".self::status();\n }\n }", "public static function getStatusCodeMessage($status)\n\t\t{\n\t\t\t// via parse_ini_file()... however, this will suffice\n\t\t\t// for an example\n\t\t\t$codes = Array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => '(Unused)',\n\t\t\t\t307 => 'Temporary Redirect',\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t600 => 'OK',\n\t\t\t\t601 => 'Bad request',\n\t\t\t\t602 => 'You must be authorized to view this page.',\n\t\t\t\t603 => 'The requested URL ' . $_SERVER['REQUEST_URI'] . ' was not found.',\n\t\t\t\t604 => 'The server encountered an error processing your request.',\n\t\t\t\t605 => 'The requested method is not implemented.',\n\t\t\t\t606 => 'You have exceeded api call limit for the hour',\n\t\t\t\t607 => 'You have exceeded api call limit for the day'\n\t\t\t);\n\t\n\t\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t\t}", "function http_status_code($code, $message = \"\") {\n\n if (!empty($code)) {\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n \n // Append the content if not empty\n if (!empty($message)) $message = \" - \" . $message;\n\n header($protocol . ' ' . $code . ' ' . $text . \"$message\");\n\n $GLOBALS['http_status_code'] = $code;\n\n } else {\n\n $code = (isset($GLOBALS['http_status_code']) ? $GLOBALS['http_status_code'] : 200);\n\n }\n\n // We must kill the requisition\n die($code);\n }", "function getStatusMessage(){\n\t\tif($this->_StatusMessage){ return $this->_StatusMessage; }\n\n\t\t//cerpano z\n\t\t//http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n\t\t$status = array(\n\t\t\t// Successful 2xx\n\t\t\t\"200\" => \"OK\",\n\t\t\t\"201\" => \"Created\",\n\t\t\t\"202\" => \"Accepted\",\n\t\t\t\"203\" => \"Non-Authoritative Information\",\n\t\t\t\"204\" => \"No Content\",\n\t\t\t\"205\" => \"Reset Content\",\n\t\t\t\"206\" => \"Partial Content\",\n\t\t\t// Redirection 3xx\n\t\t\t\"300\" => \"Multiple Choices\",\n\t\t\t\"301\" => \"Moved Permanently\",\n\t\t\t\"302\" => \"Found\",\n\t\t\t\"303\" => \"See Other\",\n\t\t\t\"304\" => \"Not Modified\",\n\t\t\t\"305\" => \"Use Proxy\",\n\t\t\t// (306 Unused)\n\t\t\t\"307\" => \"Temporary Redirect\",\n\t\t\t// Client Error 4xx\n\t\t\t\"400\" => \"Bad Request\",\n\t\t\t\"401\" => \"Unauthorized\",\n\t\t\t\"402\" => \"Payment Required\",\n\t\t\t\"403\" => \"Forbidden\",\n\t\t\t\"404\" => \"Not Found\",\n\t\t\t\"405\" => \"Method Not Allowed\",\n\t\t\t\"406\" => \"Not Acceptable\",\n\t\t\t\"407\" => \"Proxy Authentication Required\",\n\t\t\t\"408\" => \"Request Timeout\",\n\t\t\t\"409\" => \"Conflict\",\n\t\t\t\"410\" => \"Gone\",\n\t\t\t\"411\" => \"Length Required\",\n\t\t\t\"412\" => \"Precondition Failed\",\n\t\t\t\"413\" => \"Request Entity Too Large\",\n\t\t\t\"414\" => \"Request-URI Too Long\",\n\t\t\t\"415\" => \"Unsupported Media Type\",\n\t\t\t\"416\" => \"Requested Range Not Satisfiable\",\n\t\t\t\"417\" => \"Expectation Failed\",\n\t\t\t\"418\" => \"I'm a teapot\",\n\t\t\t// Server Error 5xx\n\t\t\t\"500\" => \"Internal Server Error\",\n\t\t\t\"501\" => \"Not Implemented\",\n\t\t\t\"502\" => \"Bad Gateway\",\n\t\t\t\"503\" => \"Service Unavailable\",\n\t\t\t\"504\" => \"Gateway Timeout\",\n\t\t\t\"505\" => \"HTTP Version Not Supported\",\n\t\t\t\"506\" => \"Variant Also Negotiates\",\n\t\t\t\"507\" => \"Insufficient Storage\",\n\t\t);\n\t\treturn isset($status[\"$this->_StatusCode\"]) ? $status[\"$this->_StatusCode\"] : \"Unknown\";\n\t}", "public function getStatusText($code = null)\n {\n $code = $code ?: $this->getStatusCode();\n if (array_key_exists($code, self::$messages)) {\n return self::$messages[$code];\n }\n\n return 'Unknown Status';\n }", "protected function responseMessage()\n {\n return isset($this->codes[$this->code]) ? $this->codes[$this->code] : '';\n }", "public function getStatusAsString()\n {\n $list = self::getStatusList();\n if (isset($list[$this->status]))\n return $list[$this->status];\n\n return 'Unknown';\n }", "function getResponseCodeMessage($code) {\n $code = is_string($code) ? intval($code) : $code;\n switch ($code) {\n case 100: $text = 'Continue';\n break;\n case 101: $text = 'Switching Protocols';\n break;\n case 200: $text = 'OK';\n break;\n case 201: $text = 'Created';\n break;\n case 202: $text = 'Accepted';\n break;\n case 203: $text = 'Non-Authoritative Information';\n break;\n case 204: $text = 'No Content';\n break;\n case 205: $text = 'Reset Content';\n break;\n case 206: $text = 'Partial Content';\n break;\n case 300: $text = 'Multiple Choices';\n break;\n case 301: $text = 'Moved Permanently';\n break;\n case 302: $text = 'Moved Temporarily';\n break;\n case 303: $text = 'See Other';\n break;\n case 304: $text = 'Not Modified';\n break;\n case 305: $text = 'Use Proxy';\n break;\n case 400: $text = 'Bad Request';\n break;\n case 401: $text = 'Unauthorized';\n break;\n case 402: $text = 'Payment Required';\n break;\n case 403: $text = 'Forbidden';\n break;\n case 404: $text = 'Not Found';\n break;\n case 405: $text = 'Method Not Allowed';\n break;\n case 406: $text = 'Not Acceptable';\n break;\n case 407: $text = 'Proxy Authentication Required';\n break;\n case 408: $text = 'Request Time-out';\n break;\n case 409: $text = 'Conflict';\n break;\n case 410: $text = 'Gone';\n break;\n case 411: $text = 'Length Required';\n break;\n case 412: $text = 'Precondition Failed';\n break;\n case 413: $text = 'Request Entity Too Large';\n break;\n case 414: $text = 'Request-URI Too Large';\n break;\n case 415: $text = 'Unsupported Media Type';\n break;\n case 500: $text = 'Internal Server Error';\n break;\n case 501: $text = 'Not Implemented';\n break;\n case 502: $text = 'Bad Gateway';\n break;\n case 503: $text = 'Service Unavailable';\n break;\n case 504: $text = 'Gateway Time-out';\n break;\n case 505: $text = 'HTTP Version not supported';\n break;\n default:\n $text = \"Unknown http status code\";\n break;\n }\n return $text;\n}", "public function statusMessage(): string;", "function get_status_header_desc($code)\n {\n }", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "protected function getHTTPResponceTextByCode($code) {\n $text = '';\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default: break;\n }\n return $text;\n }", "function wspra_get_status_message($code=200){\n $status = array(\n 100 => 'Continue', \n 101 => 'Switching Protocols', \n 200 => 'OK',\n 201 => 'Created', \n 202 => 'Accepted', \n 203 => 'Non-Authoritative Information', \n 204 => 'No Content', \n 205 => 'Reset Content', \n 206 => 'Partial Content', \n 300 => 'Multiple Choices', \n 301 => 'Moved Permanently', \n 302 => 'Found', \n 303 => 'See Other', \n 304 => 'Not Modified', \n 305 => 'Use Proxy', \n 306 => '(Unused)', \n 307 => 'Temporary Redirect', \n 400 => 'Bad Request', \n 401 => 'Unauthorized', \n 402 => 'Payment Required', \n 403 => 'Forbidden', \n 404 => 'Not Found', \n 405 => 'Method Not Allowed', \n 406 => 'Not Acceptable', \n 407 => 'Proxy Authentication Required', \n 408 => 'Request Timeout', \n 409 => 'Conflict', \n 410 => 'Gone', \n 411 => 'Length Required', \n 412 => 'Precondition Failed', \n 413 => 'Request Entity Too Large', \n 414 => 'Request-URI Too Long', \n 415 => 'Unsupported Media Type', \n 416 => 'Requested Range Not Satisfiable', \n 417 => 'Expectation Failed', \n 500 => 'Internal Server Error', \n 501 => 'Not Implemented', \n 502 => 'Bad Gateway', \n 503 => 'Service Unavailable', \n 504 => 'Gateway Timeout', \n 505 => 'HTTP Version Not Supported',\n 1001 => 'Parameters required!',\n 1002 => 'No Results Found'\n );\n return $status[$code];\n}", "function getStatusString() {\n\t\tswitch ($this->getData('status')) {\n\t\t\tcase THESIS_STATUS_INACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.inactive';\n\t\t\tcase THESIS_STATUS_ACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.active';\n\t\t\tdefault:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status';\n\t\t}\n\t}", "public function getMessage() {\n\n\t\t\tswitch($this->getCode()) {\n\t\t\t\tcase 100: return 'Continue';\n\t\t\t\tcase 101: return 'Switching Protocols';\n\t\t\t\tcase 102: return 'Processing';\n\t\t\t\tcase 200: return 'OK';\n\t\t\t\tcase 201: return 'Created';\n\t\t\t\tcase 202: return 'Accepted';\n\t\t\t\tcase 203: return 'Non-Authoritative Information';\n\t\t\t\tcase 204: return 'No Content';\n\t\t\t\tcase 205: return 'Reset Content';\n\t\t\t\tcase 206: return 'Partial Content';\n\t\t\t\tcase 207: return 'Multi-Status';\n\t\t\t\tcase 208: return 'Already Reported';\n\t\t\t\tcase 226: return 'IM Used';\n\t\t\t\tcase 300: return 'Multiple Choices';\n\t\t\t\tcase 301: return 'Moved Permanently';\n\t\t\t\tcase 302: return 'Found';\n\t\t\t\tcase 303: return 'See Other';\n\t\t\t\tcase 304: return 'Not Modified';\n\t\t\t\tcase 305: return 'Use Proxy';\n\t\t\t\tcase 306: return 'Switch Proxy';\n\t\t\t\tcase 307: return 'Temporary Redirect';\n\t\t\t\tcase 308: return 'Permanent Redirect';\n\t\t\t\tcase 400: return 'Bad Request';\n\t\t\t\tcase 401: return 'Unauthorized';\n\t\t\t\tcase 402: return 'Payment Required';\n\t\t\t\tcase 403: return 'Forbidden';\n\t\t\t\tcase 404: return 'Not Found';\n\t\t\t\tcase 405: return 'Method Not Allowed';\n\t\t\t\tcase 406: return 'Not Acceptable';\n\t\t\t\tcase 407: return 'Proxy Authentication Required';\n\t\t\t\tcase 408: return 'Request Timeout';\n\t\t\t\tcase 409: return 'Conflict';\n\t\t\t\tcase 410: return 'Gone';\n\t\t\t\tcase 411: return 'Length Required';\n\t\t\t\tcase 412: return 'Precondition Failed';\n\t\t\t\tcase 413: return 'Request Entity Too Large';\n\t\t\t\tcase 414: return 'Request-URI Too Long';\n\t\t\t\tcase 415: return 'Unsupported Media Type';\n\t\t\t\tcase 416: return 'Requested Range Not Satisfiable';\n\t\t\t\tcase 417: return 'Expectation Failed';\n\t\t\t\tcase 418: return 'I\\'m a teapot';\n\t\t\t\tcase 419: return 'Authentication Timeout';\n\t\t\t\tcase 420: return 'Enhance Your Calm';\n\t\t\t\tcase 420: return 'Method Failure';\n\t\t\t\tcase 422: return 'Unprocessable Entity';\n\t\t\t\tcase 423: return 'Locked';\n\t\t\t\tcase 424: return 'Failed Dependency';\n\t\t\t\tcase 424: return 'Method Failure';\n\t\t\t\tcase 425: return 'Unordered Collection';\n\t\t\t\tcase 426: return 'Upgrade Required';\n\t\t\t\tcase 428: return 'Precondition Required';\n\t\t\t\tcase 429: return 'Too Many Requests';\n\t\t\t\tcase 431: return 'Request Header Fields Too Large';\n\t\t\t\tcase 444: return 'No Response';\n\t\t\t\tcase 449: return 'Retry With';\n\t\t\t\tcase 450: return 'Blocked by Windows Parental Controls';\n\t\t\t\tcase 451: return 'Redirect';\n\t\t\t\tcase 451: return 'Unavailable For Legal Reasons';\n\t\t\t\tcase 494: return 'Request Header Too Large';\n\t\t\t\tcase 495: return 'Cert Error';\n\t\t\t\tcase 496: return 'No Cert';\n\t\t\t\tcase 497: return 'HTTP to HTTPS';\n\t\t\t\tcase 499: return 'Client Closed Request';\n\t\t\t\tcase 500: return 'Internal Server Error';\n\t\t\t\tcase 501: return 'Not Implemented';\n\t\t\t\tcase 502: return 'Bad Gateway';\n\t\t\t\tcase 503: return 'Service Unavailable';\n\t\t\t\tcase 504: return 'Gateway Timeout';\n\t\t\t\tcase 506: return 'Variant Also Negotiates';\n\t\t\t\tcase 507: return 'Insufficient Storage';\n\t\t\t\tcase 508: return 'Loop Detected';\n\t\t\t\tcase 509: return 'Bandwidth Limit Exceeded';\n\t\t\t\tcase 510: return 'Not Extended';\n\t\t\t\tcase 511: return 'Network Authentication Required';\n\t\t\t\tcase 598: return 'Network read timeout error';\n\t\t\t\tcase 599: return 'Network connect timeout error';\n\t\t\t\tdefault: return 'Unknown Response';\n\t\t\t}\n\n\t\t}", "public function getStatusString()\r\n {\r\n return $GLOBALS['TICKETSTATUS_DESC'][$this->status];\r\n }", "public static function getLekabStatusText($code)\n {\n switch (intval($code)) {\n case 0:\n return \"QUEUED\";\n case 1:\n return \"SENT\";\n case 2:\n return \"DELIVERED\";\n case 3:\n return \"DELETED\";\n case 4:\n return \"EXPIRED\";\n case 5:\n return \"REJECTED\";\n case 6:\n return \"UNDELIVERABLE\";\n case 7:\n return \"ACCEPTED\";\n case 8:\n return \"ABSENT SUBSCRIBER\";\n case 9:\n return \"UNKNOWN SUBSCRIBER\";\n case 10:\n return \"INVALID DESTINATION\";\n case 11:\n return \"SUBSCRIBER ERROR\";\n case 12:\n return \"UNKNOWN\";\n case 13:\n return \"ERROR\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "public function status($status)\n {\n if ($status == 16) {\n return \"<span class='badge badge-warning'>Order Placed</span>\";\n }\n\n if ($status == 3) {\n return \"<span class='badge badge-danger'>Canceled</span>\";\n }\n\n if ($status == 2) {\n return \"<span class='badge badge-warning'>Pending</span>\";\n }\n\n if ($status == 17) {\n return \"<span class='badge badge-danger'>Delivered</span>\";\n }\n\n return \"<span class='badge badge-danger'>Something Wrong</span>\";\n \n }", "public function status_name(){\n\t\t$status = '';\n\t\t\tswitch($this->status){\n\t\t\t\tCASE '1' : $status = 'Active';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '2' : $status = 'Currently Working';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '3' : $status = 'Work Completed';\n\t\t\t\t\t\tbreak;\n\t\t\t\tCASE '4' : $status = 'Payment Approved';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '5' : $status = 'Feedback Employer';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '6' : $status = 'Feedback Freelancer';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '7' : $status = 'Refund';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '8' : $status = 'Conflict';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '9' : $status = 'Closed';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '11' : $status = 'Payment Released';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '15' : $status = 'Charge Back';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\treturn $status;\n\t}", "function get_status_header_desc($code) {\n global $output_header_to_desc;\n\n $code = abs(intval($code));\n\n if (!isset ($output_header_to_desc)) {\n $output_header_to_desc = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 226 => 'IM Used',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Reserved',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Page Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 426 => 'Upgrade Required',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 510 => 'Not Extended'\n ];\n }\n if (isset ($output_header_to_desc [ $code ])) {\n return $output_header_to_desc [ $code ];\n } else {\n return '';\n }\n}", "function http_translate_code( $code ) {\n\t\t// Check the given parameters\n\t\tif( ! is_int( $code ) ) {\n\t\t\tthrow new \\InvalidArgumentException( 'Status is expected to be an integer.' );\n\t\t}\n\t\t// Return the string matching the given code.\n\t\tswitch( $code ) {\n\t\t\tcase 100: return 'Continue'; break;\n\t\t\tcase 101: return 'Switching Protocols'; break;\n\t\t\tcase 200: return 'OK'; break;\n\t\t\tcase 201: return 'Created'; break;\n\t\t\tcase 202: return 'Accepted'; break;\n\t\t\tcase 203: return 'Non-Authoritative Information'; break;\n\t\t\tcase 204: return 'No Content'; break;\n\t\t\tcase 205: return 'Reset Content'; break;\n\t\t\tcase 206: return 'Partial Content'; break;\n\t\t\tcase 300: return 'Multiple Choices'; break;\n\t\t\tcase 301: return 'Moved Permanently'; break;\n\t\t\tcase 302: return 'Moved Temporarily'; break;\n\t\t\tcase 303: return 'See Other'; break;\n\t\t\tcase 304: return 'Not Modified'; break;\n\t\t\tcase 305: return 'Use Proxy'; break;\n\t\t\tcase 400: return 'Bad Request'; break;\n\t\t\tcase 401: return 'Unauthorized'; break;\n\t\t\tcase 402: return 'Payment Required'; break;\n\t\t\tcase 403: return 'Forbidden'; break;\n\t\t\tcase 404: return 'Not Found'; break;\n\t\t\tcase 405: return 'Method Not Allowed'; break;\n\t\t\tcase 406: return 'Not Acceptable'; break;\n\t\t\tcase 407: return 'Proxy Authentication Required'; break;\n\t\t\tcase 408: return 'Request Time-out'; break;\n\t\t\tcase 409: return 'Conflict'; break;\n\t\t\tcase 410: return 'Gone'; break;\n\t\t\tcase 411: return 'Length Required'; break;\n\t\t\tcase 412: return 'Precondition Failed'; break;\n\t\t\tcase 413: return 'Request Entity Too Large'; break;\n\t\t\tcase 414: return 'Request-URI Too Large'; break;\n\t\t\tcase 415: return 'Unsupported Media Type'; break;\n\t\t\tcase 500: return 'Internal Server Error'; break;\n\t\t\tcase 501: return 'Not Implemented'; break;\n\t\t\tcase 502: return 'Bad Gateway'; break;\n\t\t\tcase 503: return 'Service Unavailable'; break;\n\t\t\tcase 504: return 'Gateway Time-out'; break;\n\t\t\tcase 505: return 'HTTP Version not supported'; break;\n\t\t}\n\t\t// Default is null\n\t\treturn null;\n\t}", "public function statusToText(){\n\n if($this->trashed()){\n return 'deleted';\n }\n switch($this->status){\n\n case 0:\n return 'unapproved';\n\n case 1:\n return 'pending';\n \n case 2:\n return 'approved';\n\n default:\n return 'unknown';\n\n }\n return 'unknown';\n }", "private function _getStatusCodeMessage($statusCode)\r\n {\r\n $codes = Array(\r\n 100 => 'Continue',\r\n 101 => 'Switching Protocols',\r\n 200 => 'OK',\r\n 201 => 'Created',\r\n 202 => 'Accepted',\r\n 203 => 'Non-Authoritative Information',\r\n 204 => 'No Content',\r\n 205 => 'Reset Content',\r\n 206 => 'Partial Content',\r\n 300 => 'Multiple Choices',\r\n 301 => 'Moved Permanently',\r\n 302 => 'Found',\r\n 303 => 'See Other',\r\n 304 => 'Not Modified',\r\n 305 => 'Use Proxy',\r\n 306 => '(Unused)',\r\n 307 => 'Temporary Redirect',\r\n 400 => 'Bad Request',\r\n 401 => 'Unauthorized',\r\n 402 => 'Payment Required',\r\n 403 => 'Forbidden',\r\n 404 => 'Not Found',\r\n 405 => 'Method Not Allowed',\r\n 406 => 'Not Acceptable',\r\n 407 => 'Proxy Authentication Required',\r\n 408 => 'Request Timeout',\r\n 409 => 'Conflict',\r\n 410 => 'Gone',\r\n 411 => 'Length Required',\r\n 412 => 'Precondition Failed',\r\n 413 => 'Request Entity Too Large',\r\n 414 => 'Request-URI Too Long',\r\n 415 => 'Unsupported Media Type',\r\n 416 => 'Requested Range Not Satisfiable',\r\n 417 => 'Expectation Failed',\r\n 500 => 'Internal Server Error',\r\n 501 => 'Not Implemented',\r\n 502 => 'Bad Gateway',\r\n 503 => 'Service Unavailable',\r\n 504 => 'Gateway Timeout',\r\n 505 => 'HTTP Version Not Supported'\r\n );\r\n\r\n return (isset($codes[$statusCode])) ? $codes[$statusCode] : '';\r\n }", "function formatStatus ($txt, $exit_code = 4)\n{\n\t$green = '#66bb6a';\n\t$red = '#f0666c';\n\t$orange = '#ffe57b';\n\t$grey = '#5f6268';\n\t$white = '#fff';\n\t\n\tif ($exit_code == 0)\n\t\t$output = '<span style=\"background-color:'. $green . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 1)\n\t\t$output = '<span style=\"background-color:'. $orange . '; color: ' . $grey . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 2)\n\t\t$output = '<span style=\"background-color:'. $red . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\telse\n\t\t$output = $txt;\n\n\treturn $output;\n}", "function httpStatusMessage ( $status )\n {\n # rfc2616-sec10\n $messages = array(\n // [Informational 1xx]\n 100=>'100 Continue',\n 101=>'101 Switching Protocols',\n // [Successful 2xx]\n 200=>'200 OK',\n 201=>'201 Created',\n 202=>'202 Accepted',\n 203=>'203 Non-Authoritative Information',\n 204=>'204 No Content',\n 205=>'205 Reset Content',\n 206=>'206 Partial Content',\n // [Redirection 3xx]\n 300=>'300 Multiple Choices',\n 301=>'301 Moved Permanently',\n 302=>'302 Found',\n 303=>'303 See Other',\n 304=>'304 Not Modified',\n 305=>'305 Use Proxy',\n 306=>'306 (Unused)',\n 307=>'307 Temporary Redirect',\n // [Client Error 4xx]\n 400=>'400 Bad Request',\n 401=>'401 Unauthorized',\n 402=>'402 Payment Required',\n 403=>'403 Forbidden',\n 404=>'404 Not Found',\n 405=>'405 Method Not Allowed',\n 406=>'406 Not Acceptable',\n 407=>'407 Proxy Authentication Required',\n 408=>'408 Request Timeout',\n 409=>'409 Conflict',\n 410=>'410 Gone',\n 411=>'411 Length Required',\n 412=>'412 Precondition Failed',\n 413=>'413 Request Entity Too Large',\n 414=>'414 Request-URI Too Long',\n 415=>'415 Unsupported Media Type',\n 416=>'416 Requested Range Not Satisfiable',\n 417=>'417 Expectation Failed',\n // [Server Error 5xx]\n 500=>'500 Internal Server Error',\n 501=>'501 Not Implemented',\n 502=>'502 Bad Gateway',\n 503=>'503 Service Unavailable',\n 504=>'504 Gateway Timeout',\n 505=>'505 HTTP Version Not Supported'\n );\n return isset($messages[$status])? $messages[$status] : null;\n }", "public function getStatusText()\n {\n return $this->statusText;\n }", "public function getStatusMessage();", "private function http_status_code_string($code, $include_code = false)\n {\n switch ($code) {\n // 1xx Informational\n case 100:\n $string = 'Continue';\n break;\n case 101:\n $string = 'Switching Protocols';\n break;\n case 102:\n $string = 'Processing';\n break; // WebDAV\n case 122:\n $string = 'Request-URI too long';\n break; // Microsoft\n\n // 2xx Success\n case 200:\n $string = 'OK';\n break;\n case 201:\n $string = 'Created';\n break;\n case 202:\n $string = 'Accepted';\n break;\n case 203:\n $string = 'Non-Authoritative Information';\n break; // HTTP/1.1\n case 204:\n $string = 'No Content';\n break;\n case 205:\n $string = 'Reset Content';\n break;\n case 206:\n $string = 'Partial Content';\n break;\n case 207:\n $string = 'Multi-Status';\n break; // WebDAV\n\n // 3xx Redirection\n case 300:\n $string = 'Multiple Choices';\n break;\n case 301:\n $string = 'Moved Permanently';\n break;\n case 302:\n $string = 'Found';\n break;\n case 303:\n $string = 'See Other';\n break; //HTTP/1.1\n case 304:\n $string = 'Not Modified';\n break;\n case 305:\n $string = 'Use Proxy';\n break; // HTTP/1.1\n case 306:\n $string = 'Switch Proxy';\n break; // Depreciated\n case 307:\n $string = 'Temporary Redirect';\n break; // HTTP/1.1\n\n // 4xx Client Error\n case 400:\n $string = 'Bad Request';\n break;\n case 401:\n $string = 'Unauthorized';\n break;\n case 402:\n $string = 'Payment Required';\n break;\n case 403:\n $string = 'Forbidden';\n break;\n case 404:\n $string = 'Not Found';\n break;\n case 405:\n $string = 'Method Not Allowed';\n break;\n case 406:\n $string = 'Not Acceptable';\n break;\n case 407:\n $string = 'Proxy Authentication Required';\n break;\n case 408:\n $string = 'Request Timeout';\n break;\n case 409:\n $string = 'Conflict';\n break;\n case 410:\n $string = 'Gone';\n break;\n case 411:\n $string = 'Length Required';\n break;\n case 412:\n $string = 'Precondition Failed';\n break;\n case 413:\n $string = 'Request Entity Too Large';\n break;\n case 414:\n $string = 'Request-URI Too Long';\n break;\n case 415:\n $string = 'Unsupported Media Type';\n break;\n case 416:\n $string = 'Requested Range Not Satisfiable';\n break;\n case 417:\n $string = 'Expectation Failed';\n break;\n case 422:\n $string = 'Unprocessable Entity';\n break; // WebDAV\n case 423:\n $string = 'Locked';\n break; // WebDAV\n case 424:\n $string = 'Failed Dependency';\n break; // WebDAV\n case 425:\n $string = 'Unordered Collection';\n break; // WebDAV\n case 426:\n $string = 'Upgrade Required';\n break;\n case 449:\n $string = 'Retry With';\n break; // Microsoft\n case 450:\n $string = 'Blocked';\n break; // Microsoft\n\n // 5xx Server Error\n case 500:\n $string = 'Internal Server Error';\n break;\n case 501:\n $string = 'Not Implemented';\n break;\n case 502:\n $string = 'Bad Gateway';\n break;\n case 503:\n $string = 'Service Unavailable';\n break;\n case 504:\n $string = 'Gateway Timeout';\n break;\n case 505:\n $string = 'HTTP Version Not Supported';\n break;\n case 506:\n $string = 'Variant Also Negotiates';\n break;\n case 507:\n $string = 'Insufficient Storage';\n break; // WebDAV\n case 509:\n $string = 'Bandwidth Limit Exceeded';\n break; // Apache\n case 510:\n $string = 'Not Extended';\n break;\n\n // Unknown code:\n default:\n $string = 'Unknown';\n break;\n }\n if ($include_code)\n return $code . ' ' . $string;\n return $string;\n }", "public function getStatusString()\n {\n return $this->statuses[$this->statusId];\n }", "public function getStatusText()\n {\n return $this->statusText;\n }", "function getStatusDescription($statusResponse) {\n if ($statusResponse == \"\" || $statusResponse == \"No Value Returned\") {\n $result = \"3DS not supported or there was no 3DS data provided\";\n } else {\n switch ($statusResponse) {\n Case \"Y\" : $result = \"The cardholder was successfully authenticated.\"; break;\n Case \"E\" : $result = \"The cardholder is not enrolled.\"; break;\n Case \"N\" : $result = \"The cardholder was not verified.\"; break;\n Case \"U\" : $result = \"The cardholder's Issuer was unable to authenticate due to some system error at the Issuer.\"; break;\n Case \"F\" : $result = \"There was an error in the format of the request from the merchant.\"; break;\n Case \"A\" : $result = \"Authentication of your Merchant ID and Password to the ACS Directory Failed.\"; break;\n Case \"D\" : $result = \"Error communicating with the Directory Server.\"; break;\n Case \"C\" : $result = \"The card type is not supported for authentication.\"; break;\n Case \"S\" : $result = \"The signature on the response received from the Issuer could not be validated.\"; break;\n Case \"P\" : $result = \"Error parsing input from Issuer.\"; break;\n Case \"I\" : $result = \"Internal Payment Server system error.\"; break;\n default : $result = \"Unable to be determined\"; break;\n }\n }\n return $result;\n }", "function get_status_header_desc( $code ) {\n\t\tstatic $wp_header_to_desc;\n\n\t\tif ( !isset( $wp_header_to_desc ) ) {\n\t\t\t$wp_header_to_desc = array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t102 => 'Processing',\n\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t207 => 'Multi-Status',\n\t\t\t\t226 => 'IM Used',\n\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => 'Reserved',\n\t\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t422 => 'Unprocessable Entity',\n\t\t\t\t423 => 'Locked',\n\t\t\t\t424 => 'Failed Dependency',\n\t\t\t\t426 => 'Upgrade Required',\n\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t\t507 => 'Insufficient Storage',\n\t\t\t\t510 => 'Not Extended'\n\t\t\t);\n\t\t}\n\n\t\tif ( isset( $wp_header_to_desc[$code] ) )\n\t\t\treturn $wp_header_to_desc[$code];\n\t\telse\n\t\t\treturn '';\n\t}", "static function Response($code) {\n\t\treturn 'HTTP/' . Http::VERSION . ' ' . Http::$codes[$code];\n\t}", "public function getStatusText()\n {\n return $this->statusText;\n }", "function statusCaption($status) {\n\t\tswitch($status) {\n\t\t\tcase KontakteData::$STATUS_ADMIN: return \"Administrator\";\n\t\t\tcase KontakteData::$STATUS_MEMBER: return \"Mitglied\";\n\t\t\tcase KontakteData::$STATUS_EXTERNAL: return \"Externer Mitspieler\";\n\t\t\tcase KontakteData::$STATUS_APPLICANT: return \"Bewerber\";\n\t\t\tdefault: return \"Sonstiger Kontakt\";\n\t\t}\n\t}", "public function getStatusColorText()\n {\n $status = $this->status;\n $list = self::getStatusOption();\n\n $color = 'default';\n if ($status == self::STATUS_NEW) {\n $color = 'info';\n }\n if ($status == self::STATUS_USED) {\n $color = 'default';\n }\n if ($status == self::STATUS_DONE) {\n $color = 'primary';\n }\n if ($status == self::STATUS_UNCONFIRMED) {\n $color = 'warning';\n }\n\n if (!empty($status) && in_array($status, array_keys($list))) {\n return '<span class=\"label label-' . $color . '\">' . $list[$status] . '</span>';\n }\n return '<span class=\"label label-' . $color . '\">' . Yii::$app->getModule('billing')->t('Unknown') . '</span>';\n }", "public static function getStatusMessageByCode($statusCode): string\n {\n $statusMessages = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing', // RFC 2518\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'Sono Vibiemme',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n ];\n\n return isset($statusMessages[$statusCode]) ? $statusMessages[$statusCode] : 'Unknown Status';\n }", "public function getStatusCodeMsg(): string\r\n {\r\n return $this->_statusCodeMsg;\r\n }", "public function getFirstResponseStatus(): string\n {\n $responseStatus = $this->getAllHeaders()[0] ?? '';\n\n //200 OK, protocol signature varies, HTTP 1.1/1.0, etc.\n if (preg_match('/200 OK/i', $responseStatus) === 1) {\n return self::STATUS_OK;\n }\n\n if (preg_match('/404 Not Found/i', $responseStatus) === 1) {\n return self::STATUS_NOT_FOUND;\n }\n\n return self::STATUS_OTHER;\n }", "public function getReasonPhrase() : string\n {\n return $this->reasonPhrase ?? Response::CODE_LIST[$this->getStatusCode()];\n }", "function statusToString($status = null) {\n\t\tif(!is_null($status)) {\n\t\t\t$all_status = array(\n\t\t\t\t0 => 'Unknown',\n\t\t\t\t1 => 'Delivered',\n\t\t\t\t2 => 'Failed',\n\t\t\t\t4 => 'Buffered',\n\t\t\t\t8 => 'Submitted to SMSC',\n\t\t\t\t16 => 'Failed at SMSC',\n\t\t\t\t32 => 'Intermediary update'\n\t\t\t);\n\t\t\t\n\t\t\t$status = (int)$status;\n\t\t\t\n\t\t\tif(isset($all_status[$status])) {\n\t\t\t\treturn $all_status[$status];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn \"Unknown\";\n\t}", "function displayCSCResponse($cscResultCode) {\n\n if ($cscResultCode != \"\") {\n switch ($cscResultCode) {\n Case \"Unsupported\" : $result = \"CSC not supported or there was no CSC data provided\"; break;\n Case \"M\" : $result = \"Exact code match\"; break;\n Case \"S\" : $result = \"Merchant has indicated that CSC is not present on the card (MOTO situation)\"; break;\n Case \"P\" : $result = \"Code not processed\"; break;\n Case \"U\" : $result = \"Card issuer is not registered and/or certified\"; break;\n Case \"N\" : $result = \"Code invalid or not matched\"; break;\n default : $result = \"Unable to be determined\"; break;\n }\n } else {\n $result = \"null response\";\n }\n return $result;\n }", "public function getStatusText()\r\n {\r\n return $this->status_text;\r\n }", "public function status_label(){\n\t\t$label='';\n\t\t\tswitch($this->status){\n\t\t\t\tCASE '1' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '2' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '3' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '4' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '5' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '6' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '7' : $label = 'label-warning';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '8' : $label = 'label-danger';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '9' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tCASE '11' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '15' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\treturn $label;\n\t}", "protected function getStatus()\n {\n switch (true) {\n case ($this->code >= self::HTTP_OK and $this->code < self::HTTP_MULTIPLE_CHOICES):\n $status = 'success';\n break;\n case ($this->code >= self::HTTP_BAD_REQUEST and $this->code < self::HTTP_INTERNAL_SERVER_ERROR):\n $status = 'fail';\n break;\n default:\n $status = 'error';\n break;\n }\n\n return $status;\n }", "private function returnCodeMessage(int $code): string {\n $codes = [\n 211 => 'System status, or system help reply',\n 214 => 'Help message (A response to the HELP command)',\n 220 => '<domain> Service ready',\n 221 => '<domain> Service closing transmission channel',\n 235 => 'Authentication succeeded',\n 250 => 'Requested mail action okay, completed',\n 251 => 'User not local; will forward',\n 252 => 'Cannot verify the user, but it will try to deliver the message anyway',\n 334 => '(Server challenge - the text part contains the Base64-encoded challenge)',\n 354 => 'Start mail input',\n 421 => 'Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down)',\n 432 => 'A password transition is needed',\n 450 => 'Requested mail action not taken: mailbox unavailable (e.g., mailbox busy or temporarily blocked for policy reasons)',\n 451 => 'Requested action aborted: local error in processing / IMAP server unavailable',\n 452 => 'Requested action not taken: insufficient system storage',\n 454 => 'Temporary authentication failure',\n 455 => 'Server unable to accommodate parameters',\n 500 => 'Syntax error, command unrecognized (This may include errors such as command line too long) / Authentication Exchange line is too long',\n 501 => 'Syntax error in parameters or arguments / Cannot Base64-decode Client responses / Client initiated Authentication Exchange (only when the SASL mechanism specified that client does not begin the authentication exchange)',\n 502 => 'Command not implemented',\n 503 => 'Bad sequence of commands',\n 504 => 'Command parameter is not implemented / Unrecognized authentication type',\n 521 => 'Server does not accept mail',\n 523 => 'Encryption Needed',\n 530 => 'Authentication required',\n 534 => 'Authentication mechanism is too weak',\n 535 => 'Authentication credentials invalid',\n 538 => 'Encryption required for requested authentication mechanism',\n 550 => 'Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons)',\n 551 => 'User not local; please try <forward-path>',\n 552 => 'Requested mail action aborted: exceeded storage allocation',\n 553 => 'Requested action not taken: mailbox name not allowed',\n 554 => 'Transaction has failed (Or, in the case of a connection-opening response, \"No SMTP service here\") / Message too big for system',\n 556 => 'Domain does not accept mail',\n ];\n return $codes[$code] ?? '';\n }", "public function message(int $status): string\n {\n }", "function set_status_header(int $p_code = 200, string $p_text = '') {\n if (flcCommon::is_cli()) {\n return;\n }\n\n /* if (empty($p_code) or !is_numeric($p_code)) {\n $p_text = 'Status code must be numeric';\n $p_code = 500;\n }*/\n\n if (empty($p_text)) {\n is_int($p_code) or $p_code = (int)$p_code;\n\n if (isset(self::$status_codes[$p_code])) {\n $p_text = self::$status_codes[$p_code];\n } else {\n $p_text = '(null)';\n $p_code = 500;\n }\n }\n\n if (strpos(PHP_SAPI, 'cgi') === 0) {\n header('Status: '.$p_code.' '.$p_text, true);\n } else {\n header($this->get_protocol_version().' '.$p_code.' '.$p_text, true, $p_code);\n }\n }", "public static function getStatusText($status)\n {\n switch ($status) {\n case '1':\n return 'Отображается';\n break;\n case '0':\n return 'Скрыта';\n break;\n }\n }", "function error($code) {\n\tswitch ($code) {\n\t\tcase 'EntityExists':\n\t\t\t$str = 'Cannot complete that action because the entity already exists';\n\t\t\tbreak;\n\t\tcase 'EntityDoesNotExist':\n\t\t\t$str = 'Cannot complete that action because that entity does not exist';\n\t\t\tbreak;\n\t\tcase 'InvalidPassword':\n\t\t\t$str = 'The password supplied is not valid';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = $code;\n\t}\n\treturn $str;\n}", "public function getStatusDescription($status = 0){\r\n\t\t$retval=\"gray.gif\";\r\n\t\t\r\n\t\tif($status == 0){\r\n\t\t\t$status = $this->status;\r\n\t\t}\r\n\t\t\r\n\t\tswitch ($status) {\r\n\t\t\tcase 1: $retval = \"Angelegt\";break;\r\n\t\t\tcase 2: $retval = \"Gesendet u. Bestellt\";break;\r\n\t\t\tcase 3: $retval = \"In Bearbeitung\";break;\r\n\t\t\tcase 4: $retval = \"Fertig u. im Versand\";break;\r\n\t\t\tcase 5: $retval = \"Fertig u. Abholbereit\";break;\r\n\t\t\tdefault: $retval=\"...\";\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "public function getHttpStatusMessage()\r\n\t{\r\n\t return $this->_solrResponse->getHttpStatusMessage();\r\n\t}", "public function get_status_text($status)\n\t{\n\t\tif($status == 1)\n\t\t{\n\t\t\t$status_text = 'Active';\n\t\t}\n\t\telseif($status == 0)\n\t\t{\n\t\t\t$status_text = 'Inactive';\n\t\t}\n\t\treturn $status_text;\n\t}", "public function status(int $code);", "public function getMessage($response_code = null)\n {\n if (is_null($response_code)) {\n $response_code = $this->getCode();\n }\n\n return HTTP::$statusTexts[$response_code];\n }", "public function render()\n {\n return view('request-logs::components.status-code');\n }", "public static function strerror($status) {\n return \"\";\n }", "public function getStatusDescricao() \n {\n switch ($this->status) {\n case self::SEM_NEGOCIACAO:\n return '<span class=\"label label-warning\">Sem Neg.</span>';\n break;\n case self::EM_NEGOCIACAO:\n return '<span class=\"label label-info\">Em Neg.</span>';\n break;\n }\n }", "public function getStatusMessage()\n\t{\n\t\t$actionPhrase = 'Deleting';\n\t\t$typePhrase = 'Add-on data';\n\n\t\t$currentType = ucfirst(str_replace('_', ' ', $this->currentType));\n\n\t\t if ($currentType)\n\t\t{\n\t\t\treturn sprintf('%s... %s (%s)', $actionPhrase, $typePhrase, $currentType);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn sprintf('%s... %s', $actionPhrase, $typePhrase);\n\t\t}\n\t}", "function sendHttpStatus($code) \n {\n\t\tstatic $_status = array(\n\t\t\t// Informational 1xx\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\n\t\t\t// Success 2xx\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\n\t\t\t// Redirection 3xx\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found', // 1.1\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t// 306 is deprecated but reserved\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t// Client Error 4xx\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\n\t\t\t// Server Error 5xx\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(isset($_status[$code])) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}", "public function StatusLabel()\n {\n $html = DBHTMLText::create();\n\n if (strpos($this->Status, FlowStatus::COMPLETED) !== false) {\n $html->setValue('<span style=\"color: #449d44;\">' . $this->Status . '</span>');\n } elseif (strpos($this->Status, FlowStatus::FAILED) !== false) {\n $html->setValue('<span style=\"color: #ff0000;\">' . $this->Status . '</span>');\n } else {\n $html->setValue('<span style=\"color: #ec971f;\">' . $this->Status . '</span>');\n }\n\n return $html;\n }", "public static function getHttpStatusMessage(object $errorCode): string\n {\n $httpMessages = [\n // 1xx informational response\n 100 => 'HTTP_CONTINUE',\n 101 => 'HTTP_SWITCHING_PROTOCOLS',\n 102 => 'HTTP_PROCESSING',\n 103 => 'HTTP_EARLY_HINTS',\n // 2xx success\n 200 => 'HTTP_OK',\n 201 => 'HTTP_CREATED',\n 202 => 'HTTP_ACCEPTED',\n 203 => 'HTTP_NON_AUTHORITATIVE_INFORMATION',\n 204 => 'HTTP_NO_CONTENT',\n 205 => 'HTTP_RESET_CONTENT',\n 206 => 'HTTP_PARTIAL_CONTENT',\n 207 => 'HTTP_MULTI_STATUS',\n 208 => 'HTTP_ALREADY_REPORTED',\n 226 => 'HTTP_IM_USED',\n // 3xx redirection\n 300 => 'HTTP_MULTIPLE_CHOICES',\n 301 => 'HTTP_MOVED_PERMANENTLY',\n 302 => 'HTTP_FOUND',\n 303 => 'HTTP_SEE_OTHER',\n 304 => 'HTTP_NOT_MODIFIED',\n 305 => 'HTTP_USE_PROXY',\n 306 => 'HTTP_SWITCH_PROXY',\n 307 => 'HTTP_TEMPORARY_REDIRECT',\n 308 => 'HTTP_PERMANENT_REDIRECT',\n // 4xx client errors\n 400 => 'HTTP_BAD_REQUEST',\n 401 => 'HTTP_UNAUTHORIZED',\n 402 => 'HTTP_PAYMENT_REQUIRED',\n 403 => 'HTTP_FORBIDDEN',\n 404 => 'HTTP_NOT_FOUND',\n 405 => 'HTTP_METHOD_NOT_ALLOWED',\n 406 => 'HTTP_NOT_ACCEPTABLE',\n 407 => 'HTTP_PROXY_AUTHENTICATION_REQUIRED',\n 408 => 'HTTP_REQUEST_TIMEOUT',\n 409 => 'HTTP_CONFLICT',\n 410 => 'HTTP_GONE',\n 411 => 'HTTP_LENGTH_REQUIRED',\n 412 => 'HTTP_PRECONDITION_FAILED',\n 413 => 'HTTP_PAYLOAD_TOO_LARGE',\n 414 => 'HTTP_URI_TOO_LONG',\n 415 => 'HTTP_UNSUPPORTED_MEDIA_TYPE',\n 416 => 'HTTP_RANGE_NOT_SATISFIABLE',\n 417 => 'HTTP_EXPECTATION_FAILED',\n 418 => 'HTTP_IM_A_TEAPOT',\n 421 => 'HTTP_MISIDRECTED_REQUEST',\n 422 => 'HTTP_UNPROCESSABLE_ENTITY',\n 423 => 'HTTP_LOCKED',\n 424 => 'HTTP_FAILED_DEPENDENCY',\n 425 => 'HTTP_TOO_EARLY',\n 426 => 'HTTP_UPGRADE_REQUIRED',\n 428 => 'HTTP_PRECONDITION_REQUIRED',\n 429 => 'HTTP_TOO_MANY_REQUESTS',\n 431 => 'HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE',\n 451 => 'HTTP_UNAVIALBLE_FOR_LEGAL_REASONS',\n // 5xx server errors\n 500 => 'HTTP_INTERNAL_SERVER_ERROR',\n 501 => 'HTTP_NOT_IMPLEMENTED',\n 502 => 'HTTP_BAD_GATEWAY',\n 503 => 'HTTP_SERVICE_UNAVAILABLE',\n 504 => 'HTTP_GATEWAY_TIMEOUT',\n 505 => 'HTTP_VERSION_NOT_SUPPORTED',\n 506 => 'HTTP_VARIANT_ALSO_NEGOTIATES',\n 507 => 'HTTP_INSUFFICIENT_STORAGE',\n 508 => 'HTTP_LOOP_DETECTED',\n 510 => 'HTTP_NOT_EXTENDED',\n 511 => 'HTTP_NETWORK_AUTHENTICATION_REQUIRED',\n // 9xx fallback\n 999 => 'HTTP_UNKNOWN_STATUS',\n ];\n\n if (array_key_exists($errorCode->getStatusCode(), $httpMessages)) {\n return $httpMessages[$errorCode->getStatusCode()];\n }\n\n return '';\n }", "public function getStatusText()\n {\n return 'entity.organization.field.status.' . $this->status;\n }", "public static function http_code( $code = null ) {\n\t\t// -- Check if a status code was defined\n\t\tif( $code !== null ) {\n\n\t\t\t// -- Get the proper HTTP status code\n\t\t\tswitch( $code ) {\n\t\t\t\tcase 100: $text = 'Continue'; break;\n\t\t\t\tcase 101: $text = 'Switching Protocols'; break;\n\t\t\t\tcase 200: $text = 'OK'; break;\n\t\t\t\tcase 201: $text = 'Created'; break;\n\t\t\t\tcase 202: $text = 'Accepted'; break;\n\t\t\t\tcase 203: $text = 'Non-Authoritative Information'; break;\n\t\t\t\tcase 204: $text = 'No Content'; break;\n\t\t\t\tcase 205: $text = 'Reset Content'; break;\n\t\t\t\tcase 206: $text = 'Partial Content'; break;\n\t\t\t\tcase 300: $text = 'Multiple Choices'; break;\n\t\t\t\tcase 301: $text = 'Moved Permanently'; break;\n\t\t\t\tcase 302: $text = 'Moved Temporarily'; break;\n\t\t\t\tcase 303: $text = 'See Other'; break;\n\t\t\t\tcase 304: $text = 'Not Modified'; break;\n\t\t\t\tcase 305: $text = 'Use Proxy'; break;\n\t\t\t\tcase 400: $text = 'Bad Request'; break;\n\t\t\t\tcase 401: $text = 'Unauthorized'; break;\n\t\t\t\tcase 402: $text = 'Payment Required'; break;\n\t\t\t\tcase 403: $text = 'Forbidden'; break;\n\t\t\t\tcase 404: $text = 'Not Found'; break;\n\t\t\t\tcase 405: $text = 'Method Not Allowed'; break;\n\t\t\t\tcase 406: $text = 'Not Acceptable'; break;\n\t\t\t\tcase 407: $text = 'Proxy Authentication Required'; break;\n\t\t\t\tcase 408: $text = 'Request Time-out'; break;\n\t\t\t\tcase 409: $text = 'Conflict'; break;\n\t\t\t\tcase 410: $text = 'Gone'; break;\n\t\t\t\tcase 411: $text = 'Length Required'; break;\n\t\t\t\tcase 412: $text = 'Precondition Failed'; break;\n\t\t\t\tcase 413: $text = 'Request Entity Too Large'; break;\n\t\t\t\tcase 414: $text = 'Request-URI Too Large'; break;\n\t\t\t\tcase 415: $text = 'Unsupported Media Type'; break;\n\t\t\t\tcase 500: $text = 'Internal Server Error'; break;\n\t\t\t\tcase 501: $text = 'Not Implemented'; break;\n\t\t\t\tcase 502: $text = 'Bad Gateway'; break;\n\t\t\t\tcase 503: $text = 'Service Unavailable'; break;\n\t\t\t\tcase 504: $text = 'Gateway Time-out'; break;\n\t\t\t\tcase 505: $text = 'HTTP Version not supported'; break;\n\t\t\t\tdefault:\n\t\t\t\t\texit( 'Unknown http status code \"' . htmlentities( $code ) . '\"' );\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$protocol = ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' );\n\n\t\t\theader($protocol . ' ' . $code . ' ' . $text);\n\n\t\t\t$GLOBALS[ 'http_response_code' ] = $code;\n\n\t\t} else {\n\t\t\t$code = ( isset( $GLOBALS[ 'http_response_code' ] ) ? $GLOBALS[ 'http_response_code' ] : 200 );\n\t\t}\n\n\t\treturn $code;\n\t}", "public function getHttpStatusMessage() {\n\t}", "public function getMessage() {\n return $this->getStatus();\n }", "protected function status( $status )\n\t{\n\t\techo $status . PHP_EOL;\n\t}", "function status_header($code = 200) {\n $message = [\n 200 => \"OK\",\n 404 => \"Page not found\",\n 302 => \"Moved temporarily\",\n 303 => \"Something something\",\n 500 => \"Server error\"\n ];\n header(\"HTTP/1.0 \".$code.\" \".$message[$code]);\n}", "function formatStatus($status)\n{\n\tswitch ($status)\n\t{\n\t\tcase 'Active':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Active</span>\";\n\n\t\tcase 'Inactive':\n\t\t\treturn \"<span class=\\\"label\\\">Inactive</span>\";\n\n\t\tcase 'Suspended':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Suspended</span>\";\n\n\t\tcase 'Pending':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Pending</span>\";\n\n\t\tcase 'Online':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Online</span>\";\n\n\t\tcase 'Offline':\n\t\t\treturn \"<span class=\\\"label label-important\\\">Offline</span>\";\n\n\t\tcase 'Started':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Started</span>\";\n\n\t\tcase 'Stopped':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Stopped</span>\";\n\n\t\tdefault:\n\t\t\treturn \"<span class=\\\"label\\\">Default</span>\";\n\t}\n}", "public function errorString($code) {\n \n if(!is_numeric($code)) {\n return false;\n }\n\n $code = (int)$code;\n \n switch($code) {\n case 0: \n return \"Operation was successful\";\n case 247: \n return \"The userid provided is absent, or incorrect\";\n case 250: \n return \"The provided userid and/or Oauth credentials do not match\";\n case 286: \n return \"No such subscription was found\";\n case 293: \n return \"The callback URL is either absent or incorrect\";\n case 294: \n return \"No such subscription could be deleted\";\n case 304: \n return \"The comment is either absent or incorrect\";\n case 305: \n return \"Too many notifications are already set\";\n case 342: \n return \"The signature (using Oauth) is invalid\";\n case 343: \n return \"Wrong Notification Callback Url don't exist\";\n case 601: \n return \"Too Many Request\";\n case 2554: \n return \"Wrong action or wrong webservice\";\n case 2555: \n return \"An unknown error occurred\";\n case 2556: \n return \"Service is not defined\";\n }\n \n return false;\n }", "function set_status_header($code = 200, $text = '') {\n $stati = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n if ($code == '' OR !is_numeric($code)) {\n show_error('Status codes must be numeric', 500);\n }\n\n if (isset($stati[$code]) AND $text == '') {\n $text = $stati[$code];\n }\n\n if ($text == '') {\n show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n }\n\n $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n if (substr(php_sapi_name(), 0, 3) == 'cgi') {\n header(\"Status: {$code} {$text}\", TRUE);\n }\n elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') {\n header($server_protocol . \" {$code} {$text}\", TRUE, $code);\n }\n else {\n header(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n }\n}", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "public static function translateStatus($code, $status) {\n\t\tif ($code === -1) {\n\t\t\treturn 'Waiting..';\n\t\t} else {\n\t\t\treturn $status;\n\t\t}\n\t}", "public function get_status_text() {\n $text = strtr( $this->get_status(), yith_wcbk_get_booking_statuses() );\n\n return $text;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "function getStatusCode();", "public static function getLekabStatusDesc($code)\n {\n switch (intval($code)) {\n case 0:\n return \"Queued for delivery\";\n case 1:\n return \"Sent to operator\";\n case 2:\n return \"Delivered to the mobile station\";\n case 3:\n return \"The message was deleted\";\n case 4:\n return \"The message has expired\";\n case 5:\n return \"The message was rejected by the operator\";\n case 6:\n return \"The message could not be delivered\";\n case 7:\n return \"The message was accepted by the operator\";\n case 8:\n return \"The subscribers mobile station is switched off\";\n case 9:\n return \"The subscriber is not known\";\n case 10:\n return \"The destination address is invalid\";\n case 11:\n return \"The mobile station can not receive the message\";\n case 12:\n return \"The status of the message is unknown\";\n case 13:\n return \"Internal error when sending the message\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "function getStatusMessage() \r\n\t{\r\n\t\treturn $this->replyString;\r\n\t}", "function get_reason($status) {\n $reason = array(\n 100 => 'Continue', 'Switching Protocols',\n 200 => 'OK', 'Created', 'Accepted', 'Non-Authoritative Information',\n 'No Content', 'Reset Content', 'Partial Content',\n 300 => 'Multiple Choices', 'Moved Permanently', 'Found', 'See Other',\n 'Not Modified', 'Use Proxy', '(Unused)', 'Temporary Redirect',\n 400 => 'Bad Request', 'Unauthorized', 'Payment Required','Forbidden',\n 'Not Found', 'Method Not Allowed', 'Not Acceptable',\n 'Proxy Authentication Required', 'Request Timeout', 'Conflict',\n 'Gone', 'Length Required', 'Precondition Failed',\n 'Request Entity Too Large', 'Request-URI Too Long',\n 'Unsupported Media Type', 'Requested Range Not Satisfiable',\n 'Expectation Failed',\n 500 => 'Internal Server Error', 'Not Implemented', 'Bad Gateway',\n 'Service Unavailable', 'Gateway Timeout',\n 'HTTP Version Not Supported');\n\n return isset($reason[$status]) ? $reason[$status] : '';\n }", "function status_header($code, $description = '')\n {\n }", "public function __toString()\n {\n $output = array();\n foreach ($this->_data as $status) {\n $output[] = '\"' . $status->getCode() . '\" -- \"' . $status->getMessage() . '\"';\n }\n return join(\"<br />\\n\", $output);\n }" ]
[ "0.7506552", "0.7321025", "0.729413", "0.7290866", "0.72608757", "0.7221579", "0.71758646", "0.7171435", "0.71649677", "0.7164495", "0.7137803", "0.7107865", "0.7096242", "0.7071205", "0.70693594", "0.70468587", "0.70388913", "0.70349115", "0.7030915", "0.7017728", "0.7000248", "0.6968886", "0.6968848", "0.6968509", "0.69517875", "0.6941875", "0.6935812", "0.6904154", "0.6872453", "0.68600255", "0.6831491", "0.6816695", "0.67999923", "0.679427", "0.67908996", "0.6788251", "0.67881423", "0.6782158", "0.67756444", "0.67637223", "0.6757928", "0.6755348", "0.6752543", "0.67482364", "0.6746891", "0.6744717", "0.67445225", "0.6739271", "0.6733461", "0.6732139", "0.6716311", "0.669216", "0.66789204", "0.6662396", "0.6649646", "0.6644043", "0.66371185", "0.6630683", "0.6615327", "0.66133314", "0.6597689", "0.65499336", "0.6545368", "0.65442306", "0.65338933", "0.653375", "0.65201294", "0.65166324", "0.6507622", "0.65072864", "0.64952195", "0.6476225", "0.646526", "0.6463874", "0.6460328", "0.6456025", "0.64483005", "0.64334893", "0.6430057", "0.6422172", "0.6421293", "0.64210016", "0.6418601", "0.6417853", "0.641414", "0.64110243", "0.6406798", "0.6394301", "0.63916886", "0.6377567", "0.6376829", "0.6376829", "0.6376829", "0.6376829", "0.6374692", "0.6372845", "0.6359128", "0.6355364", "0.6351633", "0.63438576" ]
0.6645673
55
Returns the appropriate string to display based on the status code
public function statusButton() { $code = $this->status['code']; if ($code === '0'){ return '<div class="status-button s'.$code.'">Closed</div>'; }else if($code === '1'){ return '<div class="status-button s'.$code.'">On Hold</div>'; }else if($code === '2'){ return '<div class="status-button s'.$code.'">Open</div>'; }else if($code === '3'){ $openingDate = ($this->status['openingdate'] === '') ? 'soon' : date("j M", strtotime($this->status['openingdate'])); return '<div class="status-button s'.$code.'">Opening '.$openingDate.'</div>'; }else if($code === '4'){ return '<div class="status-button s'.$code.'">Closed <span>For Season</span></div>'; }else if($code === '5'){ $updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date("g:ia", strtotime($this->status['updatetime'])); return '<div class="status-button s'.$code.'">Delayed Opening</div> <div class="estimate">'.$updateTime.'</div>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getStatusMessage(){\n\t\t$status = array(\n\t\t\t\t100 => 'Continue', \n\t\t\t\t101 => 'Switching Protocols', \n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created', \n\t\t\t\t202 => 'Accepted', \n\t\t\t\t203 => 'Non-Authoritative Information', \n\t\t\t\t204 => 'No Content', \n\t\t\t\t205 => 'Reset Content', \n\t\t\t\t206 => 'Partial Content', \n\t\t\t\t300 => 'Multiple Choices', \n\t\t\t\t301 => 'Moved Permanently', \n\t\t\t\t302 => 'Found', \n\t\t\t\t303 => 'See Other', \n\t\t\t\t304 => 'Not Modified', \n\t\t\t\t305 => 'Use Proxy', \n\t\t\t\t306 => '(Unused)', \n\t\t\t\t307 => 'Temporary Redirect', \n\t\t\t\t400 => 'Bad Request', \n\t\t\t\t401 => 'Unauthorized', \n\t\t\t\t402 => 'Payment Required', \n\t\t\t\t403 => 'Forbidden', \n\t\t\t\t404 => 'Not Found', \n\t\t\t\t405 => 'Method Not Allowed', \n\t\t\t\t406 => 'Not Acceptable', \n\t\t\t\t407 => 'Proxy Authentication Required', \n\t\t\t\t408 => 'Request Timeout', \n\t\t\t\t409 => 'Conflict', \n\t\t\t\t410 => 'Gone', \n\t\t\t\t411 => 'Length Required', \n\t\t\t\t412 => 'Precondition Failed', \n\t\t\t\t413 => 'Request Entity Too Large', \n\t\t\t\t414 => 'Request-URI Too Long', \n\t\t\t\t415 => 'Unsupported Media Type', \n\t\t\t\t416 => 'Requested Range Not Satisfiable', \n\t\t\t\t417 => 'Expectation Failed', \n\t\t\t\t500 => 'Internal Server Error', \n\t\t\t\t501 => 'Not Implemented', \n\t\t\t\t502 => 'Bad Gateway', \n\t\t\t\t503 => 'Service Unavailable', \n\t\t\t\t504 => 'Gateway Timeout', \n\t\t\t\t505 => 'HTTP Version Not Supported');\n\t\treturn ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n\t}", "function _getStatusMessage(){\n $status = array(\n 200 => 'Ok' ,\n 201 => 'Created' ,\n 202 => 'deleted' ,\n 204 => 'No Content' ,\n 400 => 'Bad Request',\n 404 => 'Not Found' ,\n 405 => 'Not Allowed' ,\n 406 => 'Not Acceptable',\n\n );\n return ($status[$this->CodeHTTP] ? $status[$this->CodeHTTP] : $status[500]);\n }", "public function getStatusMessage($statusCode)\n {\n switch ($statusCode) {\n case 100:\n return 'Continue';\n case 101:\n return 'Switching Protocols';\n case 200:\n return 'OK';\n case 201:\n return 'Created';\n case 202:\n return 'Accepted';\n case 203:\n return 'Non-Authoritative Information';\n case 204:\n return 'No Content';\n case 205:\n return 'Reset Content';\n case 206:\n return 'Partial Content';\n case 300:\n return 'Multiple Choices';\n case 301:\n return 'Moved Permanently';\n case 302:\n return 'Found';\n case 303:\n return 'See Other';\n case 304:\n return 'Not Modified';\n case 305:\n return 'Use Proxy';\n case 306:\n return '(Unused)';\n case 307:\n return 'Temporary Redirect';\n case 400:\n return 'Bad Request';\n case 401:\n return 'Unauthorized';\n case 402:\n return 'Payment Required';\n case 403:\n return 'Forbidden';\n case 404:\n return 'Not found';\n case 405:\n return 'Method Not Allowed';\n case 406:\n return 'Not Acceptable';\n case 407:\n return 'Proxy Authentication Required';\n case 408:\n return 'Request Timeout';\n case 409:\n return 'Conflict';\n case 410:\n return 'Gone';\n case 411:\n return 'Length Required';\n case 412:\n return 'Precondition Failed';\n case 413:\n return 'Request Entity Too Large';\n case 414:\n return 'Request-URI Too Long';\n case 415:\n return 'Unsupported Media Type';\n case 416:\n return 'Requested Range Not Satisfiable';\n case 417:\n return 'Expectation Failed';\n case 500:\n return 'Internal Server Error';\n case 501:\n return 'Not Implemented';\n case 502:\n return 'Bad Gateway';\n case 503:\n return 'Service Unavailable';\n case 504:\n return 'Gateway Timeout';\n case 505:\n return 'HTTP Version Not Supported';\n default:\n return '';\n }\n }", "public function getReasonPhrase(): string\n {\n return StatusCode::MESSAGES_MAP[$this->status];\n }", "private static function _getStatusCodeMessage($status)\n {\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public function _getStatusCodeMessage($status) {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Oops! Something has gone wrong and the page you were looking for could not be found! Try the <a href=\"\" class=\"color-blue\">home page.</a>',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => \"We're sorry because something went wrong, please try again!\",\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n );\n return (isset($codes[$status])) ? $codes[$status] : 'Unknown Result';\n }", "private function _getStatusCodeMessage($status = 100)\n {\n return (isset($this->codes[$status])) ? $this->codes[$status] : '';\n }", "public static function getStatusCodeMessage($status)\n {\n// via parse_ini_file()... however, this will suffice\n// for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "private function _getStatusCodeMessage($status){\n\t\t// via parse_ini_file()... however, this will suffice\n\t\t// for an example\n\t\t$codes = Array(\n\t\t\t200 => 'OK',\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t);\n\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t}", "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "public function getStatusAsString(){\r\n $list = self::getStatusList();\r\n if (isset($list[$this->status]))\r\n return $list[$this->status];\r\n \r\n return 'Unknown';\r\n }", "private function _getStatusCodeMessage($status)\n{\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public static function get_status_code_message($status)\n {\n $codes = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 301 => 'Moved Permanently',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "private function send_status()\n {\n switch ($this->_status) \n {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($this->_status) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n\n header($protocol . ' ' . $this->_status . ' ' . $text);\n }", "private function _getStatusCodeMessage($status)\n {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "public function printStatus()\n {\n switch ($this->status) {\n case $this::STATUS_INACTIVE:\n return \\Yii::t('app', 'Inactive');\n break;\n case $this::STATUS_ACTIVE_LOCKED:\n return \\Yii::t('app', 'Locked');\n break;\n case $this::STATUS_ACTIVE_UNLOCKED:\n return \\Yii::t('app', 'Unlocked');\n break;\n }\n\n return \\Yii::t('app', 'Unknown status');\n }", "public static function getStatusMessage()\n {\n switch(self::status())\n {\n case 'PLEXCEL_NO_CREDS':\n return \"no creds\";\n break;\n case 'PLEXCEL_PRINCIPAL_UNKNOW':\n return \"principal unknow\";\n break;\n case 'PLEXCEL_LOGON_FAILED':\n return \"logon failed\";\n break;\n default:\n return \"error :\".self::status();\n }\n }", "public static function getStatusCodeMessage($status)\n\t\t{\n\t\t\t// via parse_ini_file()... however, this will suffice\n\t\t\t// for an example\n\t\t\t$codes = Array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => '(Unused)',\n\t\t\t\t307 => 'Temporary Redirect',\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t600 => 'OK',\n\t\t\t\t601 => 'Bad request',\n\t\t\t\t602 => 'You must be authorized to view this page.',\n\t\t\t\t603 => 'The requested URL ' . $_SERVER['REQUEST_URI'] . ' was not found.',\n\t\t\t\t604 => 'The server encountered an error processing your request.',\n\t\t\t\t605 => 'The requested method is not implemented.',\n\t\t\t\t606 => 'You have exceeded api call limit for the hour',\n\t\t\t\t607 => 'You have exceeded api call limit for the day'\n\t\t\t);\n\t\n\t\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t\t}", "function http_status_code($code, $message = \"\") {\n\n if (!empty($code)) {\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n \n // Append the content if not empty\n if (!empty($message)) $message = \" - \" . $message;\n\n header($protocol . ' ' . $code . ' ' . $text . \"$message\");\n\n $GLOBALS['http_status_code'] = $code;\n\n } else {\n\n $code = (isset($GLOBALS['http_status_code']) ? $GLOBALS['http_status_code'] : 200);\n\n }\n\n // We must kill the requisition\n die($code);\n }", "function getStatusMessage(){\n\t\tif($this->_StatusMessage){ return $this->_StatusMessage; }\n\n\t\t//cerpano z\n\t\t//http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n\t\t$status = array(\n\t\t\t// Successful 2xx\n\t\t\t\"200\" => \"OK\",\n\t\t\t\"201\" => \"Created\",\n\t\t\t\"202\" => \"Accepted\",\n\t\t\t\"203\" => \"Non-Authoritative Information\",\n\t\t\t\"204\" => \"No Content\",\n\t\t\t\"205\" => \"Reset Content\",\n\t\t\t\"206\" => \"Partial Content\",\n\t\t\t// Redirection 3xx\n\t\t\t\"300\" => \"Multiple Choices\",\n\t\t\t\"301\" => \"Moved Permanently\",\n\t\t\t\"302\" => \"Found\",\n\t\t\t\"303\" => \"See Other\",\n\t\t\t\"304\" => \"Not Modified\",\n\t\t\t\"305\" => \"Use Proxy\",\n\t\t\t// (306 Unused)\n\t\t\t\"307\" => \"Temporary Redirect\",\n\t\t\t// Client Error 4xx\n\t\t\t\"400\" => \"Bad Request\",\n\t\t\t\"401\" => \"Unauthorized\",\n\t\t\t\"402\" => \"Payment Required\",\n\t\t\t\"403\" => \"Forbidden\",\n\t\t\t\"404\" => \"Not Found\",\n\t\t\t\"405\" => \"Method Not Allowed\",\n\t\t\t\"406\" => \"Not Acceptable\",\n\t\t\t\"407\" => \"Proxy Authentication Required\",\n\t\t\t\"408\" => \"Request Timeout\",\n\t\t\t\"409\" => \"Conflict\",\n\t\t\t\"410\" => \"Gone\",\n\t\t\t\"411\" => \"Length Required\",\n\t\t\t\"412\" => \"Precondition Failed\",\n\t\t\t\"413\" => \"Request Entity Too Large\",\n\t\t\t\"414\" => \"Request-URI Too Long\",\n\t\t\t\"415\" => \"Unsupported Media Type\",\n\t\t\t\"416\" => \"Requested Range Not Satisfiable\",\n\t\t\t\"417\" => \"Expectation Failed\",\n\t\t\t\"418\" => \"I'm a teapot\",\n\t\t\t// Server Error 5xx\n\t\t\t\"500\" => \"Internal Server Error\",\n\t\t\t\"501\" => \"Not Implemented\",\n\t\t\t\"502\" => \"Bad Gateway\",\n\t\t\t\"503\" => \"Service Unavailable\",\n\t\t\t\"504\" => \"Gateway Timeout\",\n\t\t\t\"505\" => \"HTTP Version Not Supported\",\n\t\t\t\"506\" => \"Variant Also Negotiates\",\n\t\t\t\"507\" => \"Insufficient Storage\",\n\t\t);\n\t\treturn isset($status[\"$this->_StatusCode\"]) ? $status[\"$this->_StatusCode\"] : \"Unknown\";\n\t}", "public function getStatusText($code = null)\n {\n $code = $code ?: $this->getStatusCode();\n if (array_key_exists($code, self::$messages)) {\n return self::$messages[$code];\n }\n\n return 'Unknown Status';\n }", "public function getStatusAsString()\n {\n $list = self::getStatusList();\n if (isset($list[$this->status]))\n return $list[$this->status];\n\n return 'Unknown';\n }", "protected function responseMessage()\n {\n return isset($this->codes[$this->code]) ? $this->codes[$this->code] : '';\n }", "function getResponseCodeMessage($code) {\n $code = is_string($code) ? intval($code) : $code;\n switch ($code) {\n case 100: $text = 'Continue';\n break;\n case 101: $text = 'Switching Protocols';\n break;\n case 200: $text = 'OK';\n break;\n case 201: $text = 'Created';\n break;\n case 202: $text = 'Accepted';\n break;\n case 203: $text = 'Non-Authoritative Information';\n break;\n case 204: $text = 'No Content';\n break;\n case 205: $text = 'Reset Content';\n break;\n case 206: $text = 'Partial Content';\n break;\n case 300: $text = 'Multiple Choices';\n break;\n case 301: $text = 'Moved Permanently';\n break;\n case 302: $text = 'Moved Temporarily';\n break;\n case 303: $text = 'See Other';\n break;\n case 304: $text = 'Not Modified';\n break;\n case 305: $text = 'Use Proxy';\n break;\n case 400: $text = 'Bad Request';\n break;\n case 401: $text = 'Unauthorized';\n break;\n case 402: $text = 'Payment Required';\n break;\n case 403: $text = 'Forbidden';\n break;\n case 404: $text = 'Not Found';\n break;\n case 405: $text = 'Method Not Allowed';\n break;\n case 406: $text = 'Not Acceptable';\n break;\n case 407: $text = 'Proxy Authentication Required';\n break;\n case 408: $text = 'Request Time-out';\n break;\n case 409: $text = 'Conflict';\n break;\n case 410: $text = 'Gone';\n break;\n case 411: $text = 'Length Required';\n break;\n case 412: $text = 'Precondition Failed';\n break;\n case 413: $text = 'Request Entity Too Large';\n break;\n case 414: $text = 'Request-URI Too Large';\n break;\n case 415: $text = 'Unsupported Media Type';\n break;\n case 500: $text = 'Internal Server Error';\n break;\n case 501: $text = 'Not Implemented';\n break;\n case 502: $text = 'Bad Gateway';\n break;\n case 503: $text = 'Service Unavailable';\n break;\n case 504: $text = 'Gateway Time-out';\n break;\n case 505: $text = 'HTTP Version not supported';\n break;\n default:\n $text = \"Unknown http status code\";\n break;\n }\n return $text;\n}", "public function statusMessage(): string;", "function get_status_header_desc($code)\n {\n }", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "protected function getHTTPResponceTextByCode($code) {\n $text = '';\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default: break;\n }\n return $text;\n }", "function wspra_get_status_message($code=200){\n $status = array(\n 100 => 'Continue', \n 101 => 'Switching Protocols', \n 200 => 'OK',\n 201 => 'Created', \n 202 => 'Accepted', \n 203 => 'Non-Authoritative Information', \n 204 => 'No Content', \n 205 => 'Reset Content', \n 206 => 'Partial Content', \n 300 => 'Multiple Choices', \n 301 => 'Moved Permanently', \n 302 => 'Found', \n 303 => 'See Other', \n 304 => 'Not Modified', \n 305 => 'Use Proxy', \n 306 => '(Unused)', \n 307 => 'Temporary Redirect', \n 400 => 'Bad Request', \n 401 => 'Unauthorized', \n 402 => 'Payment Required', \n 403 => 'Forbidden', \n 404 => 'Not Found', \n 405 => 'Method Not Allowed', \n 406 => 'Not Acceptable', \n 407 => 'Proxy Authentication Required', \n 408 => 'Request Timeout', \n 409 => 'Conflict', \n 410 => 'Gone', \n 411 => 'Length Required', \n 412 => 'Precondition Failed', \n 413 => 'Request Entity Too Large', \n 414 => 'Request-URI Too Long', \n 415 => 'Unsupported Media Type', \n 416 => 'Requested Range Not Satisfiable', \n 417 => 'Expectation Failed', \n 500 => 'Internal Server Error', \n 501 => 'Not Implemented', \n 502 => 'Bad Gateway', \n 503 => 'Service Unavailable', \n 504 => 'Gateway Timeout', \n 505 => 'HTTP Version Not Supported',\n 1001 => 'Parameters required!',\n 1002 => 'No Results Found'\n );\n return $status[$code];\n}", "function getStatusString() {\n\t\tswitch ($this->getData('status')) {\n\t\t\tcase THESIS_STATUS_INACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.inactive';\n\t\t\tcase THESIS_STATUS_ACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.active';\n\t\t\tdefault:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status';\n\t\t}\n\t}", "public function getMessage() {\n\n\t\t\tswitch($this->getCode()) {\n\t\t\t\tcase 100: return 'Continue';\n\t\t\t\tcase 101: return 'Switching Protocols';\n\t\t\t\tcase 102: return 'Processing';\n\t\t\t\tcase 200: return 'OK';\n\t\t\t\tcase 201: return 'Created';\n\t\t\t\tcase 202: return 'Accepted';\n\t\t\t\tcase 203: return 'Non-Authoritative Information';\n\t\t\t\tcase 204: return 'No Content';\n\t\t\t\tcase 205: return 'Reset Content';\n\t\t\t\tcase 206: return 'Partial Content';\n\t\t\t\tcase 207: return 'Multi-Status';\n\t\t\t\tcase 208: return 'Already Reported';\n\t\t\t\tcase 226: return 'IM Used';\n\t\t\t\tcase 300: return 'Multiple Choices';\n\t\t\t\tcase 301: return 'Moved Permanently';\n\t\t\t\tcase 302: return 'Found';\n\t\t\t\tcase 303: return 'See Other';\n\t\t\t\tcase 304: return 'Not Modified';\n\t\t\t\tcase 305: return 'Use Proxy';\n\t\t\t\tcase 306: return 'Switch Proxy';\n\t\t\t\tcase 307: return 'Temporary Redirect';\n\t\t\t\tcase 308: return 'Permanent Redirect';\n\t\t\t\tcase 400: return 'Bad Request';\n\t\t\t\tcase 401: return 'Unauthorized';\n\t\t\t\tcase 402: return 'Payment Required';\n\t\t\t\tcase 403: return 'Forbidden';\n\t\t\t\tcase 404: return 'Not Found';\n\t\t\t\tcase 405: return 'Method Not Allowed';\n\t\t\t\tcase 406: return 'Not Acceptable';\n\t\t\t\tcase 407: return 'Proxy Authentication Required';\n\t\t\t\tcase 408: return 'Request Timeout';\n\t\t\t\tcase 409: return 'Conflict';\n\t\t\t\tcase 410: return 'Gone';\n\t\t\t\tcase 411: return 'Length Required';\n\t\t\t\tcase 412: return 'Precondition Failed';\n\t\t\t\tcase 413: return 'Request Entity Too Large';\n\t\t\t\tcase 414: return 'Request-URI Too Long';\n\t\t\t\tcase 415: return 'Unsupported Media Type';\n\t\t\t\tcase 416: return 'Requested Range Not Satisfiable';\n\t\t\t\tcase 417: return 'Expectation Failed';\n\t\t\t\tcase 418: return 'I\\'m a teapot';\n\t\t\t\tcase 419: return 'Authentication Timeout';\n\t\t\t\tcase 420: return 'Enhance Your Calm';\n\t\t\t\tcase 420: return 'Method Failure';\n\t\t\t\tcase 422: return 'Unprocessable Entity';\n\t\t\t\tcase 423: return 'Locked';\n\t\t\t\tcase 424: return 'Failed Dependency';\n\t\t\t\tcase 424: return 'Method Failure';\n\t\t\t\tcase 425: return 'Unordered Collection';\n\t\t\t\tcase 426: return 'Upgrade Required';\n\t\t\t\tcase 428: return 'Precondition Required';\n\t\t\t\tcase 429: return 'Too Many Requests';\n\t\t\t\tcase 431: return 'Request Header Fields Too Large';\n\t\t\t\tcase 444: return 'No Response';\n\t\t\t\tcase 449: return 'Retry With';\n\t\t\t\tcase 450: return 'Blocked by Windows Parental Controls';\n\t\t\t\tcase 451: return 'Redirect';\n\t\t\t\tcase 451: return 'Unavailable For Legal Reasons';\n\t\t\t\tcase 494: return 'Request Header Too Large';\n\t\t\t\tcase 495: return 'Cert Error';\n\t\t\t\tcase 496: return 'No Cert';\n\t\t\t\tcase 497: return 'HTTP to HTTPS';\n\t\t\t\tcase 499: return 'Client Closed Request';\n\t\t\t\tcase 500: return 'Internal Server Error';\n\t\t\t\tcase 501: return 'Not Implemented';\n\t\t\t\tcase 502: return 'Bad Gateway';\n\t\t\t\tcase 503: return 'Service Unavailable';\n\t\t\t\tcase 504: return 'Gateway Timeout';\n\t\t\t\tcase 506: return 'Variant Also Negotiates';\n\t\t\t\tcase 507: return 'Insufficient Storage';\n\t\t\t\tcase 508: return 'Loop Detected';\n\t\t\t\tcase 509: return 'Bandwidth Limit Exceeded';\n\t\t\t\tcase 510: return 'Not Extended';\n\t\t\t\tcase 511: return 'Network Authentication Required';\n\t\t\t\tcase 598: return 'Network read timeout error';\n\t\t\t\tcase 599: return 'Network connect timeout error';\n\t\t\t\tdefault: return 'Unknown Response';\n\t\t\t}\n\n\t\t}", "public function getStatusString()\r\n {\r\n return $GLOBALS['TICKETSTATUS_DESC'][$this->status];\r\n }", "public static function getLekabStatusText($code)\n {\n switch (intval($code)) {\n case 0:\n return \"QUEUED\";\n case 1:\n return \"SENT\";\n case 2:\n return \"DELIVERED\";\n case 3:\n return \"DELETED\";\n case 4:\n return \"EXPIRED\";\n case 5:\n return \"REJECTED\";\n case 6:\n return \"UNDELIVERABLE\";\n case 7:\n return \"ACCEPTED\";\n case 8:\n return \"ABSENT SUBSCRIBER\";\n case 9:\n return \"UNKNOWN SUBSCRIBER\";\n case 10:\n return \"INVALID DESTINATION\";\n case 11:\n return \"SUBSCRIBER ERROR\";\n case 12:\n return \"UNKNOWN\";\n case 13:\n return \"ERROR\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "public function status($status)\n {\n if ($status == 16) {\n return \"<span class='badge badge-warning'>Order Placed</span>\";\n }\n\n if ($status == 3) {\n return \"<span class='badge badge-danger'>Canceled</span>\";\n }\n\n if ($status == 2) {\n return \"<span class='badge badge-warning'>Pending</span>\";\n }\n\n if ($status == 17) {\n return \"<span class='badge badge-danger'>Delivered</span>\";\n }\n\n return \"<span class='badge badge-danger'>Something Wrong</span>\";\n \n }", "public function status_name(){\n\t\t$status = '';\n\t\t\tswitch($this->status){\n\t\t\t\tCASE '1' : $status = 'Active';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '2' : $status = 'Currently Working';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '3' : $status = 'Work Completed';\n\t\t\t\t\t\tbreak;\n\t\t\t\tCASE '4' : $status = 'Payment Approved';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '5' : $status = 'Feedback Employer';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '6' : $status = 'Feedback Freelancer';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '7' : $status = 'Refund';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '8' : $status = 'Conflict';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '9' : $status = 'Closed';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '11' : $status = 'Payment Released';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '15' : $status = 'Charge Back';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\treturn $status;\n\t}", "function get_status_header_desc($code) {\n global $output_header_to_desc;\n\n $code = abs(intval($code));\n\n if (!isset ($output_header_to_desc)) {\n $output_header_to_desc = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 226 => 'IM Used',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Reserved',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Page Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 426 => 'Upgrade Required',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 510 => 'Not Extended'\n ];\n }\n if (isset ($output_header_to_desc [ $code ])) {\n return $output_header_to_desc [ $code ];\n } else {\n return '';\n }\n}", "function http_translate_code( $code ) {\n\t\t// Check the given parameters\n\t\tif( ! is_int( $code ) ) {\n\t\t\tthrow new \\InvalidArgumentException( 'Status is expected to be an integer.' );\n\t\t}\n\t\t// Return the string matching the given code.\n\t\tswitch( $code ) {\n\t\t\tcase 100: return 'Continue'; break;\n\t\t\tcase 101: return 'Switching Protocols'; break;\n\t\t\tcase 200: return 'OK'; break;\n\t\t\tcase 201: return 'Created'; break;\n\t\t\tcase 202: return 'Accepted'; break;\n\t\t\tcase 203: return 'Non-Authoritative Information'; break;\n\t\t\tcase 204: return 'No Content'; break;\n\t\t\tcase 205: return 'Reset Content'; break;\n\t\t\tcase 206: return 'Partial Content'; break;\n\t\t\tcase 300: return 'Multiple Choices'; break;\n\t\t\tcase 301: return 'Moved Permanently'; break;\n\t\t\tcase 302: return 'Moved Temporarily'; break;\n\t\t\tcase 303: return 'See Other'; break;\n\t\t\tcase 304: return 'Not Modified'; break;\n\t\t\tcase 305: return 'Use Proxy'; break;\n\t\t\tcase 400: return 'Bad Request'; break;\n\t\t\tcase 401: return 'Unauthorized'; break;\n\t\t\tcase 402: return 'Payment Required'; break;\n\t\t\tcase 403: return 'Forbidden'; break;\n\t\t\tcase 404: return 'Not Found'; break;\n\t\t\tcase 405: return 'Method Not Allowed'; break;\n\t\t\tcase 406: return 'Not Acceptable'; break;\n\t\t\tcase 407: return 'Proxy Authentication Required'; break;\n\t\t\tcase 408: return 'Request Time-out'; break;\n\t\t\tcase 409: return 'Conflict'; break;\n\t\t\tcase 410: return 'Gone'; break;\n\t\t\tcase 411: return 'Length Required'; break;\n\t\t\tcase 412: return 'Precondition Failed'; break;\n\t\t\tcase 413: return 'Request Entity Too Large'; break;\n\t\t\tcase 414: return 'Request-URI Too Large'; break;\n\t\t\tcase 415: return 'Unsupported Media Type'; break;\n\t\t\tcase 500: return 'Internal Server Error'; break;\n\t\t\tcase 501: return 'Not Implemented'; break;\n\t\t\tcase 502: return 'Bad Gateway'; break;\n\t\t\tcase 503: return 'Service Unavailable'; break;\n\t\t\tcase 504: return 'Gateway Time-out'; break;\n\t\t\tcase 505: return 'HTTP Version not supported'; break;\n\t\t}\n\t\t// Default is null\n\t\treturn null;\n\t}", "public function statusToText(){\n\n if($this->trashed()){\n return 'deleted';\n }\n switch($this->status){\n\n case 0:\n return 'unapproved';\n\n case 1:\n return 'pending';\n \n case 2:\n return 'approved';\n\n default:\n return 'unknown';\n\n }\n return 'unknown';\n }", "private function _getStatusCodeMessage($statusCode)\r\n {\r\n $codes = Array(\r\n 100 => 'Continue',\r\n 101 => 'Switching Protocols',\r\n 200 => 'OK',\r\n 201 => 'Created',\r\n 202 => 'Accepted',\r\n 203 => 'Non-Authoritative Information',\r\n 204 => 'No Content',\r\n 205 => 'Reset Content',\r\n 206 => 'Partial Content',\r\n 300 => 'Multiple Choices',\r\n 301 => 'Moved Permanently',\r\n 302 => 'Found',\r\n 303 => 'See Other',\r\n 304 => 'Not Modified',\r\n 305 => 'Use Proxy',\r\n 306 => '(Unused)',\r\n 307 => 'Temporary Redirect',\r\n 400 => 'Bad Request',\r\n 401 => 'Unauthorized',\r\n 402 => 'Payment Required',\r\n 403 => 'Forbidden',\r\n 404 => 'Not Found',\r\n 405 => 'Method Not Allowed',\r\n 406 => 'Not Acceptable',\r\n 407 => 'Proxy Authentication Required',\r\n 408 => 'Request Timeout',\r\n 409 => 'Conflict',\r\n 410 => 'Gone',\r\n 411 => 'Length Required',\r\n 412 => 'Precondition Failed',\r\n 413 => 'Request Entity Too Large',\r\n 414 => 'Request-URI Too Long',\r\n 415 => 'Unsupported Media Type',\r\n 416 => 'Requested Range Not Satisfiable',\r\n 417 => 'Expectation Failed',\r\n 500 => 'Internal Server Error',\r\n 501 => 'Not Implemented',\r\n 502 => 'Bad Gateway',\r\n 503 => 'Service Unavailable',\r\n 504 => 'Gateway Timeout',\r\n 505 => 'HTTP Version Not Supported'\r\n );\r\n\r\n return (isset($codes[$statusCode])) ? $codes[$statusCode] : '';\r\n }", "function formatStatus ($txt, $exit_code = 4)\n{\n\t$green = '#66bb6a';\n\t$red = '#f0666c';\n\t$orange = '#ffe57b';\n\t$grey = '#5f6268';\n\t$white = '#fff';\n\t\n\tif ($exit_code == 0)\n\t\t$output = '<span style=\"background-color:'. $green . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 1)\n\t\t$output = '<span style=\"background-color:'. $orange . '; color: ' . $grey . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 2)\n\t\t$output = '<span style=\"background-color:'. $red . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\telse\n\t\t$output = $txt;\n\n\treturn $output;\n}", "function httpStatusMessage ( $status )\n {\n # rfc2616-sec10\n $messages = array(\n // [Informational 1xx]\n 100=>'100 Continue',\n 101=>'101 Switching Protocols',\n // [Successful 2xx]\n 200=>'200 OK',\n 201=>'201 Created',\n 202=>'202 Accepted',\n 203=>'203 Non-Authoritative Information',\n 204=>'204 No Content',\n 205=>'205 Reset Content',\n 206=>'206 Partial Content',\n // [Redirection 3xx]\n 300=>'300 Multiple Choices',\n 301=>'301 Moved Permanently',\n 302=>'302 Found',\n 303=>'303 See Other',\n 304=>'304 Not Modified',\n 305=>'305 Use Proxy',\n 306=>'306 (Unused)',\n 307=>'307 Temporary Redirect',\n // [Client Error 4xx]\n 400=>'400 Bad Request',\n 401=>'401 Unauthorized',\n 402=>'402 Payment Required',\n 403=>'403 Forbidden',\n 404=>'404 Not Found',\n 405=>'405 Method Not Allowed',\n 406=>'406 Not Acceptable',\n 407=>'407 Proxy Authentication Required',\n 408=>'408 Request Timeout',\n 409=>'409 Conflict',\n 410=>'410 Gone',\n 411=>'411 Length Required',\n 412=>'412 Precondition Failed',\n 413=>'413 Request Entity Too Large',\n 414=>'414 Request-URI Too Long',\n 415=>'415 Unsupported Media Type',\n 416=>'416 Requested Range Not Satisfiable',\n 417=>'417 Expectation Failed',\n // [Server Error 5xx]\n 500=>'500 Internal Server Error',\n 501=>'501 Not Implemented',\n 502=>'502 Bad Gateway',\n 503=>'503 Service Unavailable',\n 504=>'504 Gateway Timeout',\n 505=>'505 HTTP Version Not Supported'\n );\n return isset($messages[$status])? $messages[$status] : null;\n }", "public function getStatusText()\n {\n return $this->statusText;\n }", "public function getStatusMessage();", "public function getStatusString()\n {\n return $this->statuses[$this->statusId];\n }", "private function http_status_code_string($code, $include_code = false)\n {\n switch ($code) {\n // 1xx Informational\n case 100:\n $string = 'Continue';\n break;\n case 101:\n $string = 'Switching Protocols';\n break;\n case 102:\n $string = 'Processing';\n break; // WebDAV\n case 122:\n $string = 'Request-URI too long';\n break; // Microsoft\n\n // 2xx Success\n case 200:\n $string = 'OK';\n break;\n case 201:\n $string = 'Created';\n break;\n case 202:\n $string = 'Accepted';\n break;\n case 203:\n $string = 'Non-Authoritative Information';\n break; // HTTP/1.1\n case 204:\n $string = 'No Content';\n break;\n case 205:\n $string = 'Reset Content';\n break;\n case 206:\n $string = 'Partial Content';\n break;\n case 207:\n $string = 'Multi-Status';\n break; // WebDAV\n\n // 3xx Redirection\n case 300:\n $string = 'Multiple Choices';\n break;\n case 301:\n $string = 'Moved Permanently';\n break;\n case 302:\n $string = 'Found';\n break;\n case 303:\n $string = 'See Other';\n break; //HTTP/1.1\n case 304:\n $string = 'Not Modified';\n break;\n case 305:\n $string = 'Use Proxy';\n break; // HTTP/1.1\n case 306:\n $string = 'Switch Proxy';\n break; // Depreciated\n case 307:\n $string = 'Temporary Redirect';\n break; // HTTP/1.1\n\n // 4xx Client Error\n case 400:\n $string = 'Bad Request';\n break;\n case 401:\n $string = 'Unauthorized';\n break;\n case 402:\n $string = 'Payment Required';\n break;\n case 403:\n $string = 'Forbidden';\n break;\n case 404:\n $string = 'Not Found';\n break;\n case 405:\n $string = 'Method Not Allowed';\n break;\n case 406:\n $string = 'Not Acceptable';\n break;\n case 407:\n $string = 'Proxy Authentication Required';\n break;\n case 408:\n $string = 'Request Timeout';\n break;\n case 409:\n $string = 'Conflict';\n break;\n case 410:\n $string = 'Gone';\n break;\n case 411:\n $string = 'Length Required';\n break;\n case 412:\n $string = 'Precondition Failed';\n break;\n case 413:\n $string = 'Request Entity Too Large';\n break;\n case 414:\n $string = 'Request-URI Too Long';\n break;\n case 415:\n $string = 'Unsupported Media Type';\n break;\n case 416:\n $string = 'Requested Range Not Satisfiable';\n break;\n case 417:\n $string = 'Expectation Failed';\n break;\n case 422:\n $string = 'Unprocessable Entity';\n break; // WebDAV\n case 423:\n $string = 'Locked';\n break; // WebDAV\n case 424:\n $string = 'Failed Dependency';\n break; // WebDAV\n case 425:\n $string = 'Unordered Collection';\n break; // WebDAV\n case 426:\n $string = 'Upgrade Required';\n break;\n case 449:\n $string = 'Retry With';\n break; // Microsoft\n case 450:\n $string = 'Blocked';\n break; // Microsoft\n\n // 5xx Server Error\n case 500:\n $string = 'Internal Server Error';\n break;\n case 501:\n $string = 'Not Implemented';\n break;\n case 502:\n $string = 'Bad Gateway';\n break;\n case 503:\n $string = 'Service Unavailable';\n break;\n case 504:\n $string = 'Gateway Timeout';\n break;\n case 505:\n $string = 'HTTP Version Not Supported';\n break;\n case 506:\n $string = 'Variant Also Negotiates';\n break;\n case 507:\n $string = 'Insufficient Storage';\n break; // WebDAV\n case 509:\n $string = 'Bandwidth Limit Exceeded';\n break; // Apache\n case 510:\n $string = 'Not Extended';\n break;\n\n // Unknown code:\n default:\n $string = 'Unknown';\n break;\n }\n if ($include_code)\n return $code . ' ' . $string;\n return $string;\n }", "public function getStatusText()\n {\n return $this->statusText;\n }", "function getStatusDescription($statusResponse) {\n if ($statusResponse == \"\" || $statusResponse == \"No Value Returned\") {\n $result = \"3DS not supported or there was no 3DS data provided\";\n } else {\n switch ($statusResponse) {\n Case \"Y\" : $result = \"The cardholder was successfully authenticated.\"; break;\n Case \"E\" : $result = \"The cardholder is not enrolled.\"; break;\n Case \"N\" : $result = \"The cardholder was not verified.\"; break;\n Case \"U\" : $result = \"The cardholder's Issuer was unable to authenticate due to some system error at the Issuer.\"; break;\n Case \"F\" : $result = \"There was an error in the format of the request from the merchant.\"; break;\n Case \"A\" : $result = \"Authentication of your Merchant ID and Password to the ACS Directory Failed.\"; break;\n Case \"D\" : $result = \"Error communicating with the Directory Server.\"; break;\n Case \"C\" : $result = \"The card type is not supported for authentication.\"; break;\n Case \"S\" : $result = \"The signature on the response received from the Issuer could not be validated.\"; break;\n Case \"P\" : $result = \"Error parsing input from Issuer.\"; break;\n Case \"I\" : $result = \"Internal Payment Server system error.\"; break;\n default : $result = \"Unable to be determined\"; break;\n }\n }\n return $result;\n }", "function get_status_header_desc( $code ) {\n\t\tstatic $wp_header_to_desc;\n\n\t\tif ( !isset( $wp_header_to_desc ) ) {\n\t\t\t$wp_header_to_desc = array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t102 => 'Processing',\n\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t207 => 'Multi-Status',\n\t\t\t\t226 => 'IM Used',\n\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => 'Reserved',\n\t\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t422 => 'Unprocessable Entity',\n\t\t\t\t423 => 'Locked',\n\t\t\t\t424 => 'Failed Dependency',\n\t\t\t\t426 => 'Upgrade Required',\n\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t\t507 => 'Insufficient Storage',\n\t\t\t\t510 => 'Not Extended'\n\t\t\t);\n\t\t}\n\n\t\tif ( isset( $wp_header_to_desc[$code] ) )\n\t\t\treturn $wp_header_to_desc[$code];\n\t\telse\n\t\t\treturn '';\n\t}", "public function getStatusText()\n {\n return $this->statusText;\n }", "static function Response($code) {\n\t\treturn 'HTTP/' . Http::VERSION . ' ' . Http::$codes[$code];\n\t}", "function statusCaption($status) {\n\t\tswitch($status) {\n\t\t\tcase KontakteData::$STATUS_ADMIN: return \"Administrator\";\n\t\t\tcase KontakteData::$STATUS_MEMBER: return \"Mitglied\";\n\t\t\tcase KontakteData::$STATUS_EXTERNAL: return \"Externer Mitspieler\";\n\t\t\tcase KontakteData::$STATUS_APPLICANT: return \"Bewerber\";\n\t\t\tdefault: return \"Sonstiger Kontakt\";\n\t\t}\n\t}", "public function getStatusColorText()\n {\n $status = $this->status;\n $list = self::getStatusOption();\n\n $color = 'default';\n if ($status == self::STATUS_NEW) {\n $color = 'info';\n }\n if ($status == self::STATUS_USED) {\n $color = 'default';\n }\n if ($status == self::STATUS_DONE) {\n $color = 'primary';\n }\n if ($status == self::STATUS_UNCONFIRMED) {\n $color = 'warning';\n }\n\n if (!empty($status) && in_array($status, array_keys($list))) {\n return '<span class=\"label label-' . $color . '\">' . $list[$status] . '</span>';\n }\n return '<span class=\"label label-' . $color . '\">' . Yii::$app->getModule('billing')->t('Unknown') . '</span>';\n }", "public static function getStatusMessageByCode($statusCode): string\n {\n $statusMessages = [\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing', // RFC 2518\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'Sono Vibiemme',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n ];\n\n return isset($statusMessages[$statusCode]) ? $statusMessages[$statusCode] : 'Unknown Status';\n }", "public function getStatusCodeMsg(): string\r\n {\r\n return $this->_statusCodeMsg;\r\n }", "public function getFirstResponseStatus(): string\n {\n $responseStatus = $this->getAllHeaders()[0] ?? '';\n\n //200 OK, protocol signature varies, HTTP 1.1/1.0, etc.\n if (preg_match('/200 OK/i', $responseStatus) === 1) {\n return self::STATUS_OK;\n }\n\n if (preg_match('/404 Not Found/i', $responseStatus) === 1) {\n return self::STATUS_NOT_FOUND;\n }\n\n return self::STATUS_OTHER;\n }", "public function getStatus() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn 'Closed';\n\t\t}else if($code === '1'){\n\t\t\treturn 'On Hold';\n\t\t}else if($code === '2'){\n\t\t\treturn 'Open';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn 'Opening '.$openingDate; \n\t\t}else if($code === '4'){\n\t\t\treturn 'Closed For Season'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn 'Delayed '.$updateTime; \n\t\t}\n\t}", "public function getReasonPhrase() : string\n {\n return $this->reasonPhrase ?? Response::CODE_LIST[$this->getStatusCode()];\n }", "function statusToString($status = null) {\n\t\tif(!is_null($status)) {\n\t\t\t$all_status = array(\n\t\t\t\t0 => 'Unknown',\n\t\t\t\t1 => 'Delivered',\n\t\t\t\t2 => 'Failed',\n\t\t\t\t4 => 'Buffered',\n\t\t\t\t8 => 'Submitted to SMSC',\n\t\t\t\t16 => 'Failed at SMSC',\n\t\t\t\t32 => 'Intermediary update'\n\t\t\t);\n\t\t\t\n\t\t\t$status = (int)$status;\n\t\t\t\n\t\t\tif(isset($all_status[$status])) {\n\t\t\t\treturn $all_status[$status];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn \"Unknown\";\n\t}", "function displayCSCResponse($cscResultCode) {\n\n if ($cscResultCode != \"\") {\n switch ($cscResultCode) {\n Case \"Unsupported\" : $result = \"CSC not supported or there was no CSC data provided\"; break;\n Case \"M\" : $result = \"Exact code match\"; break;\n Case \"S\" : $result = \"Merchant has indicated that CSC is not present on the card (MOTO situation)\"; break;\n Case \"P\" : $result = \"Code not processed\"; break;\n Case \"U\" : $result = \"Card issuer is not registered and/or certified\"; break;\n Case \"N\" : $result = \"Code invalid or not matched\"; break;\n default : $result = \"Unable to be determined\"; break;\n }\n } else {\n $result = \"null response\";\n }\n return $result;\n }", "public function getStatusText()\r\n {\r\n return $this->status_text;\r\n }", "public function status_label(){\n\t\t$label='';\n\t\t\tswitch($this->status){\n\t\t\t\tCASE '1' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '2' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '3' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '4' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '5' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '6' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '7' : $label = 'label-warning';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '8' : $label = 'label-danger';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '9' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tCASE '11' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '15' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\treturn $label;\n\t}", "protected function getStatus()\n {\n switch (true) {\n case ($this->code >= self::HTTP_OK and $this->code < self::HTTP_MULTIPLE_CHOICES):\n $status = 'success';\n break;\n case ($this->code >= self::HTTP_BAD_REQUEST and $this->code < self::HTTP_INTERNAL_SERVER_ERROR):\n $status = 'fail';\n break;\n default:\n $status = 'error';\n break;\n }\n\n return $status;\n }", "private function returnCodeMessage(int $code): string {\n $codes = [\n 211 => 'System status, or system help reply',\n 214 => 'Help message (A response to the HELP command)',\n 220 => '<domain> Service ready',\n 221 => '<domain> Service closing transmission channel',\n 235 => 'Authentication succeeded',\n 250 => 'Requested mail action okay, completed',\n 251 => 'User not local; will forward',\n 252 => 'Cannot verify the user, but it will try to deliver the message anyway',\n 334 => '(Server challenge - the text part contains the Base64-encoded challenge)',\n 354 => 'Start mail input',\n 421 => 'Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down)',\n 432 => 'A password transition is needed',\n 450 => 'Requested mail action not taken: mailbox unavailable (e.g., mailbox busy or temporarily blocked for policy reasons)',\n 451 => 'Requested action aborted: local error in processing / IMAP server unavailable',\n 452 => 'Requested action not taken: insufficient system storage',\n 454 => 'Temporary authentication failure',\n 455 => 'Server unable to accommodate parameters',\n 500 => 'Syntax error, command unrecognized (This may include errors such as command line too long) / Authentication Exchange line is too long',\n 501 => 'Syntax error in parameters or arguments / Cannot Base64-decode Client responses / Client initiated Authentication Exchange (only when the SASL mechanism specified that client does not begin the authentication exchange)',\n 502 => 'Command not implemented',\n 503 => 'Bad sequence of commands',\n 504 => 'Command parameter is not implemented / Unrecognized authentication type',\n 521 => 'Server does not accept mail',\n 523 => 'Encryption Needed',\n 530 => 'Authentication required',\n 534 => 'Authentication mechanism is too weak',\n 535 => 'Authentication credentials invalid',\n 538 => 'Encryption required for requested authentication mechanism',\n 550 => 'Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons)',\n 551 => 'User not local; please try <forward-path>',\n 552 => 'Requested mail action aborted: exceeded storage allocation',\n 553 => 'Requested action not taken: mailbox name not allowed',\n 554 => 'Transaction has failed (Or, in the case of a connection-opening response, \"No SMTP service here\") / Message too big for system',\n 556 => 'Domain does not accept mail',\n ];\n return $codes[$code] ?? '';\n }", "public function message(int $status): string\n {\n }", "function set_status_header(int $p_code = 200, string $p_text = '') {\n if (flcCommon::is_cli()) {\n return;\n }\n\n /* if (empty($p_code) or !is_numeric($p_code)) {\n $p_text = 'Status code must be numeric';\n $p_code = 500;\n }*/\n\n if (empty($p_text)) {\n is_int($p_code) or $p_code = (int)$p_code;\n\n if (isset(self::$status_codes[$p_code])) {\n $p_text = self::$status_codes[$p_code];\n } else {\n $p_text = '(null)';\n $p_code = 500;\n }\n }\n\n if (strpos(PHP_SAPI, 'cgi') === 0) {\n header('Status: '.$p_code.' '.$p_text, true);\n } else {\n header($this->get_protocol_version().' '.$p_code.' '.$p_text, true, $p_code);\n }\n }", "public static function getStatusText($status)\n {\n switch ($status) {\n case '1':\n return 'Отображается';\n break;\n case '0':\n return 'Скрыта';\n break;\n }\n }", "function error($code) {\n\tswitch ($code) {\n\t\tcase 'EntityExists':\n\t\t\t$str = 'Cannot complete that action because the entity already exists';\n\t\t\tbreak;\n\t\tcase 'EntityDoesNotExist':\n\t\t\t$str = 'Cannot complete that action because that entity does not exist';\n\t\t\tbreak;\n\t\tcase 'InvalidPassword':\n\t\t\t$str = 'The password supplied is not valid';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = $code;\n\t}\n\treturn $str;\n}", "public function getStatusDescription($status = 0){\r\n\t\t$retval=\"gray.gif\";\r\n\t\t\r\n\t\tif($status == 0){\r\n\t\t\t$status = $this->status;\r\n\t\t}\r\n\t\t\r\n\t\tswitch ($status) {\r\n\t\t\tcase 1: $retval = \"Angelegt\";break;\r\n\t\t\tcase 2: $retval = \"Gesendet u. Bestellt\";break;\r\n\t\t\tcase 3: $retval = \"In Bearbeitung\";break;\r\n\t\t\tcase 4: $retval = \"Fertig u. im Versand\";break;\r\n\t\t\tcase 5: $retval = \"Fertig u. Abholbereit\";break;\r\n\t\t\tdefault: $retval=\"...\";\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "public function getHttpStatusMessage()\r\n\t{\r\n\t return $this->_solrResponse->getHttpStatusMessage();\r\n\t}", "public function get_status_text($status)\n\t{\n\t\tif($status == 1)\n\t\t{\n\t\t\t$status_text = 'Active';\n\t\t}\n\t\telseif($status == 0)\n\t\t{\n\t\t\t$status_text = 'Inactive';\n\t\t}\n\t\treturn $status_text;\n\t}", "public function status(int $code);", "public function getMessage($response_code = null)\n {\n if (is_null($response_code)) {\n $response_code = $this->getCode();\n }\n\n return HTTP::$statusTexts[$response_code];\n }", "public function render()\n {\n return view('request-logs::components.status-code');\n }", "public static function strerror($status) {\n return \"\";\n }", "public function getStatusDescricao() \n {\n switch ($this->status) {\n case self::SEM_NEGOCIACAO:\n return '<span class=\"label label-warning\">Sem Neg.</span>';\n break;\n case self::EM_NEGOCIACAO:\n return '<span class=\"label label-info\">Em Neg.</span>';\n break;\n }\n }", "public function getStatusMessage()\n\t{\n\t\t$actionPhrase = 'Deleting';\n\t\t$typePhrase = 'Add-on data';\n\n\t\t$currentType = ucfirst(str_replace('_', ' ', $this->currentType));\n\n\t\t if ($currentType)\n\t\t{\n\t\t\treturn sprintf('%s... %s (%s)', $actionPhrase, $typePhrase, $currentType);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn sprintf('%s... %s', $actionPhrase, $typePhrase);\n\t\t}\n\t}", "function sendHttpStatus($code) \n {\n\t\tstatic $_status = array(\n\t\t\t// Informational 1xx\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\n\t\t\t// Success 2xx\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\n\t\t\t// Redirection 3xx\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found', // 1.1\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t// 306 is deprecated but reserved\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t// Client Error 4xx\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\n\t\t\t// Server Error 5xx\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(isset($_status[$code])) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}", "public function StatusLabel()\n {\n $html = DBHTMLText::create();\n\n if (strpos($this->Status, FlowStatus::COMPLETED) !== false) {\n $html->setValue('<span style=\"color: #449d44;\">' . $this->Status . '</span>');\n } elseif (strpos($this->Status, FlowStatus::FAILED) !== false) {\n $html->setValue('<span style=\"color: #ff0000;\">' . $this->Status . '</span>');\n } else {\n $html->setValue('<span style=\"color: #ec971f;\">' . $this->Status . '</span>');\n }\n\n return $html;\n }", "public static function getHttpStatusMessage(object $errorCode): string\n {\n $httpMessages = [\n // 1xx informational response\n 100 => 'HTTP_CONTINUE',\n 101 => 'HTTP_SWITCHING_PROTOCOLS',\n 102 => 'HTTP_PROCESSING',\n 103 => 'HTTP_EARLY_HINTS',\n // 2xx success\n 200 => 'HTTP_OK',\n 201 => 'HTTP_CREATED',\n 202 => 'HTTP_ACCEPTED',\n 203 => 'HTTP_NON_AUTHORITATIVE_INFORMATION',\n 204 => 'HTTP_NO_CONTENT',\n 205 => 'HTTP_RESET_CONTENT',\n 206 => 'HTTP_PARTIAL_CONTENT',\n 207 => 'HTTP_MULTI_STATUS',\n 208 => 'HTTP_ALREADY_REPORTED',\n 226 => 'HTTP_IM_USED',\n // 3xx redirection\n 300 => 'HTTP_MULTIPLE_CHOICES',\n 301 => 'HTTP_MOVED_PERMANENTLY',\n 302 => 'HTTP_FOUND',\n 303 => 'HTTP_SEE_OTHER',\n 304 => 'HTTP_NOT_MODIFIED',\n 305 => 'HTTP_USE_PROXY',\n 306 => 'HTTP_SWITCH_PROXY',\n 307 => 'HTTP_TEMPORARY_REDIRECT',\n 308 => 'HTTP_PERMANENT_REDIRECT',\n // 4xx client errors\n 400 => 'HTTP_BAD_REQUEST',\n 401 => 'HTTP_UNAUTHORIZED',\n 402 => 'HTTP_PAYMENT_REQUIRED',\n 403 => 'HTTP_FORBIDDEN',\n 404 => 'HTTP_NOT_FOUND',\n 405 => 'HTTP_METHOD_NOT_ALLOWED',\n 406 => 'HTTP_NOT_ACCEPTABLE',\n 407 => 'HTTP_PROXY_AUTHENTICATION_REQUIRED',\n 408 => 'HTTP_REQUEST_TIMEOUT',\n 409 => 'HTTP_CONFLICT',\n 410 => 'HTTP_GONE',\n 411 => 'HTTP_LENGTH_REQUIRED',\n 412 => 'HTTP_PRECONDITION_FAILED',\n 413 => 'HTTP_PAYLOAD_TOO_LARGE',\n 414 => 'HTTP_URI_TOO_LONG',\n 415 => 'HTTP_UNSUPPORTED_MEDIA_TYPE',\n 416 => 'HTTP_RANGE_NOT_SATISFIABLE',\n 417 => 'HTTP_EXPECTATION_FAILED',\n 418 => 'HTTP_IM_A_TEAPOT',\n 421 => 'HTTP_MISIDRECTED_REQUEST',\n 422 => 'HTTP_UNPROCESSABLE_ENTITY',\n 423 => 'HTTP_LOCKED',\n 424 => 'HTTP_FAILED_DEPENDENCY',\n 425 => 'HTTP_TOO_EARLY',\n 426 => 'HTTP_UPGRADE_REQUIRED',\n 428 => 'HTTP_PRECONDITION_REQUIRED',\n 429 => 'HTTP_TOO_MANY_REQUESTS',\n 431 => 'HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE',\n 451 => 'HTTP_UNAVIALBLE_FOR_LEGAL_REASONS',\n // 5xx server errors\n 500 => 'HTTP_INTERNAL_SERVER_ERROR',\n 501 => 'HTTP_NOT_IMPLEMENTED',\n 502 => 'HTTP_BAD_GATEWAY',\n 503 => 'HTTP_SERVICE_UNAVAILABLE',\n 504 => 'HTTP_GATEWAY_TIMEOUT',\n 505 => 'HTTP_VERSION_NOT_SUPPORTED',\n 506 => 'HTTP_VARIANT_ALSO_NEGOTIATES',\n 507 => 'HTTP_INSUFFICIENT_STORAGE',\n 508 => 'HTTP_LOOP_DETECTED',\n 510 => 'HTTP_NOT_EXTENDED',\n 511 => 'HTTP_NETWORK_AUTHENTICATION_REQUIRED',\n // 9xx fallback\n 999 => 'HTTP_UNKNOWN_STATUS',\n ];\n\n if (array_key_exists($errorCode->getStatusCode(), $httpMessages)) {\n return $httpMessages[$errorCode->getStatusCode()];\n }\n\n return '';\n }", "public function getStatusText()\n {\n return 'entity.organization.field.status.' . $this->status;\n }", "public function getMessage() {\n return $this->getStatus();\n }", "public function getHttpStatusMessage() {\n\t}", "public static function http_code( $code = null ) {\n\t\t// -- Check if a status code was defined\n\t\tif( $code !== null ) {\n\n\t\t\t// -- Get the proper HTTP status code\n\t\t\tswitch( $code ) {\n\t\t\t\tcase 100: $text = 'Continue'; break;\n\t\t\t\tcase 101: $text = 'Switching Protocols'; break;\n\t\t\t\tcase 200: $text = 'OK'; break;\n\t\t\t\tcase 201: $text = 'Created'; break;\n\t\t\t\tcase 202: $text = 'Accepted'; break;\n\t\t\t\tcase 203: $text = 'Non-Authoritative Information'; break;\n\t\t\t\tcase 204: $text = 'No Content'; break;\n\t\t\t\tcase 205: $text = 'Reset Content'; break;\n\t\t\t\tcase 206: $text = 'Partial Content'; break;\n\t\t\t\tcase 300: $text = 'Multiple Choices'; break;\n\t\t\t\tcase 301: $text = 'Moved Permanently'; break;\n\t\t\t\tcase 302: $text = 'Moved Temporarily'; break;\n\t\t\t\tcase 303: $text = 'See Other'; break;\n\t\t\t\tcase 304: $text = 'Not Modified'; break;\n\t\t\t\tcase 305: $text = 'Use Proxy'; break;\n\t\t\t\tcase 400: $text = 'Bad Request'; break;\n\t\t\t\tcase 401: $text = 'Unauthorized'; break;\n\t\t\t\tcase 402: $text = 'Payment Required'; break;\n\t\t\t\tcase 403: $text = 'Forbidden'; break;\n\t\t\t\tcase 404: $text = 'Not Found'; break;\n\t\t\t\tcase 405: $text = 'Method Not Allowed'; break;\n\t\t\t\tcase 406: $text = 'Not Acceptable'; break;\n\t\t\t\tcase 407: $text = 'Proxy Authentication Required'; break;\n\t\t\t\tcase 408: $text = 'Request Time-out'; break;\n\t\t\t\tcase 409: $text = 'Conflict'; break;\n\t\t\t\tcase 410: $text = 'Gone'; break;\n\t\t\t\tcase 411: $text = 'Length Required'; break;\n\t\t\t\tcase 412: $text = 'Precondition Failed'; break;\n\t\t\t\tcase 413: $text = 'Request Entity Too Large'; break;\n\t\t\t\tcase 414: $text = 'Request-URI Too Large'; break;\n\t\t\t\tcase 415: $text = 'Unsupported Media Type'; break;\n\t\t\t\tcase 500: $text = 'Internal Server Error'; break;\n\t\t\t\tcase 501: $text = 'Not Implemented'; break;\n\t\t\t\tcase 502: $text = 'Bad Gateway'; break;\n\t\t\t\tcase 503: $text = 'Service Unavailable'; break;\n\t\t\t\tcase 504: $text = 'Gateway Time-out'; break;\n\t\t\t\tcase 505: $text = 'HTTP Version not supported'; break;\n\t\t\t\tdefault:\n\t\t\t\t\texit( 'Unknown http status code \"' . htmlentities( $code ) . '\"' );\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$protocol = ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' );\n\n\t\t\theader($protocol . ' ' . $code . ' ' . $text);\n\n\t\t\t$GLOBALS[ 'http_response_code' ] = $code;\n\n\t\t} else {\n\t\t\t$code = ( isset( $GLOBALS[ 'http_response_code' ] ) ? $GLOBALS[ 'http_response_code' ] : 200 );\n\t\t}\n\n\t\treturn $code;\n\t}", "protected function status( $status )\n\t{\n\t\techo $status . PHP_EOL;\n\t}", "function status_header($code = 200) {\n $message = [\n 200 => \"OK\",\n 404 => \"Page not found\",\n 302 => \"Moved temporarily\",\n 303 => \"Something something\",\n 500 => \"Server error\"\n ];\n header(\"HTTP/1.0 \".$code.\" \".$message[$code]);\n}", "function formatStatus($status)\n{\n\tswitch ($status)\n\t{\n\t\tcase 'Active':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Active</span>\";\n\n\t\tcase 'Inactive':\n\t\t\treturn \"<span class=\\\"label\\\">Inactive</span>\";\n\n\t\tcase 'Suspended':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Suspended</span>\";\n\n\t\tcase 'Pending':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Pending</span>\";\n\n\t\tcase 'Online':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Online</span>\";\n\n\t\tcase 'Offline':\n\t\t\treturn \"<span class=\\\"label label-important\\\">Offline</span>\";\n\n\t\tcase 'Started':\n\t\t\treturn \"<span class=\\\"label label-success\\\">Started</span>\";\n\n\t\tcase 'Stopped':\n\t\t\treturn \"<span class=\\\"label label-warning\\\">Stopped</span>\";\n\n\t\tdefault:\n\t\t\treturn \"<span class=\\\"label\\\">Default</span>\";\n\t}\n}", "public function errorString($code) {\n \n if(!is_numeric($code)) {\n return false;\n }\n\n $code = (int)$code;\n \n switch($code) {\n case 0: \n return \"Operation was successful\";\n case 247: \n return \"The userid provided is absent, or incorrect\";\n case 250: \n return \"The provided userid and/or Oauth credentials do not match\";\n case 286: \n return \"No such subscription was found\";\n case 293: \n return \"The callback URL is either absent or incorrect\";\n case 294: \n return \"No such subscription could be deleted\";\n case 304: \n return \"The comment is either absent or incorrect\";\n case 305: \n return \"Too many notifications are already set\";\n case 342: \n return \"The signature (using Oauth) is invalid\";\n case 343: \n return \"Wrong Notification Callback Url don't exist\";\n case 601: \n return \"Too Many Request\";\n case 2554: \n return \"Wrong action or wrong webservice\";\n case 2555: \n return \"An unknown error occurred\";\n case 2556: \n return \"Service is not defined\";\n }\n \n return false;\n }", "function set_status_header($code = 200, $text = '') {\n $stati = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n if ($code == '' OR !is_numeric($code)) {\n show_error('Status codes must be numeric', 500);\n }\n\n if (isset($stati[$code]) AND $text == '') {\n $text = $stati[$code];\n }\n\n if ($text == '') {\n show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n }\n\n $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n if (substr(php_sapi_name(), 0, 3) == 'cgi') {\n header(\"Status: {$code} {$text}\", TRUE);\n }\n elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') {\n header($server_protocol . \" {$code} {$text}\", TRUE, $code);\n }\n else {\n header(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n }\n}", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "public static function translateStatus($code, $status) {\n\t\tif ($code === -1) {\n\t\t\treturn 'Waiting..';\n\t\t} else {\n\t\t\treturn $status;\n\t\t}\n\t}", "public function get_status_text() {\n $text = strtr( $this->get_status(), yith_wcbk_get_booking_statuses() );\n\n return $text;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "public function getStatus(): string\n {\n return $this->status;\n }", "function getStatusCode();", "public static function getLekabStatusDesc($code)\n {\n switch (intval($code)) {\n case 0:\n return \"Queued for delivery\";\n case 1:\n return \"Sent to operator\";\n case 2:\n return \"Delivered to the mobile station\";\n case 3:\n return \"The message was deleted\";\n case 4:\n return \"The message has expired\";\n case 5:\n return \"The message was rejected by the operator\";\n case 6:\n return \"The message could not be delivered\";\n case 7:\n return \"The message was accepted by the operator\";\n case 8:\n return \"The subscribers mobile station is switched off\";\n case 9:\n return \"The subscriber is not known\";\n case 10:\n return \"The destination address is invalid\";\n case 11:\n return \"The mobile station can not receive the message\";\n case 12:\n return \"The status of the message is unknown\";\n case 13:\n return \"Internal error when sending the message\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "function getStatusMessage() \r\n\t{\r\n\t\treturn $this->replyString;\r\n\t}", "function get_reason($status) {\n $reason = array(\n 100 => 'Continue', 'Switching Protocols',\n 200 => 'OK', 'Created', 'Accepted', 'Non-Authoritative Information',\n 'No Content', 'Reset Content', 'Partial Content',\n 300 => 'Multiple Choices', 'Moved Permanently', 'Found', 'See Other',\n 'Not Modified', 'Use Proxy', '(Unused)', 'Temporary Redirect',\n 400 => 'Bad Request', 'Unauthorized', 'Payment Required','Forbidden',\n 'Not Found', 'Method Not Allowed', 'Not Acceptable',\n 'Proxy Authentication Required', 'Request Timeout', 'Conflict',\n 'Gone', 'Length Required', 'Precondition Failed',\n 'Request Entity Too Large', 'Request-URI Too Long',\n 'Unsupported Media Type', 'Requested Range Not Satisfiable',\n 'Expectation Failed',\n 500 => 'Internal Server Error', 'Not Implemented', 'Bad Gateway',\n 'Service Unavailable', 'Gateway Timeout',\n 'HTTP Version Not Supported');\n\n return isset($reason[$status]) ? $reason[$status] : '';\n }", "function status_header($code, $description = '')\n {\n }", "public function __toString()\n {\n $output = array();\n foreach ($this->_data as $status) {\n $output[] = '\"' . $status->getCode() . '\" -- \"' . $status->getMessage() . '\"';\n }\n return join(\"<br />\\n\", $output);\n }" ]
[ "0.75070953", "0.7321213", "0.72944915", "0.72911185", "0.7260497", "0.72214276", "0.71765924", "0.7171854", "0.71647406", "0.7163299", "0.7140188", "0.71082556", "0.70959413", "0.7071372", "0.7069725", "0.70486283", "0.70401263", "0.7034997", "0.7028653", "0.7018701", "0.70000935", "0.6971362", "0.69695204", "0.6967029", "0.6953506", "0.69422257", "0.6935453", "0.6903202", "0.68723035", "0.68623877", "0.6831285", "0.6819189", "0.6799311", "0.6794715", "0.67925847", "0.6788617", "0.67854667", "0.67836994", "0.6775153", "0.67638487", "0.6757946", "0.6756844", "0.67538595", "0.6749419", "0.6746997", "0.6746274", "0.67456", "0.6738906", "0.67337227", "0.6732284", "0.6717276", "0.6693829", "0.6678581", "0.6663457", "0.6650723", "0.66458046", "0.66442424", "0.6639637", "0.6630441", "0.66174865", "0.6614377", "0.6597262", "0.65488607", "0.6546219", "0.65423834", "0.65348", "0.6531625", "0.6521129", "0.6517186", "0.65088785", "0.65053046", "0.64953756", "0.64759856", "0.6467531", "0.6464738", "0.64620066", "0.64536244", "0.644964", "0.64331627", "0.64320385", "0.64227307", "0.6421408", "0.6419608", "0.64193666", "0.6415901", "0.64151376", "0.6409988", "0.64056814", "0.63953805", "0.63913137", "0.63790756", "0.63787234", "0.63787234", "0.63787234", "0.63787234", "0.6374037", "0.63720965", "0.6361363", "0.63553125", "0.635108", "0.6346687" ]
0.0
-1
Returns the appropriate string to display based on the road code
public function evaluateRoad() { $code = $this->road['code']; if ($code === '0'){ return 'Closed'; }else if($code === '1'){ return 'Chains on all vehicles'; }else if($code === '2'){ return 'Chains or 4WD'; }else if($code === '3'){ return 'Chains carried'; }else if($code === '4'){ return 'Open'; }else if($code === '5'){ return 'Air Access Only'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoadName(): string\n {\n return app('geocoder')\n ->reverseQuery(\\Geocoder\\Query\\ReverseQuery::fromCoordinates($this->latitude, $this->longitude))\n ->get()->first()->toArray()['streetName'] ?? '';\n }", "public function ResidenceString()\n\t{\n\t\t$res = $this->Residence();\n\t\tif (!$res)\n\t\t\treturn \"\";\n\t\telseif ($res->Custom())\n\t\t\treturn $res->Address.\" \".$res->City.\" \".$res->State;\n\t\telse\n\t\t\treturn $res->Name.\" \".$this->Apartment;\n\t}", "public function toString()\r\n {\r\n return $this->house . ' ' . $this->street . ', ' . $this->city . ', ' . $this->state . ', ' . $this->country;\r\n }", "function GetCatName($code){\r\n\tif($code==1){\r\n\t\treturn(\"Attitude <img src=../assets/att.png height=55>\");\r\n\t}elseif($code==2){\r\n\t\treturn(\"<font color=green>Funny </font><img src=../assets/funny.png height=55>\");\r\n\t}elseif($code==3){\r\n\t\treturn(\"<font color=blue>Cool </font><img src=../assets/cool.png height=55>\");\r\n\t}elseif($code==4){\r\n\t\treturn(\"<font color=red>Flirt </font><img src=../assets/flrt.png height=55>\");\r\n\t}elseif($code==5){\r\n\t\treturn(\"<font color=brown>Dumb </font><img src=../assets/dumb.png height=55>\");\r\n\t}\r\n}", "public function getSmallDescription()\n {\n $fw = $this->getFlightVoyage();\n $result = $fw->getDepartureCity(0)->code;\n $result.= ' - ';\n if($fw->isRoundTrip())\n $result.= $fw->getArrivalCity(0)->code;\n else\n $result.= $fw->getArrivalCity(count($fw->flights)-1)->code;\n return $result;\n }", "private function formatAddress()\n\t{\n\t\t$address = '';\n\n\t\t// street + number\n\t\t$address .= $this->street;\n\t\tif ($this->number)\n\t\t{\n\t\t\tif ($this->language === 'cs')\n\t\t\t{\n\t\t\t\t$address .= ' ' . $this->number;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$address = $this->number . ' ' . $address;\n\t\t\t}\n\t\t}\n\n\t\t// use \"Praha 1\" instead of \"Praha 1, Praha\"\n\t\tif (substr($this->quarter, 0, strlen($this->town)) === $this->town)\n\t\t{\n\t\t\t$useQuarter = TRUE;\n\t\t}\n\n\t\tif (!$address)\n\t\t{\n\t\t\t// [neighborhood]\n\t\t\t$address .= $this->neighborhood;\n\n\t\t\t// [quarter]\n\t\t\tif (!isset($useQuarter))\n\t\t\t{\n\t\t\t\t$address .= $this->quarter;\n\t\t\t}\n\t\t}\n\n\t\t// town [+ zip]\n\t\tif ($address)\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\tif ($this->language === 'cs' && $this->postalCode)\n\t\t{\n\t\t\t$address .= $this->postalCode . ' ';\n\t\t}\n\t\t$address .= isset($useQuarter) ? $this->quarter : $this->town;\n\n\t\t// [district]\n\t\tif (!$address)\n\t\t{\n\t\t\t$address .= $this->district;\n\t\t}\n\n\t\t// [region]\n\t\tif (!$address)\n\t\t{\n\t\t\t$address .= $this->region;\n\t\t}\n\n\t\t// state\n\t\tif ($address && ($this->state || $this->stateCode))\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\t$address .= $this->stateCode ?: $this->state;\n\n\t\t// [zip]\n\t\tif ($address && $this->language !== 'cs' && $this->postalCode)\n\t\t{\n\t\t\tif (!$this->state && !$this->stateCode)\n\t\t\t{\n\t\t\t\t$address .= ',';\n\t\t\t}\n\t\t\t$address .= ' ' . $this->postalCode;\n\t\t}\n\n\t\t// country\n\t\tif ($address)\n\t\t{\n\t\t\t$address .= ', ';\n\t\t}\n\t\t$address .= $this->country;\n\n\t\t$this->formatedAddress = $address;\n\t}", "public function toString()\n {\n /** @var $this TrainBoardingCard */\n return 'Take train ' . $this->train . ' from ' . $this->get('departureLocation') . ' to ' . $this->get('arrivalLocation') . '. Sit in seat ' . $this->get('seat') . '.';\n }", "public function toString()\n {\n return 'Mapping Locations - Success message is displayed.';\n }", "public function getFormatted(): string\n {\n $pieces = array();\n $city = $this->getCity();\n $region = $this->getRegion();\n $country = $this->getCountry();\n $countryCode = $this->getCountryCode();\n $countryCode = strtoupper($countryCode);\n if ($countryCode === 'CA' || $countryCode === 'US') {\n if ($city !== false && $city !== '') {\n array_push($pieces, $city);\n if ($region !== false && $region !== '') {\n array_push($pieces, $region);\n return implode(', ', $pieces);\n }\n if ($country !== false && $country !== '') {\n array_push($pieces, $country);\n return implode(', ', $pieces);\n }\n array_push($pieces, $countryCode);\n return implode(', ', $pieces);\n }\n if ($region !== false && $region !== '') {\n array_push($pieces, $region);\n if ($country !== false && $country !== '') {\n array_push($pieces, $country);\n return implode(', ', $pieces);\n }\n array_push($pieces, $countryCode);\n return implode(', ', $pieces);\n }\n if ($country !== false && $country !== '') {\n return $country;\n }\n return $countryCode;\n }\n if ($city !== false && $city !== '') {\n array_push($pieces, $city);\n if ($country !== false && $country !== '') {\n array_push($pieces, $country);\n return implode(', ', $pieces);\n }\n if ($countryCode !== false && $countryCode !== '') {\n array_push($pieces, $countryCode);\n return implode(', ', $pieces);\n }\n return $city;\n }\n if ($country !== false && $country !== '') {\n return $country;\n }\n return '';\n }", "public function __toString(): String{\n $garage = \"\";\n $jardin = \"\";\n if ($this->hasGarage()){\n $garage = \" avec un garage\";\n }\n if ($this->hasJardin()){\n $jardin = \" et un jardin\";\n }\n return \"Maison situé \".$this->getPays().\" dans la ville de \".$this->getVille().\" avec le code postal : \".$this->getCp().\" avec \".$this->getEtage().\" étage(s) \".\", \".$this->getChambre().\" chambre(s)\".$garage.$jardin;\n }", "public function getStreetName();", "function get_squarecandy_acf_events_address_display( $event, $style = '2line', $maplink = true ) {\n\n\t$home_country = get_option( 'options_home_country' );\n\n\t$output = '<div class=\"venue venue-' . $style . '\" itemprop=\"location\" itemscope=\"\" itemtype=\"http://schema.org/MusicVenue\">';\n\tif ( ! empty( $event['venue'] ) ) {\n\t\t// link the venue name to the venue website, unless this is the map popup\n\t\tif ( ! empty( $event['venue_link'] ) && 'infowindow' !== $style ) {\n\t\t\t$output .= '<a href=\"' . $event['venue_link'] . '\" itemprop=\"url\">';\n\t\t}\n\t\t// link the venue name to the full version of google maps in the map popup style\n\t\tif ( ! empty( $event['venue_location'] ) && ! empty( $event['venue_location']['address'] ) && 'infowindow' === $style ) {\n\t\t\t$output .= '<a href=\"https://www.google.com/maps/search/' . rawurlencode( $event['venue_location']['address'] ) . '\"><strong>';\n\t\t}\n\n\t\t\t$output .= '<span itemprop=\"name\">' . $event['venue'] . '</span> ';\n\n\t\tif ( ! empty( $event['venue_link'] ) && 'infowindow' !== $style ) {\n\t\t\t$output .= '</a> ';\n\t\t}\n\t\tif ( ! empty( $event['venue_location'] ) && ! empty( $event['venue_location']['address'] ) && 'infowindow' === $style ) {\n\t\t\t$output .= '</strong></a><br> ';\n\t\t}\n\n\t\tif ( '1line' === $style ) {\n\t\t\t$output .= ', ';\n\t\t}\n\t\tif ( '2line' === $style || '3line' === $style ) {\n\t\t\t$output .= '<br>';\n\t\t}\n\t}\n\tswitch ( $style ) {\n\t\tcase '1line':\n\t\tcase '2line':\n\t\tcase '3line':\n\t\t\tif ( ! empty( $event['address'] ) ) {\n\t\t\t\t$output .= '<span class=\"address\">' . $event['address'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['address'] ) && ! empty( $event['city'] ) ) {\n\t\t\t\tif ( '1line' === $style || '2line' === $style ) {\n\t\t\t\t\t$output .= ', ';\n\t\t\t\t}\n\t\t\t\tif ( '3line' === $style ) {\n\t\t\t\t\t$output .= '<br>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! empty( $event['city'] ) ) {\n\t\t\t\t$output .= '<span class=\"city\">' . $event['city'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['city'] ) && ! empty( $event['state'] ) ) {\n\t\t\t\t$output .= ', ';\n\t\t\t}\n\t\t\tif ( ! empty( $event['state'] ) ) {\n\t\t\t\t$output .= '<span class=\"state\">' . $event['state'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['zip'] ) ) {\n\t\t\t\t$output .= ' <span class=\"zip\">' . $event['zip'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['country'] ) && $home_country !== $event['country'] ) {\n\t\t\t\tif ( ! empty( $event['address'] ) || ! empty( $event['city'] ) || ! empty( $event['state'] ) || ! empty( $event['zip'] ) ) {\n\t\t\t\t\t$output .= ', ';\n\t\t\t\t}\n\t\t\t\t$output .= '<span class=\"country\">' . $event['country'] . '</span>';\n\t\t\t}\n\n\t\t\t$map_location = '';\n\t\t\tif ( $maplink && get_option( 'options_map_link' ) ) :\n\t\t\t\t// to get full adress: if google map field exists, use that, otherwise try to concatenate address fields\n\t\t\t\tif ( ! empty( $event['venue_location']['address'] ) ) :\n\t\t\t\t\t$map_location = $event['venue_location']['address'];\n\t\t\t\telseif ( $event['address'] && ( ( $event['city'] && $event['state'] ) || $event['zip'] ) ) :\n\t\t\t\t\t$address_fields = array( 'city', 'state', 'zip', 'country' );\n\t\t\t\t\t$map_location = $event['address'];\n\t\t\t\t\tforeach ( $address_fields as $address_field ) {\n\t\t\t\t\t\tif ( $event[ $address_field ] ) :\n\t\t\t\t\t\t\t$map_location .= ' ' . $event[ $address_field ];\n\t\t\t\t\t\t\t$map_location .= 'city' === $address_field ? ',' : '';\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\tendif;\n\t\t\t\t$map_link = $map_location ? 'https://www.google.com/maps/search/' . rawurlencode( $map_location ) : '';\n\t\t\t\t$map_link = apply_filters( 'squarecandy_events_map_link', $map_link, $map_location );\n\t\t\t\tif ( $map_link ) :\n\t\t\t\t\t$output .= '<a class=\"button small button-gray button-map\" href=\"' . $map_link . '\">';\n\t\t\t\t\t$output .= '<i class=\"fa fa-map\"></i> ' . __( 'map', 'squarecandy-acf-events' );\n\t\t\t\t\t$output .= '</a>';\n\t\t\t\tendif;\n\t\t\tendif;\n\t\t\tif ( $map_location ) :\n\t\t\t\t$output .= '<meta itemprop=\"address\" content=\"' . $map_location . '\">';\n\t\t\tendif;\n\n\t\t\tbreak;\n\n\t\tcase 'infowindow':\n\t\t\t// for use with google maps\n\t\t\tif ( ! empty( $event['address'] ) ) {\n\t\t\t\t$output .= '<span class=\"address\">' . $event['address'] . '</span><br>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['city'] ) ) {\n\t\t\t\t$output .= '<span class=\"city\">' . $event['city'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['city'] ) && ! empty( $event['state'] ) ) {\n\t\t\t\t$output .= ', ';\n\t\t\t}\n\t\t\tif ( ! empty( $event['state'] ) ) {\n\t\t\t\t$output .= '<span class=\"state\">' . $event['state'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['zip'] ) ) {\n\t\t\t\t$output .= ' <span class=\"zip\">' . $event['zip'] . '</span>';\n\t\t\t}\n\t\t\tif ( ! empty( $event['country'] ) && $home_country !== $event['country'] ) {\n\t\t\t\t$output .= ', <span class=\"country\">' . $event['country'] . '</span>';\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'citystate':\n\t\tdefault:\n\t\t\t// for short display\n\t\t\tif ( ! empty( $event['city'] ) ) {\n\t\t\t\t$output .= '<span class=\"city\">' . $event['city'] . '</span>';\n\t\t\t}\n\t\t\tif ( $home_country && $event['country'] !== $home_country ) {\n\t\t\t\tif ( ! empty( $event['city'] ) ) {\n\t\t\t\t\t$output .= ', ';\n\t\t\t\t}\n\t\t\t\t$output .= '<span class=\"country\">' . $event['country'] . '</span>';\n\t\t\t} elseif ( ! empty( $event['state'] ) ) {\n\t\t\t\tif ( ! empty( $event['city'] ) ) {\n\t\t\t\t\t$output .= ', ';\n\t\t\t\t}\n\t\t\t\t$output .= '<span class=\"state\">' . $event['state'] . '</span>';\n\t\t\t}\n\t\t\tbreak;\n\n\t}\n\t$output .= '</div>';\n\treturn $output;\n}", "function displayAVSResponse($avsResultCode) {\n\n if ($avsResultCode != \"\") {\n switch ($avsResultCode) {\n Case \"Unsupported\" : $result = \"AVS not supported or there was no AVS data provided\"; break;\n Case \"X\" : $result = \"Exact match - address and 9 digit ZIP/postal code\"; break;\n Case \"Y\" : $result = \"Exact match - address and 5 digit ZIP/postal code\"; break;\n Case \"S\" : $result = \"Service not supported or address not verified (international transaction)\"; break;\n Case \"G\" : $result = \"Issuer does not participate in AVS (international transaction)\"; break;\n Case \"A\" : $result = \"Address match only\"; break;\n Case \"W\" : $result = \"9 digit ZIP/postal code matched, Address not Matched\"; break;\n Case \"Z\" : $result = \"5 digit ZIP/postal code matched, Address not Matched\"; break;\n Case \"R\" : $result = \"Issuer system is unavailable\"; break;\n Case \"U\" : $result = \"Address unavailable or not verified\"; break;\n Case \"E\" : $result = \"Address and ZIP/postal code not provided\"; break;\n Case \"N\" : $result = \"Address and ZIP/postal code not matched\"; break;\n Case \"0\" : $result = \"AVS not requested\"; break;\n default : $result = \"Unable to be determined\";\n }\n } else {\n $result = \"null response\";\n }\n return $result;\n }", "public function getAddressLabelHeading(): string\n {\n if (!$this->address()->exists()) {\n return '';\n }\n\n if (!$this->profile()->exists()) {\n return '';\n }\n\n $user_model_viewer = $this->getModelViewerComponent();\n\n if ($this->profile->isNatural()) {\n $phone = filled($this->profile->phone_no)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.phone_no'), $this->profile->phone_no)\n : '';\n $email = filled($this->profile->email)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.email'), $this->profile->email)\n : '';\n\n $label = sprintf(\n \"%s, %s %s, %s %s%s%s\",\n $this->getTitle(),\n $this->address->street_name,\n $this->address->street_no,\n $this->address->zip,\n $this->address->city()->exists() ? $this->address->city->getTitle() : '',\n $phone,\n $email\n );\n } elseif ($this->profile->isJuridical() && $this->company()->exists()) {\n $company_registration_no = filled($this->company->company_registration_no)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.company_registration_no'), $this->company->company_registration_no)\n : '';\n $company_registration_court = $this->company->companyRegistrationCourt()->exists()\n ? sprintf(', %s %s', $user_model_viewer->translate('text.company_registration_court'), $this->company->companyRegistrationCourt->getTitle())\n : '';\n $company_insertion_division = filled($this->company->company_insertion_division)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.company_insertion_division'), $this->company->company_insertion_division)\n : '';\n $company_insertion_no = filled($this->company->company_insertion_no)\n ? sprintf(', %s %s', $user_model_viewer->translate('text.company_insertion_no'), $this->company->company_insertion_no)\n : '';\n $phone = filled($this->profile->phone_no)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.phone_no'), $this->profile->phone_no)\n : '';\n $email = filled($this->company->email)\n ? sprintf(', %s: %s', $user_model_viewer->translate('text.email'), $this->company->email)\n : '';\n\n $label = sprintf(\n \"%s, %s %s, %s %s%s%s%s%s%s%s\",\n $this->company->getTitle(),\n $this->address->street_name,\n $this->address->street_no,\n $this->address->zip,\n $this->address->city()->exists() ? $this->address->city->getTitle() : null,\n $company_registration_no,\n $company_registration_court,\n $company_insertion_division,\n $company_insertion_no,\n $phone,\n $email\n );\n } else {\n throw new \\RuntimeException(sprintf('User [%s] has invalid user profile', $this->getKey()));\n }\n\n return $label;\n }", "public function streetName2(): string\n {\n return $this->getData('Streetname2');\n }", "public function getTitle()\n {\n if ($this->isPermit()) {\n $addresses = $this->getField('objectaddresses');\n if ($addresses != false) {\n $location = $addresses[0]['zipcode'];\n $location .= ' ' . $addresses[0]['addressnumber'];\n $location .= $addresses[0]['addressnumberadditional'];\n $location .= ' ' . $addresses[0]['city'];\n $result = sprintf(\n '%s %s %s',\n $this->getField('producttype'),\n $this->getField('productactivities'),\n $location\n );\n } else {\n $result = sprintf(\n '%s %s',\n $this->getField('producttype'),\n $this->getField('productactivities')\n );\n }\n } else {\n $result = $this->getField('title');\n }\n return $result;\n }", "public function fullAddress(){\n\n return ' '.$this->house. ' '. $this->address. ', '. $this->postcode;\n }", "public function streetName(): string\n {\n return $this->getData('Streetname');\n }", "function network_code( $network ){\n $network = trim(strtolower( $network ) );\n switch ($network) {\n case 'mtn':\n case 'dstv':\n return '01';\n break;\n case 'glo':\n case 'gotv':\n return '02';\n break;\n case '9mobile':\n case 'etisalat':\n case 'startimes':\n return '03';\n break;\n default :\n // airtel\n return '04';\n }\n}", "public function getFullDisplayNameUCAttribute()\n {\n if($this->is_active) {return '<a href=\"'.$this->url.'\" class=\"display-location\">'.ucfirst($this->style).'</a>';}\n else {return '<s><a href=\"'.$this->url.'\" class=\"display-location text-muted\">'.ucfirst($this->style).'</a></s>';}\n }", "public function __toString(): string\n {\n $equal = $this->equalDivision ? \"\" : \"אינם \";\n $tolls = $this->tollRoads ? join(\", \", $this->tollRoads) : \"ללא\";\n $fullCost = round($this->fullCost);\n return\n \"\n מסלול הנסיעה: $this->origin - $this->destination<br>\n מרחק כולל: $this->distance ק\\\"מ<br>\n זמן משוער: $this->duration שעות<br>\n סוג הרכב: $this->car<br>\n צריכת דלק: $this->kmPerLiter ק\\\"מ לליטר<br>\n מספר נוסעים: $this->passNum, אשר $equal מתחלקים שווה בשווה<br>\n כבישי אגרה: $tolls<br>\n סה\\\"כ הוצאות הנסיעה לכיוון: $fullCost ש\\\"ח<br>\n חישוב עלות לנוסע לכיוון: $this->calculation ש\\\"ח<br>\n \";\n }", "public function resultString($team_id) {\n\t\t\n\t\t$scored=0;\n\t\t$received=0;\n\t\t$matchfound=false;\n\t\tif ($this->home_team_id == $team_id && !is_null($this->away_team_id)) {\n\t\t\t$scored=$this->homeScore;\n\t\t\t$received=$this->awayScore;\n\t\t\t$matchfound=true;\t\n\t\t} elseif ($this->away_team_id == $team_id && !is_null($this->home_team_id)) {\n\t\t\t$scored=$this->awayScore;\n\t\t\t$received=$this->homeScore;\n\t\t\t$matchfound=true;\n\t\t} elseif ($this->home_team_id == $team_id || $this->away_team_id == $team_id ) {\n\t\t\t$bye=true;\n\t\t} else {\n\t\t\tdie('team with id '.$team_id.' did not play in match with id '.$this->id);\n\t\t}\n\n\t\tif ($scored > $received) {\n\t\t\treturn $scored.'-'.$received.' win';\n\t\t} elseif ($scored < $received) {\n\t\t\treturn $scored.'-'.$received.' loss';\n\t\t} elseif ($scored == $received && $matchfound == true) {\n\t\t\treturn $scored.'-'.$received.' tie';\n\t\t} elseif ($bye === true) { // team had a BYE (\" a break \")\n\t\t\treturn 'break';\n\t\t} else {\n\t\t\tdie('hae?');\n\t\t}\n\t\t\n\t}", "public function toString()\n {\n return \"Order Detail - Shipping method are correct\";\n }", "function displayCSCResponse($cscResultCode) {\n\n if ($cscResultCode != \"\") {\n switch ($cscResultCode) {\n Case \"Unsupported\" : $result = \"CSC not supported or there was no CSC data provided\"; break;\n Case \"M\" : $result = \"Exact code match\"; break;\n Case \"S\" : $result = \"Merchant has indicated that CSC is not present on the card (MOTO situation)\"; break;\n Case \"P\" : $result = \"Code not processed\"; break;\n Case \"U\" : $result = \"Card issuer is not registered and/or certified\"; break;\n Case \"N\" : $result = \"Code invalid or not matched\"; break;\n default : $result = \"Unable to be determined\"; break;\n }\n } else {\n $result = \"null response\";\n }\n return $result;\n }", "public function printDistributorAddress()\n {\n $str = '<address class=\"vcard\">';\n $str .= '<p>';\n $str .= '<strong class=\"org\">' . $this->name . '</strong>';\n if ( ! empty($this->address)) {\n $str .= '<br><span class=\"adr\">';\n $str .= '<span class=\"street-address\">' . $this->address . '</span>';\n if ( ! empty($this->city)) {\n $str .= '<br><span class=\"locality\">' . $this->city . '</span>';\n }\n if ( ! empty($this->region)) {\n $str .= ', <span class=\"region\">' . $this->region . '</span>';\n }\n if ( ! empty($this->postCode)) {\n $str .= ' <span class=\"postal-code\">' . $this->postCode . '</span>';\n }\n if ( ! empty($this->country)) {\n $str .= ', <span class=\"country-name\">' . $this->country . '</span>';\n }\n $str .= '</span>';\n }\n if ( ! empty($this->website)) {\n $str .= '<br><a href=\"' . $this->website . '\" class=\"url\">' . $this->website . '</a>';\n }\n if ( ! empty($this->contact)) {\n $str .= '<br>Contact: <span class=\"fn\">' . $this->contact . '</span>';\n }\n if ( ! empty($this->email)) {\n $str .= '<br>Email: <a href=\"mailto:' . $this->email . '\" class=\"email\">' . $this->email . '</a>';\n }\n if ( ! empty($this->phone)) {\n $str .= '<br>Phone: <span class=\"tel\">' . $this->phone . '</span>';\n }\n $str .= '</p>';\n $str .= '</address>';\n\n return $str;\n }", "public function ruoloToString($cd_ruolo){ \n if ($cd_ruolo == null){\n $cd_ruolo = $this->ruolo;\n }\n\n if ($cd_ruolo == 'PO' ||$cd_ruolo == 'ORD') {\n $ruolo = 'Professore Ordinario di I fascia';\n } else if ($cd_ruolo == 'PA' || $cd_ruolo == 'ASS') {\n $ruolo = 'Professore Associato di II fascia';\n } else if ($cd_ruolo == 'RU' || $cd_ruolo == 'RIC') {\n $ruolo = 'Ricercatore Universitario';\n } else if ($cd_ruolo == 'RD') {\n $ruolo = 'Ricercatore Universitario a Tempo Determinato (L. 230/2005)';\n } else if ($cd_ruolo == 'OD') {\n $ruolo = 'Professore Ordinario a Tempo Determinato (L. 230/2005)';\n }else if($cd_ruolo == 'CD') {\n $ruolo = \"Collaboratore ed esperto linguistico a tempo determinato\";\n } else if ($cd_ruolo == 'CL') {\n $ruolo = \"Collaboratore ed esperto linguistico a tempo indeterminato\";\n } else if ($cd_ruolo == 'ND') {\n $ruolo = \"dipendente Tecnico Amministrativo a tempo indeterminato\";\n } else if ($cd_ruolo == 'NM' || $cd_ruolo == 'NE') {\n $ruolo = \"dipendente Tecnico Amministrativo a tempo determinato\";\n } else if ($cd_ruolo == 'PR') {\n $ruolo = \"professionista\";\n } else if ($cd_ruolo == 'CC') {\n $ruolo = \"collaboratore\";\n } else if ($cd_ruolo == 'AU') {\n $ruolo = \"lavoratore autonomo\";\n } else {\n $ruolo = \"dipendente\";\n }\n return $ruolo; \n }", "public function get_tracking_code(): string {\n global $OUTPUT, $USER;\n\n $settings = $this->record->get_property('settings');\n\n $template = new \\stdClass();\n $template->siteid = $settings['siteid'];\n $template->siteurl = $settings['siteurl'];\n $custompiwikjs = (isset($settings['piwikjsurl']) && !empty($settings['piwikjsurl']));\n $template->piwikjsurl = $custompiwikjs ? $settings['piwikjsurl'] : $settings['siteurl'];\n $template->imagetrack = $settings['imagetrack'];\n\n $template->userid = false;\n\n if (!empty($settings['userid']) && !empty($settings['usefield']) && !empty($USER->{$settings['usefield']})) {\n $template->userid = $USER->{$settings['usefield']};\n }\n\n $template->doctitle = \"\";\n\n if (!empty($this->record->get_property('cleanurl'))) {\n $template->doctitle = \"_paq.push(['setDocumentTitle', '\" . $this->trackurl() . \"']);\\n\";\n }\n\n return $OUTPUT->render_from_template('watool_matomo/tracking_code', $template);\n }", "public function __toString()\n {\n return $this->postcode . ' ' . $this->post;\n }", "public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}", "public function getFullDisplayNameAttribute()\n {\n if($this->is_active) {return '<a href=\"'.$this->url.'\" class=\"display-location\">'.$this->style.'</a>';}\n else {return '<s><a href=\"'.$this->url.'\" class=\"display-location text-muted\">'.$this->style.'</a></s>';}\n }", "function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = \"\\n\") {\n\t$address_query = tep_db_query(\"select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from \" . TABLE_ADDRESS_BOOK . \" where customers_id = '\" . (int)$customers_id . \"' and address_book_id = '\" . (int)$address_id . \"'\");\n\t$address = tep_db_fetch_array($address_query);\n\t\n\t$format_id = tep_get_address_format_id($address['country_id']);\n\t\n\treturn tep_address_format($format_id, $address, $html, $boln, $eoln);\n}", "public function getAddressLabel(): string\n {\n if (!$this->address()->exists()) {\n return '';\n }\n\n if (!$this->profile()->exists()) {\n return '';\n }\n\n if ($this->profile->isNatural()) {\n $label = sprintf(\n \"%s\\n%s %s\\n%s %s\",\n $this->getTitle(),\n $this->address->street_name,\n $this->address->street_no,\n $this->address->zip,\n $this->address->city()->exists() ? $this->address->city->getTitle() : ''\n );\n } elseif ($this->profile->isJuridical() && $this->company()->exists()) {\n $label = sprintf(\n \"%s\\n%s %s\\n%s %s%s\",\n $this->company->getTitle(),\n $this->address->street_name,\n $this->address->street_no,\n $this->address->zip,\n $this->address->city()->exists() ? $this->address->city->getTitle() : null,\n $this->address->country()->exists() && ($this->address->country->getKey() != 203) ? sprintf(\"\\n%s\", $this->address->country->getTitle()) : ''\n );\n } else {\n throw new \\RuntimeException(sprintf('User [%s] has invalid user profile', $this->getKey()));\n }\n\n return nl2br($label);\n }", "public function getJkw_hospitalAddressStr () {\n return $this->xprovince->name . $this->xcity->name . $this->xcounty->name . $this->content;\n }", "public static function showProgramType($type)\n {\n \t// return program_type(string)\n \tswitch ($type) {\n \t\tcase '1':\n \t\t\treturn 'Тренировки и питание';\n \t\t\tbreak;\n \t\t\n \t\tcase '2':\n \t\t\treturn 'Только тренировки';\n \t\t\tbreak;\n\n \t\tcase '3':\n \t\t\treturn 'Только питание';\n \t\t\tbreak;\n \t\t\t\n \t\tdefault:\n \t\t\treturn 'Не определен';\n \t\t\tbreak;\n \t}\n }", "function GetRelStat($code){\r\n\tif($code==FA){\r\n\t\treturn(\"<font color=#3B170B>Forever Alone.</font>\");\r\n\t}else if($code==LFS){\r\n\t\treturn(\"<font color=#5FB404>Looking For Someone!</font>\");\r\n\t}else if($code==C){\r\n\t\treturn(\"<font color=#FF0000>Committed.</font>\");\r\n\t}else if($code==WFS){\r\n\t\treturn(\"<font color=#5882FA>Waiting For Someone!</font>\");\r\n\t}else{\r\n\t\treturn(\"Not Set Yet.\");\r\n\t}\r\n}", "public function getLabel() {\n\t\t$label = '';\n\t\tif($this->registration) {\n\t\t\t$label = $this->registration->competition->getFullName().', '.Yii::$app->formatter->asDate($this->registration->competition->start_date);\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t} else {\n\t\t\t$label = $this->practice->course->getFullName();\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t}\n\t\treturn $label;\n\t}", "public function display_eligibility_type($type){\n\t\tif($type == 'PI'){\n\t\t\t$st = 'Profile Shortlisting';\n\t\t}else if($type == 'PS'){\t\n\t \t\t$st = 'Profile Sending';\n\t\t}else if($type == 'PC'){\n\t\t\t$st = 'Position Closing';\n\t\t}\n\t\treturn $st;\n\t}", "public function getStreetName() : string\n {\n return collect($this->make_firebase_connection()\n ->firstWhere('city_id', Auth::user()->city_id)['containers'])\n ->firstWhere('street_id', Auth::user()->street_id)['street_name'];\n }", "function program_format_string($post,$type='full'){\n\t// full returns Bachelor of Arts<br />Bachelor of Science\n\n\t$format = get_field('program_format', $post->ID);\n\t$formats = array();\n\n\tif(!empty($format)){\n\t\n\t\tforeach($format as $item){\n\n\t\t\tif($item == 'ba'){\n\t\t\t\tif($type == 'short'){\n\t\t\t\t\t$formats[] = 'BA';\n\t\t\t\t} else {\n\t\t\t\t\t$formats[] = 'Bachelor of Arts';\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif($item == 'bs'){\n\t\t\t\tif($type == 'short'){\n\t\t\t\t\t$formats[] = 'BS';\n\t\t\t\t} else {\n\t\t\t\t\t$formats[] = 'Bachelor of Science';\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t$separator = ($type == 'short') ? ', ' : '<br />';\n\n\t\treturn implode($separator,$formats);\n\n\t} else {\n\n\t\treturn false;\n\n\t}\n\n\t\t\n}", "function getSocietyDetails($soc_code){\n\t\t}", "public function __toString(): string\n {\n $replacements = [\n '%name%' => $this->getName(),\n '%number%' => $this->getNumber(),\n '%elements%' => $this->getElements(),\n ];\n\n $streetString = str_replace(array_keys($replacements), array_values($replacements), $this->format);\n\n return $streetString;\n }", "public function renderAddress()\n {\n echo $this->getAddressStringSingleLine();\n }", "public function getLabel(): string {\n $label = trim($this->brief_journal_title->value ?? '');\n $volume = trim($this->volume->value ?? '');\n $issue = trim($this->issue->value ?? '');\n $pagination = trim($this->pagination->value ?? '');\n $year = trim($this->year->value ?? '');\n if (!empty($issue)) {\n $volume .= '(' . $issue . ')';\n }\n if (!empty($volume)) {\n $label .= \" $volume\";\n }\n if (!empty($pagination)) {\n $label .= \": $pagination\";\n }\n if (!empty($year)) {\n $label .= \", $year\";\n }\n return $label;\n }", "protected function get_runway() {\n// Format is Rrrr/vvvvFT where rrr = runway number and vvvv = visibility in feet.\n if (substr($this->current_group_text,0,1) == 'R') {\n $this->varConcatenate($this->wxInfo,'CODE_RUNWAY', $this->current_group_text);\n $this->varConcatenate($this->wxInfo, 'IGNORES', $this->current_group_text);\n\n $this->current_ptr++;\n }\n else $this->current_group++;\n }", "public function getAvenueStreet() :string\n {\n return $this->avenueStreet;\n }", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "public function __toString()\r\n {\r\n $passengerName = \"\";\r\n $route = $this->getRoutes();\r\n $passengerName = date(\"m/d/Y\",strtotime($this->getStartDate())).\" - \".$route->getOriginString().\" to \".$route->getDestinationString();\r\n\r\n return $passengerName;\r\n\r\n }", "public function getPostcode(): string\n {\n return $this->postcode;\n }", "function oos_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = \"\\n\") {\n\n // Get database information\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $address_booktable = $oostable['address_book'];\n $query = \"SELECT entry_firstname AS firstname, entry_lastname AS lastname, entry_company AS company,\n entry_street_address AS street_address, entry_suburb AS suburb, entry_city AS city,\n entry_postcode AS postcode, entry_state AS state, entry_zone_id AS zone_id,\n entry_country_id AS country_id\n FROM $address_booktable\n WHERE customers_id = '\" . intval($customers_id) . \"' AND\n address_book_id = '\" . intval($address_id) . \"'\";\n $address = $dbconn->GetRow($query);\n\n $format_id = oos_get_address_format_id($address['country_id']);\n\n return oos_address_format($format_id, $address, $html, $boln, $eoln);\n }", "public function display_billing_status($status){\n\t\tif($status == 'W' || $status == 'R'){\n\t\t\t$st = 'L1 - P';\n\t\t}elseif($status == 'A'){\t\n\t \t\t$st = 'L1 - A';\n\t\t}\n\t\treturn $st;\n\t}", "public function get_this_convention() : string {\n\t\tif ( is_singular( 'location' ) ) {\n\t\t\treturn strtolower( get_field( 'convention_abbreviated_name' ) );\n\t\t} else {\n\t\t\t$location_tax = wp_get_post_terms( get_the_ID(), 'ghc_conventions_taxonomy' );\n\t\t\treturn $this->get_single_convention_abbreviation( $location_tax[0]->slug );\n\t\t}\n\n\t\treturn '';\n\t}", "public static function getLekabStatusDesc($code)\n {\n switch (intval($code)) {\n case 0:\n return \"Queued for delivery\";\n case 1:\n return \"Sent to operator\";\n case 2:\n return \"Delivered to the mobile station\";\n case 3:\n return \"The message was deleted\";\n case 4:\n return \"The message has expired\";\n case 5:\n return \"The message was rejected by the operator\";\n case 6:\n return \"The message could not be delivered\";\n case 7:\n return \"The message was accepted by the operator\";\n case 8:\n return \"The subscribers mobile station is switched off\";\n case 9:\n return \"The subscriber is not known\";\n case 10:\n return \"The destination address is invalid\";\n case 11:\n return \"The mobile station can not receive the message\";\n case 12:\n return \"The status of the message is unknown\";\n case 13:\n return \"Internal error when sending the message\";\n default:\n return \"(UNKNOWN CODE?)\";\n }\n }", "function getTitle(&$record){\n $type = array('H' => 'Hydrological Station', 'M'=>'Meteorological Station');\n $title = \"\".$type[$record->val('type_station')].\" - id: \".$record->val('id_station');\n \n return $title;\n }", "private function buildMaptype() {\n $result = 'roadmap';\n\n return '&maptype=' . $result;\n }", "function wcfm_tracking_url_display_label( $display_key ) {\r\n\t\tglobal $WCFM, $WCFMu;\r\n\t\t\r\n\t\tif( $display_key == 'wcfm_tracking_code' ) {\r\n\t\t\t$display_key = __( 'Tracking Code', 'wc-frontend-manager-ultimate' );\r\n\t\t}\r\n\t\t\r\n\t\tif( $display_key == 'wcfm_tracking_url' ) {\r\n\t\t\t$display_key = __( 'Tracking URL', 'wc-frontend-manager-ultimate' );\r\n\t\t}\r\n\t\t\r\n\t\tif( $display_key == 'wcfm_mark_as_recived' ) {\r\n\t\t\t$display_key = __( 'Item(s) Received', 'wc-frontend-manager-ultimate' );\r\n\t\t}\r\n\t\t\r\n\t\treturn $display_key;\r\n\t}", "public function __toString()\n {\n return $this->locality;\n }", "public function getDisplayAttribute()\n {\n return $this->post . ' (' . $this->postcode . ')';\n }", "public function toString()\n {\n return 'Default billing and shipping address form is correct.';\n }", "public function toString()\n {\n return 'Default billing and shipping address form is correct.';\n }", "function getTeamFlag($countryCode) {\n\tif (!empty($countryCode)) {\n\t\treturn \"<img src='http://img.fifa.com/imgml/flags/s/{$countryCode}.gif' title='{$countryCode}' />\";\n\t}\n}", "function displayStation ($station, $value)\n {\n global $THRESHOLD, $IN_SERVICE;\n $str = $station->$value.\" @ \".$station->name;\n\n if ($station->status != $IN_SERVICE)\n return \"<b><font color='red'>\".$station->status.\"</font></b>\";\n if (intval($station->$value) < $THRESHOLD)\n return \"<b><font color='red'>\".$str.\"</font></b>\";\n\n return $str;\n }", "public function getSport()\n {\n return \"Football\";\n }", "function latto_place2book_ticketsinfo($variables) {\n $output = '';\n $place2book_id = $variables['place2book_id'];\n $url = $variables['url'];\n $type = $variables['type'];\n \n switch ($type) {\n case 'event-over':\n $output = '<button class=\"btn btn-warning btn-large\">' . t('The event has already taken place') . '</button>';\n break;\n case 'closed-admission':\n $output = '<button class=\"btn btn-warning btn-large\">' . t('Not open for ticket sale') . '</button>';\n break;\n case 'no-tickets-left':\n $output = '<button class=\"btn btn-warning btn-large\">' . t('Sold out') . '</button>';\n break;\n case 'order-link':\n $output = l(t('Book a ticket'), $url, array('attributes' => array('class' => array('btn', 'btn-primary', 'btn-large'))));\n break;\n default:\n $output = '';\n break;\n }\n \n return $output;\n}", "public function getContragentDirectionStr(): string\n {\n return self::DIRECTION_STRS_FOR_CONTRAGENT[$this->direction];\n }", "private function getTypeDescription()\n {\n switch($this->_type)\n {\n case 'Mountain':\n return \"Mountains are peaceful places. Your ships don't do any damage here, while your tanks will do 10% less damage. Flying weapons (airplanes and helicopters) do normal damage.\" . PHP_EOL;\n case 'Water':\n return \"Water is what you drink. It's also the place where your tanks will be completely useless, but your ships will do 1000% more damage. o7\" . PHP_EOL;\n case 'Open land':\n return \"Who doesn't like the smell of grass in the morning, with a hint of blood from your enemy? Your tanks will do 1000% more damage here, while ships will do none. Good luck!\" . PHP_EOL;\n case 'Woods':\n return \"All you can do is hide, and sometimes it's the best option. Your tanks will do 40% less damage, your ships wont do any damage at all, your air vehicles will do 10% more, and your foot soldiers will do 30% more, so use them wisely. This is your chance, fella!\" . PHP_EOL;\n }\n }", "protected function renderZone_id()\n {\n // @codingStandardsIgnoreEnd\n return '';\n }", "public function upsRouteInfo($country_code,$postal_code){\n\t\t\t$select = $this->masterdb->select()\n\t\t\t\t\t ->from(array('UR'=>UPS_ROUTECODES),array('urc_code'))\n\t\t\t\t\t ->where('postal_high >=?', $postal_code)\n\t\t\t\t\t ->where('postal_low <=?', $postal_code)\n\t\t\t\t\t ->where('country_code =?' ,$country_code);\n\t\t\t$result = $this->masterdb->fetchRow($select);\n\t\t\t$urc_code = isset($result['urc_code'])?$result['urc_code']:'';\n\t\t\treturn $urc_code;\n\t}", "public function addressDetail(){\n $province = array('0'=>'กรุงเทพมหานคร','1'=>'กระบี่','2'=>'กาญจนบุรี','3'=>'กาฬสินธุ์','4'=>'กำแพงเพชร','5'=>'ขอนแก่น','6'=>'จันทบุรี','7'=>'ฉะเชิงเทรา','8'=>'ชลบุรี','9'=>'ชัยนาท','10'=>'ชัยภูมิ','11'=>'ชุมพร','12'=>'เชียงราย','13'=>'เชียงใหม่','14'=>'ตรัง','15'=>'ตราด','16'=>'ตาก','17'=>'นครนายก','18'=>'นครปฐม','19'=>'นครพนม','20'=>'นครราชสีมา','21'=>'นครศรีธรรมราช','22'=>'นครสวรรค์','23'=>'นนทบุรี','24'=>'นราธิวาส','25'=>'น่าน','26'=>'บึงกาฬ','27'=>'บุรีรัมย์','28'=>'ปทุมธานี','29'=>'ประจวบคีรีขันธ์','30'=>'ปราจีนบุรี','31'=>'ปัตตานี','32'=>'พระนครศรีอยุธยา','33'=>'พังงา','34'=>'พัทลุง','35'=>'พิจิตร','36'=>'พิษณุโลก','37'=>'เพชรบุรี','38'=>'เพชรบูรณ์','39'=>'แพร่','40'=>'พะเยา','41'=>'ภูเก็ต','42'=>'มหาสารคาม','43'=>'มุกดาหาร','44'=>'แม่ฮ่องสอน','45'=>'ยะลา','46'=>'ยโสธร','47'=>'ร้อยเอ็ด','48'=>'ระนอง','49'=>'ระยอง','50'=>'ราชบุรี','51'=>'ลพบุรี','52'=>'ลำปาง','53'=>'ลำพูน','54'=>'เลย','55'=>'ศรีสะเกษ','56'=>'สกลนคร','57'=>'สงขลา','58'=>'สตูล','59'=>'สมุทรปราการ','60'=>'สมุทรสงคราม','61'=>'สมุทรสาคร','62'=>'สระแก้ว','63'=>'สระบุรี','64'=>'สิงห์บุรี','65'=>'สุโขทัย','66'=>'สุพรรณบุรี','67'=>'สุราษฎร์ธานี','68'=>'สุรินทร์','69'=>'หนองคาย','70'=>'หนองบัวลำภู','71'=>'อ่างทอง','72'=>'อุดรธานี','73'=>'อุทัยธานี','74'=>'อุตรดิตถ์','75'=>'อุบลราชธานี','76'=>'อำนาจเจริญ');\n\n $tmp = explode(\",,\", $this->address);\n $arr['addressNo'] = $tmp[0];\n $arr['moo'] = $tmp[1];\n $arr['street'] = $tmp[2];\n $arr['subdistrict'] = $tmp[3];\n $arr['district'] = $tmp[4];\n $arr['province'] = $province[$tmp[5]];\n $arr['zipcode'] = $tmp[6];\n $arr['provinceNo'] = $tmp[5];\n return $arr;\n }", "public function getOrganizerName($organizerCode = null) \n {\n $this->db->select(\"toh_org_code, toh_org_desc, toh_org_code ||' - '|| toh_org_desc as toh_org_code_desc, toh_address, toh_postcode, toh_city, sm_state_desc, cm_country_desc\");\n $this->db->from('ims_hris.training_organizer_head, ims_hris.state_main, ims_hris.country_main');\n $this->db->where(\"toh_state=sm_state_code\");\n $this->db->where(\"toh_country=cm_country_code\");\n $this->db->where(\"COALESCE(toh_external_agency,'N') = 'Y'\");\n\n if(!empty($organizerCode)) {\n $this->db->where(\"toh_org_code\", $organizerCode);\n $q = $this->db->get();\n \n return $q->row_case('UPPER');\n } \n else {\n $this->db->order_by(\"2\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n } \n }", "function get_trip_type($type)\r\n{\r\n\tswitch($type) {\r\n\t\tcase 'circle' : $type = 'Round Way';\r\n\t\tbreak;\r\n\t\tcase 'oneway' : $type = 'One Way';\r\n\t\tbreak;\r\n\t\tdefault : $type = 'Multi Stop';\r\n\t\tbreak;\r\n\t}\r\n\treturn $type;\r\n}", "function encodeCity($cityName){\n\tswitch(strtoupper($cityName)){\n\t\tcase \"ARGYLE\": $code=51; break;\n\t\tcase \"AUBREY\": $code=60; break;\n\t\tcase \"BARTONVILLE\": $code=86; break;\n\t\tcase \"BOLIVAR\": $code=1778; break;\n\t\tcase \"CARROLLTON\": $code=241; break;\n\t\tcase \"CELINA\": $code=255; break;\n\t\tcase \"CLARK\": $code=1687; break;\n\t\tcase \"COPPELL\": $code=322; break;\n\t\tcase \"COPPER CANYON\": $code=323; break;\n\t\tcase \"CORINTH\": $code=325; break;\n\t\tcase \"CORRAL CITY\": $code=327; break;\n\t\tcase \"CROSS ROADS\": $code=347; break;\n\t\tcase \"DALLAS\": $code=364; break;\n\t\tcase \"DECATUR\": $code=376; break;\n\t\tcase \"DENTON\": $code=383; break;\n\t\tcase \"DISH\": $code=1707; break;\n\t\tcase \"DOUBLE OAK\": $code=408; break;\n\t\tcase \"FLOWER MOUND\": $code=499; break;\n\t\tcase \"FORT WORTH\": $code=514; break;\n\t\tcase \"FRISCO\": $code=525; break;\n\t\tcase \"GRAPEVINE\": $code=586; break;\n\t\tcase \"HACKBERRY\": $code=602; break;\n\t\tcase \"HASLET\": $code=627; break;\n\t\tcase \"HEBRON\": $code=634; break;\n\t\tcase \"HICKORY CREEK\": $code=649; break;\n\t\tcase \"HIGHLAND VILLAGE\": $code=655; break;\n\t\tcase \"JUSTIN\": $code=737; break;\n\t\tcase \"KRUGERVILLE\": $code=777; break;\n\t\tcase \"KRUM\": $code=778; break;\n\t\tcase \"LAKE DALLAS\": $code=801; break;\n\t\tcase \"LAKEWOOD VILLAGE\": $code=811; break;\n\t\tcase \"LANTANA\": $code=818; break;\n\t\tcase \"LEWISVILLE\": $code=839; break;\n\t\tcase \"LINCOLN PARK\": $code=844; break;\n\t\tcase \"LITTLE ELM\": $code=851; break;\n\t\tcase \"MARSHALL CREEK\": $code=912; break;\n\t\tcase \"NO CITY\": $code=1675; break;\n\t\tcase \"NORTHLAKE\": $code=1064; break;\n\t\tcase \"OAK POINT\": $code=1070; break;\n\t\tcase \"PILOT POINT\": $code=1163; break;\n\t\tcase \"PLANO\": $code=1172; break;\n\t\tcase \"PONDER\": $code=1185; break;\n\t\tcase \"PROSPER\": $code=1215; break;\n\t\tcase \"PROVIDENCE VILLAGE\": $code=1698; break;\n\t\tcase \"RHOME\": $code=1252; break;\n\t\tcase \"ROANOKE\": $code=1273; break;\n\t\tcase \"SANGER\": $code=1346; break;\n\t\tcase \"SAVANNAH\": $code=1681; break;\n\t\tcase \"SHADY SHORES\": $code=1377; break;\n\t\tcase \"SLIDELL\": $code=1394; break;\n\t\tcase \"SOUTHLAKE\": $code=1411; break;\n\t\tcase \"THE COLONY\": $code=1479; break;\n\t\tcase \"TIOGA\": $code=1492; break;\n\t\tcase \"TROPHY CLUB\": $code=1511; break;\n\t\tcase \"VALLEY VIEW\": $code=1536; break;\n\t\tcase \"WESTLAKE\": $code=1584; break;\n\t\tdefault: $code=\"\";break;\n\t}\n\treturn $code;\n}", "function GetPacket($GetPacket)\n{\n\tif ($GetPacket == 1) return \"Bronspaket\";\n\tif ($GetPacket == 2) return \"Silverpaket\";\n\tif ($GetPacket == 3) return \"Guldpaket\";\n\tif ($GetPacket == 4) return \"VIP-paket\";\n\tif ($GetPacket > 4) return \"VIP PLUS\";\n}", "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "function stringify() {\n return $this->Name.' '.$this->Addressln1;\n }", "public function showCarInfo()\n\t{\n\t\treturn sprintf(\n\t\t\t\t\t'The car model is %s, with %s color and max speed - %d. The current speed is %d and current gear is %d.' ,\n\t\t\t\t\t$this->model,\n\t\t\t\t\t$this->color,\n\t\t\t\t\t$this->maxSpeed,\n\t\t\t\t\t$this->currentSpeed,\n\t\t\t\t\t$this->currentGear\n\t\t\t\t\t);\n\t}", "protected function renderAddress()\n {\n\n\n $html = '';\n\n if ($this->model->isAttributeActive('street')) {\n $html .= $this->form->field($this->model, 'street')->textInput(['name' => $this->getInputName('street')]);\n }\n\n if ($this->model->isAttributeActive('city')) {\n $html .= Html::beginTag('div', ['class' => 'row']);\n $html .= $this->form->field($this->model, 'postcode', ['options' => ['class' => 'col-' . $this->colPrefix . '-4']])->textInput(['name' => $this->getInputName('postcode')]);\n $html .= $this->form->field($this->model, 'city', ['options' => ['class' => 'col-' . $this->colPrefix . '-8']])->textInput(['name' => $this->getInputName('city')]);\n $html .= Html::endTag('div');\n }\n\n if ($this->model->isAttributeActive('state')) {\n $html .= $this->form->field($this->model, 'state')->textInput(['name' => $this->getInputName('state')]);\n }\n if ($this->model->isAttributeActive('country')) {\n $html .= $this->form->field($this->model, 'country')->dropDownList(Geo::IsoCountryList(), ['name' => $this->getInputName('country')]);\n }\n\n return $html;\n }", "public function toString() : string\n {\n return $this->address;\n }", "public function getDisplayNameAttribute()\n {\n if($this->is_active) {return '<a href=\"'.$this->url.'\" class=\"display-location\">'.$this->name.'</a>';}\n else {return '<s><a href=\"'.$this->url.'\" class=\"display-location text-muted\">'.$this->name.'</a></s>';}\n }", "public function __toString() // Позволява обекта да се принтира като стринг\n {\n return $this->model . \" \" . number_format($this->fuelAmount, 2) . \" \" . $this->distanceTravelled;\n }", "public function get_label() {\n\t\treturn __( 'Other URL', 'the-events-calendar' );\n\t}", "function bb_locatie($arguments = array()) {\n\t\t$address = $this->parseArray(array('[/locatie]'), array());\n\t\t$map = $this->maps(htmlspecialchars($address), $arguments);\n\t\treturn '<span class=\"hoverIntent\"><a href=\"https://maps.google.nl/maps?q=' . htmlspecialchars($address) . '\">' . $address . ' <img src=\"/plaetjes/famfamfam/map.png\" alt=\"map\" title=\"Kaart\" /></a><div class=\"hoverIntentContent\">' . $map . '</div></span>';\n\t}", "public function getStateNameByCode($code) {\n $states = array(\n \"AC\" => \"Acre\",\n \"AL\" => \"Alagoas\",\n \"AM\" => \"Amazonas\",\n \"AP\" => \"Amapá\",\n \"BA\" => \"Bahia\",\n \"CE\" => \"Ceará\",\n \"DF\" => \"Distrito Federal\",\n \"ES\" => \"Espírito Santo\",\n \"GO\" => \"Goiás\",\n \"MA\" => \"Maranhão\",\n \"MT\" => \"Mato Grosso\",\n \"MS\" => \"Mato Grosso do Sul\",\n \"MG\" => \"Minas Gerais\",\n \"PA\" => \"Pará\",\n \"PB\" => \"Paraíba\",\n \"PR\" => \"Paraná\",\n \"PE\" => \"Pernambuco\",\n \"PI\" => \"Piauí\",\n \"RJ\" => \"Rio de Janeiro\",\n \"RN\" => \"Rio Grande do Norte\",\n \"RO\" => \"Rondônia\",\n \"RS\" => \"Rio Grande do Sul\",\n \"RR\" => \"Roraima\",\n \"SC\" => \"Santa Catarina\",\n \"SE\" => \"Sergipe\",\n \"SP\" => \"São Paulo\",\n \"TO\" => \"Tocantins\" \n );\n\n if (isset($states[$code])) {\n return $states[$code];\n } else {\n return false;\n }\n }", "public function getLocalisation()\n {\n return $this->address . \" \" . $this->city . \" \" . $this->zipcode . \" \" . $this->country;\n }", "public function as_string() {\n return sprintf('%d %s', $this->code, self::$messages[$this->code]);\n }", "public function getFullAddressAttribute(): string\n {\n return \"{$this->street} {$this->house_number}, {$this->city} {$this->zip_code}\";\n }", "public function getFullAddressAttribute(): string\n {\n return \"$this->address\" . ($this->address2 ? ' #' . $this->address2 : '') . \", $this->city $this->state, $this->zip\";\n }", "function errorCase($lan) {\n\t\t$error_msg = \"\";\n\t\tif($lan == \"Hebrew\"){\n\t\t\t$error_msg = \"לא נמצאו נתונים.\";\n\t\t} \n\t\telse if($lan == \"English\") {\n\t\t\t$error_msg = \"Data not Found.\";\n\t\t} \n\t\telse if($lan == \"Arabic\") {\n\t\t\t$error_msg = \"لم يتم العثور على بيانات.\";\n\t\t}\n\t\telse {\n\t\t\t$error_msg = \"Data not Found.\";\n\t\t}\n\t\n\t\t$output = '\n\t\t\t<div class=\"table-responsive\">\n\t\t\t\t<table class=\"table table-bordered\" id=\"tableWidth\" >\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">'.$error_msg.'</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>';\n\t\techo $output;\n\t}", "public function getStreet();", "function get_string() {\n\t\t$attribs = $this->__attribs();\n\t\t$str = $this->__str();\n\t\t$str = '<a'.$attribs.'>'.$this->label.$str.'</a>';\n\t\treturn $str;\n\t}", "public function getFullAddress() {\n $address = '';\n if (isset($this->street)) {\n $address .= $this->street . ', ';\n }\n\n if (isset($this->postcode)) {\n $address .= $this->postcode . ' ';\n }\n\n if (isset($this->city)) {\n $address .= $this->city . ', ';\n }\n\n// if (isset($this->state)) {\n// $address .= $this->state . ', ';\n// }\n\n if (isset($this->country)) {\n $address .= trans('countries.' . $this->country);\n }\n\n return $address;\n }", "public function checkcasondelivery($pincode){\n\t\t$this->db->where('PinCode', $pincode);\n\t\t$query=$this->db->get('tbl_cod');\n\t\tif($query->num_rows()==1){\n\t\t\treturn $query->row(0)->LocationName;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "function testModeName($type) {\n switch ($type) {\n case 'firstName':\n $tagType = 'First Name';\n break;\n case 'lastName':\n $tagType = 'Last Name';\n break;\n case 'customerFeedback':\n $tagType = 'Feedback';\n break;\n default:\n $tagType = 'First and Last Name';\n }\n\n return '[Test Mode: Customer ' . $tagType . ' will appear here]';\n }", "public function getTown() :string\n {\n return $this->town;\n }", "function agst_pmpro_level_cost_text($cost, $level)\n{\n\t$cost .= __(\" Customers in Australia will be charged a 10% tax.\", 'pmpro-australia-gst');\n\t\n\treturn $cost;\n}", "protected function getSportString() {\n\t\treturn ($this->sportid == -1 ? __('All') : SportFactory::name($this->sportid));\n\t}", "public function status_label(){\n\t\t$label='';\n\t\t\tswitch($this->status){\n\t\t\t\tCASE '1' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '2' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '3' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '4' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '5' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '6' : $label = 'label-info';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '7' : $label = 'label-warning';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '8' : $label = 'label-danger';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '9' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tCASE '11' : $label = 'label-success';\n\t\t\t\t\tbreak;\n\t\t\t\tCASE '15' : $label = 'label-danger';\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\treturn $label;\n\t}", "public function genMapsLink()\n {\n $city = str_replace(' ', '+', $this->getCity()->getCityName());\n $street = str_replace(' ', '+', $this->getStreet());\n $hno = str_replace(' ', '+', $this->getHouseNo());\n\n $url = \"https://maps.google.com?q=\" . $city . '+' . $street . '+' . $hno;\n\n return $url;\n }", "public function detail(): string\n {\n // PS5 titles don't seem to have the detail data.\n if ($this->serviceName() == 'trophy2') {\n return '';\n }\n\n return $this->pluck('trophyTitleDetail');\n }", "protected function LiveName()\n {\n $finalString = _t('OrderModifier.TAXCOULDNOTBEDETERMINED', 'tax could not be determined');\n $countryCode = $this->LiveCountry();\n $startString = '';\n $name = '';\n $endString = '';\n $taxObjects = $this->currentTaxObjects();\n if ($taxObjects) {\n $objectArray = [];\n foreach ($taxObjects as $object) {\n $objectArray[] = $object->Name;\n }\n if (count($objectArray)) {\n $name = implode(', ', $objectArray);\n }\n if ($this->config()->get('exclusive_explanation') && $this->isExclusive()) {\n $endString = $this->config()->get('exclusive_explanation');\n } elseif ($this->Config()->get('inclusive_explanation') && $this->isInclusive()) {\n $endString = $this->Config()->get('inclusive_explanation');\n }\n if ($name) {\n $finalString = $startString . $name . $endString;\n }\n } else {\n if ($this->hasExceptionTaxes()) {\n $finalString = $this->Config()->get('no_tax_description');\n }\n }\n if ($countryCode && $finalString) {\n $countryName = EcommerceCountry::find_title($countryCode);\n if ($this->Config()->get('based_on_country_note') && $countryName && $countryCode !== self::get_default_country_code_combined()) {\n $finalString .= $this->Config()->get('based_on_country_note') . ' ' . $countryName;\n }\n }\n\n return $finalString;\n }", "function getAllocationTypeLabel(){\n\t\t$types = getPartnerAllocationTypes();\n\t\tif(isEmptyString($this->getFarmisType())){\n\t\t\treturn '';\n\t\t}\n\t\tif(isArrayKeyAnEmptyString($this->getFarmisType(), $types)){\n\t\t\treturn '';\n\t\t}\n\t\treturn $types[$this->getFarmisType()];\n\t}" ]
[ "0.61148113", "0.5983148", "0.5745325", "0.57320017", "0.57055014", "0.5679392", "0.56652826", "0.55911344", "0.558984", "0.5588558", "0.55439734", "0.5530149", "0.5502743", "0.5501032", "0.5499579", "0.5481047", "0.5479658", "0.5478064", "0.5460066", "0.5451565", "0.5448662", "0.5435692", "0.5428612", "0.54219335", "0.54174894", "0.5391926", "0.53770596", "0.5368788", "0.5363924", "0.53585917", "0.5351333", "0.53316313", "0.5328768", "0.53275836", "0.53251725", "0.53245705", "0.5320279", "0.5312596", "0.53105646", "0.53003705", "0.5295689", "0.5290227", "0.52872074", "0.52870744", "0.52840316", "0.5279913", "0.5279204", "0.5271385", "0.52637887", "0.52540135", "0.52407926", "0.5233755", "0.52327853", "0.5226024", "0.5220537", "0.52057517", "0.5189313", "0.51853615", "0.51853615", "0.5184535", "0.51769453", "0.51746917", "0.51705915", "0.5158744", "0.5137832", "0.51375264", "0.5135714", "0.51283765", "0.5126773", "0.51242197", "0.5121031", "0.5120398", "0.51195335", "0.51138633", "0.5112239", "0.5111551", "0.5107139", "0.50995886", "0.5098904", "0.5094735", "0.5089403", "0.50892705", "0.5088708", "0.5087629", "0.508453", "0.5082955", "0.50765", "0.50628906", "0.50617385", "0.5056425", "0.5056206", "0.50501406", "0.5042086", "0.50404894", "0.5035425", "0.5033903", "0.5029956", "0.50292724", "0.502734", "0.5026067" ]
0.77648205
0
For convience. This is used in both the ReportsPage template and the Pdf's html function
public function getBrief() { $baseUrl = "http://" . $_SERVER['SERVER_NAME'] . Director::BaseURL(); $themeDir = $baseUrl . 'themes/' . SSViewer::current_theme(); $html = '<div class="brief"> <div class="cell" >'.$this->statusButton().'</div> <div class="cell weather"><img src="'.$themeDir.'/images/weather_report/'.$this->getWeatherBrief().'.png" alt="weather-icon" /></div> <div class="cell temp">'.$this->getWeatherTempurature().'&deg;</div> <div class="cell snowfall"> Last Snowfall<br /> <span class="amount">'.$this->getLatestFall().'cm</span><br /> on '.$this->getLatestFallDate().' </div> </div>'; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateHtml()\n\t{\n\t}", "public function html() {}", "public function renderHTML()\n {\n }", "public abstract function asHTML();", "public function html();", "abstract public function generateHtml();", "public function header(){\n $header = '<html>\n <head>\n <style>\n @page{\n margin: 100px 25px;\n }\n header{\n position: absolute;\n top: -60px;\n left: 0px;\n right: 0px;\n height:20px;\n }\n .container-table{ \n margin:80px 0;\n width: 100%;\n }\n .fixed-footer{.\n width : 100%;\n position: fixed; \n bottom: -28; \n left: 0px; \n right: 0px;\n height: 50px; \n text-align:center;\n }\n .fixed-footer-right{\n position: absolute; \n bottom: -150; \n height: 0; \n font-size:13px;\n float : right;\n }\n .page-number:before {\n \n }\n </style>\n </head>\n /\n <script type=\"text/php\">\n if (isset($pdf)){\n $text = \"Page {PAGE_NUM} / {PAGE_COUNT}\";\n $size = 10;\n $font = $fontMetrics->getFont(\"Verdana\");\n $width = $fontMetrics->get_text_width($text, $font, $size) / 2;\n $x = ($pdf->get_width() - $width) / 2;\n $y = $pdf->get_height() - 35;\n $pdf->page_text($x, $y, $text, $font, $size);\n }\n </script>\n <body>\n <header>\n <p style=\"margin:0; position:left;\">\n <img src=\"images/logo.png\" width=\"200\" height=\"160\"/>\n </p>\n </header>'; \n return $header;\n }", "protected function render() {}", "protected function render() {}", "protected function render() {}", "abstract protected function view_generatePageContent();", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "public function toHTML()\n {\n }", "public function toHTML();", "protected function _handlePdfStringCallback() {}", "public function getRenderXhtml() {}", "abstract public function getHtml();", "protected function getPageRenderer() {}", "protected function setHtmlContent() {}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "private function generateReportFrontPage()\n {\n $period = $this->data->getPeriod();\n\n return '<h1>' . $this->getReportName() . '</h1><h2>' . $period->getStartDate()->format('d-m-Y') . ' - ' . $period->getEndDate()->format('d-m-Y') . '</h2>';\n }", "abstract protected function render_page_content(): void;", "function reporticoDefaults($reportico)\n{\n return;\n $reportico->createPageHeader(\"H1\", 2, \"{REPORT_TITLE}{STYLE border-width: 0px 0px 1px 0px; margin: 15px 0px 0px 0px; border-color: #000000; font-size: 18; border-style: solid;padding:0px 0px 0px 0px; width: 100%; background-color: inherit; color: #000; margin-left: 0%;margin-bottom: 20px;text-align:center}\");\n $reportico->setPageHeaderAttribute(\"H1\", \"ShowInHTML\", \"yes\");\n $reportico->setPageHeaderAttribute(\"H1\", \"ShowInPDF\", \"yes\");\n $reportico->setPageHeaderAttribute(\"H1\", \"justify\", \"left\");\n\n // Create Image on every page of PDF\n //$reportico->createPageHeader(\"H3\", 1, \"Time: date('Y-m-d H:i:s'){STYLE font-size: 8pt; text-align: right; font-style: italic;float:right;}\");\n //$reportico->setPageHeaderAttribute(\"H3\", \"ShowInHTML\", \"yes\");\n //$reportico->setPageHeaderAttribute(\"H3\", \"justify\", \"right\");\n\n $reportico->createPageHeader(\"H4\", 1, \"<img src='http://127.0.0.1/newarc/images/reportico100.png' style='width: 100%'>{STYLE width: 100; height: 50; margin: 0 0 0 0; background-image:http://127.0.0.1/newarc/images/reportico100.png;}\" );\n $reportico->createPageHeader(\"H4\", 1, \"<img src='http://127.0.0.1/newarc/images/reportico100.png' style='width: 100%'>{STYLE width: 100px; height: 50px; margin: 5px 0 0 0;}\" );\n $reportico->setPageHeaderAttribute(\"H4\", \"ShowInHTML\", \"yes\" );\n\n // Create Page No on bottom of PDF page\n $reportico->createPageFooter(\"F1\", 2, \"Page: {PAGE} of {PAGETOTAL} {STYLE border-width: 1 0 0 0; top: 0px; font-size: 6pt; margin: 2px 0px 0px 0px; font-style: italic; }\");\n $reportico->setPageFooterAttribute(\"F1\", \"justify\", \"left\");\n $reportico->setPageFooterAttribute(\"F1\", \"ShowInHTML\", \"yes\");\n\n $reportico->createPageFooter(\"F2\", 1, \"Time: date('Y-m-d H:i:s'){STYLE font-size: 6pt; margin-top: 2px;text-align: right; width: 100%; font-style: italic;top:2px;}\");\n $reportico->setPageFooterAttribute(\"F2\", \"ShowInHTML\", \"yes\");\n $reportico->setPageFooterAttribute(\"F2\", \"justify\", \"right\");\n\n}", "public function getPdfValue() {}", "public function getPdfValue() {}", "public function getPdfValue() {}", "function wisdom() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(6);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "protected function renderInformationContent() {}", "abstract function render_page();", "function html()\n {\n }", "function html()\n {\n }", "function html()\n {\n }", "public abstract function html(): string;", "public function getHtmlTemplate() {}", "protected function _beforeToHtml()\n {\n return parent::_beforeToHtml();\n }", "function _pdf($order_id, $html, $file_name, $head){\n $this->load->library('pdf');\n $od = $this->order_details_model->get_count($order_id);\n $size ='';// $od .\" ___ \" .PDF_PAGE_FORMAT;\n\n switch (true) {\n case $od>3 and $od <=5:\n $size = \"<h1>$od recipt A5</h1>\";\n $this->pdf->changePageFormat('A5');\n break;\n case $od>5 and $od<9: \n $size = \"<h1>$od recipt2</h1>\";\n $this->pdf->changePageFormat('RECIPT2');\n default:\n $size = \"<h1>$od recipt def</h1>\";\n \n break;\n }\n\n return $this->pdf->html($html, $file_name, $head);\n }", "protected function renderAsPlain() {}", "public function getHTML();", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render()\n {\n $fallbackLogo = FileUtility::findFilesBy(1, 'pages', 'logo');\n\n $page = $this->getPage();\n $logo = FileUtility::findFilesBy($page['uid'], 'pages', 'logo');\n\n if (!is_array($logo) || empty($logo)) {\n $logo = $fallbackLogo;\n }\n\n if (is_array($logo)) {\n $this->templateVariableContainer->add('logo', $logo[0] ?? null);\n }\n }", "abstract public function convert_to_html();", "function printReport() {\n # You need both of these globals!!\n global $report, $page_index;\n\n # This turns the Name Field into a link to the correct contact.\n $report->setFieldRule( 'Account',\n '<a href=\"/ACCT_main_workspace_page.php?content_page='\n . urlencode(\"/py/account/view.pt\")\n . '&args=' . urlencode('account_number=') \n . '%Account\">%Account</a>');\n\n\n # This does the actual printing of the HTML\n $report->printHTML( $page_index );\n}", "public function printHtmlPage(){\n\n // Change the content headers to that of HTML\n header('Content-type: text/html; charset=utf8');\n\n // Include the HTML wrapper and collect output\n ob_start();\n require_once(LEGACY_MMRPG_ROOT_DIR.'markup/html-wrapper.php');\n $html_markup = ob_get_clean();\n\n // Print out the collected markup and exit\n echo($html_markup);\n exit();\n\n }", "abstract function get_html();", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function getOutputHTML()\n\t{\n\t\t$startRecord=0;\t\t# for the first page\t\n\n\t\t# loop through pages and build the link for each\n\t\tfor($pageNum=0;$pageNum<$this->totalPages;$pageNum++)\n\t\t{\n\t\t # add the pageNum and corresponding startRecord to array to be use for creating prev and next link\n\t\t $this->startRecordArr[$pageNum+1]=$startRecord;\n\n\t\t\t# create the link for the page\n\t\t\t$this->outputHTML.=$this->createLink($pageNum,$startRecord);\n\t\t\t\n\t\t\t#each iteration needs to increment the startRecord by the numbe rof records per page\n\t\t\t$startRecord+=$this->recordsPerPage;\n\t\t}\n\n # create the previous and next page links\n $this->prevPageHTML.=$this->createPrevPageLink($this->activePage);\n $this->nextPageHTML.=$this->createNextPageLink($this->activePage);\n\n # append the three navigation link strings\n $this->outputHTML=$this->prevPageHTML.$this->outputHTML.$this->nextPageHTML;\n\n return $this->outputHTML;\n\t}", "function _pagehead(&$pdf, $object, $showaddress, $outputlangs)\n\t{\n\t\tglobal $conf,$langs;\n\t\t$default_font_size = pdf_getPDFFontSize($outputlangs);\n\n\t\t$outputlangs->load(\"main\");\n\t\t$outputlangs->load(\"dict\");\n\t\t$outputlangs->load(\"companies\");\n\t\t$outputlangs->load(\"interventions\");\n\n\t\tpdf_pagehead($pdf,$outputlangs,$this->page_hauteur);\n\n\t\t$posx=$this->marge_gauche;\n\t\t$posy=$this->marge_haute;\n\t\t$largeur_utile = $this->page_largeur-$this->marge_droite-$this->marge_gauche;\n\t\t$pdf->SetAutoPageBreak(0,0);\n\t\t\n\t\t$pdf->SetFont('','',$default_font_size-2);\n\t\t$pdf->SetTextColor(0,0,60);\n\t\t\n\t\t$pdf->SetXY($posx,$posy);\n\t\t$pdf->MultiCell($largeur_utile, 4, $outputlangs->transnoentities(\"Ref\").\" : \" . $outputlangs->convToOutputCharset($object->ref), '', 'L');\n\n\t\t$posy+=4;\n\t\t$pdf->SetXY($posx,$posy);\n\t\t$pdf->MultiCell($largeur_utile, 3, $outputlangs->transnoentities(\"Date\").\" : \" . dol_print_date($object->datec,\"day\",false,$outputlangs,true), '', 'L');\n\n\t\tif ($object->thirdparty->code_client)\n\t\t{\n\t\t\t$posy+=4;\n\t\t\t$pdf->SetXY($posx,$posy);\n\t\t\t$pdf->MultiCell($largeur_utile, 3, $outputlangs->transnoentities(\"CustomerCode\").\" : \" . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'L');\n\t\t}\n\n\t\t//Recipient name\n\t\t// On peut utiliser le nom de la societe du contact\n\t\tif ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {\n\t\t\t$thirdparty = $object->contact;\n\t\t} else {\n\t\t\t$thirdparty = $object->thirdparty;\n\t\t}\n\t\t\t\n\t\t$carac_client_name=pdfBuildThirdpartyName($thirdparty, $outputlangs);\n\n\t\t// Show recipient\n\t\t$posy+=4;\n\t\t$posx=$this->marge_gauche;\n\n\t\t// Show recipient name\n\t\t$pdf->SetXY($posx,$posy);\n\t\t$pdf->MultiCell($largeur_utile, 4, $carac_client_name, 0, 'L');\n\n\t\t$posy = $pdf->getY();\n\n\t\t$carac_client = '';\n\t\t// Phone\n\t\tif ($object->thirdparty->phone) $carac_client .= $outputlangs->transnoentities(\"PhoneShort\").\": \".$outputlangs->convToOutputCharset($object->thirdparty->phone);\n\t\t// Fax\n\t\tif ($object->thirdparty->fax) $carac_client .= \"\\n\".$outputlangs->transnoentities(\"Fax\").\": \".$outputlangs->convToOutputCharset($object->thirdparty->fax);\n\t\t\n\t\t// Show recipient information\n\t\t$pdf->SetXY($posx,$posy);\n\t\t$pdf->MultiCell($largeur_utile, 4, $carac_client, 0, 'L');\n\t\t\n\t}", "public function getHTML(): string;", "public function other()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'render css or js content in template',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $content = '';\n if ($this->_get->pageType() === 'css') {\n header('content-type: text/css');\n } elseif ($this->_get->pageType() === 'js') {\n header(\"content-type: text/javascript\");\n }\n \n foreach ($this->_get as $mod => $param) {\n if (is_array($param)) {\n\n foreach ($param as $val) {\n $content .= $this->_read($mod, $val, $this->_get->pageType());\n }\n } else {\n $content .= $this->_read($mod, $param, $this->_get->pageType());\n }\n }\n \n $this->generate('css_js', $content);\n }", "public function render_content() {\n\t}", "protected function _render()\n {\n }", "public abstract function get_html();", "protected function content_template() {}", "protected function content_template() {}", "function join_pdf()\n\t\t{\n\t\t}", "public function render(){\n $web=$this->tmp;\n // $this->pdf=self::_pipeExec(\n $cmd = '\"'.$this->cmd.'\"'\n .(($this->copies>1)?' --copies '.$this->copies:'') // number of copies\n .' --orientation '.$this->orient // orientation\n .' --page-size '.$this->size // page size\n .($this->quiet?' --quiet':'') // table of contents\n .($this->print?' --print-media-type':'') // table of contents\n .($this->toc?' --toc':'') // table of contents\n .($this->grayscale?' --grayscale':'') // grayscale\n .(($this->title!='')?' --title \"'.$this->title.'\"':'') // title\n .' \"'.$web.'\" \"'.$this->tmp.'.pdf\"'; // URL and optional to write to STDOUT\n if( $this->debug ) echo \"Running rendering command: $cmd\\n\";\n exec( $cmd );\n // if(strpos(strtolower($this->pdf['stderr']),'error')!==false)throw new Exception('WKPDF system error: <pre>'.$this->pdf['stderr'].'</pre>');\n // if($this->pdf['stdout']=='')throw new Exception('WKPDF didn\\'t return any data. <pre>'.$this->pdf['stderr'].'</pre>');\n // if(((int)$this->pdf['return'])>1)throw new Exception('WKPDF shell error, return code '.(int)$this->pdf['return'].'.');\n // $this->status=$this->pdf['stderr'];\n // $this->pdf=$this->pdf['stdout'];\n if( !$this->debug ) unlink($this->tmp);\n $this->pdf = file_get_contents( $this->tmp.\".pdf\" );\n if( $this->debug && strlen( $this->pdf ) == 0 ) echo \"Generated PDF is zero length\\n\";\n if( !$this->debug ) unlink( $this->tmp.\".pdf\" );\n }", "function render($embedded=false) { return \"\"; }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "public function render() {\r\n\t\t\r\n $pdf=new PDF_HTML(MainConfig::$pdf_settings['orientation'],'pt',MainConfig::$pdf_settings['format']);\r\n \t $this->renderPDF($pdf);\r\n\t\t$pdf->Output(\"rkeys.pdf\",\"I\");\r\n \t}", "function qa_self_html()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_used_url_format;\n\n\treturn qa_path_html(qa_request(), $_GET, null, $qa_used_url_format);\n}", "function addCommonHtml() \n\t{\n\t\treturn true;\n\t}", "private function printHTML() \n\t{\n\t\t// str with error type and nr of errors\n\t\tif ($this->error_nr_html == -1) {\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\t\t\t\n\t\t\t$this->Write(5,_AC(\"html_validator_disabled\"));\n\t\t\t$this->SetTextColor(0);\n\t\t} else {\t\t\t\t\n\t\t\t$this->SetFont('DejaVu', 'B', 14);\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->Write(5, _AC('file_report_html').' ('.$this->error_nr_html.' '._AC('file_report_found').'):');\t\t\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5,strip_tags(_AC(\"html_validator_provided_by\")));\n\t\t\t$this->Ln(10);\t\t\n\t\t\n\t\t\t// show congratulations if no errors found\n\t\t\tif ($this->error_nr_html == 0 && $this->html_error == '') {\n\t\t\t\t// no html validation errors, passed\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0, 128, 0);\n\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/feedback.jpg\";\n\t\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t\t$this->SetX(14);\n\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t$this->Write(5, _AC(\"congrats_html_validation\"));\n\t\t\t} else if($this->error_nr_html == 0 && $this->html_error != '') {\n\t\t\t\t// html validation errors\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t$this->Write(5, $this->html_error);\n\t\t\t} else { // else make report on errors\n\t\t\t\tforeach($this->html as $error) {\n\t\t\t\t\t// error icon img, line, column, error text\n\t\t\t\t\t$img_data = explode(\".\", $error['img_src']);\t\t\n\t\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/\".$img_data[0].\".jpg\";\n\t\t\t\t\t$this->Image($path, $this->GetX()+7, $this->GetY(), 4, 4);\n\t\t\t\t\t$this->SetX(21);\n\t\t\t\t\tif ($error['line'] != '' && $error['col'] != '') {\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$this->SetFont('DejaVu', 'BI', 9);\n\t\t\t\t\t\t$location = \" \"._AC('line').\" \".$error['line'].\", \"._AC('column').\" \".$error['col'].\": \";\n\t\t\t\t\t\t$this->Write(5, $location);\n\t\t\t\t\t}\n\t\t\t\t\t$this->SetTextColor(26, 74, 114);\n\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t$this->Write(5, html_entity_decode(strip_tags($error['err'])));\n\t\t\t\t\t$this->Ln(7);\n\t\n\t\t\t\t\t// html code of error\n\t\t\t\t\tif ($error['html_1'] != '' || $error['html_2'] != '' || $error['html_3'] != '') {\n\t\t\t\t\t\t$this->SetFont('DejaVu', '', 9);\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_1'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->SetTextColor(255, 0 ,0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_2'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_3'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// text\n\t\t\t\t\tif ($error['text'] != '') {\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t\t$this->Write(5, html_entity_decode(strip_tags($error['text'])));\n\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} // end of else \n\t\t\n\t}", "public function template2(){\n\t\t$pdf = new pdfKop('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\t\t// set document information\n\t\t$pdf->SetCreator(PDF_CREATOR);\n\t\t$pdf->SetAuthor('Aduhay');\n\n\t\t// set default monospaced font\n\t\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\t\t$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n\t\t// set auto page breaks\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n\t\t// set image scale factor\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n\t\t// set some language-dependent strings (optional)\n\t\tif (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n\t\t require_once(dirname(__FILE__).'/lang/eng.php');\n\t\t $pdf->setLanguageArray($l);\n\t\t}\n\n\t\t$taman = $this->model->getLaporanByStatus();\n\n\t\t$pdf->AddPage();\n\t\t$pdf->SetFont('helvetica', 'B', 12);\n\n\t\t$pdf->Write(0, '', '', 0, 'C', true, 0, false, false, 0);\n\t\t$pdf->Write(0, \"Laporan Pengaduan Kondisi Taman Kota Bandung\", '', 0, 'C', true, 0, false, false, 0);\n\t\t$pdf->Write(0, \"Bulan \".$this->bulan.\" \".$this->tahun, '', 0, 'C', true, 0, false, false, 0);\n\t\t$pdf->Write(0, '', '', 0, 'C', true, 0, false, false, 0);\n\n\n\t\t$pdf->SetFont('helvetica', '', 10);\n\t\t$tbl = '\n\t\t<table border=\"1\" cellpadding=\"2\" align=\"center\">\n\t\t<thead>\n\t\t <tr>\n\t\t <th rowspan=\"2\" width=\"40\" align=\"center\"><b>No.</b></th>\n\t\t <th rowspan=\"2\" width=\"140\" align=\"center\"><b>Nama Taman</b></th>\n\t\t <th colspan=\"4\" align=\"center\"><b>Status</b></th>\n\t\t <th rowspan=\"2\" width=\"93\" align=\"center\"> <b>Total Aduan</b></th>\n\t\t </tr>\n\t\t <tr>\n\t\t <th align=\"center\"><b>Menunggu Konfirmasi</b></th>\n\t\t <th align=\"center\"><b>Ditolak</b></th>\n\t\t <th align=\"center\"><b>Sedang Ditanggapi</b></th>\n\t\t <th align=\"center\"><b>Sudah Ditanggapi</b></th>\n\t\t </tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t';\n\n\t\t$i=1;\n\t\tif (!$taman){\n\t\t $pdf->SetFont('helvetica', 'B', 10);\n\t\t $pdf->Write(0, \"Daftar taman kosong.\", '', 0, 'C', true, 0, false, false, 0);\n\t\t} else {\n\t\tforeach($taman as $row){\n\t\t if($row['id']){\n\t\t\t $tbl .= '<tr>\n\t\t\t <td width=\"40\" align=\"center\">'.$i.'.</td>\n\t\t\t <td width=\"140\" align=\"left\">'.$row['nama'].'</td>\n\t\t\t <td>'.$row['menunggu'].'</td>\n\t\t\t <td>'.$row['ditolak'].'</td>\n\t\t\t <td>'.$row['sedang'].'</td>\n\t\t\t <td>'.$row['sudah'].'</td>\n\t\t\t <td width=\"93\">'.$row['total'].'</td>\n\t\t\t </tr>';\n\t\t\t $i++;\n\t\t }\n\t\t}\n\t\t$tbl .= '<tr>\n\t\t <td colspan=\"2\" align=\"center\"><b>Total Aduan</b></td>\n\t\t <td>'.$taman['menunggu'].'</td>\n\t\t <td>'.$taman['ditolak'].'</td>\n\t\t <td>'.$taman['sedang'].'</td>\n\t\t <td>'.$taman['sudah'].'</td>\n\t\t <td width=\"93\">'.$taman['total'].'</td>\n\t\t </tr>';\n\t\t$tbl .= '</tbody></table>';\n\n\t\t $pdf->writeHTML($tbl, true, false, false, false, '');\n\t\t $pdf->Write(10, '', '', 0, 'C', true, 0, false, false, 0);\n\t\t}\n\t\t//Close and output PDF document\n\t\t$pdf->Output('Laporan '.$this->bulan.' '.$this->tahun.'.pdf', 'I');\n }", "function encabezadoReporte() {\n ?>\n <table width=\"100%\">\n <tr>\n <caption class=\"sigma centrar\">\n REPORTE DE INSCRIPCION\n </caption>\n </tr>\n </table>\n <?\n }", "public function getPdfContent();", "public function Pdf(){\n \n\n// $pdf->writeHTML($html, true, 0, true, 0);\n\n// $pdf->writeHTML($html);\n\n// pdf($html);die;\n\n // 如果是把数据库数据转PDF格式执行以下代码\n // 数据格式只能是字符串\n // $markTable = Db::table('unmark')\n // ->alias('a')\n // ->join('unstudent b', 'a.stu_id=b.stu_id ')\n // ->join('untest c', 'a.test_id = c.test_id')\n // ->join('unteacher d', ' c.tea_id =d.tea_id')\n // ->join('unmajor e', 'b.major_id =e.major_id')\n // ->join('uncourse f', 'c.course_id =f.course_id')\n // ->join('unqbank_type g', 'c.test_type =g.qbank_no')\n // ->select();\n // foreach ($markTable as $data) {\n // $PHPSheet->setCellValue(\"A\" . $i, $data['stu_rollno'])\n // ->setCellValue(\"B\" . $i, $data['stu_name'])\n // ->setCellValue(\"C\" . $i, $data['tea_name'])\n // ->setCellValue(\"D\" . $i, $data['major_name'])\n // ->setCellValue(\"E\" . $i, $data['course_name'])\n // ->setCellValue(\"F\" . $i, $data['test_desc'])\n // ->setCellValue(\"G\" . $i, $data['mark'])\n // ->setCellValue(\"H\" . $i, $data['qbank_type'])\n // ;\n // }\n\n\n // <table class=\"table table-striped table-hover\">\n\t// \t<thead>\n\t// \t\t<tr>\n\t// \t\t\t<th>\\</th>\n\t// \t\t\t<th id=\"stu_rollno\">学号<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"stu_name\">学生姓名<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"major_name\">专业名称<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"course_name\">课程名称<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"tea_name\">教师姓名<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"mark\">测试名称<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"mark\">成绩<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t\t<th id=\"type\">类型<i class=\"fa fa-fw fa-sort-amount-desc\"></i><i class=\"fa fa-fw fa-sort-amount-asc\"></i></th>\n\t// \t\t</tr>\n\t// \t</thead>\n\n\t// \t{volist name=\"markTable\" id=\"mark\" }\n\t// \t<tr>\n\t// \t\t<td>6666</td>\n\t// \t</tr>\n\t// \t{/volist}\n\t// </table>\n$html = <<<EOD\n<h1>该功能正在维护--敬请期待</h1>\n\nEOD;\n\n pdf($html);die;\n \n // //如果是把HTML页面转PDF格式执行以下代码\n // $html = \"http://localhost:8888/tp5/public/examOnlineForteacher/mark/listmark\";\n // $data = file($html);//获取html页面的url\n // pdf($data);die;\n \n }", "public function renderContent() {}", "protected function renderPageTitle() {}", "public function render() {\n $htmlContent = \"\";//Main Content\n\n return $htmlContent;\n}", "abstract protected function RenderContent();", "function printOtherInfos($pdf, $infosUtiles) {\n $pdf->setPrintFooter(true);\n $pdf->setPrintHeader(true);\n $pdf->AddPage();\n $pdf->Bookmark('Informations utiles', 2, 0, '', '', array(128, 0, 0));\n $pdf->SetTextColor(255, 255, 255);\n $pdf->SetFont('helvetica', '', 17);\n $pdf->SetXY(7, 25);\n $pdf->Cell(52, 0, \"Informations utiles \", 0, false, 'L', 1, '', 0, false, 'M', 'M');\n $pdf->SetXY(7, 35);\n preHTML($pdf);\n $pdf->writeHTML($infosUtiles, true, 0, true, 0);\n}", "protected function _beforeToHtml()\n {\n if (!$this->isReviewsEnabled()) {\n $this->setTemplate('');\n return parent::_beforeToHtml();\n }\n\n if (!$this->_setReviews()) {\n $this->setTemplate('');\n return parent::_beforeToHtml();\n }\n\n return parent::_beforeToHtml();\n }", "abstract protected function buildPdf(string $htmlPath) : void ;", "public function getHtml();", "protected abstract function generateHtmlBody() : string;", "private function htmlResponse() {\n\n /*\n * In case of error, return json\n */\n if (is_array($this->response) && $this->response['ErrorCode'] === 500) {\n $this->request['content-type'] = self::DEFAULT_RESPONSE_FORMAT;\n return $this->jsonResponse();\n }\n \n /*\n * No collection set => renders home page\n */\n if (!$this->request['collection']) {\n $template = new Template(realpath(dirname(__FILE__)) . '/../templates/home.php', $this);\n }\n /*\n * Identifier set => renders resource page\n */ else if ($this->request['identifier']) {\n $template = new Template(realpath(dirname(__FILE__)) . '/../templates/' . $this->responseDescription['template'] . '/' . $this->request['method'] . 'Resource' . '.php', $this, $this->response, $this->responseDescription);\n }\n /*\n * Renders collection\n */ else {\n $template = new Template(realpath(dirname(__FILE__)) . '/../templates/' . $this->responseDescription['template'] . '/' . $this->request['method'] . 'Collection' . '.php', $this, $this->response, $this->responseDescription);\n }\n\n return $template->render();\n }", "function __toString () {\n return $this->compile_html ();\n }", "abstract protected function getHtmlBody();", "public function asHTML() {\n $page = $this->doctype;\n $page .= $this->buildPage();\n if ( $this->indent ) {\n $cleaning_object = new CleanOutput();\n $page = $cleaning_object->clean( $page );\n }\n return $page;\n }", "private function buildHtmlReport($data)\n {\n if ($this->input->post('typeofreport', TRUE) == 'htm') {\n $this->load->view('yreportlib/report_format_html_ajax', $data);\n }\n }" ]
[ "0.66638637", "0.66609764", "0.6403624", "0.633475", "0.63173825", "0.6313634", "0.6234746", "0.6233817", "0.6233817", "0.6233434", "0.6164836", "0.61357164", "0.6118476", "0.6098063", "0.6069969", "0.60682714", "0.60583466", "0.6045935", "0.60381895", "0.6037625", "0.6025626", "0.6015427", "0.60137403", "0.59885556", "0.5983617", "0.5983617", "0.5961234", "0.5951671", "0.5946645", "0.5943271", "0.5943271", "0.5943271", "0.5940583", "0.59365577", "0.59340304", "0.59330976", "0.592932", "0.5925071", "0.5915216", "0.5915216", "0.5915216", "0.5914213", "0.5914014", "0.5908756", "0.59076834", "0.5906899", "0.58905005", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.5873365", "0.58661604", "0.5862725", "0.58567566", "0.5855526", "0.5841776", "0.5838887", "0.58323103", "0.5832275", "0.5832275", "0.5825655", "0.5824859", "0.5820925", "0.5819253", "0.58182484", "0.5817592", "0.5817592", "0.581744", "0.5817158", "0.5814971", "0.5812641", "0.5806504", "0.57953054", "0.5790018", "0.57824033", "0.5778178", "0.5764467", "0.5763707", "0.5755244", "0.5753467", "0.57526404", "0.57386965", "0.5723093", "0.5713731", "0.57134324", "0.57102704", "0.5692865", "0.56916004", "0.5684618", "0.56814444", "0.56754375" ]
0.0
-1
Returns the average snow from the min and max snow fall
public function calcSnowAvg() { $min = $this->snow['base']; $max = $this->snow['upperbase']; return ($min + $max)/2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function snow()\n {\n return $this->hasOne(Snow::class)->select(['min_snow', 'max_snow']);\n }", "public function average()\n {\n return $this->getSum() / count($this->values);\n }", "function array_max_min_avg($array) {\t\n\t\t// initialize variables\n\t\t$result\t= array();\n\t\t$amount = count($array);\n\t\t$avg\t= 0;\n\t\t\n\t\t// examine each array item\n\t\tfor ($x = 0; $x < $amount; $x++) {\n\t\t\t// if no low number, set it\n\t\t\tif (!isset($low)) {\n\t\t\t\t$low = $array[$x];\n\t\t\t\n\t\t\t// if there's a low number, compare and assign if necessary\n\t\t\t} elseif ($array[$x] < $low) {\n\t\t\t\t$low = $array[$x];\n\t\t\t}\n\t\t\t\n\t\t\t// same for the highest number\n\t\t\tif (!isset($high)) {\n\t\t\t\t$high = $array[$x];\n\t\t\t} elseif ($array[$x] > $high) {\n\t\t\t\t$high = $array[$x];\n\t\t\t}\n\t\t\t\n\t\t\t// sum all the values\t\t\n\t\t\t$avg = $avg + $array[$x];\n\t\t}\n\t\t\n\t\t// calculate the average\n\t\t$avg = $avg / $amount;\n\t\t\n\t\t// return the result\n\t\treturn array(\n\t\t\t'high'\t=> $high,\n\t\t\t'low'\t=> $low,\n\t\t\t'avg'\t=> $avg\n\t\t);\n\t}", "public function getAverage(): float\n {\n return $this->average;\n }", "public function spread () {\n $low = min($this->values);\n $high = max($this->values);\n return round(((1 - ($low/$high)) * 100), 3);\n }", "public function average(){\n $i = 0;\n $total = 0;\n for($i = 0; $i < count($this->collection); $i++){\n $total += $this->collection[$i]->amount;\n }\n if($i == 0)\n return 3;\n return (int)round($total/$i);\n }", "public function getPlayerAverages() : array\n {\n $average['shooting'] = 0;\n $average['skating'] = 0;\n $average['checking'] = 0;\n foreach ($this->players as $player) {\n $average['shooting'] += $player->shooting;\n $average['skating'] += $player->skating;\n $average['checking'] += $player->checking;\n }\n // Checks if zero players are on a squad to prevent division by zero\n if (count($this->players) !== 0) {\n $average['shooting'] = (int) ($average['shooting'] / count($this->players));\n $average['skating'] = (int) ($average['skating'] / count($this->players));\n $average['checking'] = (int) ($average['checking'] / count($this->players));\n }\n return $average;\n }", "public function getAverageWins()\n {\n return round($this->getWinsAttribute() / $this->teams->count());\n }", "public function calcAverageMileage()\n {\n $battles = $this->battles - $this->battles_old;\n \n return $battles > 0 \n ? (float)$this->mileage / $battles \n : null;\n }", "public function getAverage()\n {\n $total = 0;\n $nb = 0;\n foreach ($this->evaluationSessions as $evaluationSession) {\n if ($evaluationSession->getStatus() === Status::CLOSED) {\n $total += $evaluationSession->getGlobalScore();\n $nb++;\n }\n }\n if ($nb > 0) {\n return floatval($total / $nb);\n }\n return -1;\n }", "function average() {\n $total = 0;\n foreach ($this->grades as $value) // goes through grades using foreach\n $total += $value;\n return $total / count($this->grades);\n }", "public static function average($parameters=null) {}", "public function calculateAverage()\n {\n return 0.0;\n }", "public function getAvg(): float\n {\n return $this->avg;\n }", "public function mean() {\n $count = count($this->value);\n $sum = array_sum($this->value);\n return ((float) $sum) / $count;\n }", "public function getAverageAlt() :float\n {\n //https://stackoverflow.com/a/33461488/1469799\n $numbers = array_filter($this->numbers);\n return floatval(array_sum($numbers)/count($numbers));\n }", "public function getAveragePointsAgainst()\n {\n return number_format((float) $this->getPointsAgainst() / $this->teams->count(), 2, '.', '');\n }", "public function average(): float\n {\n return $this->sum() / $this->count();\n }", "public static function average(array $parameters = []);", "public function getAveragePointsFor()\n {\n return number_format((float) $this->getPointsFor() / $this->teams->count(), 2, '.', '');\n }", "static public function getAverageMonthPace() {\r\n\t\tif (self::$AverageMonthPace === false) {\r\n\t\t\t$AverageMonthPace = DB::getInstance()->query('SELECT AVG(`s`/60/`distance`) AS `avg` FROM `'.PREFIX.'training` WHERE `time` > '.(time()-30*DAY_IN_S).' AND `sportid`='.CONF_RUNNINGSPORT.' LIMIT 1')->fetch();\r\n\t\t\tself::$AverageMonthPace = $AverageMonthPace['avg'];\r\n\t\t}\r\n\r\n\t\treturn self::$AverageMonthPace;\r\n\t}", "function sma($candles) {\n $sma = 0.0;\n $count = count($candles);\n for($i = 0; $i < $count; $i++) {\n $sma += $candles[$i]->get_close();\n }\n return $sma / $count;\n }", "public function calcAverageTreesCut()\n {\n return $this->battles > 0 \n ? (float)$this->trees_cut / $this->battles \n : null;\n }", "public static function average(array $data): float\n\t{\n\t\treturn self::mean($data);\n\t}", "public static function average()\n {\n //retrieve the arguments passed to the function, and extracts the reference to the execution environment\n $args = func_get_args();\n $self = array_shift($args);\n\n //return the average of the array\n return array_sum($args) / count($args); \n }", "public function _getAverageScore() {\n\t\treturn $this->_averageScore;\n\t}", "public function getAverage() : float\n {\n if (is_array($this->numbers) && count($this->numbers)) {\n $sum = singleNumberMathFactory(0, 'sum');\n foreach ($this->numbers as $number) {\n $sum = (singleNumberMathFactory($sum->operate($number), 'sum'));\n }\n\n return singleNumberMathFactory($sum->operate(0), 'divide')->operate(count($this->numbers));\n }\n\n return 0;\n }", "public function getAverageLosses()\n {\n return round($this->getLossesAttribute() / $this->teams->count());\n }", "public function getSunDistanceMean()\n {\n return $this->sunDistanceMean;\n }", "public static function mean($values_arr){\r\n\t\treturn (float) (array_sum($values_arr) / count($values_arr));\r\n }", "public function getAverageFinish()\n {\n $total = $this->teams->reduce(function ($position, $team) {\n return $position + $team->position;\n });\n\n return round($total / $this->teams->count());\n }", "public function evalAvg()\n {\n $users = User::students()->get();\n $marks = [];\n foreach ( $users as $user )\n {\n if ($this->evalGradeExists($user))\n {\n array_push($marks,$this->userPercentage($user));\n }\n }\n $count = count($marks); //total numbers in array\n $total = 0;\n foreach ($marks as $mark) {\n $total += $mark; // total value of array numbers\n }\n $average = ($total/$count); // get average value\n return round($average,2);\n\n }", "function averageAge ( array $students) : float {\n\n\t$totalAge = 0;\n\n\tforeach ($students as $student) {\n\n\t\techo $student[\"name\"] . \" is \" . $student[\"age\"];\n\t\techo \"<br>\";\n\t\t$totalAge += $student[\"age\"];\n\n\t}\n\t//make sure $totalAge is the correct number\n\techo \"Total age is \" . $totalAge;\n\techo \"<br>\";\n\treturn ($totalAge/count($students));\n\n}", "function getAverageStats() {\n return $this->averageNpsStats;\n }", "function get_ave($array) {\n\t\t\t// echo $ave;\n\t\t\treturn \"average of is \" . array_sum($array) / count($array);\n\t\t}", "public function getRainVolume(): float\n {\n return (float)($this->details['rain']['3h'] ?? 0);\n }", "function overall_average($key, $value)\n {\n // first get high and low\n $high = $this->get_highest($this->sorted_input, $key);\n\n $low = $this->get_lowest($this->sorted_input, $key);\n\n // get differance in key\n\n $key_diff = $high[$key] - $low[$key];\n\n // get differance in value\n $value_diff = $high[$value] - $low[$value];\n\n // work out average\n // check if zero first\n if ($key_diff == 0) {\n $key_diff = 1;\n }\n\n $average = $value_diff / $key_diff;\n\n return $average;\n }", "function avg($s)\n{\n\tif (!$this->getSql()) return 0;\n\t$rows = $this->getClone()->select(\"avg($s) as n\");\n\treturn +$rows[0]['n'];\n}", "public function testAverage()\n {\n $dice = new Dice();\n $dice->roll(100);\n $faceValues = $dice->getFaceValues();\n $res = $dice->average();\n $this->assertEquals(array_sum($faceValues) / 100, $res);\n }", "function calculateAverage($values,$averageType='simple'){\n $average=array_sum($values)/count($values);\n return $average;\n}", "function area() { return ($this->max->x() - $this->min->x()) * ($this->max->y() - $this->min->y()); }", "public function getAverageRevenueSecondConversion()\n {\n $average = 0;\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n\n $nbConvertedCarts= $resource->getNbSecondReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts) {\n $total = $resource->getSumAmountSecondReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n $average = $total / $nbConvertedCarts;\n }\n\n return $average;\n }", "function average($array)\n{\n $avg = array_sum($array) / (count($array));\n return $avg;\n}", "function getAverageAge($input) {\n global $sum; //'sum' was global gedeclareerd\n for($i=0; $i<count($input); $i++) { //$i moest '0' inhouden\n $sum += $input[$i];\n }\n\n return $sum / $i; //moest nog delen door aantal values van het array\n }", "public function getSnow() {\n\n return $this->snow;\n }", "public function calculate()\n {\n $nationalInsurance = 0.0;\n $nationalInsurance += $this->calculateBand('basic');\n $nationalInsurance += $this->calculateBand('higher');\n return $nationalInsurance;\n }", "public function getCFUInAVG(): int\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->cfu * $esame->in_avg;\n }, 0);\n }", "function array_stats($values) {\n $min = min($values);\n $max = max($values);\n $mean = array_sum($values) / count($values);\n return array($min, $max, $mean);\n}", "function bbconnect_kpi_calculate_average($count, $amount) {\n return $count > 0 ? $amount/$count : 0;\n}", "public static function mean(array $data): float\n\t{\n\t\treturn array_sum($data) / count($data);\n\t}", "public function getAvgWidth() {}", "public function silver(): int\n {\n return $this->pluck('definedTrophies.silver');\n }", "function holt_winters($data, $season_length = 7, $alpha = 0.2, $beta = 0.01, $gamma = 0.01, $dev_gamma = 0.1) {\n \n // Calculate an initial trend level\n $trend1 = 0;\n for($i = 0; $i < $season_length; $i++) {\n $trend1 += $data[$i];\n }\n $trend1 /= $season_length;\n \n $trend2 = 0;\n for($i = $season_length; $i < 2*$season_length; $i++) {\n $trend2 += $data[$i];\n }\n $trend2 /= $season_length;\n \n $initial_trend = ($trend2 - $trend1) / $season_length;\n \n // Take the first value as the initial level\n $initial_level = $data[0];\n \n // Build index\n $index = array();\n foreach($data as $key => $val) {\n $index[$key] = $val / ($initial_level + ($key + 1) * $initial_trend);\n }\n \n // Build season buffer\n $season = array_fill(0, count($data), 0);\n for($i = 0; $i < $season_length; $i++) {\n $season[$i] = ($index[$i] + $index[$i+$season_length]) / 2;\n }\n \n // Normalise season\n $season_factor = $season_length / array_sum($season);\n foreach($season as $key => $val) {\n $season[$key] *= $season_factor;\n }\n \n \n $holt_winters = array();\n $deviations = array();\n $alpha_level = $initial_level;\n $beta_trend = $initial_trend;\n foreach($data as $key => $value) {\n $temp_level = $alpha_level;\n $temp_trend = $beta_trend;\n \n $alpha_level = $alpha * $value / $season[$key] + (1.0 - $alpha) * ($temp_level + $temp_trend);\n $beta_trend = $beta * ($alpha_level - $temp_level) + ( 1.0 - $beta ) * $temp_trend;\n \n $season[$key + $season_length] = $gamma * $value / $alpha_level + (1.0 - $gamma) * $season[$key];\n \n $holt_winters[$key] = ($alpha_level + $beta_trend * ($key + 1)) * $season[$key];\n $deviations[$key] = $dev_gamma * abs($value - $holt_winters[$key]) + (1-$dev_gamma) \n * (isset($deviations[$key - $season_length]) ? $deviations[$key - $season_length] : 0);\n }\n \n /* Could forecast a bit!\n for($i = 1; $i <= $season_length; $i++) {\n $holt_winters[$key + $i] = $alpha_level + $beta_trend * $season[$key + $i];\n }\n */\n \n return array($holt_winters, $deviations);\n}", "private function globalAverageScatter($equation, $minx, $maxx) \n {\n $num = $equation->value;\n $codebooks = $equation->meta->pluck('value')->first();\n\n //dd($codebooks);\n\n $query = DatasetMeta::query();\n $query->selectRaw(\"t1.value as yaxis, t2.value as xaxis\");\n $query->from('datasets_meta as t1');\n $query->join('datasets_meta as t2', function($q) {\n $q->on('t1.datasets_id', '=', 't2.datasets_id')\n ->on('t1.row', '=', 't2.row');\n });\n $query->where([\n ['t1.codebook_id', $codebooks],\n ['t2.codebook_id', $num],\n ['t2.value', '!=', 'header'],\n ['t1.value', '!=', 'header']\n ]);\n\n $results = $query->get();\n\n $x = [];\n $y = [];\n\n foreach($results as $result) {\n $x[] = floatval($result->xaxis);\n $y[] = floatval($result->yaxis);\n $xtimesy[] = floatval($result->xaxis) * floatval($result->yaxis);\n $xsquared[] = pow(floatval($result->xaxis), 2);\n $ysquared[] = pow(floatval($result->yaxis), 2);\n }\n\n\n //$minx = collect($x)->min(); // Minimum X - Axis Value\n //$maxx = collect($x)->max(); // Maximum X - Axis Value\n $sumx = collect($x)->sum(); // Sum of all X Axis Values\n $sumy = collect($y)->sum(); // Sum or all Y Axis Values\n $sumxtimesy = collect($xtimesy)->sum(); // The Sum of all X Axis * Y Axis Values\n $sumxsquared = collect($xsquared)->sum(); // The Sum of all X Axis values squared\n $sumysquared = collect($ysquared)->sum(); // The Sum of all Y Axis values squared\n $rows = $results->count(); // Total rows of data\n\n $intercept = (($sumy * $sumxsquared) - ($sumx * $sumxtimesy))/($rows * $sumxsquared - pow($sumx, 2));\n $slope = (($rows * $sumxtimesy) - ($sumx * $sumy))/($rows * $sumxsquared - pow($sumx, 2));\n\n // Need to get the min/max X point\n $stepsX = ($maxx - $minx) / 100;\n $linearX[] = $minx;\n for($i = 1; $i < 100; $i++) {\n $linearX[] = $minx + ($stepsX * $i);\n }\n $linearX[] = $maxx;\n\n $stepsY = ((($maxx * $slope) + $intercept) - (($minx * $slope) + $intercept)) / 100;\n\n $linearY[] = (($minx * $slope) + $intercept);\n for($i = 1; $i < 100; $i++) {\n $linearY[] = (($minx * $slope) + $intercept) + ($stepsY * $i);\n }\n $linearY[] = (($maxx * $slope) + $intercept);\n\n //dd($linearY);\n\n //$linearX = $//[$minx, $maxx];\n ///$linearY = //[(($minx * $slope) + $intercept), (($maxx * $slope) + $intercept)];\n\n $rnumerator = $rows * ($sumxtimesy) - ($sumx * $sumy);\n $rdenominatorleft = ($rows * $sumxsquared) - pow($sumx, 2);\n $rdenominatorright = ($rows * $sumysquared) - pow($sumy, 2);\n\n // This is the R-Squared Value\n $rValue = pow(($rnumerator / sqrt($rdenominatorleft * $rdenominatorright)), 2);\n\n // Generation of the P-Value\n $degreesOfFreedom = $rows - 2;\n $mean = $sumx / $rows;\n\n foreach($results as $result) {\n $predictive[] = pow($result->yaxis - (($result->xaxis * $slope) + $intercept), 2);\n $observed[] = pow($result->xaxis - $mean, 2);\n }\n\n \n // Generating the Standard Error\n $predictiveSum = collect($predictive)->sum();\n $predictiveWDoF = sqrt($predictiveSum / $degreesOfFreedom);\n $observedSum = collect($observed)->sum();\n $observedSqrt = sqrt($observedSum);\n $standardError = $predictiveWDoF / $observedSqrt;\n\n $tValue = $slope / $standardError;\n $pValue = $this->pValueTable($tValue, $degreesOfFreedom);\n\n\n return ['x' => $linearX, 'y' => $linearY, 'slope' => $slope, 'rValue' => $rValue, 'tValue' => $tValue, 'pValue' => $pValue];\n }", "function getMeanHours($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour){\n\t\t//Declaring arrays\t\n\t\t$HOURS_IN_DAY = 24;\n\t\t$hourly_array = accessData($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour);\n\t\t$sum_array = array();\n\t\t$divideBy_array = array();\n\t\t$mean_array = array();\n\t\t\n\t\t//Initializing the arrays.\n\t\t//$sum_array will hold the number of people that have crossed in that specific hour, for the entire timeframe specified.\n\t\t//$dividBy_array will holder the number of unique hours that were pulled from for each hour (unique regarding year, month, day) \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\t$sum_array[$i] = 0;\n\t\t\t$divideBy_array[$i] = 0;\n\t\t}\n\t\t\n\t\t//This fills the previously described associative arrays, $sum_array and $divideBy_array.\n\t\tforeach($hourly_array as $year => $temp1){\n\t\t\tforeach($hourly_array[$year] as $month => $temp2){\n\t\t\t\tforeach($hourly_array[$year][$month] as $day => $temp3){\n\t\t\t\t\tforeach($hourly_array[$year][$month][$day] as $hour => $value){\n\t\t\t\t\t\t$sum_array[$hour] += $value;\n\t\t\t\t\t\t$divideBy_array[$hour] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//This creates the associative array $mean_array dividing the $sum_array by the $divideBy_array, with the index\n\t\t//decided by the specific hour that has its mean being caluclated. \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\t$mean_array[$i] = (int)($sum_array[$i]/$divideBy_array[$i]);\n\t\t}\n\t\t\n\t\t//Any values that are still null will be set to 0.\n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\tif($mean_array[$i] == NULL)\n\t\t\t\t$mean_array[$i] = 0;\n\t\t}\n\t\t\t\n \t\treturn $mean_array;\n\t}", "abstract public function calculateAverage($grades);", "public function tempHumScore();", "public function getAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts = $resource->getSumNbConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts > 0) {\n $sumAmout = $resource->getSumAmountConvertedCarts(\n $this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod()\n );\n $average = $sumAmout / $nbConvertedCarts;\n }\n\n return $average;\n }", "function ros_get_grades_average($grads)\n{\n $povprecje = array();\n $cnt = count($grads);\n $povprecje['mistakes'] = 0;\n $povprecje['timeinseconds'] = 0;\n $povprecje['hitsperminute'] = 0;\n $povprecje['precision'] = 0;\n foreach($grads as $grade)\n {\n $povprecje['mistakes'] = $povprecje['mistakes'] + $grade->mistakes; \n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] + $grade->timeinseconds;\n }\n if($cnt != 0){\n $povprecje['mistakes'] = $povprecje['mistakes'] / $cnt;\n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] / $cnt;\n }\n return $povprecje;\n}", "public function getAverageConfidence(): float\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)\n ->avg('confidence');\n }", "public static function avg( ...$numbers ) {\n \n // Remove the options object from the number array.\n $numbers = array_head($numbers);\n \n // Get the average of all numbers.\n return (array_sum($numbers) / count($numbers));\n \n }", "public function getAverage()\r\n {\r\n $fSum = 0.0;\r\n foreach ($this->aNotes as $fNote) {\r\n $fSum += $fNote;\r\n }\r\n $fAverage = $fSum / count($this->aNotes);\r\n // get only 2 digits after comma\r\n $fAverage = floatval(number_format($fAverage, 2));\r\n return $fAverage;\r\n }", "function by_avg($students, $average)\n {\n //first we need average\n $sum = 0;\n for($i=0; $i<count($students)-1; $i++)\n {\n $sum = $sum + $students[$i]['mark'];\n } \n $avg = $sum / count($students);\n //now we can use average mark\n if($average == 'alt')\n {\n do\n {\n $a = rand(0, 7);\n $mark = $students[$a]['mark'];\n }\n while($mark >= $avg);\n print $students[$a]['name'].'-'.$students[$a]['mark'];\n }\n else\n {\n do\n {\n $a = rand(0, 7);\n $mark = $students[$a]['mark'];\n }\n while($mark <= $avg);\n print $students[$a]['name'].'-'.$students[$a]['mark'];\n }\n }", "public function getBestSeasonFinale();", "function avgT($a){\n\t\t\treturn array_sum($a) / count($a);\t\n\t\t}", "function meanArray(array $array): float\n {\n if(count($array) > 0)\n {\n return array_sum($array)/count($array);\n }\n }", "function average($arr){\n return ($arr) ? array_sum($arr)/count($arr) : 0;\n }", "public function averageRating() : float\n {\n return $this->ratings()->exists() ? $this->ratings()->avg('rating') : 0;\n }", "public function getAverageRevenueFirstConversion()\n {\n $average = 0;\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n\n $nbConvertedCarts= $resource->getNbFirstReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts) {\n $total = $resource->getSumAmountFirstReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n $average = $total / $nbConvertedCarts;\n }\n\n return $average;\n }", "public function getMin(): float;", "private function weightedAverage(&$data) {\n $accuracy = $this->options['accuracy'];\n $closest_dist = $data->closestPoint['distance'];\n $x_factor = round($closest_dist / $data->swingX['distance'] * $accuracy);\n $y_factor = round($closest_dist / $data->swingY['distance'] * $accuracy);\n $avg_sum = $accuracy * $data->closestPoint['value'] + \n $x_factor * $data->swingX['value'] + \n $y_factor * $data->swingY['value']; \n $data->wa = $avg_sum / ($accuracy + $x_factor + $y_factor);\n }", "function _calculateMaxima()\n {\n $x = $this->_minimumX;\n while ($x <= $this->_maximumX) {\n $y = $this->_getPointY($x);\n $this->_minimumY = min($y, $this->_minimumY);\n $this->_maximumY = max($y, $this->_maximumY);\n $x += $this->_stepX();\n }\n }", "function averageOfTwo($num1, $num2){\n// return $avg;\n return (($num1 + $num2) / 2);\n }", "public function getMediaPesata(): float\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->voto * $esame->cfu * $esame->in_avg;\n }, 0) / $this->getCFUInAVG();\n }", "function compute_rsi () {\n\n if (empty($this->rsi_gains) OR $this->value == $this->prev_value) {\n array_push($this->rsi_gains, 0);\n array_push($this->rsi_losses, 0);\n\n } elseif ($this->value > $this->prev_value) {\n array_push($this->rsi_gains, $this->value - $this->prev_value);\n array_push($this->rsi_losses, 0);\n\n } else {\n array_push($this->rsi_losses, $this->prev_value - $this->value);\n array_push($this->rsi_gains, 0);\n }\n\n if (count($this->rsi_gains) > $this->period) {\n array_shift($this->rsi_gains);\n array_shift($this->rsi_losses);\n }\n\n $gain_avg = array_sum($this->rsi_gains) / count($this->rsi_gains);\n $loss_avg = array_sum($this->rsi_losses) / count($this->rsi_gains);\n\n if ($loss_avg > 0) {\n $this->rsi = round(100-(100/(1+($gain_avg/$loss_avg))),3);\n\n } else {\n $this->rsi = 100;\n }\n }", "private function calculateAvg(array $floats): float\r\n {\r\n //avoid division by zero\r\n if (count($floats) == 0) {\r\n return 0;\r\n } else {\r\n return round(array_sum($floats) / count($floats), 2);\r\n }\r\n }", "function average($key, $value, $point)\n {\n // first get closest high and low\n $high = $this->get_high($this->sorted_input, $key, $point);\n\n $low = $this->get_low($this->sorted_input, $key, $point);\n\n // get differance in key\n\n $key_diff = $high[$key] - $low[$key];\n\n // get differance in value\n $value_diff = $high[$value] - $low[$value];\n\n // work out average\n // check if zero first\n if ($key_diff == 0) {\n $key_diff = 1;\n }\n\n $average = $value_diff / $key_diff;\n\n return $average;\n }", "public function normalisasi($values, $maxmin) {\n\n // untuk setiap data\n foreach ($values as $value) {\n\n // normalisasikan jarak\n $value->jarak = (float)$maxmin->jarak / (float)$value->jarak;\n\n // normalisasikan tiket_masuk\n $value->tiket_masuk = (float)$maxmin->tiket_masuk / (float)$value->tiket_masuk;\n \n // normalisasikan jumlah_fasilitas\n $value->jumlah_fasilitas = (float)$value->jumlah_fasilitas / (float)$maxmin->jumlah_fasilitas;\n \n // jika umur ingin digunakan\n if ($this->pakai_umur){\n\n // normalisasikan umur\n $value->umur = (float)$maxmin->umur / (float)$value->umur;\n } \n }\n \n // kembalikan hasil\n return $values;\n }", "private function calcTempScores() {\n foreach ($this->cities as $city){\n $cityTemp = $city['Temp']; \n $difference = abs($this->preferredTemp - $cityTemp); \n $score = ((self::TEMP_BASE - $difference)/4)*$this->citiesInputed; \n $this->tempScores[] = $score; \n }\n }", "function draw_average_line($average, $max_w, $min_w, $im){\r\n \r\n global $width, $height, $offset_w, $offset_h;\r\n $red = imagecolorallocate($im, 220, 0, 200);\r\n $y = $height - ($average - $min_w) * $height / ($max_w - $min_w) + $offset_h;\r\n imageline($im, $offset_w, $y, $offset_w + $width, $y, $red); \r\n imagestring($im, 2, $offset_w+$width+10, $y, round($average,2), $red);\r\n}", "function gradeMean($grades)\n {\n if (count($grades) == 0) {\n return null;\n }\n return array_sum($grades) / count($grades);\n }", "public function getTotalAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts= $resource->getSumNbConvertedCarts();\n if ($nbConvertedCarts) {\n $average = $resource->getSumAmountConvertedCarts() / $nbConvertedCarts;\n }\n\n return $average;\n }", "public static function getAverage()\n {\n \t$tempAveWaitTimeContainer = 0;\n $curlURL = \"http://149.202.73.207/contactRate.php\";\n $curlres = curl_init($curlURL);\n curl_setopt($curlres, CURLOPT_RETURNTRANSFER, true);\n $curlResRaw = curl_exec($curlres);\n $tempArr = json_decode($curlResRaw, true);\n $tempAveWaitTimeContainer = $tempArr[\"avgWaitTime\"];\n if ($tempArr[\"avgWaitTime\"] != 'null') {\n \t$tempAveWaitTimeContainer = $tempArr[\"avgWaitTime\"];\n }\n return $tempAveWaitTimeContainer;\n }", "public function mean(array $array)\n {\n return array_sum($array) / count($array);\n }", "function SDpointsForGame ( $moves ) {\n\t//Output: A number between 0 -> 1 of how suspicious that game is\n\n\tglobal $SD_CONST_TRESHOLD, $SD_CONST_ADJ;\n\n\t$deviation = SDdeviation( $moves );\n\t$output = 0;\n\n\tif( $deviation < $SD_CONST_TRESHOLD ){\n\t\t/*\n\t\t\t\t\t| Threshold - Deviation |\n\t\toutput = \t|---------------------------------|\n\t\t\t\t\t| Threshold - Adjustment Variable |\n\n\t\tBasically takes the diviation over mean and returns a scaled value between 0 -> 1\n\n\t\t*/\n\t\t$adjustment = SDrange( SDmean( $moves ) );\n\t\t$output = pow( ( $SD_CONST_TRESHOLD - $deviation ) / ( $SD_CONST_TRESHOLD - $adjustment ), 2 );\n\t\t//echo \"$output = $SD_CONST_TRESHOLD - $deviation / $SD_CONST_TRESHOLD - $adjustment \\n\";\n\t}\n\n\treturn ( $output > 1 ) ? 1 : $output;\n}", "public function getLandheightValueAttribute()\n {\n $landheight = Landheight::where(['village_id' => $this->id])->get();\n\n $landheight = $landheight->avg('total');\n\n return $landheight;\n }", "public function average() {\n $avgEmployees = Employee::avg(\"age\");\n\n return response()->json([\"age\"=>round($avgEmployees, 0)]);\n }", "function fiftyone_degrees_get_rolling_average($current_average, $value, $count) {\n return intval((($current_average * $count) + $value) / ($count + 1));\n}", "function mean_bpm($con) {\n\t$bpm = array();\n\n\tfor ($i = 0; $i < 6; $i++) {\n\n\t\t$mood_cluster = $i + 1;\n\n\t\t$qry = \"SELECT AVG(BPM) AS MEAN_BPM\n\t\t\t\tFROM SONGS\n\t\t\t\tWHERE MOOD = '$mood_cluster'\";\n\n\t\t$results = mysqli_query($con, $qry);\n\n\t\tif (mysqli_num_rows($results) > 0) {\n\n\t\t\twhile($row = mysqli_fetch_assoc($results)) {\n\n\t\t\t\t$bpm[$i] = round( $row['MEAN_BPM'] );\n\t\t\t\t// echo 'mood: '.$mood_cluster.' - bpm: '.$bpm[$i].\"</br>\";\n\n\t\t\t} // End While.\n\n\t\t\tmysqli_free_result($results);\n\t\t} // End if.\n\n\t// End for.\n\t}\n\t\n\treturn $bpm;\n}", "public function getIdealAverage(string $param) : int \n {\n // If no players are in the squad, return the ideal average.\n if (count($this->players) === 0) {\n return $this->idealAverage[$param];\n }\n // Find the average skill of all players in the squad.\n $total = 0;\n foreach ($this->players as $player) {\n $total += $player->{$param};\n }\n $average = (int) $total / count($this->players);\n // If $average is greater than the set average, \n // then find the value that would 'balance' out the current average.\n $difference = $average - $this->idealAverage[$param];\n return $this->idealAverage[$param] - $difference;\n }", "function movingAverage($input, $kDays) {\n\t// initialize the Day Count at zero before starting so fresh slate\n\t$Day = 0;\n\t// \tcount the # of items in the input array\n\t$count = count($input);\n\t// iterate through the different days' worth of data\n\tfor ($i = 0; $i < $count; $i++) {\n\t\t// set the numerator to zero to start a round of work\n\t\t$numerator = 0;\n\t\t// increment the Day count\n\t\t$Day ++;\n\t\t// if the number of days is less than the k totay we're looking for, use\n\t\t// all available information\n\t\tif ($Day < $kDays) {\n\t\t\t// add up all array elements until this day for the numerator\n\t\t\tfor ($j = 0; $j < $Day; $j++) {\n\t\t\t\t$numerator += $input[$j];\n\t\t\t}\n\t\t}\n\t\t// if the current day we're looking at is >= k days input, use only the\n\t\t// last k days of data (including current day)\n\t\telse if ($Day >= $kDays) {\n\t\t\t// set Day count = kDays since it will never be bigger than this\n\t\t\t$Day = $kDays;\n\t\t\t// subtract days to get the numerator, by adding those array\n\t\t\t// elements\n\t\t\tfor ($j = 0; $j < $kDays; $j++) {\n\t\t\t\t$numerator += $input[$i - $j];\n\t\t\t}\n\t\t}\n\t// the output at this position (assumed to be the same as in the first\n\t// array, because of the iteration) is the summed numerator divided by the\n\t// correct # of days\n\t$output[] = round($numerator / $Day, 2);\n\t}\n\treturn $output;\n}", "public function calculateAverageRating($data)\n {\n return ($data['product_rating'] + $data['operator_rating']\n + $data['marker_rating'] + $data['reliability_rating']) / 4;\n }", "public function getAvgRating(){\n if($this->ratings){\n return $this->ratings->avg('rating');\n }\n }", "function GetNormalisasi($data, $maxmin, $status){\n if(strtolower($status) == 'benefit'){\n return round( $data / $maxmin, 2);\n }else{\n return round($maxmin / $data, 2);\n }\n}", "public function getMeanGrade();", "function under (float $value, float $max) : float\n{\n return $value > $max ? $max : $value;\n}", "private function mergeAverage($cityInfo){\n //instatiate class ZtransformController to access the method which calculates the average\n $average = new ZtransformController();\n //make the average of the z-values\n $cityAvg = $average->calculateAverage($cityInfo, sizeof($cityInfo));\n //merge the city the values array with the average calculated\n $cityValues = array_merge($cityInfo, array(\"Média\" => $cityAvg));\n\n return $cityValues;\n }", "public function getBestInSeason($season);", "public function studentAverageCalculation($sum_total, $no_of_items){\n\t\t\t$average=$sum_total/$no_of_items;\n\t\t\treturn $average;\n\t\t}", "function inters($bbox1) {\r\n// echo \"$this -> BBox::inters($bbox1)<br>\\n\";\r\n $xmin = max($bbox1->min()->x(),$this->min()->x());\r\n $ymin = max($bbox1->min()->y(),$this->min()->y());\r\n $xmax = min($bbox1->max()->x(),$this->max()->x());\r\n $ymax = min($bbox1->max()->y(),$this->max()->y());\r\n if (($xmax < $xmin) or ($ymax < $ymin))\r\n return 0;\r\n// echo \"area=\",$this->area(),\", \",$bbox1->area(),\"<br>\\n\";\r\n return (($xmax-$xmin)*($ymax-$ymin)) / max($bbox1->area(), $this->area());\r\n }" ]
[ "0.59354967", "0.5871716", "0.5818352", "0.577135", "0.5716527", "0.5702971", "0.56810206", "0.56673115", "0.5655297", "0.56531775", "0.5614699", "0.55837667", "0.55360377", "0.55298674", "0.5500532", "0.5500177", "0.5471004", "0.5463209", "0.53743917", "0.53634906", "0.5330668", "0.5321194", "0.5303571", "0.5296796", "0.52845794", "0.5277554", "0.5260609", "0.52333516", "0.52259564", "0.5219905", "0.5211498", "0.52031064", "0.5196207", "0.51908046", "0.5171323", "0.51621693", "0.5147886", "0.50956315", "0.5093254", "0.5046726", "0.5030352", "0.5024753", "0.50131947", "0.49987906", "0.49987584", "0.49822575", "0.49770182", "0.49736455", "0.4972877", "0.4965594", "0.4964497", "0.49549758", "0.49546593", "0.49510273", "0.4950723", "0.4942394", "0.49301165", "0.49265492", "0.49072716", "0.4901765", "0.4901548", "0.490138", "0.48984727", "0.48928216", "0.4888011", "0.4882455", "0.4864475", "0.48487645", "0.48289463", "0.48279905", "0.48127627", "0.48106834", "0.4809026", "0.4807461", "0.47983274", "0.4794088", "0.47902435", "0.47685772", "0.47613573", "0.47558045", "0.47539046", "0.47526455", "0.4751803", "0.47498345", "0.4740237", "0.47392318", "0.47358286", "0.47321123", "0.47217932", "0.47213605", "0.4717595", "0.47144538", "0.47123817", "0.4712362", "0.47117826", "0.47093624", "0.47079933", "0.4706033", "0.4705285", "0.4702172" ]
0.8668021
0
Gets the feed's date and time for this ski field
public function getDateAndTime() { $dateAndTime = $this->date.$this->time; return date("g:iA, l jS F Y", strtotime($dateAndTime)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTime()\n {\n return $this->data['fields']['time'];\n }", "public function getEntry_time()\n {\n return $this->entry_time;\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getInstantAt()\n {\n return isset($this->feedbackFields['instant_at']) ? $this->feedbackFields['instant_at'] : null;\n }", "public function getDate()\n {\n return $this->getData('created_at');\n }", "public function time() {\n\n\t\t\t$date = $this->date();\n\t\t\t$output = '<time class=\"post-date\" datetime=\"'.$date['datetime'].'\" title=\"'.$date['posted'].'\">'.$date['date'].'</time>'.\"\\n\";\n\n\t\t\treturn $output;\n\t\t}", "public function getStartDateAndTime() {}", "public function getStamp()\n {\n return $this->_list->getStamp();\n }", "public function getStamp()\n {\n return $this->_list->getStamp();\n }", "public function get()\n {\n return $this->date;\n }", "protected function getDate() {\n\t\treturn date('Y-m-d h:i:s');\n\t}", "public function getPublishedTime()\n {\n $this->initialRequest();\n if (isset($this->item['snippet']['publishedAt'])) {\n return date('Y-m-d H:i:s', strtotime($this->item['snippet']['publishedAt']));\n }\n else {\n $this->onApiBadInterpretation(\"snippet.publishedAt not found\");\n }\n }", "public function getTimestamp()\n { return $this->get('timestamp'); }", "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "protected function _getDateTime()\n {\n return date('Y-m-d', time()) . 'T' . date('H:i:s', time());\n }", "public function getDatetime();", "function the_time() {\n\tglobal $discussion;\n\treturn $discussion['time'];\n}", "public function get_time() {\n return $this->_time;\n }", "function getDateTime(){\r\n return date('jS F Y\\, g:ia',$this->timestamp);\r\n }", "function getTime()\n {\n return date('Y-m-d H:i:s', $this->model->getTime());\n }", "public function getOffer_timestamp()\n {\n return $this->offer_timestamp;\n }", "public static function getDate() {\r\n\t\treturn date('Y-m-d H:i:s');\r\n\t}", "public function getDatetime()\n {\n return $this->datetime;\n }", "public function getDatetime()\n {\n return $this->datetime;\n }", "public function getDatetime()\n {\n return $this->datetime;\n }", "public function getDate()\n\t{\n\t\treturn $this->datetime;\n\t}", "private function _getDateTime()\r\n\t\t{\r\n\t\t\t\treturn getDateTime('%Y-%m-%d %H:%M:%S');\r\n\t\t}", "function getTimestamp() {\n return $this->time_stamp;\n }", "public function getEntryDate()\n {\n return $this->entry_date;\n }", "public function getTimeStamp() {\n return $this->timestamp;\n }", "public function getDate() {\n if($this->items!==false)\n $date = date('Y-m-d H:i:s',strtotime(@current($this->items)->created_at));\n if(strlen($date)==0)\n $date = date('Y-m-d H:i:s');\n return $date;\n }", "public function getDatetime()\r\n {\r\n return $this->m_datetime;\r\n }", "public function getDatetime()\n {\n return $this->_datetime;\n }", "function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}", "protected function getTimeStamp() {\n return time().' ('.strftime( '%Y.%m.%d %H:%I:%S', time() ).')';\n }", "function get_timecreated() {\n return $this->timecreated;\n }", "public function time()\n {\n return $this->client->publicRequest('GET', '/api/v3/time');\n }", "protected function get_time() {\n// Format is ddhhmmZ where dd = day, hh = hours, mm = minutes in UTC time.\n if (preg_match('#^([0-9]{2})([0-9]{2})([0-9]{2})Z$#',$this->current_group_text,$pieces)) {\n\n// date_default_timezone_set('UTC');\n $month_start = date('m',$this->timestamp);\n $year_start = date('Y',$this->timestamp);\n\n $hour = $pieces[2];\n $minute = $pieces[3];\n $day = $pieces[1];\n\n $this->wxInfo['ITEMS'][$this->tend]['CODE_TIME'] = $this->current_group_text;\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_DAY'] = $pieces[1];\n// $this->wxInfo['ITEMS'][$this->tend]['DATE_TIME'] = $pieces[2].':'.$pieces[3];\n\n $this->wxInfo['ITEMS'][$this->tend]['DATE_TIMESTAMP'] = mktime( $hour, $minute, 0, $month_start, $day, $year_start);\n\n $this->current_ptr++;\n }\n $this->current_group++;\n }", "public function getDate() {\n return @$this->attributes['date'];\n }", "public function getDocTime()\n {\n return $this->doc_time;\n }", "public function getTime()\n {\n return $this->values[\"time\"];\n }", "public function getPickupDateTimeAttribute()\n {\n return date('l, F d, Y h:i A',strtotime($this->attributes['created_at']));\n }", "public function dateSend()\n {\n if ($this->time) {\n return $this->time->format('m/d/Y');\n }\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getDistriCreateTime()\n {\n return $this->distri_create_time;\n }", "public function getTimestamp()\n\t{\n\t\treturn $this->getValue('timestamp');\n\t}", "public function getDateTime()\n {\n return $this->dateTime;\n }", "public function getDatetime()\n {\n return $this->toString(self::DATE_TIME_FORMAT);\n }", "public static function dateTimeSgbd()\n {\n return date('Y-m-d H:i:s');\n }", "public function getFilingDate() {\n\t\treturn self::$_filingDate;\n\t}", "public function getTime()\n {\n return $this->time;\n }", "public function getTimeStamp() {\n\t\treturn $this->timeStamp;\n\t}", "public function get_time_created(){\n\t\treturn $this->time_created;\n\t}", "protected function getTimeStamp()\n {\n return time() . ' (' . strftime('%Y.%m.%d %H:%I:%S', time()) . ')';\n }", "public function newest_entry_start()\n\t{\n\t\treturn ee()->localize->format_date('%Y-%m-%d %H:%i', ee()->localize->now - 604800);\n\t}", "function getDateRated() {\n\t\treturn $this->getData('dateRated');\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}", "public function getDatetime()\n {\n // Look for value only if not already set\n if(!isset($this->content)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->datetime = $user['uDatetime'];\n }\n return $this->datetime;\n }", "public function getTimestamp()\r\n {\r\n return $this->_timestamp;\r\n }", "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "public function getRequestDatetime()\n {\n return $this->auth->formattedRequestTime();\n }", "public function getTimeStamp()\n\t{\n\t\treturn $this->_current_timestamp;\n\t}", "public function getDate()\n {\n return $this->date;\n }", "function getData()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->_date;\n }", "public function getDate() { return $this->date; }", "public function getStamp()\n {\n $this->_init();\n return $this->_list_cache->getStamp();\n }", "public static function datetime()\n {\n return date('Y-m-d H:i:s');\n }", "public function getPostedDate()\n {\n return $this->_fields['PostedDate']['FieldValue'];\n }", "public function getPostedDate()\n {\n return $this->_fields['PostedDate']['FieldValue'];\n }", "public function getDateTime()\n {\n return $this->dateTime;\n }", "public function getDateTime()\n {\n return $this->dateTime;\n }", "public function getPresentationTimestamp() {}", "public function getDate() {\n return $this->date;\n }", "public function time() {\n return date('j F Y, H:i', $this->time_changed); // 12 October 2010, 09:14\n // return date('j F Y, h:ia', $this->time_changed); // 12 October 2010, 09:14am\n }", "public function getDateTime() {\n\t\treturn $this->datetime;\n\t}", "public function getDate()\r\n {\r\n return $this->date;\r\n }", "public function getTimestamp()\n {\n return $this->_timestamp;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }" ]
[ "0.64705867", "0.6430916", "0.63431954", "0.63422185", "0.633497", "0.62581724", "0.62491345", "0.6246051", "0.6246051", "0.6185376", "0.6131068", "0.6128788", "0.61142623", "0.6098921", "0.6094734", "0.6041388", "0.6040224", "0.6036484", "0.6030687", "0.6028931", "0.6017734", "0.60144866", "0.5977279", "0.5977279", "0.5977279", "0.5972688", "0.59691435", "0.5959537", "0.59576875", "0.59500414", "0.5909625", "0.5903618", "0.59007", "0.5896586", "0.58920974", "0.58878165", "0.58803654", "0.5876238", "0.5873161", "0.58714086", "0.58644164", "0.58568865", "0.5856757", "0.58431345", "0.58431345", "0.58427614", "0.5842391", "0.5834183", "0.58218914", "0.5817304", "0.5815683", "0.5813551", "0.5811663", "0.581018", "0.58091176", "0.5808384", "0.5806771", "0.5806112", "0.58005846", "0.5789638", "0.57877725", "0.57806844", "0.57718086", "0.5769999", "0.57699114", "0.5767183", "0.5766604", "0.5759765", "0.5759194", "0.57580316", "0.57580316", "0.57533425", "0.57533425", "0.57524306", "0.57490456", "0.5742975", "0.5741844", "0.57403004", "0.57399625", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655", "0.57329655" ]
0.6295973
5
/ Getter for status code
public function getStatusCode() { return $this->status['code']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusCode(): int\n {\n return $this->code ;\n }", "public function getStatusCode()\n {\n return $this->status;\n }", "public function getStatusCode()\n {\n return $this->status_code;\n }", "public function getStatusCode()\n {\n return static::STATUS_CODE;\n }", "function getStatusCode();", "private function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n \treturn $this->statusCode;\n }", "public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}", "public function getStatusCode() {\n\n return $this->result->status_code;\n }", "public function getStatusCode() {}", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode();", "public function getStatusCode(): int\n {\n return $this->status;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function statusCode()\n {\n return $this->code;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "protected function getStatusCode()\n {\n return $this->statusCode;\n }", "public static function getStatusCode(): int;", "public function getStatusCode() {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->statusCode;\n }", "public function getStatusCode(){\n return $this->httpResponseCode;\n }", "public function getHTTPStatusCode() { return $this->status; }", "public function getStatusCode()\n\t{\n\t\treturn $this->statusCode_;\n\t}", "public function getStatusCode(): int\r\n {\r\n return $this->_statusCode;\r\n }", "public function getStatusCode() {\r\n\t\treturn $this->statusCode;\r\n\t}", "public function getStatusCode(): int\n {\n return $this->meta['status_code'];\n }", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}", "public function getStatusCode(): int {\n\t\treturn $this->statusCode;\n\t}", "public function getStatusCode()\n {\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function getStatusCode()\n {\n return (int) $this->statusCode;\n }", "public function getStatusCode() {\n return $this->getResponse()->statuscode;\n }", "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "public function getStatusCode() : int\n {\n return $this->statusCode;\n }", "public function getStatusCode() : int\n {\n return $this->statusCode;\n }", "public function get_status_code() {\n\n\t\treturn $this->get_status_info()->code;\n\t}", "public function statusCode()\n {\n return $this->meta['http_code'];\n }", "public function getStatusCode()\n {\n return isset($this->headers['statusCode']) ? $this->headers['statusCode']: 500;\n }", "public function getStatusCode()\n {\n return (int) $this->getReturnVal();\n }", "public function getStatusCode()\n {\n return \\http_response_code();\n }", "public function getStatus(): int\n {\n return $this->statusCode;\n }", "public function getStatusCode(): int\r\n {\r\n // TODO: Implement getStatusCode() method.\r\n return $this->statusCode;\r\n }", "public function getStatusCode()\n {\n return $this->statusCode ?: 200;\n }", "public function status_code()\n {\n }", "public function getHttpStatusCode()\n {\n return $this->statusCode;\n }", "public function get_status_code(): int {\n if (empty($this->status_code)) {\n throw new RuntimeException(\"HTTP Response is missing a status code\");\n }\n\n return $this->status_code;\n }", "public function getStatusCode()\n {\n // TODO: Implement getStatusCode() method.\n }", "public function getStatusCode(): int\n {\n return $this->response->getStatusCode();\n }", "public function getStatusCode()\n {\n return isset($this->statusCode) ? $this->statusCode : null;\n }", "public function getStatusCode(): int\n {\n return (int) $this->response->getStatusCode();\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "function statusCode()\n {\n }", "public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function getHttpStatusCode()\n {\n return $this->httpStatusCode;\n }", "public function status()\n {\n return (int)$this->response->getStatusCode();\n }", "public function getResponseStatusCode()\n {\n return $this->responseCode;\n }", "public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }", "public function getStatusCode()\n {\n preg_match(\"/(\\d\\d\\d)/\", $this->_status, $matches);\n return isset($matches[1]) ? (int) $matches[1] : 0;\n }", "public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }", "public function getHttpCode()\n {\n return $this->code;\n }", "public function getResponseStatusCode()\r\n\t{\r\n\t\treturn (int) $this->statusCode;\r\n\t}" ]
[ "0.87221545", "0.8707327", "0.8706629", "0.8704754", "0.8697104", "0.86905414", "0.8660019", "0.86481017", "0.86440974", "0.86435825", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8633859", "0.8590167", "0.85859054", "0.85752356", "0.8567256", "0.8565307", "0.85528916", "0.8544935", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.8533036", "0.852502", "0.8519817", "0.8495973", "0.84947", "0.8477499", "0.8467206", "0.84489954", "0.84489954", "0.84489954", "0.84489954", "0.8416265", "0.8416265", "0.84066164", "0.84063613", "0.84063613", "0.84063613", "0.84063613", "0.84063613", "0.8401972", "0.83680904", "0.83658385", "0.8363563", "0.8354005", "0.8354005", "0.8341525", "0.8324006", "0.8321039", "0.8304079", "0.82719904", "0.82672846", "0.8262423", "0.824037", "0.8220421", "0.82073355", "0.8207105", "0.8191587", "0.8172861", "0.81630915", "0.81184953", "0.81161654", "0.8067787", "0.8050879", "0.8050879", "0.80476695", "0.803568", "0.8012712", "0.80017203", "0.79857343", "0.7959883", "0.79546076" ]
0.8740246
0
Returns the max length of a column
protected function getMaxLength(array $data, array $paddings_right = []) : array { $max = []; foreach ($data as $list) { foreach ($list as $i => $item) { if (!isset($max[$i])) { $max[$i] = 0; } $padding_right = $paddings_right[$i] ?? $this->padding_right; $length = strlen($item) + $padding_right; if ($length > $max[$i]) { $max[$i] = $length; } } } return $max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxColumnNameLength();", "public function getMaxLength() {}", "public function getMaxLength()\n {\n return $this->__get(self::FIELD_MAXLENGTH); \n }", "public function getMaxLength();", "public function getMaxLength()\n {\n return $this->maxLength;\n }", "public function getColumnLength()\n {\n $columnLength = self::INITIAL_COLUMN_LENGTH;\n while ($columnLength < $this->maximumLength) {\n $columnLength *= self::COLUMN_LENGTH_STEPS;\n }\n\n return $columnLength;\n }", "public function getMaxLength() {\n return $this->maxLength;\n }", "protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n\t}", "public function getLengthMax()\n {\n return $this->lengthMax;\n }", "public function getMaxLength()\n {\n return 254;\n }", "public function getMaxAttributeLength()\n {\n return (int)$this->floatValue('recorded.value.max.length', 1200);\n }", "public function getMaxLength(): ?int\n {\n return $this->maxLength;\n }", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxChars()\n {\n return intval($this->maxChars);\n }", "public function getMaxChars()\n {\n return $this->maxChars;\n }", "public function maxSize($key)\n {\n\n if (! isset(static::$cols[$key])) {\n Error::report('asked for wrong Validation data: '.$key.' in '.get_class($this));\n\n return null;\n }\n\n return static::$cols[$key][self::COL_MAX];\n\n }", "public function getMaxlength(): ?int\n {\n return $this->maxlength;\n }", "public function getMaximumLineLength() {}", "public function max_width() {\n\t\t$upper_breakpoint_val = end( $this->breakpoints );\n\t\t$upper_breakpoint = key( $this->breakpoints );\n\t\t$col_width = $this->column_widths[ $upper_breakpoint ];\n\t\t$margins = $this->margins[ $upper_breakpoint ];\n\t\t$gutters = $this->gutters[ $upper_breakpoint ];\n\t\t$max_cols = $this->columns[ $upper_breakpoint ];\n\t\t$max_width = ( (int) $max_cols * (int) $col_width ) + ( ( (int) $max_cols - 1 ) * (int) $gutters ) + ( (int) $margins * 2 );\n\n\t\treturn $max_width;\n\t}", "public function getMaxSize(): int;", "public function field_len($result, $index){\r\n\t\t$obj_field = new ADOFieldObject();\r\n\t\t$obj_field = $result->FetchField($index);\r\n\t\treturn isset($obj_field->max_length) ? $obj_field->max_length : \"\";\r\n\t}", "public function maximalVal( string $column = '' )\n {\n return $this->show()->max( $column );\n }", "public function getMigrationsColumnLength(): int\n {\n return 255;\n }", "public function get_max_query_length() {\n\t\treturn $this->max_query_length;\n\t}", "public function getMaxWidth()\r\n {\r\n return $this->max_width;\r\n }", "public function getColumns()\n {\n return strlen($this->string);\n }", "protected function _getMaxWidth()\n\t{\n\t\treturn $this->_maxWidth;\n\t}", "public function GetColumnLength( $column, $table = '' )\r\n\t{\r\n\t\t$this->ResetError();\r\n\t\tif( empty( $table ) )\r\n\t\t{\r\n\t\t\tif( is_numeric( $column ) )\r\n\t\t\t{\r\n\t\t\t\t$columnID = $column;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$columnID = $this->GetColumnID( $column );\r\n\t\t\t}\r\n\t\t\tif( !$columnID )\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$result = mysql_field_len( $this->last_result, $columnID );\r\n\t\t\t\tif( !$result )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->SetError();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn $result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$records = mysql_query( 'SELECT ' . $column . ' FROM ' . $table . ' LIMIT 1' );\r\n\t\t\tif( !$records )\r\n\t\t\t{\r\n\t\t\t\t$this->SetError();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$result = mysql_field_len( $records, 0 );\r\n\t\t\tif( !$result )\r\n\t\t\t{\r\n\t\t\t\t$this->SetError();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn $result;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getLengthLimit()\n {\n }", "public function getMaxWidth()\n {\n return $this->_maxWidth;\n }", "final public function searchMinLength():int\n {\n return $this->col()->searchMinLength();\n }", "public function getMaxWidth()\n {\n return $this->maxWidth;\n }", "public function getMaxWidth()\n {\n return $this->maxWidth;\n }", "function has_max_length($value, $max) {\r\n\treturn strlen($value) <= $max;\r\n}", "public function getFieldLength()\n {\n return $this->FieldLength;\n }", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "public function getMaxKeyLength()\n {\n return $this->maxKeyLength;\n }", "public function getRightColumnSize(): int\n {\n return $this->rightColumnSize;\n }", "function has_max_length($value, $max) {\n\t\treturn strlen($value) <= $max;\n\t\t}", "function _get_field_size() \n {\n if (isset($this->attribs['size'])) {\n return $this->attribs['size'];\n }\n elseif ($this->attribs['maxlength'] > $this->max_size) {\n return $this->max_size;\n }\n else {\n return $this->attribs['maxlength'];\n }\n }", "function has_max_length($value, $max) {\n\treturn strlen($value) <= $max;\n}", "function has_max_length($value, $max) {\n\treturn strlen($value) <= $max;\n}", "public function getMaxchar() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(3, $this->_result)) return (string) $this->_result[3];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getMaxchar', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getMaxchar', __LINE__, __FILE__);\n\t}", "function CharMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}", "public static function getMaximumPathLength() {}", "public function getMaxUploadFileSize()\n\t{\n\t\t$objResult = \\Database::getInstance()->prepare(\"SELECT MAX(maxlength) AS maxlength FROM tl_form_field WHERE pid=? AND invisible='' AND type='upload' AND maxlength>0\")\n\t\t\t\t\t\t\t\t\t\t\t ->execute($this->id);\n\n\t\tif ($objResult->numRows > 0 && $objResult->maxlength > 0)\n\t\t{\n\t\t\treturn $objResult->maxlength;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \\Config::get('maxFileSize');\n\t\t}\n\t}", "public static function _maxlength($value, $field, $max_length) {\n\t\treturn strlen($value) <= $max_length;\n\t}", "public function GetMustHaveMaxLength () {\n\t\treturn $this->mustHaveMaxLength;\n\t}", "public function getMaxSize()\r\n {\r\n return $this->max_size;\r\n }", "public function getMaxLineLength()\n {\n return $this->maxLineLength;\n }", "public function getMaxCustomEntityFieldNameSize()\n {\n $subtractSize = max(\n strlen(self::RELATION_DEFAULT_COLUMN_PREFIX),\n strlen(self::RELATION_COLUMN_SUFFIX),\n strlen(self::SNAPSHOT_COLUMN_SUFFIX)\n );\n\n return $this->getMaxIdentifierSize() - $subtractSize;\n }", "public function setMaxLength($maxLength) {}", "protected function getCharacterLimit()\n {\n $charLimit = static::CHAR_LIMIT_DEFAULT;\n if ($this->isUsingExpectedLengthAsCharLimit()) {\n $charLimit = $this->interaction->getExpectedLength();\n }\n\n return $charLimit;\n }", "public function getLongestLineLength(): int\n {\n return 0;\n }", "public function getLimitLength()\n\t\t{\n\t\t\tif($this->hasLimit())\n\t\t\t{\n\t\t\t\treturn $this->limit[1];\n\t\t\t}\n\t\t\tthrow new \\Exception('Retrieving non-existant limit length');\n\t\t}", "protected function max($length, $field_name, $data)\n {\n if (strlen($data) <= $length) {\n return true;\n } else {\n $this->errors[$field_name][] = \"maximum {$length} char\";\n }\n// $this->errors[$field_name][] = \"maximum {$length} char\";\n// return empty(strlen($data) <= $length) ? false : true;\n }", "public function getMaxUsernameLength();", "function longCampo($result, $indice){\n\t\treturn mysql_field_len($result, $indice);\t\n\t}", "public function max($field_name, $value, $max_length)\n {\n if (strlen($value) <= $max_length) {\n return true;\n }\n return ucfirst($field_name).' must have max length of '.$max_length.'.';\n }", "public function getMaxPadSize() {\n\treturn $this->textStorageSize - $this->getOverheadSize($this->algoBlockSize - 1);\n }", "public function getMaxLineLength(): ?int {\n\t\treturn $this->maxLineLength;\n\t}", "public function FIELD_LEN($SQL_Resource, $SColumn)\n {\n if (extension_loaded(\"sqlsrv\") == false)\n {\n return false;\n }\n $DB_Field = sqlsrv_field_metadata($SQL_Resource);\n return $DB_Field[$SColumn]['Size'];\n }", "public function setMaxLength($length);", "public function setMaxColumn($value)\n {\n return $this->set('MaxColumn', $value);\n }", "public function max() : ColumnVector\n {\n return ColumnVector::quick(array_map('max', $this->a));\n }", "function validMaxLength($value, $max)\n {\n return strlen($value) <= $max;\n }", "public function getMaxSize() {\n\t\t\treturn $this->maxSize >= 0 ? $this->maxSize : $this->getTotalMaxSize();\n\t\t}", "function getMaxTextboxWidth()\n\t{\n\t\t$maxwidth = 0;\n\t\tforeach ($this->answers as $answer)\n\t\t{\n\t\t\t$len = strlen($answer->getAnswertext());\n\t\t\tif ($len > $maxwidth) $maxwidth = $len;\n\t\t}\n\t\treturn $maxwidth + 3;\n\t}", "public function max($column)\r\n {\r\n return $this->select('max('.$column.') max')->value('max');\r\n }", "protected function _getMax(): int\n {\n $field = $this->_config['right'];\n $rightField = $this->_config['rightField'];\n $edge = $this->_scope($this->_table->find())\n ->select([$field])\n ->orderByDesc($rightField)\n ->first();\n\n if ($edge === null || empty($edge[$field])) {\n return 0;\n }\n\n return $edge[$field];\n }", "public function GetMaxSize ();", "function db2_field_display_size($stmt, $column)\n{\n}", "public function columnCount()\r\n\t{\r\n\t\treturn intval($this->columnCount);\r\n\t}", "function odbc_field_len($result_id, $field_number)\n{\n}", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function maxLength($field, $length) {\n\t\t$length = intval($length);\n\t\t$postData = $_POST[$field['name']];\n\t\t\n\t\tif ( ! is_string($postData))\n\t\t\tstrval($postData);\n\t\t\t\n\t\tif (strlen($postData) > intval($length)) {\n\t\t\t$this->_errors[$field['name']]['param'] = $length;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public function getMaxIssuerPathLengthValue()\n {\n return $this->readWrapperValue(\"max_issuer_path_length\");\n }", "public function setMaximumCalcLength($length = 200)\n {\n $this->_maxNameCalcLength = $length;\n\n return $this;\n }", "public function longestFieldLength($idless=false) {\n $len = 0;\n foreach ($this->fields as $field) {\n if ($len < strlen($idless ? $field->getNameWithoutId() : $field->getName())) {\n $len = strlen($idless ? $field->getNameWithoutId() : $field->getName());\n }\n }\n return $len;\n }", "public function getMaxSize() : int{\n return $this->maxSize;\n }", "public function GetColumnCount() : INT\r\n {\r\n return($this->preparedStatement->columnCount());\r\n }", "public function getLen()\n {\n $value = $this->get(self::LEN);\n return $value === null ? (integer)$value : $value;\n }", "function wp_get_comment_fields_max_lengths()\n {\n }", "public function max(string $column): ?int\n {\n if ($this->shouldEmulateExecution()) {\n return null;\n }\n\n return (int) $this->executeScript('Max', !empty($column) ? $column : $this->attribute);\n }", "public function validateCharLimit(string $attribute)\n {\n if ($this->charLimit) {\n $columnTypeMax = Db::getTextualColumnStorageCapacity($this->columnType);\n\n if ($columnTypeMax && $columnTypeMax < $this->charLimit) {\n $this->addError($attribute, Craft::t('app', 'Character Limit is too big for your chosen Column Type.'));\n }\n }\n }", "protected function _getMaxHeight()\n\t{\n\t\treturn $this->_maxHeight;\n\t}", "function max_length($array){\n\t$message = [];\n\tforeach($array as $field=>$limit){\n\t\t$length = strlen(trim($_POST[$field]));\n\t\tif($length > $limit){\n\t\t\t$message[$field] = readable_name($field).\" cannot exceed \".$limit.\" characters. \";\n\t\t}\n\t}\n\n\treturn $message;\n}", "public function getLastCol() : int\n {\n\n // Convert A1:D3 to D3.\n list(,$endRef) = explode(':', $this->getTableNode()->getAttribute('ref'));\n\n // Convert D3 to 4.\n $endCol = preg_replace('/([0-9])/', '', $endRef);\n\n return XlsxTools::convRefToNumber($endCol);\n }", "public static function longestString($array) {\r\n\t$i = 0;\r\n\t\r\n\tforeach ($array as $value) {\t\r\n\t\tif (strlen($value) > $i) {\t\r\n\t\t\t$i = strlen($value);\r\n\t\t}\t\t\t\r\n\t}\r\n\t\r\n\treturn $i;\r\n}", "public function getMaxSize(): int\n {\n return $this->maxSize;\n }", "public function getMaxCustomEntityNameSize()\n {\n return $this->getMaxIdentifierSize() - strlen(self::CUSTOM_TABLE_PREFIX);\n }", "function _max_size($field, $size)\r\n\t{\r\n\t\treturn ($this->{$field} > $size) ? FALSE : TRUE;\r\n\t}", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "public function getMaxSize() : int {\n\t\treturn $this->generator->getMaxSize();\n\t}", "protected static function _maxLength() {\n if (self::$_ruleValue) {\n if (strlen(trim(self::$_elementValue)) > self::$_ruleValue) {\n self::setErrorMessage(\"Enter at most \" . self::$_ruleValue . \" charachters only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }" ]
[ "0.8621254", "0.78425354", "0.782288", "0.7745618", "0.7745415", "0.77204376", "0.770807", "0.74657536", "0.7286223", "0.70812213", "0.70482326", "0.6885448", "0.683517", "0.683517", "0.68345726", "0.68345726", "0.68345726", "0.6826992", "0.67947507", "0.67523813", "0.6741918", "0.6704812", "0.66952926", "0.6671982", "0.65564007", "0.6522048", "0.6476488", "0.64593124", "0.6417577", "0.6402212", "0.63880026", "0.6381245", "0.6362562", "0.6361709", "0.63543713", "0.63481885", "0.63481885", "0.6322536", "0.63128936", "0.6306132", "0.6306132", "0.6306132", "0.62926394", "0.6252019", "0.6250368", "0.6244943", "0.6228913", "0.6228913", "0.6226599", "0.6209513", "0.6192212", "0.6164815", "0.61558205", "0.61477035", "0.6139052", "0.613856", "0.61308944", "0.6113202", "0.6106742", "0.6080831", "0.6078479", "0.60337406", "0.6032291", "0.60137904", "0.60061777", "0.5997969", "0.5979143", "0.59619147", "0.5952496", "0.59504217", "0.5936123", "0.5927716", "0.5913148", "0.5906817", "0.59037393", "0.58888906", "0.5886898", "0.58864963", "0.5876655", "0.5873933", "0.5863854", "0.5863662", "0.5857104", "0.58511454", "0.5847238", "0.58405286", "0.58384645", "0.58375335", "0.5834155", "0.58100736", "0.58085257", "0.5808457", "0.58066916", "0.5794792", "0.57897234", "0.5785139", "0.57753885", "0.5771147", "0.5769889", "0.57660043", "0.5764094" ]
0.0
-1
Initializes the SquareChart Object with size 500x500px
public function __construct() { $this->sizeField['width'] = '500'; $this->sizeField['height'] = '500'; $this->gridObject = new SimpleXMLElement('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500px" height="500px"></svg>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n parent::init();\n\n $this->size = $this->finalWidth;\n }", "public function __construct()\n\t{\n\t\t$this->setWidth('600px');\n\t\t$this->setHeight('250px');\n\t\tparent::__construct();\n\t}", "public function __construct(){\n parent::__construct(); // paima parent constructoriu\n $this->width = 50;\n $this->height = 50;\n }", "public function init(){\n parent::init();\n\t\t$this->_gridParam['width'] = 870;\n }", "public function __construct($size = 50)\n {\n $this->size = $size;\n }", "function __construct($width = 200, $height = 200, $type = 'g', $direction='v'){\n\t\t$this -> setChartType($type, $direction);\n\t\t$this -> setDimensions($width, $height);\t\n\t}", "public function __construct($height, $width){\n $this->height = $height;\n $this->width = $width; \n}", "function setSize($w=0,$h=0){\r\n $this->width = $w;\r\n $this->heigth=$h;\r\n }", "function __construct($width = 200, $height = 200){\n\t\t$this -> setDimensions($width, $height);\n\t\t$this -> setProperty('cht','gom');\n\t}", "public function setSize($size): self;", "public function setDimensions($width, $height) {}", "public function setUp()\n {\n // We set the height & width directly.\n }", "public function setSizeField($width='800', $height='600') {\n\n $this->sizeField['width'] = $width;\n $this->sizeField['height'] = $height;\n $this->gridObject = new SimpleXMLElement(\n '<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"\n \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n width=\"'.$width.'\" height=\"'.$height.'\"></svg>'\n );\n \n return $this;\n }", "public function createCube($size);", "public function setGridSize($girdSize);", "public function setSize($size);", "public function testCSize() {\n\t\t$csize = new CSize();\n\t\t$csize->set(100,200,300);\n\t\t$this->assertTrue($csize->w===100);\n\t\t$this->assertTrue($csize->h===200);\n\t\t$this->assertTrue($csize->l===300);\n\t\t$csize->scale(0.5,2.0,1.5);\n\t\t$this->assertTrue($csize->w==50);\n\t\t$this->assertTrue($csize->h==400);\n\t\t$this->assertTrue($csize->l==450);\n\t}", "function __construct($width = 440, $height = 220){\n\t\t$this -> setDimensions($width, $height);\n\t\t$this -> setProperty('cht','t');\n\t}", "function setSize($size) {\n\t\t$this->size = $size;\n\t}", "public function __construct($settings) {\n\t\t$this->setting['length'] = $settings['length'];\n\t\t$this->setting['width'] = $settings['width'];\n\t\t$this->setting['height'] = $settings['height'];\n\t}", "function __construct($radius, $height){}", "function setSize($size)\n {\n $this->size = $size;\n }", "function setSize($size)\n\t{\n\t\t$this->size = 0+$size;\n\t}", "function SetSize($aRadius) {\n\t$this->iRadius = $aRadius;\n }", "protected function _construct()\n {\n $this->_init(\n \\Harriswebworks\\Sizing\\Model\\Size::class,\n \\Harriswebworks\\Sizing\\Model\\ResourceModel\\Size::class\n );\n $this->_map['fields']['store_id'] = 'store_table.store_id';\n $this->_map['fields']['size_id'] = 'main_table.size_id';\n //phpcs: enable\n }", "public static function init(int $width, int $height, string $title) {}", "public function setSize($size){\n $this->game->setGridSize($size);\n }", "protected function SetGridDimensions()\n {\n $this->g_height = $this->height - $this->pad_top - $this->pad_bottom;\n $this->g_width = $this->width - $this->pad_left - $this->pad_right;\n }", "public function __construct($size = 0) // [\\SplFixedArray]\n\t{\n\t\t$this->start = ($size instanceof \\SplFixedArray) ? 0\n\t\t : $size / 2;\n\t\tparent::__construct($size);\n\t}", "public function setPlanetSize($size) {\n list ($x, $y) = explode(' ', $size);\n \n $this->maxX = $x;\n $this->maxY = $y;\n }", "public function init()\n {\n\n $this->minWidth = 300;\n $this->minHeight = 200;\n $this->width = 950;\n $this->height = 650;\n $this->resizable = true;\n $this->movable = true;\n $this->closable = true;\n\n $this->models = new TArray();\n\n }", "function _set_new_y($size)\r\n {\r\n $this->new_y = $size;\r\n }", "protected function setDisplaySize($display_canvas_size, $scale_up=FALSE) {\n\t\t// Set the width and height depending on the value sent in.\n\t\tif(is_array($display_canvas_size)) {\n\t\t// seperate specific height and width specified\n\t\t\tlist($display_width, $display_height) = $display_canvas_size;\n\t\t} else {\n\t\t// resized image size is square\n\t\t\t$display_width = $display_canvas_size;\n\t\t\t$display_height = $display_width * $this->aspect_ratio;\n\t\t}\n\t\t// set the resized image dimesions to the source image dimensions\n\t\t$this->resized_image_width = $display_width;\n\t\t$this->resized_image_height = $display_height;\n\n\t\t// scale the image to fit the display canvas dimensions\n\t\tImageLib::scale($this->resized_image_width, $this->resized_image_height, $display_width, $display_height, NULL, $scale_up);\n\t}", "private function setDimensions(){\r\n list($width, $height) = getimagesize($this->fileName);\r\n $this->imageDimensions = array('width'=>$width,\r\n 'height'=>$height);\r\n \r\n }", "public function setSize($width,$height) \n {\n $this->width = $width;\n $this->height = $height;\n }", "public function setSize($size) {\n $this->size = $size;\n }", "public function setSize($size) {\n $this->size = $size;\n }", "private function _setMapSize()\n {\n $this->map_obj->setSize($this->image_size[0], $this->image_size[1]);\n if ($this->_isResize()) {\n $this->map_obj->setSize($this->_download_factor*$this->image_size[0], $this->_download_factor*$this->image_size[1]);\n }\n }", "public function constructNotSquare(){\n $this->nbRows = 0;\n $this->nbSeatsPerRow = 0;\n $this->rowLabel = 1;\n $this->seatLabel = 1;\n }", "public function setSize($size)\n {\n $this->size = $size;\n }", "public function __construct($queueSize) \n {\n $this->storageSize = $queueSize;\n }", "private function _addOmittedCanvasDimension() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\tif (\n\t\t\tempty($this->params['w']) &&\n\t\t\tempty($this->params['h'])\n\t\t) {\n\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t$this->params['h'] = $sourceHeight;\n\t\t} elseif (empty($this->params['h'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['w'] > $sourceWidth\n\t\t\t) {\n\t\t\t\t$this->params['h'] = $sourceHeight;\n\t\t\t} else {\n\t\t\t\t$this->params['h'] = $this->params['w'] / $sourceRatio;\n\t\t\t}\n\t\t} elseif (empty($this->params['w'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['h'] > $sourceHeight\n\t\t\t) {\n\t\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t} else {\n\t\t\t\t$this->params['w'] = $this->params['h'] * $sourceRatio;\n\t\t\t}\n\t\t}\n\t}", "public function __construct($title=false) {\n\t\t\n\t\tparent::__construct($title);\n\t\t\n\t\t$this->data = array(\n\t\t\t\"x\"\t=> array(),\n\t\t\t\"y\"\t=> array(),\n\t\t\t\"size\"\t=> array()\n\t\t);\n\t\t\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(empty($this->id)) $this->id=\"map-canvas\";\n\n\t\tif(empty($this->container)) $this->container=\"div\";\n\n\t\tif(empty($this->markerIcon)) $this->markerIcon=\"\";\n\n\t\tif(empty($this->fitBound)) $this->fitBound=FALSE;\n\n\t\tif(empty($this->isCluster)) $this->isCluster=FALSE;\n\n\t\tif(!empty($this->style))\n\t\t{\n\t\t\tif(!is_array($this->style))\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\".$this->style.\"\\\"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\";\n\t\t\t\tforeach($this->style as $attribute=>$value)\n\t\t\t\t{\n\t\t\t\t\t$this->line_style .= $attribute.':'.$value.\";\";\n\t\t\t\t}\n\t\t\t\t$this->inline_style.=\"\\\"\";\n\t\t\t}\n\n\t\t}\n\n\t\tif(!empty($this->address))\n\t\t{\n\t\t\tif(!is_array($this->address))\n\t\t\t{\n\t\t\t\t$address=$this->getGeo($this->address);\n\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($this->address as $adr)\n\t\t\t\t{\n\t\t\t\t\t$address=$this->getGeo($adr);\n\t\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public function setSize($size) {\n $this->_size = $size;\n }", "public function __construct($height, $width) \n\t{\n\t\t$this->setHeight($height);\n\t\t$this->setWidth($width);\n\t}", "public function __construct($layoutImage = '', $size = array()) \n {\n if (!function_exists('imagecreatefrompng')) return; // GD is not available.\n \n // Load the layout image.\n $this->setImage($layoutImage, 'layout', $size);\n }", "public function SetSize($width = 550, $height = 450){\n\t\t\t$this->width = $width;\n\t\t\t$this->height = $height;\n\t\t}", "public function __construct($width, $height, $radius)\r\n {\r\n $this->setWidth($width);\r\n $this->setHeight($height);\r\n $this->setRadius($radius);\r\n }", "public function __construct(){\n parent::__construct(); // paima parent constructoriu\n $this->radiusX = 50;\n $this->radiusY = 100;\n }", "protected abstract function createGoogleVisualization($width, $height);", "public function run()\n {\n $sizes = [\n ['name' => 'xs','label' => 'extra small'],\n ['name' => 'sm','label' => 'small'],\n ['name' => 'md','label' => 'medium'],\n ['name' => 'lg','label' => 'large'],\n ['name' => 'xl','label' => 'extra large'],\n ['name' => '2xl','label' => 'double extra large'],\n ];\n\n foreach ($sizes as $size) {\n Size::create(['name' => $size['name'], 'label' => $size['label']]);\n }\n }", "public function __construct()\n {\n parent::__construct();\n $this->endpoint = 'scales';\n $this->init();\n }", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\t\t\n\t\t$this->set_margins(5);\n\t\t\n\t\t$this->colors['pen_color'] = array(\t// for drawing \"value lines\"\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_color'] = array(\t// point border color\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_fill_color'] = array('#ffffff', NULL, NULL);\t// point fill color\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t\t$this->colors['legend_color'] = \t\tarray('#fefefe', NULL, NULL); // background legend color\n\t}", "public function setDefaultSize() {\n return $this->setSize('medium');\n }", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\n\t\t$this->set_margins(5);\n\n\t\t$this->colors['bar_color'] = \t\t\t\tarray('#e0d62e', NULL, NULL);\n\t\t$this->colors['bar_border_color'] = array('#747014', 10, \t NULL);\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t}", "public function __construct($_layoutID = NULL,$_optimalPictureSize = NULL,$_themeID = NULL)\r\n\t{\r\n\t\tparent::__construct(array('LayoutID'=>$_layoutID,'OptimalPictureSize'=>$_optimalPictureSize,'ThemeID'=>$_themeID));\r\n\t}", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }", "public function __construct()\n {\n bcscale(0);\n }", "public function __construct($width, $height)\n {\n $this->setWidth($width);\n $this->setHeight($height);\n }", "private static function initDimensionsUsingStty(): void\n {\n if ($sttyString = self::getSttyColumns()) {\n if (preg_match('/rows.(\\d+);.columns.(\\d+);/is', $sttyString, $matches)) {\n // extract [w, h] from \"rows h; columns w;\"\n self::$width = (int) $matches[2];\n self::$height = (int) $matches[1];\n } elseif (preg_match('/;.(\\d+).rows;.(\\d+).columns/is', $sttyString, $matches)) {\n // extract [w, h] from \"; h rows; w columns\"\n self::$width = (int) $matches[2];\n self::$height = (int) $matches[1];\n }\n }\n }", "public function set_spacing_sizes()\n {\n }", "public function __construct() {\n $this->img = 'test_crown_1.png';\n $this->type = array('orientation' => 'bottom', 'count' => 1);\n }", "function _set_img_y($size)\r\n {\r\n $this->img_y = $size;\r\n }", "public static function size ()\n {\n return ['x' => static::$_map_width, 'y' => static::$_map_height];\n }", "function scale($scale) {\r\n\t\t$width = $this->getWidth() * $scale/100;\r\n\t\t$height = $this->getheight() * $scale/100;\r\n\t\t$this->resize($width,$height);\r\n\t}", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "function resize_square($size){\n\n //container for new image\n $new_image = imagecreatetruecolor($size, $size);\n\n\n if($this->width > $this->height){\n $this->resize_by_height($size);\n\n imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0));\n imagealphablending($new_image, false);\n imagesavealpha($new_image, true);\n imagecopy($new_image, $this->image, 0, 0, ($this->get_width() - $size) / 2, 0, $size, $size);\n }else{\n $this->resize_by_width($size);\n\n imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0));\n imagealphablending($new_image, false);\n imagesavealpha($new_image, true);\n imagecopy($new_image, $this->image, 0, 0, 0, ($this->get_height() - $size) / 2, $size, $size);\n }\n\n $this->image = $new_image;\n\n //reset sizes\n $this->width = $size;\n $this->height = $size;\n\n return true;\n }", "function setBox($height, $width){\n\t\t//Takes the height and width passed and\n\t\t//saves them to the 'ScaleTool' object.\n\n\t\t$this->box_height = $height;\n\t\t$this->box_width = $width;\n\t}", "function __construct($i,$hTA,$hC,$fX,$fY,$sSA,$sSL,$sSIF,$sMin,$sMax) {\n $id = $i;\n $hTubeAngle = $hTA;\n $hsetCovr = $hC;\n $frameX = $fX;\n $frameY = $fY;\n $sStemAngle = $sSA;\n $sStemLength = $sSL;\n $sStemIsFlippable = $sSIF;\n $spacerMin = $sMin;\n $spacerMax = $sMax;\n $stockConfigs = calculateHXY($this);\n }", "protected function init() {\n\t\t$this->load_image_sizes();\n\n\t\t// Set image size to WP\n\t\t$this->add_image_sizes();\n\t}", "public function AutoSize()\n\t{\n\t\tif ($this->img->img == null) {\n\t\t\t// The predefined left, right, top, bottom margins.\n\t\t\t// Note that the top margin might incease depending on\n\t\t\t// the title.\n\t\t\t$hadj = $vadj = 0;\n\t\t\tif ($this->doshadow) {\n\t\t\t\t$hadj = $this->shadow_width;\n\t\t\t\t$vadj = $this->shadow_width + 5;\n\t\t\t}\n\n\t\t\t$lm = $this->img->left_margin;\n\t\t\t$rm = $this->img->right_margin + $hadj;\n\t\t\t$rm += 2;\n\t\t\t$tm = $this->img->top_margin;\n\t\t\t$bm = $this->img->bottom_margin + $vadj;\n\t\t\t$bm += 2;\n\n\t\t\t// If there are any added Plot\\GanttVLine we must make sure that the\n\t\t\t// bottom margin is wide enough to hold a title.\n\t\t\t$n = safe_count($this->iObj);\n\t\t\tfor ($i = 0; $i < $n; ++$i) {\n\t\t\t\tif ($this->iObj[$i] instanceof Plot\\GanttVLine) {\n\t\t\t\t\t$bm = max($bm, $this->iObj[$i]->title->GetHeight($this->img) + 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// First find out the height\n\t\t\t$n\t = $this->GetBarMaxLineNumber() + 1;\n\t\t\t$m\t = max($this->GetMaxLabelHeight(), $this->GetMaxBarAbsHeight());\n\t\t\t$height = $n * ((1 + $this->iLabelVMarginFactor) * $m);\n\n\t\t\t// Add the height of the scale titles\n\t\t\t$h = $this->scale->GetHeaderHeight();\n\t\t\t$height += $h;\n\n\t\t\t// Calculate the top margin needed for title and subtitle\n\t\t\tif ($this->title->t != '') {\n\t\t\t\t$tm += $this->title->GetFontHeight($this->img);\n\t\t\t}\n\t\t\tif ($this->subtitle->t != '') {\n\t\t\t\t$tm += $this->subtitle->GetFontHeight($this->img);\n\t\t\t}\n\n\t\t\t// ...and then take the bottom and top plot margins into account\n\t\t\t$height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin;\n\t\t\t// Now find the minimum width for the chart required\n\n\t\t\t// If day scale or smaller is shown then we use the day font width\n\t\t\t// as the base size unit.\n\t\t\t// If only weeks or above is displayed we use a modified unit to\n\t\t\t// get a smaller image.\n\t\t\tif ($this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute()) {\n\t\t\t\t// Add 2 pixel margin on each side\n\t\t\t\t$fw = $this->scale->day->GetFontWidth($this->img) + 4;\n\t\t\t} elseif ($this->scale->IsDisplayWeek()) {\n\t\t\t\t$fw = 8;\n\t\t\t} elseif ($this->scale->IsDisplayMonth()) {\n\t\t\t\t$fw = 4;\n\t\t\t} else {\n\t\t\t\t$fw = 2;\n\t\t\t}\n\n\t\t\t$nd = $this->scale->GetNumberOfDays();\n\n\t\t\tif ($this->scale->IsDisplayDay()) {\n\t\t\t\t// If the days are displayed we also need to figure out\n\t\t\t\t// how much space each day's title will require.\n\t\t\t\tswitch ($this->scale->day->iStyle) {\n\t\t\t\t\tcase DAYSTYLE_LONG:\n\t\t\t\t\t\t$txt = 'Monday';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_LONGDAYDATE1:\n\t\t\t\t\t\t$txt = 'Monday 23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_LONGDAYDATE2:\n\t\t\t\t\t\t$txt = 'Monday 23 Jun 2003';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORT:\n\t\t\t\t\t\t$txt = 'Mon';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE1:\n\t\t\t\t\t\t$txt = 'Mon 23/6';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE2:\n\t\t\t\t\t\t$txt = 'Mon 23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE3:\n\t\t\t\t\t\t$txt = 'Mon 23';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE1:\n\t\t\t\t\t\t$txt = '23/6';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE2:\n\t\t\t\t\t\t$txt = '23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE3:\n\t\t\t\t\t\t$txt = 'Mon 23';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE4:\n\t\t\t\t\t\t$txt = '88';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->day->iLabelFormStr, strtotime('2003-12-20 18:00'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_ONELETTER:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = 'M';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$fw = $this->scale->day->GetStrWidth($this->img, $txt) + 6;\n\t\t\t}\n\n\t\t\t// If we have hours enabled we must make sure that each day has enough\n\t\t\t// space to fit the number of hours to be displayed.\n\t\t\tif ($this->scale->IsDisplayHour()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t// and determine the length of that string.\n\t\t\t\tswitch ($this->scale->hour->iStyle) {\n\t\t\t\t\tcase HOURSTYLE_HMAMPM:\n\t\t\t\t\t\t$txt = '12:00pm';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_H24:\n\t\t\t\t\t\t// 13\n\t\t\t\t\t\t$txt = '24';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_HAMPM:\n\t\t\t\t\t\t$txt = '12pm';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->hour->iLabelFormStr, strtotime('2003-12-20 18:00'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_HM24:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = '24:00';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$hfw = $this->scale->hour->GetStrWidth($this->img, $txt) + 6;\n\t\t\t\t$mw = $hfw;\n\t\t\t\tif ($this->scale->IsDisplayMinute()) {\n\t\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t\t// and determine the length of that string.\n\t\t\t\t\tswitch ($this->scale->minute->iStyle) {\n\t\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t\t$txt2 = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55'));\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase MINUTESTYLE_MM:\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$txt2 = '15';\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$mfw = $this->scale->minute->GetStrWidth($this->img, $txt2) + 6;\n\t\t\t\t\t$n2 = ceil(60 / $this->scale->minute->GetIntervall());\n\t\t\t\t\t$mw = $n2 * $mfw;\n\t\t\t\t}\n\t\t\t\t$hfw = $hfw < $mw ? $mw : $hfw;\n\t\t\t\t$n = ceil(24 * 60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall()));\n\t\t\t\t$hw = $n * $hfw;\n\t\t\t\t$fw = $fw < $hw ? $hw : $fw;\n\t\t\t}\n\n\t\t\t// We need to repeat this code block here as well.\n\t\t\t// THIS iS NOT A MISTAKE !\n\t\t\t// We really need it since we need to adjust for minutes both in the case\n\t\t\t// where hour scale is shown and when it is not shown.\n\n\t\t\tif ($this->scale->IsDisplayMinute()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t// and determine the length of that string.\n\t\t\t\tswitch ($this->scale->minute->iStyle) {\n\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MINUTESTYLE_MM:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = '15';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$mfw = $this->scale->minute->GetStrWidth($this->img, $txt) + 6;\n\t\t\t\t$n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall()));\n\t\t\t\t$mw = $n * $mfw;\n\t\t\t\t$fw = $fw < $mw ? $mw : $fw;\n\t\t\t}\n\n\t\t\t// If we display week we must make sure that 7*$fw is enough\n\t\t\t// to fit up to 10 characters of the week font (if the week is enabled)\n\t\t\tif ($this->scale->IsDisplayWeek()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space\n\t\t\t\t$fsw = strlen($this->scale->week->iLabelFormStr);\n\t\t\t\tif ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) {\n\t\t\t\t\t$fsw += 8;\n\t\t\t\t} elseif ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR) {\n\t\t\t\t\t$fsw += 7;\n\t\t\t\t} else {\n\t\t\t\t\t$fsw += 4;\n\t\t\t\t}\n\n\t\t\t\t$ww = $fsw * $this->scale->week->GetFontWidth($this->img);\n\t\t\t\tif (7 * $fw < $ww) {\n\t\t\t\t\t$fw = ceil($ww / 7);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() &&\n\t\t\t\t!(($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR ||\n\t\t\t\t\t$this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek())) {\n\t\t\t\t// If we don't display the individual days we can shrink the\n\t\t\t\t// scale a little bit. This is a little bit pragmatic at the\n\t\t\t\t// moment and should be re-written to take into account\n\t\t\t\t// a) What scales exactly are shown and\n\t\t\t\t// b) what format do they use so we know how wide we need to\n\t\t\t\t// make each scale text space at minimum.\n\t\t\t\t$fw /= 2;\n\t\t\t\tif (!$this->scale->IsDisplayWeek()) {\n\t\t\t\t\t$fw /= 1.8;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cw = $this->GetMaxActInfoColWidth();\n\t\t\t$this->scale->actinfo->SetMinColWidth($cw);\n\t\t\tif ($this->img->width <= 0) {\n\t\t\t\t// Now determine the width for the activity titles column\n\n\t\t\t\t// Firdst find out the maximum width of each object column\n\t\t\t\t$titlewidth = max(\n\t\t\t\t\tmax(\n\t\t\t\t\t\t$this->GetMaxLabelWidth(),\n\t\t\t\t\t\t$this->scale->tableTitle->GetWidth($this->img)\n\t\t\t\t\t),\n\t\t\t\t\t$this->scale->actinfo->GetWidth($this->img)\n\t\t\t\t);\n\n\t\t\t\t// Add the width of the vertivcal divider line\n\t\t\t\t$titlewidth += $this->scale->divider->iWeight * 2;\n\n\t\t\t\t// Adjust the width by the user specified zoom factor\n\t\t\t\t$fw *= $this->iZoomFactor;\n\n\t\t\t\t// Now get the total width taking\n\t\t\t\t// titlewidth, left and rigt margin, dayfont size\n\t\t\t\t// into account\n\t\t\t\t$width = $titlewidth + $nd * $fw + $lm + $rm;\n\t\t\t} else {\n\t\t\t\t$width = $this->img->width;\n\t\t\t}\n\n\t\t\t$width = round($width);\n\t\t\t$height = round($height);\n\t\t\t// Make a sanity check on image size\n\t\t\tif ($width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H) {\n\t\t\t\tUtil\\JpGraphError::RaiseL(6007, $width, $height);\n\t\t\t\t//(\"Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.\");\n\t\t\t}\n\t\t\t$this->img->CreateImgCanvas($width, $height);\n\t\t\t$this->img->SetMargin($lm, $rm, $tm, $bm);\n\t\t}\n\t}", "public function scale() { }", "public function init()\n {\n $this->shortcode->getHandlers()->add('size', function(ShortcodeInterface $sc) {\n $size = $sc->getParameter('s', $this->getBbCode($sc));\n if ( is_numeric($size) ) { $size = $size.'px' ; }\n return '<span style=\"font-size: '.$size.';\">'.$sc->getContent().'</span>';\n });\n }", "public function setSize($size)\n {\n $this->size = $size;\n\n return $this;\n }", "public function __construct() {\n parent::__construct();\n\n $this -> radiusX;\n $this -> radiusY;\n\n\t}", "public function testSizeServiceWithConfiguration()\n {\n $size = self::createContainer(array('environment' => 'test'))->get('ivory_google_map.size');\n\n $this->assertEquals($size->getWidth(), 100.1);\n $this->assertEquals($size->getHeight(), 200.2);\n\n $this->assertEquals($size->getWidthUnit(), 'px');\n $this->assertEquals($size->getHeightUnit(), 'pt');\n }", "public static function setMinSize(int $width, int $height) {}", "function _set_img_x($size)\r\n {\r\n $this->img_x = $size;\r\n }", "function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->Width=65;\r\n $this->Height=65;\r\n $this->_pen=new Pen();\r\n $this->_pen->_control=$this;\r\n $this->_brush=new Brush();\r\n $this->_brush->_control=$this;\r\n\r\n }", "public function define_size($p_width,$p_w_unity,$p_height,$p_h_unity)\r\n\t\t{\r\n\t\t\t$this->c_width = $p_width;\r\n\t\t\t$this->c_w_unity = $p_w_unity;\r\n\t\t\t$this->c_height = $p_height;\r\n\t\t\t$this->c_h_unity = $p_h_unity;\r\n\t\t}", "public function setSize()\n {\n //Available sizes\n $sizes = [\n 'xs' => '16',\n 'sm' => '24',\n 'md' => '32',\n 'lg' => '48',\n 'xl' => '64',\n 'xxl' => '80',\n ];\n\n //Size class\n if (isset($sizes[$this->compParams['size']])) {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-\" . $this->compParams['size'];\n } else {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-inherit\";\n }\n\n return $this->data;\n }", "public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }", "public function __construct($aWidth = 0, $aHeight = 0, $aCachedName = '', $aTimeOut = 0, $aInline = true)\n\t{\n\t\t// Backward compatibility\n\t\tif ($aWidth == -1) {\n\t\t\t$aWidth = 0;\n\t\t}\n\n\t\tif ($aHeight == -1) {\n\t\t\t$aHeight = 0;\n\t\t}\n\n\t\tif ($aWidth < 0 || $aHeight < 0) {\n\t\t\tUtil\\JpGraphError::RaiseL(6002);\n\t\t\t//(\"You can't specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.\");\n\t\t}\n\t\tparent::__construct($aWidth, $aHeight, $aCachedName, $aTimeOut, $aInline);\n\t\t$this->scale = new GanttScale($this->img);\n\n\t\t// Default margins\n\t\t$this->img->SetMargin(15, 17, 25, 15);\n\n\t\t$this->hgrid = new HorizontalGridLine();\n\n\t\t$this->scale->ShowHeaders(GANTT_HWEEK | GANTT_HDAY);\n\t\t$this->SetBox();\n\t}", "public function setSize($size)\n {\n $this->size = $size;\n $this->computeGroup();\n }", "public function __construct(){\n\n\t\tparent::setUnits($this->bytesUnits);\n\t}", "function calc_size()\n\t{\n\t\t\t$size = getimagesize(ROOT_PATH . $this->file);\n\t\t\t$this->width = $size[0];\n\t\t\t$this->height = $size[1];\n\t}", "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->width = func_get_arg(0);\n $this->height = func_get_arg(1);\n $this->length = func_get_arg(2);\n }\n }", "function __construct(int $x, int $y, bool $ticks = true)\n\t{\n\t\t$this->ticks = $ticks;\n\n\t\t$this->sizeX = $x;\n\t\t$this->sizeY = $y;\n\t\t$this->imageName = \"chart.png\";\n\t\t$this->im = imagecreatetruecolor($x, $y);\n\n\t\t//Assign default colors\n\t\t$this->colorTickY = imagecolorallocate($this->im, 255, 255, 255); //white\n\t\t$this->colorTickX = imagecolorallocate($this->im, 255, 255, 255); //white\n\t\t$this->colorAxisY = imagecolorallocate($this->im, 255,215,0); //gold\n\t\t$this->colorAxisX = imagecolorallocate($this->im, 255, 215, 0); //gold\n\t\t$this->colorBackground = imagecolorallocate($this->im, 0, 0, 0); //black\n\t\t$this->colorPoints = imagecolorallocate($this->im, 0,128,0); //green\n\t\timagefill($this->im, 0, 0, $this->colorBackground);\n\t}", "public function __construct(){\n parent::__construct(); // paima parent constructoriu\n $this->font = 'vedrana';\n $this->size = 35;\n }", "public function setScaledSize(Size $size)\n {\n $this->options['scaledSize'] = $size;\n }", "public function setSize(Size $size)\n {\n $this->options['size'] = $size;\n }", "private function adjust_graph_dimensions(){\n\t\t$this->axiswidth = ($this->startingmonth + 1.5) * $this->monthwidth;\n\t\tif($this->max_graph_height < $this->max_month_value){\n\t\t\t$this->yscale = $this->max_graph_height / $this->max_month_value;\n\t\t}\n\t\t$this->axisheight = $this->yscale * ($this->max_month_value + 20);\n\t\tif($this->max_graph_height < $this->axisheight){\n\t\t\t$this->yscale = $this->yscale * ($this->max_graph_height / $this->axisheight);\n\t\t\t$this->axisheight = $this->max_graph_height;\n\t\t}\n\t\t$this->graphheight = $this->axisheight + $this->graphmargintop + $this->graphmarginbottom;\n\t\t$this->graphwidth = $this->axiswidth + $this->graphmarginleft + $this->graphmarginright;\n\t\t\n\t\treturn;\n\t}", "public function setSize(int $size) : self\n {\n $this->initialized['size'] = true;\n $this->size = $size;\n return $this;\n }", "public function setSize(int $size) : self\n {\n $this->initialized['size'] = true;\n $this->size = $size;\n return $this;\n }", "function set_sizes($mw, $mh, $img_c = 1){\r\n\r\n $this->max_width = $mw;\r\n $this->max_height = $mh;\r\n $this->is_crop_img = $img_c;\r\n }", "public function size($pixels);", "public function size($size)\n\t{\n\t\t$this->size = $size;\n\t\treturn $this;\n\t}", "public function set_default_dimension($options) {\n foreach ($options as $name => $value) {\n switch (strtolower($name)) {\n\n case 'rowheight':\n $this->worksheet->getDefaultRowDimension()->setRowHeight($value);\n break;\n\n case 'columnwidth':\n $this->worksheet->getDefaultColumnDimension()->setWidth($value);\n break;\n\n case 'columnautosize':\n $this->worksheet->getDefaultColumnDimension()->setAutoSize($value);\n break;\n }\n }\n }", "public function __construct()\n {\n parent::__construct(ChartTypes::BAR);\n }" ]
[ "0.6160381", "0.6132256", "0.6099869", "0.58391845", "0.5815313", "0.57553905", "0.5647006", "0.5583575", "0.5567874", "0.5470023", "0.5465005", "0.54170555", "0.54084843", "0.53865784", "0.53793263", "0.5337026", "0.53368074", "0.53113973", "0.53061545", "0.53052086", "0.52961665", "0.5285179", "0.52718055", "0.5265732", "0.52504045", "0.52351934", "0.52280164", "0.519253", "0.5187283", "0.5149693", "0.5080828", "0.5062097", "0.5044057", "0.50433046", "0.5033597", "0.5012106", "0.5012106", "0.5008732", "0.5001623", "0.4998559", "0.49848187", "0.4980975", "0.49801475", "0.49708453", "0.4963148", "0.49609414", "0.49544257", "0.49272144", "0.49268585", "0.4910812", "0.4905636", "0.49045298", "0.49020568", "0.49000967", "0.4897305", "0.4897295", "0.48900688", "0.48869985", "0.48747587", "0.48697484", "0.4866065", "0.48583025", "0.48526642", "0.48476654", "0.4843608", "0.48430866", "0.48391667", "0.4838376", "0.48302862", "0.4822452", "0.48203158", "0.4815829", "0.4813266", "0.48120698", "0.48069036", "0.47989514", "0.47980082", "0.4791844", "0.47653106", "0.4760287", "0.47547543", "0.4753028", "0.4747956", "0.47469488", "0.47453937", "0.47262463", "0.47184232", "0.4714224", "0.47125593", "0.4701901", "0.4701822", "0.47013068", "0.46962166", "0.46927416", "0.46927416", "0.46921316", "0.46917522", "0.46867293", "0.46625125", "0.4649832" ]
0.64430135
0
Sets the size of the Chart
public function setSizeField($width='800', $height='600') { $this->sizeField['width'] = $width; $this->sizeField['height'] = $height; $this->gridObject = new SimpleXMLElement( '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'.$width.'" height="'.$height.'"></svg>' ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSize($size);", "function setSize($size)\n {\n $this->size = $size;\n }", "function setSize($size) {\n\t\t$this->size = $size;\n\t}", "public function setDimensions($width, $height) {}", "public function setSize($size) {\n $this->size = $size;\n }", "public function setSize($size) {\n $this->size = $size;\n }", "public function setSize($size)\n {\n $this->size = $size;\n }", "public function setSize($size){\n $this->game->setGridSize($size);\n }", "public function setSize(Size $size)\n {\n $this->options['size'] = $size;\n }", "public function setSize($size) {\n $this->_size = $size;\n }", "public function setPlanetSize($size) {\n list ($x, $y) = explode(' ', $size);\n \n $this->maxX = $x;\n $this->maxY = $y;\n }", "public function SetSize($width = 550, $height = 450){\n\t\t\t$this->width = $width;\n\t\t\t$this->height = $height;\n\t\t}", "function setSize($size)\n\t{\n\t\t$this->size = 0+$size;\n\t}", "public function setSize($size)\n {\n $this->size = $size;\n $this->computeGroup();\n }", "public function setScaledSize(Size $size)\n {\n $this->options['scaledSize'] = $size;\n }", "function _set_new_y($size)\r\n {\r\n $this->new_y = $size;\r\n }", "public function setSize($size): self;", "public function setPaperSize($paperSize);", "public function setSize($size)\n {\n return $this->setAttribute('size', $size);\n }", "private function setChartScale(Dataset $dataset): void\n {\n $this->start = 0;\n $this->unit = 1;\n $boundaries = $dataset->boundaries();\n if (null !== $boundaries) {\n $this->start = $boundaries->getStartDate()->getTimestamp();\n $this->unit = $this->config->width() / $boundaries->getTimestampInterval();\n }\n }", "public function setChartBorderWidth($width) {\n\t\t$this->chartBorderWidth = $width;\n\t}", "public function setSize($newSize)\n {\n $this->domain->setSize($newSize);\n }", "function setFontSize($fontSize)\n {\n $this->fontSize = $fontSize;\n }", "function setSize($w=0,$h=0){\r\n $this->width = $w;\r\n $this->heigth=$h;\r\n }", "private function adjust_graph_dimensions(){\n\t\t$this->axiswidth = ($this->startingmonth + 1.5) * $this->monthwidth;\n\t\tif($this->max_graph_height < $this->max_month_value){\n\t\t\t$this->yscale = $this->max_graph_height / $this->max_month_value;\n\t\t}\n\t\t$this->axisheight = $this->yscale * ($this->max_month_value + 20);\n\t\tif($this->max_graph_height < $this->axisheight){\n\t\t\t$this->yscale = $this->yscale * ($this->max_graph_height / $this->axisheight);\n\t\t\t$this->axisheight = $this->max_graph_height;\n\t\t}\n\t\t$this->graphheight = $this->axisheight + $this->graphmargintop + $this->graphmarginbottom;\n\t\t$this->graphwidth = $this->axiswidth + $this->graphmarginleft + $this->graphmarginright;\n\t\t\n\t\treturn;\n\t}", "public function setSize($width,$height) \n {\n $this->width = $width;\n $this->height = $height;\n }", "function SetSize($aRadius) {\n\t$this->iRadius = $aRadius;\n }", "public function setSize($size)\n {\n $this->size = $size;\n\n return $this;\n }", "public function size($size = UIRepository::STYLE_DEFAULT)\n {\n $this->size = $size;\n\n return $this;\n }", "public function setGridSize($girdSize);", "public function setSize($size)\n {\n if (!is_numeric($size)) {\n throw new GUIException(\"The specified font size is not numeric!\");\n }\n $this->size = $size;\n $this->setAttributes(\"Size\");\n }", "public function setSize(int $size)\n {\n $this->size = $size;\n }", "public function setSize($size = 100)\n {\n $this->size = $size;\n\n return $this;\n }", "public static function setMinSize(int $width, int $height) {}", "public function setSize($size)\n\t{\n\t\t$this->size = $size;\n\t\treturn $this;\n\t}", "function SetFontSize($size)\n\t\t{\n\t\t\t/*if($this->FontSizePt==$size) return;\n\t\t\t$this->FontSizePt=$size;\n\t\t\t$this->FontSize=$size/$this->k;\n\t\t\tif($this->page>0)\n\t\t\t\t$this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));*/\n\t\t}", "protected function SetGridDimensions()\n {\n $this->g_height = $this->height - $this->pad_top - $this->pad_bottom;\n $this->g_width = $this->width - $this->pad_left - $this->pad_right;\n }", "public function setDefaultSize() {\n return $this->setSize('medium');\n }", "public function setSize($size) {\n $this->size = $size;\n return $this;\n }", "public function setShadowSize($series, $size) {\n\t\t$this->Data[$series]['shadowSize'] = $size;\n\t}", "public function setSize($size)\n {\n $this->size = $size;\n return $this;\n }", "public function setSize($size)\n {\n $this->size = $size;\n\n return $this;\n }", "public function setSize($width, $height) {\n $this->width = $width;\n $this->height = $height;\n }", "public function setSize($size)\n {\n return $this->setParam('size', $size);\n }", "function setLegendWidth($width = 40)\n {\n $width *= 1.0;\n if ($width < 0) {\n $width = 0;\n }\n if ($width > 100) {\n $width = 100;\n }\n $this->legend_width = $width;\n }", "function setLegendWidth($width = 40)\n {\n $width *= 1.0;\n if ($width < 0) {\n $width = 0;\n }\n if ($width > 100) {\n $width = 100;\n }\n $this->legend_width = $width;\n }", "public function setDimensions($width, $height) {\n $this->width = $width;\n $this->height = $height;\n }", "public function setFontSize($fontSize) {\n\t\t$this->fontSize = $fontSize;\n\t}", "public function set_spacing_sizes()\n {\n }", "public function setPlotWidth($plotWidth = 700) {\n\t\t$this->plotWidth = $plotWidth;\n\t}", "public final function setWidth($width)\n {\n $this->googleVisualization->setWidth($width);\n }", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function setSize(int $size): void\n {\n $this->size = $size;\n }", "public function setSize(int $size): void\n {\n $this->size = $size;\n }", "public function setFontSize($size)\n {\n return $this->setFontSizeConfig($size);\n }", "public function setSize($size)\n {\n $this->size = $size;\n\n return $this;\n }", "public function setSize($size)\n {\n $this->size = $size;\n\n return $this;\n }", "public function withViewportSize(ViewportSize $size);", "public function setPlotHeight($plotHeight = 500) {\n\t\t$this->plotHeight = $plotHeight;\n\t}", "public function setFontSize($size = 50)\n {\n $this->fontSize = $size;\n\n return $this;\n }", "public function set_page_size($size){\n $this->size=$size;\n }", "public function set_pagesize($size) {\n $this->page_size = (int) $size;\n }", "private function setDimensions(){\r\n list($width, $height) = getimagesize($this->fileName);\r\n $this->imageDimensions = array('width'=>$width,\r\n 'height'=>$height);\r\n \r\n }", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }", "protected function setDisplaySize($display_canvas_size, $scale_up=FALSE) {\n\t\t// Set the width and height depending on the value sent in.\n\t\tif(is_array($display_canvas_size)) {\n\t\t// seperate specific height and width specified\n\t\t\tlist($display_width, $display_height) = $display_canvas_size;\n\t\t} else {\n\t\t// resized image size is square\n\t\t\t$display_width = $display_canvas_size;\n\t\t\t$display_height = $display_width * $this->aspect_ratio;\n\t\t}\n\t\t// set the resized image dimesions to the source image dimensions\n\t\t$this->resized_image_width = $display_width;\n\t\t$this->resized_image_height = $display_height;\n\n\t\t// scale the image to fit the display canvas dimensions\n\t\tImageLib::scale($this->resized_image_width, $this->resized_image_height, $display_width, $display_height, NULL, $scale_up);\n\t}", "public function setAppearanceFontSize($fontSize) {}", "public function setSize(int $size) : self\n {\n $this->initialized['size'] = true;\n $this->size = $size;\n return $this;\n }", "public function setSize(int $size) : self\n {\n $this->initialized['size'] = true;\n $this->size = $size;\n return $this;\n }", "public function setSize($data)\n {\n $this->_Size=$data;\n return $this;\n }", "public function setHeight($height) {}", "public function setSize()\n {\n //Available sizes\n $sizes = [\n 'xs' => '16',\n 'sm' => '24',\n 'md' => '32',\n 'lg' => '48',\n 'xl' => '64',\n 'xxl' => '80',\n ];\n\n //Size class\n if (isset($sizes[$this->compParams['size']])) {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-\" . $this->compParams['size'];\n } else {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-inherit\";\n }\n\n return $this->data;\n }", "public function setSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->size = $var;\n\n return $this;\n }", "public function setWidth($width);", "public function setWidth($width);", "public function set_default_dimension($options) {\n foreach ($options as $name => $value) {\n switch (strtolower($name)) {\n\n case 'rowheight':\n $this->worksheet->getDefaultRowDimension()->setRowHeight($value);\n break;\n\n case 'columnwidth':\n $this->worksheet->getDefaultColumnDimension()->setWidth($value);\n break;\n\n case 'columnautosize':\n $this->worksheet->getDefaultColumnDimension()->setAutoSize($value);\n break;\n }\n }\n }", "public function setSize($w, $h = 0) {\n $this->width = $w;\n $this->height = $w;\n }", "public function setPickTrayByPdfSize($value = true) {}", "function set_height($height) {\n $this->height = $height;\n }", "public function setSize($value) {\r\n $this->iSize = $this->setIntegerProperty($this->iSize, $value);\r\n }", "protected function update_size($width = \\false, $height = \\false)\n {\n }", "public function setTargetSize( $size )\n {\n $this->targetSize = $size;\n\n }", "public function withPaperSize(PaperSize $size);", "public function setChart($c) {\r\n parent::setChart($c);\r\n if ($this->pen != null) {\r\n $this->pen->setChart($c);\r\n }\r\n if ($this->bBrush != null) {\r\n $this->bBrush->setChart($c);\r\n }\r\n }", "public function setDimensions($width, $height) {\n\t\t$this -> setWidth($width);\n\t\t$this -> setHeight($height);\n\t\tif ($width && $height) {\n\t\t\t$this -> setProperty('chs', $width.'x'.$height);\n\t\t}\n\t\telse if ($height) \n\t\t\t$this -> setProperty('chs', $height);\n\t}", "public function setFontSize(string $value)\n {\n $this->styles['font-size'] = $value;\n }", "private function _setMapSize()\n {\n $this->map_obj->setSize($this->image_size[0], $this->image_size[1]);\n if ($this->_isResize()) {\n $this->map_obj->setSize($this->_download_factor*$this->image_size[0], $this->_download_factor*$this->image_size[1]);\n }\n }", "function limitToSize($size) {\r\n $this->sizeLimit = $size;\r\n }", "function setPaperHeight($paperHeight) {\t \r\n\t $this->paperHeight = $paperHeight;\r\n\t}", "public function size($size)\n\t{\n\t\t$this->size = $size;\n\t\treturn $this;\n\t}", "public function setSize($size)\n {\n if (is_int($size) || is_float($size)) {\n $this->size = $size;\n return $this;\n } else {\n throw new InvalidArgumentException(get_class($this) . '::size must been float type');\n }\n }", "public function init()\n {\n parent::init();\n\n $this->size = $this->finalWidth;\n }", "function _set_img_y($size)\r\n {\r\n $this->img_y = $size;\r\n }", "public function setWidth($value)\n {\n $this->_width = $value;\n }", "public function setSize( $aInputSize )\n\t{ return $this->setAttr('size', $aInputSize); }", "public function AutoSize()\n\t{\n\t\tif ($this->img->img == null) {\n\t\t\t// The predefined left, right, top, bottom margins.\n\t\t\t// Note that the top margin might incease depending on\n\t\t\t// the title.\n\t\t\t$hadj = $vadj = 0;\n\t\t\tif ($this->doshadow) {\n\t\t\t\t$hadj = $this->shadow_width;\n\t\t\t\t$vadj = $this->shadow_width + 5;\n\t\t\t}\n\n\t\t\t$lm = $this->img->left_margin;\n\t\t\t$rm = $this->img->right_margin + $hadj;\n\t\t\t$rm += 2;\n\t\t\t$tm = $this->img->top_margin;\n\t\t\t$bm = $this->img->bottom_margin + $vadj;\n\t\t\t$bm += 2;\n\n\t\t\t// If there are any added Plot\\GanttVLine we must make sure that the\n\t\t\t// bottom margin is wide enough to hold a title.\n\t\t\t$n = safe_count($this->iObj);\n\t\t\tfor ($i = 0; $i < $n; ++$i) {\n\t\t\t\tif ($this->iObj[$i] instanceof Plot\\GanttVLine) {\n\t\t\t\t\t$bm = max($bm, $this->iObj[$i]->title->GetHeight($this->img) + 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// First find out the height\n\t\t\t$n\t = $this->GetBarMaxLineNumber() + 1;\n\t\t\t$m\t = max($this->GetMaxLabelHeight(), $this->GetMaxBarAbsHeight());\n\t\t\t$height = $n * ((1 + $this->iLabelVMarginFactor) * $m);\n\n\t\t\t// Add the height of the scale titles\n\t\t\t$h = $this->scale->GetHeaderHeight();\n\t\t\t$height += $h;\n\n\t\t\t// Calculate the top margin needed for title and subtitle\n\t\t\tif ($this->title->t != '') {\n\t\t\t\t$tm += $this->title->GetFontHeight($this->img);\n\t\t\t}\n\t\t\tif ($this->subtitle->t != '') {\n\t\t\t\t$tm += $this->subtitle->GetFontHeight($this->img);\n\t\t\t}\n\n\t\t\t// ...and then take the bottom and top plot margins into account\n\t\t\t$height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin;\n\t\t\t// Now find the minimum width for the chart required\n\n\t\t\t// If day scale or smaller is shown then we use the day font width\n\t\t\t// as the base size unit.\n\t\t\t// If only weeks or above is displayed we use a modified unit to\n\t\t\t// get a smaller image.\n\t\t\tif ($this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute()) {\n\t\t\t\t// Add 2 pixel margin on each side\n\t\t\t\t$fw = $this->scale->day->GetFontWidth($this->img) + 4;\n\t\t\t} elseif ($this->scale->IsDisplayWeek()) {\n\t\t\t\t$fw = 8;\n\t\t\t} elseif ($this->scale->IsDisplayMonth()) {\n\t\t\t\t$fw = 4;\n\t\t\t} else {\n\t\t\t\t$fw = 2;\n\t\t\t}\n\n\t\t\t$nd = $this->scale->GetNumberOfDays();\n\n\t\t\tif ($this->scale->IsDisplayDay()) {\n\t\t\t\t// If the days are displayed we also need to figure out\n\t\t\t\t// how much space each day's title will require.\n\t\t\t\tswitch ($this->scale->day->iStyle) {\n\t\t\t\t\tcase DAYSTYLE_LONG:\n\t\t\t\t\t\t$txt = 'Monday';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_LONGDAYDATE1:\n\t\t\t\t\t\t$txt = 'Monday 23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_LONGDAYDATE2:\n\t\t\t\t\t\t$txt = 'Monday 23 Jun 2003';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORT:\n\t\t\t\t\t\t$txt = 'Mon';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE1:\n\t\t\t\t\t\t$txt = 'Mon 23/6';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE2:\n\t\t\t\t\t\t$txt = 'Mon 23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDAYDATE3:\n\t\t\t\t\t\t$txt = 'Mon 23';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE1:\n\t\t\t\t\t\t$txt = '23/6';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE2:\n\t\t\t\t\t\t$txt = '23 Jun';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE3:\n\t\t\t\t\t\t$txt = 'Mon 23';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_SHORTDATE4:\n\t\t\t\t\t\t$txt = '88';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->day->iLabelFormStr, strtotime('2003-12-20 18:00'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DAYSTYLE_ONELETTER:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = 'M';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$fw = $this->scale->day->GetStrWidth($this->img, $txt) + 6;\n\t\t\t}\n\n\t\t\t// If we have hours enabled we must make sure that each day has enough\n\t\t\t// space to fit the number of hours to be displayed.\n\t\t\tif ($this->scale->IsDisplayHour()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t// and determine the length of that string.\n\t\t\t\tswitch ($this->scale->hour->iStyle) {\n\t\t\t\t\tcase HOURSTYLE_HMAMPM:\n\t\t\t\t\t\t$txt = '12:00pm';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_H24:\n\t\t\t\t\t\t// 13\n\t\t\t\t\t\t$txt = '24';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_HAMPM:\n\t\t\t\t\t\t$txt = '12pm';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->hour->iLabelFormStr, strtotime('2003-12-20 18:00'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HOURSTYLE_HM24:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = '24:00';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$hfw = $this->scale->hour->GetStrWidth($this->img, $txt) + 6;\n\t\t\t\t$mw = $hfw;\n\t\t\t\tif ($this->scale->IsDisplayMinute()) {\n\t\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t\t// and determine the length of that string.\n\t\t\t\t\tswitch ($this->scale->minute->iStyle) {\n\t\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t\t$txt2 = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55'));\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase MINUTESTYLE_MM:\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$txt2 = '15';\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$mfw = $this->scale->minute->GetStrWidth($this->img, $txt2) + 6;\n\t\t\t\t\t$n2 = ceil(60 / $this->scale->minute->GetIntervall());\n\t\t\t\t\t$mw = $n2 * $mfw;\n\t\t\t\t}\n\t\t\t\t$hfw = $hfw < $mw ? $mw : $hfw;\n\t\t\t\t$n = ceil(24 * 60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall()));\n\t\t\t\t$hw = $n * $hfw;\n\t\t\t\t$fw = $fw < $hw ? $hw : $fw;\n\t\t\t}\n\n\t\t\t// We need to repeat this code block here as well.\n\t\t\t// THIS iS NOT A MISTAKE !\n\t\t\t// We really need it since we need to adjust for minutes both in the case\n\t\t\t// where hour scale is shown and when it is not shown.\n\n\t\t\tif ($this->scale->IsDisplayMinute()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space. We therefore create a typical string for the choosen format\n\t\t\t\t// and determine the length of that string.\n\t\t\t\tswitch ($this->scale->minute->iStyle) {\n\t\t\t\t\tcase HOURSTYLE_CUSTOM:\n\t\t\t\t\t\t$txt = date($this->scale->minute->iLabelFormStr, strtotime('2005-05-15 18:55'));\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MINUTESTYLE_MM:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$txt = '15';\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$mfw = $this->scale->minute->GetStrWidth($this->img, $txt) + 6;\n\t\t\t\t$n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall()));\n\t\t\t\t$mw = $n * $mfw;\n\t\t\t\t$fw = $fw < $mw ? $mw : $fw;\n\t\t\t}\n\n\t\t\t// If we display week we must make sure that 7*$fw is enough\n\t\t\t// to fit up to 10 characters of the week font (if the week is enabled)\n\t\t\tif ($this->scale->IsDisplayWeek()) {\n\t\t\t\t// Depending on what format the user has choose we need different amount\n\t\t\t\t// of space\n\t\t\t\t$fsw = strlen($this->scale->week->iLabelFormStr);\n\t\t\t\tif ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) {\n\t\t\t\t\t$fsw += 8;\n\t\t\t\t} elseif ($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR) {\n\t\t\t\t\t$fsw += 7;\n\t\t\t\t} else {\n\t\t\t\t\t$fsw += 4;\n\t\t\t\t}\n\n\t\t\t\t$ww = $fsw * $this->scale->week->GetFontWidth($this->img);\n\t\t\t\tif (7 * $fw < $ww) {\n\t\t\t\t\t$fw = ceil($ww / 7);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() &&\n\t\t\t\t!(($this->scale->week->iStyle == WEEKSTYLE_FIRSTDAYWNBR ||\n\t\t\t\t\t$this->scale->week->iStyle == WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek())) {\n\t\t\t\t// If we don't display the individual days we can shrink the\n\t\t\t\t// scale a little bit. This is a little bit pragmatic at the\n\t\t\t\t// moment and should be re-written to take into account\n\t\t\t\t// a) What scales exactly are shown and\n\t\t\t\t// b) what format do they use so we know how wide we need to\n\t\t\t\t// make each scale text space at minimum.\n\t\t\t\t$fw /= 2;\n\t\t\t\tif (!$this->scale->IsDisplayWeek()) {\n\t\t\t\t\t$fw /= 1.8;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cw = $this->GetMaxActInfoColWidth();\n\t\t\t$this->scale->actinfo->SetMinColWidth($cw);\n\t\t\tif ($this->img->width <= 0) {\n\t\t\t\t// Now determine the width for the activity titles column\n\n\t\t\t\t// Firdst find out the maximum width of each object column\n\t\t\t\t$titlewidth = max(\n\t\t\t\t\tmax(\n\t\t\t\t\t\t$this->GetMaxLabelWidth(),\n\t\t\t\t\t\t$this->scale->tableTitle->GetWidth($this->img)\n\t\t\t\t\t),\n\t\t\t\t\t$this->scale->actinfo->GetWidth($this->img)\n\t\t\t\t);\n\n\t\t\t\t// Add the width of the vertivcal divider line\n\t\t\t\t$titlewidth += $this->scale->divider->iWeight * 2;\n\n\t\t\t\t// Adjust the width by the user specified zoom factor\n\t\t\t\t$fw *= $this->iZoomFactor;\n\n\t\t\t\t// Now get the total width taking\n\t\t\t\t// titlewidth, left and rigt margin, dayfont size\n\t\t\t\t// into account\n\t\t\t\t$width = $titlewidth + $nd * $fw + $lm + $rm;\n\t\t\t} else {\n\t\t\t\t$width = $this->img->width;\n\t\t\t}\n\n\t\t\t$width = round($width);\n\t\t\t$height = round($height);\n\t\t\t// Make a sanity check on image size\n\t\t\tif ($width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H) {\n\t\t\t\tUtil\\JpGraphError::RaiseL(6007, $width, $height);\n\t\t\t\t//(\"Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.\");\n\t\t\t}\n\t\t\t$this->img->CreateImgCanvas($width, $height);\n\t\t\t$this->img->SetMargin($lm, $rm, $tm, $bm);\n\t\t}\n\t}", "public function ofSize($size = 4) {\n $class = 'w-' . $size . ' h-' . $size;\n\n if (str_contains($this->svg,'w-')) {\n return $this;\n } elseif (str_contains($this->svg,'class=')) {\n $this->svg = str_replace('class=\"', 'class=\"' . $class . ' ', $this->svg);\n } else {\n $this->svg = str_replace('<svg ', '<svg class=\"' . $class . '\" ', $this->svg);\n }\n\n return $this;\n }", "private function getPlotWidth() {\n\t\treturn $this->plotWidth;\n\t}", "public function setDefaultSize($size)\n {\n $this->defaultSize = intval($size);\n }" ]
[ "0.65380585", "0.65017945", "0.6491875", "0.63824224", "0.63584584", "0.63584584", "0.633435", "0.62486786", "0.62337667", "0.6214964", "0.6129884", "0.6071223", "0.60330474", "0.60245526", "0.6024404", "0.6023282", "0.59381086", "0.5928062", "0.5920802", "0.5920111", "0.59073544", "0.58691627", "0.58605415", "0.5819606", "0.58169043", "0.5811271", "0.5806101", "0.5800183", "0.5794761", "0.5776441", "0.57546586", "0.5701157", "0.5700156", "0.566891", "0.56574124", "0.5634533", "0.561707", "0.5608237", "0.5600743", "0.5599557", "0.55986726", "0.55807275", "0.557327", "0.55569404", "0.5524583", "0.5524583", "0.55218816", "0.5512176", "0.55088544", "0.5507482", "0.5498547", "0.5497023", "0.5497023", "0.5496373", "0.5484757", "0.5484757", "0.548072", "0.54787344", "0.54787344", "0.54779786", "0.54633003", "0.54628503", "0.54594666", "0.5447923", "0.54420537", "0.5420343", "0.54161364", "0.54040647", "0.53951716", "0.53951716", "0.5385745", "0.5383095", "0.53720194", "0.53711", "0.5352351", "0.5352351", "0.5342045", "0.5328764", "0.5317425", "0.5308622", "0.530653", "0.5289038", "0.52885383", "0.52714825", "0.5268908", "0.5264293", "0.5248414", "0.52474", "0.5226209", "0.5222977", "0.5222963", "0.52149695", "0.5206927", "0.5204517", "0.5200316", "0.5190588", "0.51868045", "0.5185722", "0.518289", "0.51820743" ]
0.5547139
44
Initiates a Gridobject and sets the Grid
public function setGridObject($gridField = array()) { $xmlObject = $this->gridObject; $xmlGridObject = $xmlObject->addChild('g'); $xmlGridObject->addAttribute('id', 'grid'); $xmlGridObject->addAttribute('stroke', 'black'); // x-Line $xmlGridDetailsObject = $xmlGridObject->addChild('line'); $xmlGridDetailsObject->addAttribute('x1', '0'); $xmlGridDetailsObject->addAttribute('y1', '0'); $xmlGridDetailsObject->addAttribute('x2', $this->sizeField['width']); $xmlGridDetailsObject->addAttribute('y2', '0'); $xmlGridDetailsObject->addAttribute('style', 'stroke-dasharray:1,' . $gridField['x']['quadSize'] . ';stroke-width:' . $this->sizeField['height']*40 . ';'); // y-Line $xmlGridDetailsObject = $xmlGridObject->addChild('line'); $xmlGridDetailsObject->addAttribute('x1', '0'); $xmlGridDetailsObject->addAttribute('y1', $this->sizeField['height']); $xmlGridDetailsObject->addAttribute('x2', '0'); $xmlGridDetailsObject->addAttribute('y2', '0'); $xmlGridDetailsObject->addAttribute('style', 'stroke-dasharray:1,' . $gridField['y']['quadSize'] . ';stroke-width:' . $this->sizeField['width']*40 . ';'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setGrid(Grid $grid)\n {\n $this->gridInstance = $grid;\n }", "public function __construct(Grid $grid)\n {\n $this->_grid = $grid;\n }", "protected function initGrid(): void\n\t{\n\t\t$this->initGridConfig();\n\t\t$this->initGridColumns();\n\t\t$this->initGridPageNavigation();\n\t\t$this->initGridOrder();\n\t}", "public function init()\n {\n // load the grid\n $this->setId('demo-full-grid')\n ->addColumn(array(\n 'label' => 'Cod.',\n 'index' => 'id',\n ))\n ->addColumn(array(\n 'label' => 'Company',\n 'index' => 'companyName',\n ))\n ->addColumn(array(\n 'label' => 'Role',\n 'index' => 'roleName',\n ))\n ->addColumn(array(\n 'label' => 'Name',\n 'index' => 'personName',\n ))\n ->addColumn(array(\n 'label' => 'Balance',\n 'index' => 'balance',\n 'align' => 'right',\n 'render' => 'money',\n 'order' => false,\n ))\n ->addColumn(array(\n 'label' => 'Username',\n 'index' => 'username',\n 'render' => array(\n 'type' => 'link',\n 'href' => 'http://www.mdnsolutions.com',\n ),\n ))\n ->addColumn(array(\n 'label' => 'Birthday',\n 'index' => 'birthday',\n 'align' => 'center',\n 'render' => 'date',\n ))\n ->addColumn(array(\n 'label' => 'Last access',\n 'index' => 'lastAccess',\n 'render' => 'dateTime',\n ))\n ->addColumn(array(\n 'label' => 'Status',\n 'index' => 'statusId',\n 'render' => 'EnableOrDisabled',\n ))\n ->setRecordsPerPage(30)\n ->setOrder(false);\n }", "public function __construct(Grid $grid = null)\n {\n if ($grid) {\n $this->setGrid($grid);\n }\n }", "public function init(){\n parent::init();\n\t\t$this->_gridParam['width'] = 870;\n }", "public function __construct(Grid $grid)\n\t{\n\t\t$this->grid = $grid;\n\t\t$this->columns = new \\Illuminate\\Support\\Collection();\n\t}", "public function init()\n {\n\t\tif (!isset($this->options['id'])) {\n $this->options['id'] = $this->getId();\n }\t\n\n\t\tif (!isset($this->gridOptions['class'])) {\n\t\t\t$this->gridOptions['class'] = self::DEFAULT_GRID_CLASS;\t\t\n\t\t}\n\n\t\tif (isset($this->itemOptions['class'])) {\n\t\t\t$this->clientOptions['itemSelector'] = '.' . $this->itemOptions['class'];\n\t\t} else {\n\t\t\t$this->itemOptions['class'] = self::DEFAULT_ITEM_CLASS;\n\t\t\t$this->clientOptions['itemSelector'] = '.' . self::DEFAULT_ITEM_CLASS;\n\t\t}\n\t\t\n\t\tif (empty($this->gridSelector)) {\n\t\t\t$this->gridSelector = '#'. $this->id . ' .' . self::DEFAULT_GRID_CLASS;\n\t\t}\t\t\n\t\t\n\t\tif (empty($this->layout)) {\n\t\t\t$tag = ArrayHelper::remove($this->gridOptions, 'tag', 'div');\n\t\t\t\n\t\t\t$gridContainer = Html::tag($tag, '{items}', $this->gridOptions);\n\t\t\t\n\t\t\t$this->layout = \"{summary}$gridContainer\\n{pager}\";\n\t\t}\n\t\t\t\n parent::init();\n }", "public function setGrid(Grid $grid)\n {\n $this->grid = $grid;\n\n return $this;\n }", "protected function grid()\n {\n $grid = new Grid(new Banner);\n\n $grid->id('Id');\n $grid->title('Title');\n $grid->image('Image')->display(function($image) {\n return '<img width=\"30\" src=\"' . (env('APP_URL') . '/storage/' . ($image ?: 'images/default.png')) . '\"\"/>';\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }", "public function __construct(Grid $gridInstance, $initalGridPosition = null)\n {\n\n $this->type = \"Obstacle\";\n\n $this->setGrid($gridInstance);\n\n if ($initalGridPosition !== null) {\n $this->setInitialGridPosition($initalGridPosition);\n }\n }", "public function init()\n {\n\n $this->minWidth = 300;\n $this->minHeight = 200;\n $this->width = 950;\n $this->height = 650;\n $this->resizable = true;\n $this->movable = true;\n $this->closable = true;\n\n $this->models = new TArray();\n\n }", "protected function grid()\n {\n $grid = new Grid(new Elevator);\n\n $grid->id('ID');\n $city=getCity();$brand=getBrand();\n\n if($city!='*'){\n $subsql=DB::table('project')->whereIn('city_id', $city)->select('id')->sql();\n $grid->model()->whereRaw(DB::raw('pid in ('.$subsql.')'));\n }\n if($brand!='*'){\n $subsql=DB::table('project')->whereIn('brand', $brand)->select('id')->sql();\n $grid->model()->whereRaw(DB::raw('pid in ('.$subsql.')'));\n }\n $grid->column('project.name','项目名称');\n $grid->region('梯号');\n $grid->eid('电梯设备')->display(function(){\n if($this->device){\n return $this->device->brand.$this->device->brand_set;\n }\n return '未找到电梯设备';\n });\n $grid->num('电梯数量');\n $grid->height('提升高度(m)');\n $grid->layer_numbers('层/站/门')->display(function($layer_number){\n return \"{$this->layer_number}/{$this->layer_number_site}/{$this->layer_number_door}\";\n });\n $grid->pit_depth('底坑深度(mm)');\n $grid->top_height('顶层高度(mm)');\n $grid->hall_width('厅门尺寸(mm)')->display(function($hall){\n return \"{$this->hall_width}X{$this->hall_height}\";\n });\n $grid->car_width('轿厢尺寸(mm)')->display(function($car){\n return \"{$this->car_width}X{$this->car_height}X{$this->car_depth}\";\n });\n $grid->desc('电梯说明');\n\n $grid->status1('功能/装修')->display(function(){\n if($this->status>=Elevator::STATUS_JD_JT){\n return Elevator::getStatusStr($this->status);\n }\n return '<a href=\"/admin/elevator/'.$this->id.'/funfit\">查看&配置</a>';\n });\n $grid->status('状态')->eleStatus();\n $grid->filter(function($filter) use($city,$brand){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $pj=Project::select('*');\n if($city!='*'){\n $pj->whereIn('city_id', $city);\n }\n if($brand!='*'){\n $pj->where('brand', $brand);\n }\n $pj=$pj->get();\n $arr=Arr::pluck($pj, 'name','id');\n //var_dump($pj,$arr);\n $filter->equal('pid','项目')->select($arr);\n $filter->like('desc', '电梯说明');\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n $grid->disableExport();\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableView();\n if($actions->row->status>=Elevator::STATUS_JD_JT){\n $actions->disableDelete();\n $actions->disableEdit();\n }\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->hyzz('资质证书')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->type('类型');\n $grid->username('用户名称');\n $grid->password('密码');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n $grid->status('账户状态')->radio([\n 0=> '审核中',\n 1=> '审核通过',\n 2=> '冻结账户'\n ]);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n $grid->id('ID')->sortable();\n $grid->name('名称');\n $grid->type('分类')->display(function($status) {\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n foreach ($arr as $key => $value) {\n if($status==$value['id']) return $value['type']; \n }\n \n });\n $grid->cover('商品大图')->image('',70, 70);\n $grid->image('详情图')->image('',70, 70);\n $grid->stock('库存');\n $grid->price('积分价格');\n $grid->status('状态')->display(function($status) {\n if($status==1) return \"上架中\";\n if($status==0) return \"已下架\"; \n });\n $grid->disableExport();//禁用导出数据按钮\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();//禁用查询过滤器\n });\n \n \n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n //$filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('title_designer_cn', '标题(设计师)');\n $filter->like('title_name_cn', '标题(项目名称)');\n $filter->like('title_intro_cn', '标题(项目介绍)');\n\n });\n\n $grid->id('ID')->sortable();\n $grid->title_designer_cn('标题(中)')->display(function () {\n return CurrentModel::formatTitle($this, 'cn');\n });\n $grid->title_designer_en('标题(英)')->display(function () {\n return CurrentModel::formatTitle($this, 'en');\n });\n $grid->article_status('状态')->display(function ($article_status) {\n switch ($article_status) {\n case '0' :\n $article_status = '草稿';\n break;\n case '1' :\n $article_status = '审核中';\n break;\n case '2' :\n $article_status = '已发布';\n break;\n }\n return $article_status;\n });\n $grid->release_time('发布时间')->sortable();\n \n // $grid->column('created_at', __('发布时间'));\n $grid->created_at('添加时间')->sortable();\n // $grid->column('updated_at', __('添加时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n// $grid->column('id', __('Id'));\n $grid->column('date', __('Дата'));\n $grid->column('name', __('Город'))->display(function () {\n return '<a href=\"/admin/city-users?set='.$this->id.'\">'.$this->name.'</a>';\n });\n $grid->column('image', 'Картинка')->display(function () {\n $str = $this->image!='' ? '<img src=\"/uploads/images/'.$this->image.'\" height=\"100\"/>' : '';\n return $str;\n });\n// $grid->column('text', __('Text'));\n $grid->column('show', 'Активен')->display(function () {\n return $this->show ? 'да' : 'нет';\n });\n// $grid->column('orders', __('Orders'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Information);\n\n $grid->model()->where('adminuser_id', '=', Admin::user()->id);\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('项目名称'));\n $grid->column('content', __('项目简介'))->limit(30);\n $grid->column('industry', __('行业类别'));\n $grid->column('investment', __('投资金额')); \n $grid->column('cont_name', __('资方联系人'));\n $grid->column('cont_phone', __('资方联系方式'));\n $grid->column('staff_name', __('工作人员姓名'));\n $grid->column('staff_phone', __('工作人员电话'));\n $grid->column('created_at', __('上报时间'));\n $grid->column('updated_at', __('更新时间'));\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('name', '项目名称');\n $filter->like('cont_name', '资方联系人');\n $filter->like('content', '项目情况');\n });\n\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Drug);\n\n $grid->id('ID');\n $grid->street_name('«Уличное» название');\n $grid->city('Город');\n $grid->column('photo_drug','Фотография наркотика')->display(function () {\n $photo = Photo::whereDrugId($this->id)->where('type', 0)->first();\n\n if ($photo) {\n return $photo->photo;\n } else {\n return '';\n }\n })->image();\n\n $grid->column('confirm', 'Подтверждение')->display(function ($confirm) {\n if ($confirm) {\n return '✅Подтверждено';\n } else {\n return '❌Не подтверждено';\n }\n });\n $grid->updated_at('Дата изменения');\n\n return $grid;\n }", "private function populateGrid() {\n for ($x = 0; $x < self::HEIGHT; $x++) {\n $this->grid[$x] = [];\n for ($y = 0; $y < self::HEIGHT; $y++) {\n $location = new Location();\n $location->setX($x);\n $location->setY($y);\n $this->grid[$x][$y] = $location;\n }\n }\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->id('ID')->sortable();\n\n $grid->company_id('公司名称')->display(function ($company_id) {\n $company = Company::find($company_id);\n if ($company) {\n return $company->company_name;\n }\n return $company_id;\n });\n $grid->project_name('项目名称')->sortable();\n $grid->link_url('项目链接');\n $grid->display('公开度')->display(function ($display) {\n return $display == 0 ? '公开' : '私密';\n });\n $grid->created_at('添加时间')->sortable();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Direction());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('intro', __(trans('hhx.intro')));\n $grid->column('Img', __(trans('hhx.img')))->image();\n $grid->column('status', __(trans('hhx.status')))->using(config('hhx.status'));\n $grid->column('order_num', __(trans('hhx.order_num')));\n $grid->column('all_num', __(trans('hhx.all_num')));\n $grid->column('this_year', __(trans('hhx.this_year')));\n $grid->column('stock', __(trans('hhx.stock')));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StationBannerImage());\n\n $grid->column('id', __('Id'));\n $grid->column('station.station_name', __('測站'));\n $grid->column('image', __('輪播圖'))->image('', '50');\n $grid->column('url', __('連結'))->link();\n $grid->column('order', __('排序'));\n $grid->column('valid_at', __('有效日期'));\n $grid->column('mod_user', __('異動人員'));\n $grid->column('updated_at', __('異動時間'));\n\n if (Admin::user()->username != 'admin') {\n $grid->model()->where('station_id', '=', Admin::user()->station_id);\n }\n\n return $grid;\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->setId('productGrid');\r\n $this->setDefaultSort('entity_id');\r\n $this->setDefaultDir('DESC');\r\n $this->setSaveParametersInSession(true);\r\n }", "protected function grid()\n { \n \n $grid = new Grid(new Blog);\n\n $grid->id('Id')->sortable();\n $grid->title('标题');\n // $grid->content('内容');\n $grid->logo('图片')->display(function ($value) {\n return \"<img width='50' src='/upload/$value'>\";\n });\n $grid->discuss('评论');\n $grid->display('浏览');\n \n $grid->lab_id('标签')->display(function ($value) {\n $lab_name = Lab::select('lab_name')->where('id',$value)->get();\n \n return $lab_name[0]->lab_name;\n });\n\n $grid->cat_id('分类')->display(function ($value) {\n $cat_name = Cat::select('cat_name')->where('id',$value)->get();\n return $cat_name[0]->cat_name;\n });\n \n\n\n $grid->created_at('添加时间');\n \n $grid->actions(function ($actions){\n $actions->disableView();\n });\n\n $grid->filter(function($filter){\n $filter->like('title', '标题');\n $filter->like('content', '内容');\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GoodsClass);\n $pid=Input::get(\"pid\",null);\n $grid->model()->where(\"pid\",$pid);\n $info_array=[\n array(\"field\"=>\"id\",\"title\"=>\"id\",\"type\"=>\"value\"),//展示昵称\n array(\"field\"=>\"parent.title\",\"title\"=>\"上级\",\"type\"=>\"default\",\"default\"=>\"顶级\"),//展示昵称\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),//展示昵称\n array(\"field\"=>\"desc\",\"title\"=>\"简介\",\"type\"=>\"value\"),//展示真实姓名\n array(\"field\"=>\"icon\",\"title\"=>\"图标\",\"type\"=>\"image\"),//展示图片\n array(\"field\"=>\"updated_at\",\"title\"=>\"更新时间\",\"type\"=>\"value\"),\n ];\n BaseControllers::setlist_show($grid,$info_array);//拼接列表展示数据\n\n $grid->actions(function ($actions) use($pid) {\n\n if(empty($pid)){\n $actions->add(new SeeNext());\n }\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new NewEnergy());\n\n $grid->column('user_id', __('用户'));\n $grid->column('car_id', __('车辆ID'));\n $grid->column('start_mileage', __('开始里程'));\n $grid->column('end_mileage', __('结束里程'));\n $grid->column('mileage', __('里程'));\n $grid->column('type', __('车辆类型'));\n $grid->column('status', __('状态'));\n $grid->column('remark', __('备注'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Carousel);\n\n $grid->model()->latest();\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->equal('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->select(CarouselCategory::all()->pluck('name', 'id'));\n $filter->like('title', __('carousel::carousel.title'));\n $filter->between('start_time', __('carousel::carousel.start_time'))->date();\n $filter->between('end_time', __('carousel::carousel.end_time'))->date();\n\n });\n\n $grid->column('id', __('carousel::carousel.id'));\n $grid->column('category.name', __('carousel::carousel.carousel_category_id'));\n $grid->column('title', __('carousel::carousel.title'));\n $grid->column('img_src', __('carousel::carousel.img_src'))->image();\n $grid->column('status', __('carousel::carousel.status.label'))\n ->using(__('carousel::carousel.status.value'));\n $grid->column('start_time', __('carousel::carousel.start_time'));\n $grid->column('end_time', __('carousel::carousel.end_time'));\n $grid->column('created_at', __('admin.created_at'));\n\n return $grid;\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function grid()\n {\n $grid = new Grid(new Advertisement);\n\n $grid->id('الرقم');\n $grid->title('العنوان');\n $grid->ad_views()->views('المشاهدات');\n // $grid->user('المستخدم')->display(function ($user) {\n // return \"<span class='label label-success'>{$user['name']}</span>\";\n // });\n $grid->category('القسم')->display(function ($category) {\n return \"<span class='label label-success'>{$category['title_ar']}</span>\";\n });\n $grid->status('الحالة')->radio([\n -1 => 'قيد المراجعة',\n 1 => 'مقبول',\n 0 => 'مرفوض',\n ]);\n $grid->type('النوع')->radio([\n 'sell' => 'بيع',\n 'rental' => 'إيجار',\n ]);\n $grid->featured('مميز')->editable('select', [\n 1 => 'نعم',\n -1 => 'لا',\n ]);\n // $grid->column('position')->openMap(function () {\n\n // return [$this->lat, $this->long];\n\n // }, 'Position');\n $grid->area('المساحة');\n $grid->price('السعر');\n $grid->created_at('تاريخ الإنشاء');\n $grid->updated_at('اخر تحديث');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n\n //only display paid order\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('order number');\n $grid->column('user.name', 'Buyer');\n $grid->total_amount('Total Amount')->sortable();\n $grid->paid_at('Paid Time')->sortable();\n $grid->ship_status('Shipment')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('Refund Status')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Terrace());\n\n $grid->column('id', __('Id'))->sortable()->style('text-align:center');\n $grid->column('image', __('平台图片'))->style('text-align:center')->image();\n $grid->column('name', __('平台名称'))->style('text-align:center');\n $grid->column('path', __('外链'))->style('text-align:center');\n $grid->column('notice_info', __('提示语'))->style('text-align:center');\n $grid->column('status', __('状态'))->display(function($status){\n return $status == 1 ? '未推荐' : '已推荐';\n })->style('text-align:center');\n $grid->column('created_at', __('创建时间'))->style('text-align:center');\n $grid->disableExport();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->add(new Terracedel());\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('ID');\n $grid->name('Название');\n //$grid->intro_img('Превью');\n\n return $grid;\n }", "public function __construct($grid, $i)\n\t{\n\t\t$this->i = $i;\n\t\t$this->grid = $grid;\n\t}", "protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $grid->id('Id');\n $grid->title(trans('admin.title'));\n $grid->slogan(trans('admin.slogan'));\n $grid->name(trans('admin.name'));\n $grid->price(trans('admin.price'))->editable();\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Test());\n\n $grid->id('编号');\n $grid->name('教师姓名');\n $grid->work_point('教学分数');\n $grid->science_point('科研分数');\n $grid->disableCreateButton();\n $grid->disableFilter();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Good);\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('名称'));\n $grid->column('unit', __('单位'));\n //$grid->column('list_img', __('商品图片'))->image()->width(10);\n $grid->column('amount', __('价格'));\n $grid->column('created_at', __('创建时间'));\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableFilter();\n return $grid;\n }", "protected function grid()\n\t{\n\t\t$grid = new Grid(new NativePlaceRegion);\n\t $grid->model()->where('parentid', '=', 0);\n\t\t$grid->paginate(40);\n\t\t\n\t\t$grid->region_id('地区id')->sortable();\n\t\t$grid->parentid('上级地区id')->sortable();\n\t\t$grid->region_name('地区名称');\n\t\t$grid->have_children('是否有更下级地区');\n\t\t\n\t\t// filter($callback)方法用来设置表格的简单搜索框\n\t\t$grid->filter(function ($filter) {\n\t\t\t$filter->disableIdFilter();\n\t\t\t$filter->like('region_name', '地区名称');\n\t\t});\n\t\t\n\t\treturn $grid;\n\t}", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->column('id', __('Id'));\n $grid->column('type.name', __('分类名称'));\n $grid->column('recommend.name', __('推荐名称'));\n $grid->column('name', __('产品名称'));\n $grid->column('description', __('产品描述'));\n $states = [\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n ];\n $grid->column('pop', __('推荐'))->switch($states);\n $grid->column('logo','logo图')->display(function (){\n if ($this->logo){\n return '<div class=\"pop\"><img src='.env('APP_URl').'/uploads/'.$this->logo.' style=\"width:100px;height:100px;\"></div>';\n }else{\n return ;\n }\n });\n $grid->column('price', __('价格'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Resources);\n\n $grid->id('ID');\n $grid->type('类型')->using(Resources::TYPE)->filter(Resources::TYPE);\n $grid->name('名称');\n $grid->url('图片')->image();\n $grid->sort_num('排序')->editable()->sortable();\n $grid->memo('备注');\n\n $grid->disableExport();\n $grid->disableFilter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n $grid->model()->where('type',$this->getProductType())->orderBy('id','desc');\n //调用自定义的Grid\n\n $this->customGird($grid);\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new BrandCooperation);\n\n $grid->sort('排序')->editable()->sortable();\n $grid->name('品牌名称');\n $grid->is_show('是否显示')->editable('select', [1 => '显示', 0 => '隐藏']);\n $grid->created_at('添加时间')->sortable();\n\n// $grid->actions(function ($actions) {\n// $actions->disableView(); // 禁用查看\n// });\n\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n // 查询\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->like('name', '品牌名称');\n $filter->equal('is_show', '显隐')->radio([1 => '显示', 0 => '隐藏']);\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Facility);\n\n $grid->id('施設ID')->sortable();\n $grid->facility_name('施設名')->sortable();\n $grid->type('タイプ')->sortable();\n $grid->room('部屋数')->sortable();\n $grid->floor('フロア数')->sortable();\n $grid->transaction_status('取引ステータス')->sortable();\n $grid->sales_status('運営状況')->sortable();\n $grid->postalcode('郵便番号')->sortable();\n $grid->prefecture('都道府県')->sortable();\n $grid->address('住所')->sortable();\n $grid->katagaki('方書')->sortable();\n $grid->tel('電話番号')->sortable();\n $grid->manager('支配人')->sortable();\n $grid->manager_phone_number('支配人 携帯電話')->sortable();\n // $grid->division1('担当事業部1')->sortable();\n // $grid->department1('部署1')->sortable();\n // $grid->staff1('担当者名1')->sortable();\n // $grid->staff_phone_number1('担当者携帯1')->sortable();\n // $grid->remarks1('備考1')->sortable();\n // $grid->division2('担当事業部2')->sortable();\n // $grid->department2('部署2')->sortable();\n // $grid->staff2('担当者名2')->sortable();\n // $grid->staff_phone_number2('担当者携帯2')->sortable();\n // $grid->remarks2('備考2')->sortable();\n // $grid->division3('担当事業部3')->sortable();\n // $grid->department3('部署3')->sortable();\n // $grid->staff3('担当者名3')->sortable();\n // $grid->staff_phone_number3('担当者携帯3')->sortable();\n // $grid->remarks3('備考3')->sortable();\n // $grid->customer_id('顧客ID')->sortable();\n // $grid->wifi('WiFi販売')->sortable();\n // $grid->fixtures('備品販売')->sortable();\n // $grid->tv('TV販売')->sortable();\n // $grid->tableware('食器販売')->sortable();\n // $grid->created_at('Created at');\n // $grid->updated_at('Updated at');\n\n $grid->actions(function ($actions) {\n // $actions->disableDelete();\n // $actions->disableEdit();\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Member());\n\n $grid->column('id', 'id')->sortable();\n $grid->column('username','用户名');\n $grid->column('phone', '手机号')->display(function() {\n return substr($this->phone, 0, 3).'****'.substr($this->phone, 7);\n });\n $grid->column('avatar', '头像')->image('', 50, 50);\n $grid->column('created_at', '注册时间')->sortable();\n $grid->disableCreateButton();\n $grid->disableExport();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n\n // 设置created_at字段的范围查询\n $filter->between('created_at', '创建时间')->datetime();\n });\n\n return $grid;\n }", "public function gameGrid() {\n\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $store_id = Auth::guard('admin')->user()->id;\n\n $grid->model()->where('store_id',$store_id)->orderBy('created_at','desc');\n\n $grid->product_id('ID');\n $grid->product_name('商品名称');\n $grid->product_num('库存');\n $grid->prime_cost('商品原价');\n $grid->present_price('商品现价');\n $grid->product_freght('运费');\n $isshhow = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'default'],\n ];\n $grid->is_show('是否显示')->switch($isshhow);\n// $grid->status('状态')->select([\n// 1 => '热门',\n// 2 => '最新',\n// 3 => '推荐',\n// ]);\n\n// $grid->updated_at('更新时间');\n// $grid->created_at('创建时间');\n\n $grid->created_at('上架时间');\n $grid->sales_volume('总销量')->display(function($sales){\n return isset($sales)?$sales:0;\n });\n\n //去掉查看按钮\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MachinesStyle());\n\n $grid->model()->latest();\n \n $grid->column('id', __('索引'))->sortable();\n\n $grid->column('style_name', __('型号名称'))->help('机具的型号名称');\n\n $grid->column('machines_fact.factory_name', __('所属厂商'))->help('机具型号所属的厂商');\n\n // $grid->column('machines_fact.machines_types.name', __('所属类型'))->help('机具型号所属的类型');\n\n $grid->column('created_at', __('创建时间'))->date('Y-m-d H:i:s')->help('机具型号的创建时间');\n\n $grid->column('updated_at', __('修改时间'))->date('Y-m-d H:i:s')->help('机具型号的最后修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Project());\n $grid->model()->orderBy('id', 'desc');\n $grid->id('ID')->sortable();\n $grid->name('项目名称')->editable();\n $grid->url('项目地址')->link();\n $grid->username('账号');\n $grid->password('密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],\n ];\n $grid->status('状态')->switch($status);\n $grid->created_at('创建时间');\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n\n return $grid;\n }", "protected function grid(){\n $grid = new Grid(new Clients());\n \n $grid->column('id'\t\t\t\t, __('ID'));\n \n $grid->column('created_at'\t\t, __('admin.clients.created_at'));\n \n $grid->column('name'\t\t\t, __('admin.clients.name'));\n\t\t\n\t\t$grid->column('username'\t\t, __('admin.clients.username'))->display(function($username){\n\t\t\tif($username){\n\t\t\t\treturn '<a href=\"http://t.me/'.$username.'\" target=\"_blank\">@'.$username.'</a>';\n\t\t\t}\n\t\t\t\n\t\t\treturn '-';\n\t\t});\n\t\t\n\t\t$grid->column('phone'\t\t\t, __('admin.clients.phone'))->display(function($phone){\n\t\t\tif($phone){\n\t\t\t\treturn '<a href=\"tel:+'.$phone.'\" target=\"_blank\">+'.$phone.'</a>';\n\t\t\t}\n\t\t\t\n\t\t\treturn '-';\n\t\t});\n\t\t\n\t\t//$grid->column('address'\t\t\t, __('admin.clients.address'));\n\t\t\n $grid->column('status'\t\t\t, __('admin.clients.status.label'))->display(function($status){\n if($status){\n if($status == 'new'){\n return __('admin.clients.status.new').\"<br><a href=\\\"/clients/\".$this->id.\"/approved\\\">\".__('admin.clients.approved_btn').\"</a>\";\n }else{\n return __('admin.clients.status.'.$status);\n }\n }\n \n return '-';\n });\n \n $model = $grid->model();\n \n\t\t$grid->actions(function($actions){\n\t\t\t//$tools->disableDelete();\n\t\t\t$actions->disableView();\n\t\t\t//$tools->disableList();\n\t\t});\n\t\t\n\t\t$grid->filter(function($filter){\n\t\t\t$filter->like('name'\t\t\t, __('admin.clients.name'));\n\t\t\t$filter->like('username'\t\t, __('admin.clients.username'));\n\t\t\t$filter->like('phone'\t\t\t, __('admin.clients.phone'));\n\t\t\t//$filter->like('address'\t\t\t, __('admin.clients.address'));\n \n $filter->equal('status'\t\t\t, __('admin.clients.status.label'))->radio([\n null => __('admin.filter-all'), \n 'new' => __('admin.clients.status.new'),\n 'approved' => __('admin.clients.status.approved'),\n 'rejected' => __('admin.clients.status.rejected')\n ]);\n\t\t});\n\t\t\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->id('Id');\n $grid->name('商品名');\n $grid->column('category.name', '品类');\n $grid->fabric('Fabric');\n $grid->gsm('Gsm');\n $grid->material('Material');\n $grid->attach('Attach');\n $grid->head_image('商品图')->image('http://yujiaknit.test/images/', 100, 100);\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MobileImport);\n $grid->title('导入标题');\n $grid->employee()->name('所属员工');\n $grid->projectItem()->name('主推产品');\n $grid->labels_html('导入意向')->display(function ($labels_html){\n return $labels_html;\n });\n $grid->status_html('当前状态')->display(function ($status_html){\n return $status_html;\n });\n $grid->error('错误文件')->display(function ($file){\n return $file?'<a href=\"/upload/'.$file.'\" target=\"_blank\">链接</a>':'无';\n });\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n $actions->disableView();\n if (Admin::user()->can('mobile-close')) {\n $actions->append(new CloseMobileImportRow($actions->getKey(),$this->row->status));\n }\n });\n $grid->tools(function (Grid\\Tools $tools) {\n $tools->append(new MobileImportTemplate());\n });\n $grid->disableExport();\n $grid->disableFilter();\n $grid->disableRowSelector();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ArticleCategory);\n// $grid->id('Id');\n $grid->name('名称');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Regional());\n\n $grid->column('id', 'ID');\n $grid->column('logo', 'Logo')->image('', '50', '50');\n $grid->column('name', 'Nama');\n $grid->column('address', 'Alamat');\n $grid->column('created_at', 'Dibuat')->date('d-m-Y');\n $grid->column('updated_at', 'Diubah')->date('d-m-Y');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n $grid->column('id', __('Id'));\n $grid->column('sort', __('Sort'));\n $grid->column('name', __('Name'));\n $grid->column('slug', __('Slug'));\n $grid->column('description', __('field.description'))->display(function ($item) {\n return mb_strimwidth($item, 0, 500, '...');\n });\n $grid->column('files', __('field.images'))->display(function () {\n $images = array();\n foreach ($this->files as $file) {\n array_push($images, preg_replace(\"/images\\//\", \"images/small.\", $file->file));\n }\n return $images;\n })->carousel(150, 100);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Purchase());\n\n $grid->column('id', \"编号\");\n $grid->column('consumer_name', \"客户\")->display(function () {\n return $this->consumer->full_name;\n });\n $grid->column('house_readable_name', \"房源\")->display(function () {\n return $this->house->readable_name;\n });\n $grid->column('started_at', \"生效日期\");\n $grid->column('ended_at', \"结束日期\");\n $grid->column('sell_type', \"出售方式\")->display(function ($sell_type) {\n return Purchase::$type[$sell_type];\n });\n $grid->column('price', \"成交价格\")->display(function ($price) {\n return \"¥$price\";\n });\n $grid->column('created_at', \"创建日期\");\n $grid->column('updated_at', \"更新日期\");\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HotRank());\n\n// $grid->column('id', __('Id'));\n $grid->column('sort', __('排序'))->editable();\n $grid->column('nickname', __('昵称'));\n $grid->column('avatar', __('头像'))->image();\n $grid->column('gender', __('性别'))->using([\n 1 => '男',\n 2 => '女'\n ]);\n// $grid->column('role', __('Role'));\n// $grid->column('intro', __('Intro'));\n $grid->column('fans', __('粉丝数'));\n $grid->column('red_book_link', __('小红书链接'));\n $grid->column('red_book_fans', __('小红书粉丝'));\n $grid->column('douyin_link', __('抖音链接'));\n $grid->column('douyin_fans', __('抖音粉丝'));\n $grid->column('created_at', __('创建时间'));\n $grid->actions(function ($actions) use ($grid) {\n // 去掉删除\n// $actions->disableDelete();\n// // 去掉编辑\n// $actions->disableEdit();\n // 去掉查看\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity);\n\n $grid->id('Id');\n $grid->log_name('Log name');\n $grid->description('Description');\n $grid->subject_id('Subject id');\n $grid->subject_type('Subject type');\n $grid->causer_id('Causer id');\n $grid->causer_type('Causer type');\n $grid->properties('Properties');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableEdit();\n $actions->disableView();\n });\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->between('created_at', '创建时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Clinic());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('image', __('Image'))->image();\n $grid->column('name', __('Name'))->filter();\n $grid->column('type', __('Type'))->using(['1' => 'Clinic', '2' => 'Hospital'])->filter();\n $grid->column('email', __('Email'))->filter();\n $grid->column('phone', __('Phone'))->filter();\n $grid->column('address', __('Address'))->filter();\n $grid->column('website_url', __('Website url'))->link()->filter();\n $grid->column('profile_finish', __('Profile finish'))->bool()->filter();\n $grid->column('status', __('Status'))->bool()->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Customer);\n $grid->model()->where('is_delete',0)->orderBy('id','desc');\n $grid->id('ID')->sortable();\n $grid->code('客户编号');\n $grid->name('客户名称');\n $grid->contactor('联系人');\n $grid->tel('联系电话');\n $grid->email('邮箱');\n $grid->address('地址');\n $grid->receivables('应收账款数字');\n\n $grid->create_time('创建时间')->display(function ($create_time) {\n return date('Y-m-d H:i',$create_time);\n })->sortable();\n\n // 查询过滤\n $grid->filter(function($filter){\n $filter->column(1/2, function ($filter) {\n $filter->like('code', '客户编号');\n $filter->like('name', '客户名称');\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('contactor', '联系人');\n $filter->like('tel', '联系电话');\n $filter->use(new TimestampBetween('create_time','创建时间'))->datetime();\n });\n\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new News);\n\n $grid->id('Id');\n $grid->title('题目');\n $grid->category_id('分类ID');\n // $grid->content('内容');\n $grid->thumbnail('封面图');\n $grid->status('状态');\n $grid->read_count('阅读数量');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Engine());\n\n $grid->column('id', __('#'));\n $grid->column('power_station_id', __('Power station'))\n ->display(function ($userId) {\n $u = PowerStation::find($userId);\n if (!$u)\n return \"-\";\n return $u->name;\n })\n ->sortable();\n $grid->column('name', __('Tank Name'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Station());\n\n $grid->column('id', __('Id'));\n $grid->column('area.area_name', __(trans('admin.area_name')));\n $grid->column('station_code', __(trans('admin.station_code')));\n $grid->column('station_name', __(trans('admin.station_name')));\n $grid->column('telno', __(trans('admin.telno')));\n $grid->column('order', __(trans('admin.order')));\n $grid->column('valid_at', __(trans('admin.valid_at')));\n $grid->column('mod_user', __(trans('admin.mod_user')));\n $grid->column('updated_at', __(trans('admin.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User);\n $grid->model()->where(function ($query) {\n\t\t\tif (Admin::user()->isRole('市场人员')) {\n\t\t\t\t// 修改数据来源\n\t\t\t\t$account = Account::where('a_account', Admin::user()->username)->first();\n\t\t\t\t$query->where('u_account_id', $account->a_id);\n\t\t\t}\n\t\t});\n $grid->exporter(new UserExporter());\n\n $grid->u_id('ID');\n if (Admin::user()->inRoles(['administrator', '后台管理员'])) {\n $grid->district()->a_district('区域')->expand(function ($model) {\n $info = $model->district()->get()->map(function ($item) {\n return $item->only(['a_district', 'a_city', 'a_manager', 'a_manager_phone']);\n });\n return new Table(['区域', '城市', '区域负责人姓名', '区域负责人电话'], $info->toArray());\n });\n }\n $grid->u_city('城市');\n $grid->u_openid('openId');\n $grid->u_nick('用户昵称');\n $grid->u_headimg('用户头像')->image('', 64, 64);\n $grid->u_phone('用户手机号');\n $grid->u_current_point('当前积分');\n $grid->u_total_point('总积分');\n $grid->u_ip('登录IP');\n $grid->u_created('登录时间');\n\n $grid->disableCreateButton();\n $grid->disableRowSelector();\n\n // 数据查询过滤\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n if (!Admin::user()->isRole('市场人员')) {\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('u_account_id', '区域')->select('/admin/accounts_list');\n });\n }\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('u_phone', '手机号');\n });\n });\n\n // 禁用 编辑和删除\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n\n return $grid;\n }", "public function __construct($template_path = null) \n {\n Benchmark::start('GridModule Loading');\n \n if($template_path) \n {\n $this->template_path = $template_path;\n }\n \n Kohana::log('debug', 'Grid :: Grid_Core Module loaded');\n \n }", "protected function grid()\n {\n $grid = new Grid(new Work);\n\n $grid->id('Id')->sortable();;\n $grid->name(trans('Название'))->sortable();;\n $grid->description(trans('Описание'))->sortable();;\n $grid->order_id(trans('Порядок'))->sortable();;\n\n $grid->paginate(20);\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('name', trans('Название'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId) {\n if ($formId) {\n $form = Formulario::find($formId);\n return \"<span>{$form['name']}</span>\";\n }\n });\n\n $grid->model()->orderBy('id', 'asc');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Article);\n $grid->model()->latest('id');\n\n $grid->id('Id');\n $grid->title('标题')->limit(50);\n $grid->url('文章链接')->display(function () {\n return \"http://btl.yxcxin.com/article_detail/{$this->id}/public\";\n });\n $grid->category()->title('分类');\n $grid->read_count('阅读数');\n $grid->share_count('分享数');\n $grid->show_at('显示时间');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n $grid->disableExport();\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->equal('category_id', '分类')->select(ArticleCategory::query()->pluck('title', 'id'))->default(1);\n $filter->like('title', '标题');\n });\n\n $grid->actions(function ($action) {\n $action->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Talent);\n\n $grid->column('talents_id', 'ID');\n $grid->column('name', '姓名')->filter('like');\n $grid->column('sex', '性别')->filter('like');\n $grid->column('jobtitle', '工作单位及职务')->filter('like');\n $grid->column('education', '学历学位')->filter('like');\n $grid->column('university', '毕业院校与专业')->filter('like');\n $grid->column('major', '目前的专业/技术特长')->filter('like');\n $grid->column('linkphone', '联系电话')->filter('like');\n $grid->exporter(new TalentExporter());\n $grid->actions(function ($actions) {\n // 去掉查看\n $actions->disableView();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('Id');\n $grid->parent_id('父ID');\n $grid->name('名称');\n $grid->order('排序');\n $grid->image('图片');\n $grid->index_template('首页模版');\n $grid->detail_template('详情模版');\n $grid->status('Status')->display(function ($status){\n return $status ? '<p class=\"text-success\">启用</p>' : '<p class=\"text-muted\">禁用</p>';\n });\n $grid->created_at('创建时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product());\n\n $grid->selector(function (Tools\\Selector $selector) {\n $selector->select('audit_status', '审核状态', [\n 0 => '未进行审核',\n 1 => '审核已通过',\n 2 => '审核未通过'\n ]);\n });\n $grid->id('ID')->sortable();\n $grid->product_core('商品编码');\n $grid->title('商品名称');\n $grid->bar_code('国条码');\n $grid->category_id('商品分类')->display(function ($category_id) {\n return Category::where('id', $category_id)->first()->name;\n });\n $grid->status('已上架')->display(function ($status) {\n return $status ? '是' : '否';\n });\n $grid->audit_status('审核状态')->display(function ($audit_status) {\n if ($audit_status == 1) {\n return '审核已通过';\n } elseif ($audit_status == 2) {\n return '审核未通过';\n } else {\n return '未进行审核';\n }\n// return $audit_status ? '审核通过' : '审核未通过';\n });\n $grid->shop_id('所属店铺')->display(function ($shop_id) {\n return Shop::where('id', $shop_id)->first()->name;\n });\n $grid->price('价格');\n $grid->rating('评分');\n $grid->sold_count('销量');\n $grid->review_count('评论数');\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Site());\n\n $grid->id('ID');\n $grid->category()->title('分类');\n $grid->title('标题');\n $grid->thumb('图标')->gallery(['width' => 50, 'height' => 50]);\n $grid->describe('描述')->limit(40);\n $grid->url('地址');\n\n $grid->disableFilter();\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Usertype());\n\n $grid->column('id', 'ID');\n $grid->column('usertype', '分类名称');\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '修改时间');\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->disableActions();\n return $grid;\n }", "protected function setUp()\n {\n $this->object = new Matrix;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $cateList = Category::all()->where('is_show',1)->toArray();\n\n $grid->model()->where('hos_id', session('hos_id'));\n $grid->id('ID')->sortable();\n $grid->column('name','商品名称');\n $grid->column('is_valid','是否显示')->display(function ($is){\n return $is ? '<span class=\"label label-success\">是</span>' : '<span class=\"label label-warning\">否</span>';\n });\n\n $grid->column('cate_id','分类')->display(function ($id) use ( $cateList ) {\n foreach ($cateList as $key => $value) {\n if ($id == $value['id']){\n return '<span class=\"label label-success\">'.$value['title'].'</span>';\n }\n }\n });\n\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n\n //分类树形\n $cateTree = getTree(Category::all()->where('is_show',1)->toArray());\n $cate_map = [];\n foreach ($cateTree as $key => $value) {\n $cate_map[$value['id']] = str_repeat('&#12288;&#12288;',$value['level']).$value['title'];\n }\n\n $grid->actions(function ($actions) {\n $actions->disableDelete(false);\n $actions->disableEdit(false);\n $actions->disableView(false);\n });\n\n $grid->filter(function($filter) use ($cate_map){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n //$filter->equal('department_id','部门')->select($departments);\n $filter->equal('cate_id','分类')->select($cate_map);\n $filter->like('name', '商品');\n\n });\n\n\n return $grid;\n }", "protected function setUp()\r\n {\r\n $this->object = new Pane;\r\n }", "protected function grid()\n {\n $grid = new Grid(new DbTop());\n $grid->header(function ($query) {\n $alread = DbTop::whereStatus(1)->count();\n $notyet = DbTop::whereStatus(0)->count();\n $notok = DbTop::whereStatus(2)->count();\n $pan = DbTop::where('pan_url', '<>', '')->count();\n $x = '已看:' . $alread . '<br />未看:' . $notyet . '<br />不感兴趣:' . $notok . '<br />资源:' . $pan;\n return '<div class=\"alert alert-success\" role=\"alert\">' . $x . '</div>';\n });\n $grid->column('no', __(trans('hhx.no')))->display(function ($no) {\n return 'No.' . $no;\n });\n $grid->column('img', __(trans('hhx.img')))->image();\n $grid->column('c_title', __(trans('hhx.c_title')))->display(function () {\n return $this->c_title . ' ' . $this->year;\n });\n $grid->column('rating_num', __(trans('hhx.rating_num')));\n $grid->column('inq', __(trans('hhx.inq')));\n $grid->column('actor', __(trans('hhx.actor')));\n $grid->column('type', __(trans('hhx.type')));\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.db_status'));\n $grid->filter(function ($filter) {\n $filter->like('c_title', '中文名');\n $filter->like('year', '年');\n $filter->like('status', trans('hhx.status'))->select(config('hhx.db_status'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GuestBook);\n\n $grid->model()->orderByDesc('id');\n //禁用创建\n $grid->disableCreateButton();\n //禁用分页\n// $grid->disablePagination();\n //禁用检索\n $grid->disableFilter();\n //禁用导出\n $grid->disableExport();\n //禁用多行\n// $grid->disableRowSelector();\n// $grid->disableColumnSelector();\n //禁用操作\n// $grid->disableActions();\n\n $grid->actions(function ($actions) {\n\n // 去掉删除\n// $actions->disableDelete();\n\n // 去掉编辑\n $actions->disableEdit();\n\n // 去掉查看\n $actions->disableView();\n });\n\n $grid->column('id', __('Id'));\n $grid->column('body', __('内容'));\n $grid->column('user_id', __('店铺所属用户'))->display(function ($user_id) {\n return \"<a href='/admin/admin_users?&id={$user_id}'>{$this->user->nickname}</a>\";\n });\n $grid->column('guest_id', __('留言人'))->display(function ($guest_id) {\n return \"<a href='/admin/admin_users?&id={$guest_id}'>{$this->guest->nickname}</a>\";\n });\n $grid->column('guest_book_id', __('留言回复'))->display(function ($guest_book_id) {\n if ($guest_book_id) {\n return \"@ <a href='/admin/admin_guest_books?&id={$guest_book_id}'>{$guest_book_id}</a>\";\n }\n return '';\n });\n $grid->column('created_at', __('创建'))->filter('range', 'datetime');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Procurement);\n /*禁用创建按钮*/\n $grid->disableCreateButton();\n /*禁用导出数据按钮*/\n $grid->disableExport();\n// $grid->disableRowSelector();\n /*禁用行选择checkbox*/\n $grid->actions(function ($actions) {\n //$actions->disableDelete(); /*关闭删除按钮*/\n $actions->disableEdit(); /*关闭编辑按钮*/\n //$actions->disableView(); /*关闭查看按钮*/\n });\n $grid->filter(function($filter){\n $uids = Procurement::distinct()->pluck('u_id');\n $user_list = \\DB::table('users')->where('status',0)->whereIn('id',$uids)->pluck('name','id');\n $filter->equal('u_id','用户')->select($user_list);\n $filter->equal('brick_time','用砖时间')->select(['1'=>'1周','5'=>'1个月','10'=>'3个月']);\n $filter->equal('status','审核状态')->select([ 0 =>'待审核', 1 => '通过', 2 => '未通过',]);\n });\n $grid->id('Id')->sortable();\n $grid->u_id('姓名/昵称')->display(function($userId) {\n return User::where('id',$userId)->value('name');\n });\n $grid->brand('品牌要求')->display(function ($id) {\n return Brand::where('id',$id)->value('name');\n });\n $grid->status('审核')->select([\n 0 =>'待审核',\n 1 => '通过',\n 2 => '未通过',\n ]);\n $grid->area('采购面积')->display(function ($num) {\n return $num.'平米';\n })->sortable();\n $grid->room_city('项目地址')->display(function ($id) {\n return Cities::where('area_code',$id)->value('area_name');\n });\n $grid->address('详细地址');\n $grid->brick_time('用砖时间')->display(function ($num) {\n switch($num){\n case '1':\n return '1周';\n break;\n case '5':\n return '1个月';\n break;\n case '10':\n return '3个月';\n break;\n }\n });\n $grid->ctime('创建时间')->sortable();\n\n return $grid;\n }", "public function __construct(GridBuilder $builder)\n {\n $this->builder = $builder;\n }", "protected function grid()\n {\n $grid = new Grid(new Community);\n\n\n $grid->column('id', __('Id'));\n $grid->column('permalink', __('Permalink'));\n $grid->column('eyecatch_path', __('Eyecatch path'));\n $grid->column('name', __('Name'));\n $grid->column('pref', __('Pref'));\n $grid->column('information', __('Information'));\n $grid->column('image1_path', __('Image1 path'));\n $grid->column('image2_path', __('Image2 path'));\n $grid->column('image3_path', __('Image3 path'));\n $grid->column('video1_link', __('Video1 link'));\n $grid->column('video2_link', __('Video2 link'));\n $grid->column('video3_link', __('Video3 link'));\n $grid->column('calendar', __('calendar'));\n $grid->column('message_image_path', __('Message image path'));\n $grid->column('message', __('Message'));\n $grid->column('contact', __('Contact'));\n $grid->column('facebook_link', __('Facebook link'));\n $grid->column('instagram_link', __('Instagram link'));\n $grid->column('website_link', __('Website link'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n\n return $grid;\n }", "protected function grid()\n {\n $instance = new Order;\n\n $grid = new Grid($instance);\n $grid->id('ID')->sortable();\n $grid->column('order_id', __('Order id'));\n $grid->column('customer_id', __('Customer id'))->display(function($customer_id){\n return Customer::where('id',$customer_id)->value('customer_name');\n });\n $grid->column('expected_pickup_date', __('Pickup date'))->display(function($expected_pickup_date){\n return date('d M-Y',strtotime($expected_pickup_date));\n });\n $grid->column('pickup_time', __('Pickup Slot'));\n $grid->column('expected_delivery_date', __('Delivery date'))->display(function($expected_delivery_date){\n return date('d M-Y',strtotime($expected_delivery_date));\n });\n $grid->column('drop_time', __('Drop Slot'));\n $grid->column('delivered_by', __('Delivered by'))->display(function($delivered_by){\n if($delivered_by){\n return DeliveryBoy::where('id',$delivered_by)->value('delivery_boy_name');\n }else{\n return '---';\n }\n\n });\n $grid->column('status', __('Status'))->display(function($status){\n $label_name = Label::where('id',$status)->value('label_name');\n if ($status == 7) {\n return \"<span class='label label-success'>$label_name</span>\";\n } else {\n return \"<span class='label label-warning'>$label_name</span>\";\n }\n });\n $grid->column('View Orders')->display(function () {\n return \"<a href='\".url('/admin/view_orders/').'/'.$this->id.\"'><span class='label label-info'>View Orders</span></a>\";\n });\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n// $grid->quickSearch(function ($model, $query) {\n// $model->where('order_id', $query)\n// ->orWhere('order_id', 'like', \"%{$query}%\");\n// });\n $grid->filter(function ($filter) {\n //Get All status\n $labels = Label::pluck('label_name', 'id');\n $customers = Customer::pluck('customer_name', 'id');\n $phone_number = Customer::pluck('phone_number', 'id');\n $delivery_boys = DeliveryBoy::pluck('delivery_boy_name', 'id');\n $filter->equal('customer_id', 'Customer')->select($customers);\n $filter->equal('delivered_by', 'Delivered By')->select($delivery_boys);\n $filter->equal('order_id', 'Order Id');\n $filter->equal('customer_id', 'Phone Number')->select($phone_number);\n $filter->equal('status', 'Status')->select($labels);\n $filter->date('expected_pickup_date', 'Pickup Date');\n $filter->date('expected_delivery_date', 'Delivery Date');\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new PointMachine());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('point.name', __('Point name'));\n $grid->column('machine_no', __('Machine no'));\n // 1-自助型 2-全自动型\n $grid->column('type', __('Type'))->display(function ($type) {\n return $type == 1 ? '自助型 ' : '全自动型';\n });\n $grid->column('cost', __('Cost'));\n $grid->column('cost_at', __('Cost at'));\n $grid->column('build_at', __('Build at'));\n $grid->column('remark', __('Remark'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->model()->small();\n \n $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n $create->text('erp_id', 'ERP ID');\n $create->text('name', '小分類名稱');\n $create->select('parent_id', __('中分類'))->options(\n Category::Mid()->pluck('name', 'id')\n );\n $create->text('type','分級(不需改)')->default(3);\n });\n\n $grid->column('erp_id', __('ERP Id'));\n $grid->column('name', __('小分類名稱'));\n $grid->column('parent_id', __('中分類'))->display(function($userId) {\n return Category::find($userId)->name;\n });\n return $grid;\n }", "public function setup()\n {\n $this->usergrid = $GLOBALS['usergrid'];\n }", "protected function grid()\n {\n $grid = new Grid(new Boarding());\n\n $grid->column('id', __('Id'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('reservation.date', __('Reservation Date'));\n $grid->column('cage_id', __('Cage Number'));\n $grid->column('end_date', __('End date'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('pet.name', 'Pet Name');\n \n });\n\n return $grid;\n }", "protected function grid()\n {\n\n $grid = new Grid(new Member());\n\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('open_id', __('微信openid'));\n $grid->column('head', __('头像'))->display(function ($head, $grid) {\n if ($head) {\n return \"<img style='width: 50px;' src=\".env('IMG_URL').$head.\">\";\n }\n return $grid->gravatar(40);\n });\n $grid->column('nickname', __('昵称'));\n $grid->column('mobile', __('手机号'));\n $grid->column('name', __('姓名'));\n $grid->column('weixin', __('微信号'));\n $grid->column('qq', __('QQ'));\n $grid->column('city', __('城市'));\n $grid->column('yidudian', __('易读点'));\n $grid->column('integral', __('积分'));\n $grid->column('balance', __('余额'));\n $grid->column('parent.nickname', __('推荐人'));\n $grid->column('level', __('等级'))->display(function ($level) {\n return Member::$levelMap[$level];\n });\n// $grid->column('active', __('活跃度'));\n $grid->column('longitude', __('经度'));\n $grid->column('latitude', __('纬度'));\n $grid->column('created_at', __('生成时间'));\n $grid->column('updated_at', __('修改时间'));\n $states = [\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '冻结', 'color' => 'default'],\n ];\n $grid->column('status', '是否使用')->switch($states);\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('nickname', '昵称');\n $filter->like('mobile', '手机号');\n $filter->like('name', '姓名');\n $filter->equal('level', '会员等级')->select(['0' => '游客','1' => '会员','2' => '贵宾']);\n $filter->between('created_at', '生成时间')->datetime();\n\n\n });\n\n $grid->actions(function ($actions) {\n\n // 去掉删除\n $actions->disableDelete();\n\n // 去掉编辑\n $actions->disableEdit();\n\n // 去掉查看\n $actions->disableView();\n\n $actions->add(new Address);\n $actions->add(new \\App\\Admin\\Actions\\Post\\Friends());\n $actions->add(new \\App\\Admin\\Actions\\Post\\Voucher());\n $actions->add(new \\App\\Admin\\Actions\\Post\\BookOrder());\n $actions->add(new \\App\\Admin\\Actions\\Post\\WelfareOrder());\n });\n\n $grid->exporter(new MemberExporter());\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new rechargeOnline());\n $grid->disableCreateButton();\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->like('accountName', ___('AccountName'));\n $filter->like('orderNo', ___('OrderNo'));\n $filter->like('rechargeWay', ___('RechargeWay'));\n $filter->like('rechargeTime', ___('RechargeTime'));\n $filter->like('rechargeSource', ___('RechargeSource'));\n $filter->like('orderStatus', ___('OrderStatus'));\n });\n\n $grid->column('id', ___('Id'));\n $grid->column('accountName', ___('AccountName'));\n $grid->column('orderNo', ___('OrderNo'));\n $grid->column('rechargeAmount', ___('RechargeAmount'));\n $grid->column('rechargeWay', ___('RechargeWay'));\n $grid->column('rechargeTime', ___('RechargeTime'));\n $grid->column('rechargeSource', ___('RechargeSource'));\n $grid->column('rechargeStatus', ___('RechargeStatus'));\n $grid->column('nickName', ___('NickName'));\n $grid->column('rechargeSubsidy', ___('RechargeSubsidy'));\n $grid->column('payWay', ___('PayWay'));\n $grid->column('orderStatus', ___('OrderStatus'));\n $grid->column('orderDesc', ___('OrderDesc'));\n $grid->column('orderTime', ___('OrderTime'));\n $grid->column('orderCompleteTime', ___('OrderCompleteTime'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku);\n\n $grid->column('id', 'ID');\n $grid->column('name', 'sku名称')->editable();\n $grid->column('sku_number', 'sku编号')->editable();\n // $grid->column('description', 'sku描述');\n $grid->product(\"所属商品\")->display(function ($product) {\n return $product['name'];\n });\n $grid->column('price', '原价')->editable();\n $grid->column('stock', '库存量')->editable();\n $grid->column('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']);\n $grid->column('primary_picture', '商品主图');\n $grid->column('retail_price', '零售价格')->editable();\n $grid->column('is_promotion', '是否促销')->using([0 => '否', 1 => '是']);\n $grid->column('promotion_price', '促销价格')->editable();\n\n return $grid;\n }", "public function init()\n {\n $this->_createBoard();\n $this->_createSlots();\n }", "protected function setUp() {\n $this->object = new Canvas;\n }", "protected function grid()\n {\n $grid = new Grid(new Feedback);\n $grid->column('id', 'ID');\n $grid->column('content', '内容');\n $grid->column('member', '用户')->display(function(){\n return $this->member->nickname;\n });\n $grid->column('created_at', '时间');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Sections());\n\n $grid->column('id', __('ID'))->editable() -> sortable();\n $grid->column('name', __('Nazwa'))->editable() -> sortable();\n $grid->column('pageId', __('ID sekcji (w sensie HTML)'))->editable() -> sortable();\n $grid->column('content', __('Zawartość'))->editable() -> sortable();\n $grid->column('style', __('Style(CSS)'))->editable() -> sortable();\n $grid->column('created_at', __('Utworzono')) -> sortable();\n $grid->column('updated_at', __('Zauktalizowano')) -> sortable() ;\n\n return $grid;\n }", "protected function grid()\n {\n $Adv=new Adv();\n $grid = new Grid($Adv);\n\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"array\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"array\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>\"start_time\",\"title\"=>\"活动开始时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"end_time\",\"title\"=>\"活动结束时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::setlist_show($grid,$list_array);\n\n $grid->filter(function($filter) use($platform,$type){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->in('platform', \"平台\")->multipleSelect($platform);\n $filter->in('type', \"类型\")->multipleSelect($type);\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order());\n\n $grid->column('id', __('Id'));\n $grid->column('trip', __('Trip'))->display(function () {\n return $this->trip->name;\n });\n $grid->column('user', __('User'))->display(function () {\n return $this->user->name . ' ' . $this->user->surname . \" ({$this->user->email})\";\n });\n $grid->column('paid', __('Paid'))->bool()->filter([\n 0 => 'No',\n 1 => 'Yes',\n ]);\n $grid->column('reservation_expires', __('Reservation expires'))->sortable();\n $grid->column('price', __('Price'));\n\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HhxEquip());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('hhx_travel_id', __(trans('hhx.hhx_travel_id')))->display(function ($hhx_travel_id){\n return self::getTravelService()->getNameByTravelId($hhx_travel_id);\n });\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.equip_status'));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "public function initGame(){\r\n $this->board = new Board();\r\n }", "protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }", "protected function grid()\n {\n\n $this->getHeader();\n\n $grid = new Grid(new Good);\n\n $grid->model()->where('group_id', session('group_id'));\n\n $grid->header(function ($query) {\n return \"<div style='padding: 10px;'>Группа: <b>\".$this->group.\"</b></div>\";\n });\n\n $grid->column('name', __('Товар'));\n $grid->column('size', __('Объем/кол-во'));\n $grid->column('price', __('Цена'));\n $grid->content('Фото')->display(function ($image) {\n $link = '';\n if ($this->file) {\n $link = '<a href=\"javascript:removePhoto(\\''.$this->id.'\\')\" class=\"photo'.$this->id.'\" title=\"удалить фото\">удалить</a>\n <img class=\"photo'.$this->id.'\" src=\"/uploads/'.$this->file.'\" style=\"width: 150px;padding:5px; \">';\n }\n return $link;\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n $grid->column('id', __('Id'));\n $grid->column('currency', __('Currency'));\n $grid->column('amount', __('Amount'));\n $grid->column('state', __('State'));\n $grid->column('game_id', __('Game id'));\n $grid->column('user_id', __('User id'));\n $grid->column('product_id', __('Product id'));\n $grid->column('product_name', __('Product name'));\n $grid->column('cp_order_id', __('Cp order id'));\n $grid->column('callback_url', __('Callback url'));\n $grid->column('callback_info', __('Callback info'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "function initialize(&$request) {\n\t\tparent::initialize($request);\n\t\t// Basic grid configuration\n\t\t$this->setTitle('grid.masthead.title');\n\n\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OMP_MANAGER));\n\n\t\t// Elements to be displayed in the grid\n\t\t$router =& $request->getRouter();\n\t\t$context =& $router->getContext($request);\n\t\t$groupDAO =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups = $groupDAO->getGroups(ASSOC_TYPE_PRESS, $context->getId());\n\n\t\t$rowData = array();\n\t\twhile ($group =& $groups->next()) {\n\t\t\t$groupId = $group->getId();\n\t\t\t$rowData[$groupId] = array('groups' => $group->getLocalizedTitle());\n\t\t}\n\t\t$this->setData($rowData);\n\n\t\t// Add grid-level actions\n\t\t$router =& $request->getRouter();\n\t\t$this->addAction(\n\t\t\tnew GridAction(\n\t\t\t\t'addMasthead',\n\t\t\t\tGRID_ACTION_MODE_MODAL,\n\t\t\t\tGRID_ACTION_TYPE_APPEND,\n\t\t\t\t$router->url($request, null, null, 'addGroup', null, array('gridId' => $this->getId())),\n\t\t\t\t'grid.action.addItem'\n\t\t\t),\n\t\t\tGRID_ACTION_POSITION_ABOVE\n\t\t);\n\n\t\t// Columns\n\t\t$emptyActions = array();\n\t\t// Basic grid row configuration\n\t\t$this->addColumn(new GridColumn('groups', 'grid.masthead.column.groups', $emptyActions, 'controllers/grid/gridCellInSpan.tpl'));\n\t}" ]
[ "0.72832334", "0.7266868", "0.7265416", "0.67937726", "0.6719775", "0.6465312", "0.6362588", "0.6262363", "0.61651397", "0.6151837", "0.60787076", "0.6048137", "0.60231215", "0.6019757", "0.5996619", "0.59531605", "0.5944861", "0.59365034", "0.592644", "0.5916221", "0.59125364", "0.5904393", "0.58953094", "0.589517", "0.58887273", "0.5886741", "0.58818036", "0.5872777", "0.5872723", "0.58726263", "0.58630884", "0.58601063", "0.585734", "0.5853287", "0.58442163", "0.5837938", "0.58294475", "0.5828741", "0.58242106", "0.5819761", "0.5803598", "0.57983994", "0.57981807", "0.579316", "0.57924235", "0.57885873", "0.57835275", "0.57747024", "0.5772692", "0.5771551", "0.5763971", "0.57638234", "0.57629985", "0.57608473", "0.57586694", "0.5753442", "0.57462704", "0.5742224", "0.5726694", "0.5720694", "0.5718942", "0.5713909", "0.5709302", "0.57013386", "0.57010543", "0.57005125", "0.56928355", "0.56902105", "0.56783706", "0.56771463", "0.5669975", "0.5669774", "0.56684554", "0.566655", "0.566343", "0.5661516", "0.565037", "0.5645532", "0.56435513", "0.5632354", "0.5629264", "0.56273097", "0.56227297", "0.56137705", "0.56121254", "0.55987436", "0.5593672", "0.5587166", "0.5584943", "0.55829674", "0.557423", "0.5573585", "0.55728966", "0.5572292", "0.5568546", "0.5567289", "0.5565869", "0.55612624", "0.5560673", "0.5558833" ]
0.63384044
7
Adds an Element to the ElementChain
public function addElements(array $svgElements) { foreach($svgElements as $svgElement) { $this->elementsList[] = $svgElement; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($element);", "public function add($element);", "public function add($element);", "public function addElement($element) {\n $this->elements[] = $element;\n }", "public function addElement($element)\n\t{\n\t\t$this->elements[] = $element;\n\t\treturn $this;\n\t}", "public function addElement(Form\\Element $element) {\n $this->elements[] = $element;\n }", "public function element(Element $element)\r\n {\r\n $this->elements[] = $element;\r\n\r\n return $this;\r\n }", "public function add($element)\n {\n $this->elements[] = $element;\n\n return $this;\n }", "public function addElement($name, $element);", "function append ( $element ) {\n $this->childrenElements[] = $element;\n }", "public function add($element) {\n //debug('Form->add() ; START');\n //debug('Form->add() : '.get_class($element).' -- '.$element->getName().' -- '.$element->getId());\n if(is_object($element)) {\n if(false == $this->idIsAvailable($element)) {\n throw new Exception('Element name ('.$element->getId().') already exist');\n } else {\n $this->elements[] = $element;\n $this->aIds[] = $element->getId();\n $this->nbElements++;\n\n //debug('Form->add() : fireEvent(\\'addedToParent\\')');\n //debug('Form->add() : $this->errorMethod : '.$this->errorMethod);\n $element->fireEvent('addedToParent', array(\n 'parent' => $this,\n 'showError' => $this->errorMethod\n ));\n\n //~ $element->setParent($this);\n }\n } else {\n throw new Exception('Can\\'t add element : it must be an object');\n }\n\n //debug('Form->add() ; END');\n return $element;\n }", "public function add($elem) {\n\t\t$this->elems[] = $elem;\n\t}", "public function add($element) {\n $type = strtolower(current(array_reverse(explode(\"\\\\\", get_class($element)))));\n parent::add($element);\n if ($type == \"hidden\")\n $this->_hiddenElements[] = $element;\n else\n $this->_inputElements[] = [$element, $this->_currentFieldset];\n }", "public function addElement(FormItBuilder_baseElement $o_formElement){\n\t\t$this->_formElements[]=$o_formElement;\n\t}", "function &add(& $element)\n {\n if (!is_a($element, 'Image_Graph_Font')) {\n $this->_elements[] = &$element;\n }\n $element->_setParent($this);\n return $element;\n }", "public function addChildElement(HtmlElementInterface $element);", "public function addElement(FormElementInterface $element): void;", "public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function addElement($element)\n\t{\n\t\tif (count(parent::getElements()) < 2)\n\t\t{\n\t\t\tparent::addElement($element);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function addProduct(ProductElementInterface $product);", "public function add(RuleElement\\Element $element) {\n $this->elements[] = $element;\n\n return $this;\n }", "public function add(string $key, $element): void;", "public function addElement(TestInterface $element);", "public function addElement(Tx_FormBase_Core_Model_FormElementInterface $formElement) {\n\t\t$this->addRenderable($formElement);\n\t}", "function addElement($element, $type, $attrDefinition, $attr_collections = array(),\n $attributes = array()) {\n $config = &$this->htmlPurifier()->config;\n $def = &$config->getHTMLDefinition(TRUE);\n $def->addElement($element, $type, $attrDefinition, $attr_collections, $attributes);\n }", "function addFormElement($formElement) {\n\t\tif (!$formElement) {\n\t\t\treturn false;\n\t\t}\n\t\tarray_push($this->elementList, $formElement);\n\t\t\n\t\t// Add name of element, linked to it's object\n\t\t$this->elementListNames[$formElement->name] = $formElement;\n\t\t\n\t\t// Add reference to parent.\n\t\t$formElement->parent = $this;\n\t}", "public function addElement(SVGElement $elementObject) {\n\n $this->elementsList[] = $elementObject;\n\n return $this;\n }", "protected function addElem($element)\r\n\t{\r\n\t\tforeach($this->getPools() as $pool) {\r\n\t\t\t$pool->add($element);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "public function addElement(AdaptiveCardElement $element)\n {\n if (!isset($this->body)) {\n $this->body = [];\n }\n\n $this->body[] = $element;\n\n return $this;\n }", "public function append($element)\n {\n $this->_data[] = $element;\n return $this;\n }", "public function addElement($id, &$element = NULL)\n\t{\n\t\t\n\t\t// a bit shaky, but who cares?\n\t\tif(is_null($element))\n\t\t{\n\t\t\t$element = $id;\n\t\t\t$id = reset($element->getNames());\n\t\t}\n\t\t\n\t\tif (!is_a($element,'FormElement'))\n\t\t\tthrow new FormException('Element is not a Form element: '.$id);\n\t\t\t\n\t\tif (array_key_exists($id,$this->elements))\n\t\t\tthrow new FormException('Element with id '.$id.' already exists!');\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t$this->elements[$id]=$element;\n\t\t\n\t\t//don't change the way the names are found! some Elements rely on this to stay hidden\n\t\tforeach($element->getNames() as $name)\n\t\t{\n\t\t\tif(isset($this->relay[$name]))\n\t\t\t\t$this->relay[$name] []= $id;\n\t\t\t\t//return;\n\t\t\t\t//throw new FormException('another element with variable name '.$name.' already exists!');\n\t\t\telse\t\n\t\t\t\t$this->relay[$name] = array($id);\t\t\t\n\t\t}\n\t\t\t\n\t}", "public function push($element): void\n {\n if ($this->isFull()) {\n throw new \\BadMethodCallException('Cannot push element onto full stack.');\n }\n\n ++$this->size;\n\n $this->elements[] = $element;\n }", "public function hydrateAdd($element)\n {\n $this->collection->add($element);\n // If _backRefFieldName is set and its a one-to-many association,\n // we need to set the back reference.\n if ($this->backRefFieldName && $this->association['type'] === ApiMetadata::ONE_TO_MANY) {\n // Set back reference to owner\n $this->metadata->getReflectionProperty($this->backRefFieldName)->setValue(\n $element,\n $this->owner\n );\n $this->manager->getUnitOfWork()->setOriginalEntityProperty(\n spl_object_hash($element),\n $this->backRefFieldName,\n $this->owner\n );\n }\n }", "abstract protected function helperGetOrAdd(ElementInterface $element);", "public function addElementAtStart(IElement $element): IFormBuilder;", "public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}", "public function addElement($type) {\n\t\t$element = $this->newElement($type)->setParent($this);\n\t\t\n\t\t$this->add($element);\n\t\t\n\t\treturn $element;\n\t}", "public function add(IWhereCondition $element) {\n $this->elements[] = $element;\n }", "public function push(Element ...$elem): Element\n {\n foreach ($elem as $e) {\n $this->element = $this->element.$e;\n }\n\n return $this;\n }", "public function add(Element $element): ElementCollection\n {\n if (isset($this->elements[$element->getId()])) {\n throw new \\InvalidArgumentException('Input array has more than 1 elements with the same ID: ' . $element->getId());\n }\n\n $this->elements[$element->getId()] = $element;\n\n return $this;\n }", "public function addCategoryRegisterElement ($element) {\n $this->categoryRegisterElements[] = $element;\n }", "public function push($element)\n {\n array_unshift($this->stack,$element);\n }", "public function add_element($elements)\n {\n if (is_array($elements)) {\n foreach ($elements as $element) {\n if (in_array($element, $this->elements, true)) {\n continue;\n }\n $this->elements[] = $element;\n }\n } else {\n if (in_array($elements, $this->elements, true)) {\n return;\n }\n $this->elements[] = $elements;\n }\n }", "private function addRawElement($newElement)\n {\n $this->elements[] = $newElement;\n }", "public function addElement(PageElement $element): bool {\n\t\treturn $this->insertElement($element, $this->elementCount());\n\t}", "public function add($element): self\n {\n $collection = clone $this;\n $collection->cursor = 0;\n $collection->items[] = $element;\n $collection->length++;\n\n return $collection;\n }", "public function enqueue($element) {\n $this->queue[] = $element;\n }", "public function addElement(FormElement $element)\n {\n if ($this->elements->has($element->getName()) === true) {\n throw FormFieldException::alreadyDefined($element->getName(), $this);\n }\n $element->setForm($this);\n $this->elements->put($element->getName(), $element);\n return $this;\n }", "public function addField(Element &$field)\n {\n $this->fields[] = $field;\n }", "public function add(DiagramInterface $element);", "public function addElement(ElementInterface $formElement) : ServiceInterface\n {\n $elementName = $formElement->getName();\n $elementName = $this->name.'['.$elementName.']';\n\n if (isset($this->formElements[$elementName])) {\n throw new InvalidArgumentException(\n sprintf('The element \"%s\" in field list is ambiguous.', $elementName),\n 1001\n );\n }\n\n $formElement->setName($elementName);\n $this->formElements[$elementName] = $formElement;\n\n return $this;\n }", "public function addElementAtEnd(IElement $element): IFormBuilder;", "public function addElements($elements);", "public function withAddedNestedElements(IElement ...$Elements): IContainerElement;", "public function addElement( $tagName, $params = array() ) {\n $elt = new Element( $tagName, $params );\n $elt->closeTag = $this->closeTags;\n $this->elements[] = $elt;\n return $elt;\n }", "public function add ($elType, $param = NULL, $place = 'head');", "public function add($element) {\n $result = !$this->contains($element);\n $this->elements[$element] = true;\n return $result;\n }", "public function addElement($data)\n {\n return $this->save($data);\n }", "public function addArray($element){\n array_push($this->array,$element);\n }", "public function addElementInMiddle(IElement $element): IFormBuilder;", "public function add_element($elementName, $content, $attributes = null)\n\t{\n\t\t$this->elements[$elementName]['name'] = $elementName;\n\t\t$this->elements[$elementName]['content'] = $content;\n\t\t$this->elements[$elementName]['attributes'] = $attributes;\n\t}", "public function addCategory(CategoryElementInterface $category);", "public static function add(array $element){\n array_push(self::$data, $element);\n }", "public function addTargetElement($element)\n {\n if ( !in_array($element, $this->getSupportedTargetElements()) ) {\n /**\n * @uses Parsonline_Exception_ValueException\n */\n require_once('Parsonline/ExceptionValueException.php');\n throw new Parsonline_Exception_ValueException(\"element '$element' is not supported\");\n }\n $this->_targetElements[] = $element;\n return $this;\n }", "public function addElementGroup(FormElementGroupInterface $elementGroup): void;", "function add($element, $controller)\r\n\t\t{\r\n\t\t\t//go through each element in the node\r\n\t\t\tfor ($i = 0; $i < count($this->elements); $i++)\r\n\t\t\t{\r\n\t\t\t\t//if we get to a key that's greater than this element's key, we insert\r\n\t\t\t\t//the element right before it\r\n\t\t\t\tif ($controller->compare($this->elements[$i]->key, $element->key) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($this->elements, $i, 0, array($element));\r\n\t\t\t\t\treturn $i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if we still haven't found an element greater than the new one, insert the\r\n\t\t\t//new one at the end.\r\n\t\t\t$this->elements[] = $element;\r\n\t\t\treturn count($this->elements) - 1;\r\n\t\t}", "function _StartElement($parser, $name, $attrs) {\n $this->_CurrentNode =& $this->_CurrentNode->AppendNode($name);\n }", "public function addBrand(BrandElementInterface $brand);", "public function buildElement() {\n\n // Set the element type\n $this->addType('example');\n\n // Add the element attributes\n $this->addAttributes(array(\n // Some attributes\n ));\n\n // Example if we need to add child object\n // to this element\n $object = new VTCore_Form_Base();\n $object->addType('example_child');\n $object->addAttributes(array(\n // Some Attributes\n ));\n\n // Adding a plaing text as child of subchild\n $object->addText('some text');\n\n // Inject the child and subchild back to parent\n $this->addChildren($object);\n\n // No need to echo or print anything, all the\n // actual rendering will be performed by\n // VTCore_Form_Base() when user is invoking\n // the render or __toString method.\n }", "private function pushResult($element) {\n array_push($this->records, $element);\n\t}", "public function testAddingAnElementWillReturnTrue()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $response = $Collection->add($element1);\n $this->assertTrue($response);\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1), $elements);\n }", "protected function add() {\n\t}", "public function append(int $structureId, ElementInterface $element, $parentElement, string $mode = self::MODE_AUTO): bool\n {\n $parentElementRecord = $this->_getElementRecord($structureId, $parentElement);\n\n if ($parentElementRecord === null) {\n throw new Exception('There was a problem getting the parent element.');\n }\n\n return $this->_doIt($structureId, $element, $parentElementRecord, 'appendTo', $mode);\n }", "function dynamical_add_elements($element)\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$output .= '<div class=\"ace_dynamical_add_elements_container\">';\n\t\t$output .= '\t<span class=\"ace_style_wrap ace_dynamical_add_elements_style_wrap\">';\n\t\t$output .= '<span class=\"ace_select_unify\"><select class=\"'.$element['class'].' ace_dynamical_add_elements_select\">';\n\t\t$output .= '<option value=\"\">Select Element</option> ';\n\t\n\n\t\t//gets the option array with available elements\n\t\tif(! @include(ACE_BASE.$element['options_file']))\n\t\t{\n\t\t\t@include($element['options_file']);\n\t\t}\n\n\t\tforeach ($elements as $dynamic_element)\n\t\t{\n\t\t\tif(empty($dynamic_element['name'])) $dynamic_element['name'] = $dynamic_element['id'];\n\t\t\t$output .= \"<option value='\". $dynamic_element['id'].\"'>\". $dynamic_element['name'].\"</option>\";\n\t\t}\n\t\t\n\t\t$output .= '</select>';\n\t\t$output .= '<span class=\"ace_select_fake_val\">Select Element</span></span>';\n\t\t$output .= '\t<a href=\"#\" class=\"ace_button ace_dynamical_add_elements\" title=\"'.$element['name'].'\" id=\"ace_'.$element['id'].'\">Add Element</a>';\n\t\t$output .= '\t<span class=\"ace_loading ace_beside_button_loading\"></span>';\n\t\t$output .= '\t</span>';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_parent\" type=\"hidden\" value=\"'.$element['slug'].'\" />';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_config_file\" type=\"hidden\" value=\"'.$element['options_file'].'\" />';\n\t\n\t\t$output .= '</div>';\n\t\treturn $output;\n\t}", "protected function setElement()\n {\n $this->result[$this->attribute]['element'] = $this->field['element'];\n return $this;\n }", "public function __construct($element = null) { \r\n\t\t\r\n\t if (isset($element)) {\r\n\t\t\t\r\n\t\t\tif (@get_class($element) === 'DOMElement') {\r\n\t\t\t\t$this->add($element);\r\n\t\t\t} elseif (is_array($element)) {\r\n\t\t\t\tforeach ($element as $node) {\r\n\t\t\t\t\tif (is_object($node) AND get_class($node) === 'DOMElement') {\r\n\t\t\t\t\t\t$this->add($node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function add_element_array($elementArray)\n\t{\n\t\tif(! is_array($elementArray)) return;\n\t\tforeach ($elementArray as $elementName => $content) \n\t\t{\n\t\t\t$this->add_element($elementName, $content);\n\t\t}\n\t}", "public function addElement($tag = '')\n {\n $htmlTag = (\n is_object($tag) && $tag instanceof self ?\n $tag :\n new static($tag)\n );\n $htmlTag->top = $this->getTop();\n $htmlTag->parent = &$this;\n $this->content[] = $htmlTag;\n return $htmlTag;\n }", "public function addElement(Control $element, $order = 0): Div\n {\n if ($order == 0) {\n $this->elements[] = $element;\n } else {\n $this->elements[$order] = $element;\n }\n return $this;\n }", "public function element($element) {\n $this->element = $element;\n if ($element >= self::$maxElement) {\n self::$maxElement = $element + 1;\n }\n return $this;\n }", "public function add($elementOrFieldset, array $flags = array())\n {\n if (!$elementOrFieldset instanceof ElementInterface) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s requires that $elementOrFieldset be an object implementing %s; received \"%s\"',\n __METHOD__,\n __NAMESPACE__ . '\\ElementInterface',\n (is_object($elementOrFieldset) ? get_class($elementOrFieldset) : gettype($elementOrFieldset))\n ));\n }\n\n $name = $elementOrFieldset->getName();\n if (empty($name) && (!array_key_exists('name', $flags) || empty($flags['name']))) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s: element or fieldset provided is not named, and no name provided in flags',\n __METHOD__\n ));\n }\n\n if (array_key_exists('name', $flags) && !empty($flags['name'])) {\n $name = $flags['name'];\n\n // Rename the element or fieldset to the specified alias\n $elementOrFieldset->setName($name);\n }\n $order = 0;\n if (array_key_exists('priority', $flags)) {\n $order = $flags['priority'];\n }\n\n $this->iterator->insert($elementOrFieldset, $order);\n $this->byName[$name] = $elementOrFieldset;\n\n if ($elementOrFieldset instanceof FieldsetInterface) {\n $this->fieldsets[$name] = $elementOrFieldset;\n return $this;\n }\n\n $this->elements[$name] = $elementOrFieldset;\n return $this;\n }", "function addElement( $element )\r\n\t\t{\r\n\t\t\t$id = NULL;\r\n\t\t\t$class = NULL;\r\n\t\t\t$eValue = NULL;\r\n\t\t\t$caption = NULL;\r\n\t\t\t$label = NULL;\r\n\t\t\t$placeholder = NULL;\r\n\t\t\t$value = NULL;\r\n\t\t\t$type = NULL;\r\n\t\t\t$name = NULL;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tforeach( $element as $attribute => $eValue ) \r\n\t\t\t{\r\n\t\t\t\t# ELEMENT ATTRIBUTES\r\n\t\t\t\tswitch ( $attribute ) \r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'type':\r\n\t\t\t\t\t\tswitch ( $eValue ) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 'button': // Defines a clickable button\r\n\t\t\t\t\t\t\tcase 'btn': // Defines a clickable button\r\n\t\t\t\t\t\t\t\t$type = 'button';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'checkbox': // Defines a checkbox\r\n\t\t\t\t\t\t\t\t$type = 'checkbox';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'color': // Defines a color picker\r\n\t\t\t\t\t\t\t\t$type = 'color';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'date': // Defines a date control (year, month and day (no time))\r\n\t\t\t\t\t\t\t\t$type = 'date';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second, based on UTC time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime-local': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime-local';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'email': // Defines a field for an e-mail address\r\n\t\t\t\t\t\t\t\t$type = 'email';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'file': // Defines a file-select field and a \"Browse...\" button (for file uploads)\r\n\t\t\t\t\t\t\t\t$type = 'file';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'hidden': // Defines a hidden input field\r\n\t\t\t\t\t\t\t\t$type = 'hidden';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'image': // Defines an image as the submit button\r\n\t\t\t\t\t\t\t\t$type = 'image';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'month': // Defines a month and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'month';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'number': // Defines a field for entering a number\r\n\t\t\t\t\t\t\t\t$type = 'number';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'password': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\tcase 'pass': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\t\t$type = 'password';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'radio': // Defines a radio button\r\n\t\t\t\t\t\t\t\t$type = 'radio';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'range': // Defines a control for entering a number whose exact value is not important (like a slider control)\r\n\t\t\t\t\t\t\t\t$type = 'range';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'reset': // Defines a reset button (resets all form values to default values)\r\n\t\t\t\t\t\t\t\t$type = 'reset';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'search': // Defines a text field for entering a search string\r\n\t\t\t\t\t\t\t\t$type = 'search';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'submit': // Defines a submit button\r\n\t\t\t\t\t\t\t\t$type = 'submit';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'tel': // Defines a field for entering a telephone number\r\n\t\t\t\t\t\t\t\t$type = 'tel';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'text': // Default. Defines a single-line text field (default width is 20 characters)\r\n\t\t\t\t\t\t\tcase 'textbox':\r\n\t\t\t\t\t\t\t\t$type = 'text';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'textarea': // Defines a nulti-line text field\r\n\t\t\t\t\t\t\t\t$type = 'textarea';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'time': // Defines a control for entering a time (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'time';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'url': // Defines a field for entering a URL\r\n\t\t\t\t\t\t\t\t$type = 'url';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'week': // Defines a week and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'week';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Invalid attribute with new Element Class. Please check your form. Please use one of the following as defined in W3 Attribute Values. <a href=\"http://www.w3schools.com/tags/att_input_type.asp\" target=\"_blank\">Valid Attribute Values</a>' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} // end switch ( $eValue ) type\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'name':\r\n\t\t\t\t\t\t\tif( $eValue != '' && $eValue != NULL && $eValue != FALSE )\r\n\t\t\t\t\t\t\t\t$name = $this->form_id . '-'. preg_replace( '/[^A-Za-z-_]/', \"\", $eValue );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Please set a name for your form element.' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} // end else\t\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'class':\r\n\t\t\t\t\t\tcase 'classes':\r\n\t\t\t\t\t\t\t$class = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'id':\r\n\t\t\t\t\t\tcase 'ids':\r\n\t\t\t\t\t\t\t$id = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'placeholder':\r\n\t\t\t\t\t\t\t$placeholder = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'label':\r\n\t\t\t\t\t\t\t$label = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'caption':\r\n\t\t\t\t\t\tcase 'captions':\r\n\t\t\t\t\t\t\t$caption = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'value':\r\n\t\t\t\t\t\t\t$value = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\r\n\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\r\n\t\t\t$errors = array();\r\n\t\t\t\r\n\t\t\t# VALIDATION\r\n\r\n\t\t\tif( $this->isSubmitted() )\r\n\t\t\t{\r\n\t\t\t\tforeach( $element as $rule => $msg ) \r\n\t\t\t\t{\r\n\t\t\t\t\tswitch ( $rule ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'val_req':\r\n\t\t\t\t\t\tcase 'val_required':\r\n\t\t\t\t\t\t\tif( empty( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = 'This field is required. Please enter a value.';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_email':\r\n\t\t\t\t\t\t\tif( $this->vEmail( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $this->sEmail( $_POST[$name] ) );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NEW_EMAIL;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_name':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $this->vName( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NAME;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alpha':\r\n\t\t\t\t\t\t\tif( $this->vAlpha( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHA;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alphanumeric':\r\n\t\t\t\t\t\t\tif( $this->vAlphanumeric( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHANUMERIC;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_int':\r\n\t\t\t\t\t\t\tif( $this->vInt( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_INT;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_number':\r\n\t\t\t\t\t\t\tif( $this->vNumber( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NUMBER;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_pass':\r\n\t\t\t\t\t\tcase 'val_password':\r\n\t\t\t\t\t\t\tif( $this->vPassword( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_PASS;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_match':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $_POST[$name] == $msg['match'] )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !array_key_exists('message', $msg ) )\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_MM_VALUE;\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = $msg['message'];\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t/* ----------- SANITIZE DATA ------------*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 's_query':\r\n\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\t\r\n\t\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* ####################################### */\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ################# */\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t\r\n\t\t\t# Add label if there is one\r\n\t\t\tif( !empty( $label ) )\t\r\n\t\t\t\techo \"<label>$label</label>\";\r\n\t\t\t\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t/* ################# */\r\n\t\t\t\r\n\t\t\t/* ######################## */\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t/* -------------------- Text, Textbox, or Password -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'text' || $type == 'textbox' || $type == 'password' || $type == 'email' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' placeholder='$placeholder' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'text' || $type == 'textbox' || $type == 'password' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Textarea -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'textarea' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<textarea type='$type' name='$name' id='$name' placeholder='$placeholder\"; \r\n\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close tag\t\r\n\t\t\t\t\t$element .= \"' >\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$element .= '</textarea>';\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Submit -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'submit' || $type == 'button' || $type == 'btn' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( $value != '' || $value != FALSE || $value != NULL ) $element .= $value;\r\n\t\t\t\t\telse $element .= 'Submit';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name btn btn-default $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t/* ######################## */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t\r\n\t\t\t# Check for errors\r\n\t\t\t$error_msg = NULL;\r\n\t\t\tif( array_key_exists( $name, $errors ) )\t\r\n\t\t\t\t$error_msg = \"<small class='error'>$errors[$name]</small>\";\r\n\t\t\t\t\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t/* ################### */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !empty( $caption ) )\t\r\n\t\t\t\t$error_msg .= \"<div class='caption mbs'>&uarr; $caption</div>\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t/* ################### */\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t/* ####################################### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( isset( $_POST[$name] ) )\r\n\t\t\t{\r\n\t\t\t\t$output = $_POST[$name];\r\n\t\t\t\t$error_field = \"<style>input.$name, textarea.$name{ border-color: #c60f13; background-color:rgba(198,15,19,0.1);}</style>\".$element;\r\n\t\t\t\tif( empty( $errors ) )\r\n\t\t\t\t\t$valid = TRUE;\r\n\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\t$valid = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output = FALSE;\r\n\t\t\t\t$valid = FALSE;\r\n\t\t\t\t$error_msg = FALSE;\r\n\t\t\t\t$error_field = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t \r\n\t\t\t\t\r\n\t\t\treturn array( 'element' => $element.$error_msg,\r\n\t\t\t\t\t\t 'e' => $element.$error_msg,\r\n\t\t\t\t\t\t 'field' => $element,\r\n\t\t\t\t\t\t 'f' => $element,\r\n\t\t\t\t\t\t 'error_field' => $error_field,\r\n\t\t\t\t\t\t 'ef' => $error_field,\r\n\t\t\t\t\t\t 'error_msg' => $error_msg,\r\n\t\t\t\t\t\t 'em' => $error_msg,\r\n\t\t\t\t\t\t 'output' => $output,\r\n\t\t\t\t\t\t 'o' => $output,\r\n\t\t\t\t\t\t 'valid' => $valid, \r\n\t\t\t\t\t\t 'v' => $valid,\r\n\t\t\t\t\t\t 'name' => $name,\r\n\t\t\t\t\t\t 'n' => $name );\r\n\t\t\t\r\n\t\t}", "function add($str) {\n\t $this->xml .= $str;\n\t}", "public function addElement($elementType, $name) {\n $elementTypes = $this->getElementTypes(TRUE);\n\n if(!array_key_exists($elementType, $elementTypes)) {\n throw new formWizardException(\n 'unknown elementtype',\n $this->name,\n $name\n );\n }\n\n $className = $elementTypes[$elementType];\n\n $element = array(\n 'name' => $name,\n 'object' => new $className()\n );\n\n $interfaceCheck = ($element['object'] instanceof formElementHandles) ? TRUE : FALSE;\n\n if(!$interfaceCheck) {\n throw new formWizardException('formelement does not implement required interface');\n }\n\n /* new element was added, count id */\n $this->elementCounter++;\n\n $element['object']->name = $name;\n $element['object']->form = $this;\n $element['object']->id = $this->name.'_'.$this->elementCounter;\n\n if($this->isSubmitted() && isset($_REQUEST[$name])) $element['object']->setValue($_REQUEST[$name]);\n\n $this->elements[] = $element;\n\n\n return $element['object'];\n }", "public function push($el){\r\n\r\n array_push($this->data,$el);\r\n\r\n }", "public function addElement($item)\n {\n $this->items[$this->itemsCount] = $item;\n $this->itemsCount++;\n }", "public function addSubElement(OutputInterface $subElement)\n {\n $this->subelements[] = $subElement;\n\n if ($this->isSubelementGoingToAppend($subElement)) {\n $this->subelementsThatAppend[get_class($subElement)] = $subElement;\n }\n\n return $this;\n }", "public function add(array $elements);", "public function AddElement(Request $request,User $user,Room $room,Element $element) \n {\n logger()->info(__METHOD__);\n $this->model->addModel($room,'elements',$element);\n return $this->getView();\n }", "public function appendElement(string $name, $content = '', array $attributes = NULL): Element {\n $this->appendChild(\n $node = $this->createElement($name, $content, $attributes)\n );\n return $node;\n }", "public function add(string $name, $element, array $dependencies = []) {\n $this->addElement($element, [self::INFO_INDEX_KEY=>$name, $name, $dependencies]);\n $this->noteCollectionChanged();\n }", "public static function addpurifierelement($elementname, $elementconfig = Array())\n\t {\n\t // Create a new configuration object, or load it if there is already one set\n\t\tif (Security::$htmlpurifierconfig != False)\n\t\t{\n\t\t $config = Security::$htmlpurifierconfig;\n\t\t}\n\t\telse\n\t\t{\n\t\t $config = HTMLPurifier_Config::createDefault();\n\t\t $config->autoFinalize = false; // To allow for later changes to the config\n\n\t\t if (is_array($settings = Kohana::config('purifier.settings')))\n\t\t {\n\t\t\t // Load the settings\n\t\t\t $config->loadArray($settings);\n\t\t }\n\t }\n\t\t\n\t\tif (!isset($elementconfig[\"attributes\"]) OR !is_array($elementconfig[\"attributes\"]))\n\t\t{\n\t\t $elementconfig[\"attributes\"] = Array();\n\t\t}\n \n $config->set('Core.Encoding', \"UTF-8\");\n $config->set('HTML.DefinitionID', 'cms-specific');\n $config->set('Cache.DefinitionImpl', null); // Do not use caching\n \n $def = $config->getHTMLDefinition(true);\n $element = $def->addElement(\n $elementname, // name\n 'Inline', // content set\n 'Flow', // allowed children\n 'Common', // attribute collection\n $elementconfig[\"attributes\"]\n );\n\t // Save configuration for later use\n\t Security::$htmlpurifierconfig = $config;\n\t }", "public function add();", "public function add();", "public function editorAttach(&$element, &$settings);", "public function testAttributeElementWithParentThrowsExceptionWhenSchemaElementAddAttributeElement(): void\n {\n $parent1 = new SchemaElement();\n $parent1->addAttributeElement($this->sut);\n \n $parent2 = new SchemaElement();\n $this->expectInvalidOperationExceptionChildOfAnotherElement($this->sut, $parent2);\n $parent2->addAttributeElement($this->sut);\n }", "public function addElements(array $elements)\n {\n foreach ($elements as $element) {\n $this->addelement($element);\n }\n return $this;\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function appendTo(Element $parentNode): void {\n foreach ($this->_document->childNodes as $node) {\n if ($node instanceof \\DOMElement) {\n $this->addNode($parentNode, $node);\n }\n }\n }", "public function add (DOMElement $node) {\r\n\t \r\n\t if (array_push($this->list, $node)) {\r\n\t\t\t$this->length++;\r\n\t\t\treturn true;\r\n\t\t} else return false;\r\n\t}" ]
[ "0.7387055", "0.7387055", "0.7387055", "0.71146816", "0.70552564", "0.69838405", "0.68652725", "0.6841732", "0.6737516", "0.66956395", "0.6679973", "0.66637915", "0.6651228", "0.66480935", "0.6558576", "0.6532849", "0.6379752", "0.637757", "0.63574654", "0.6351349", "0.6321144", "0.62603915", "0.6241778", "0.61720884", "0.61670643", "0.60881585", "0.60851455", "0.6072779", "0.60697687", "0.60558397", "0.59774005", "0.59698415", "0.59643567", "0.5910379", "0.5908845", "0.5896512", "0.5891376", "0.58837265", "0.588033", "0.5870578", "0.5844645", "0.5826037", "0.5804006", "0.5798423", "0.5797081", "0.5745539", "0.569969", "0.5689995", "0.567158", "0.5658107", "0.5657673", "0.56100625", "0.55813646", "0.55782074", "0.55588365", "0.5536812", "0.55192685", "0.5512893", "0.54996717", "0.5464669", "0.5458881", "0.54351956", "0.543018", "0.54238665", "0.5416713", "0.5409628", "0.5379341", "0.5376647", "0.531991", "0.5280934", "0.5262968", "0.5262592", "0.5230915", "0.5228859", "0.5215809", "0.5190223", "0.5163711", "0.5161531", "0.51537263", "0.5130493", "0.5112224", "0.5093666", "0.5089241", "0.50852036", "0.5070524", "0.5067745", "0.5061912", "0.5048182", "0.5043618", "0.5043098", "0.5037258", "0.50298065", "0.5026277", "0.5026277", "0.50230503", "0.5013568", "0.50109994", "0.49813285", "0.49813285", "0.4977883", "0.49756753" ]
0.0
-1
Adds an Element to the ElementChain
public function addElement(SVGElement $elementObject) { $this->elementsList[] = $elementObject; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($element);", "public function add($element);", "public function add($element);", "public function addElement($element) {\n $this->elements[] = $element;\n }", "public function addElement($element)\n\t{\n\t\t$this->elements[] = $element;\n\t\treturn $this;\n\t}", "public function addElement(Form\\Element $element) {\n $this->elements[] = $element;\n }", "public function element(Element $element)\r\n {\r\n $this->elements[] = $element;\r\n\r\n return $this;\r\n }", "public function add($element)\n {\n $this->elements[] = $element;\n\n return $this;\n }", "public function addElement($name, $element);", "function append ( $element ) {\n $this->childrenElements[] = $element;\n }", "public function add($element) {\n //debug('Form->add() ; START');\n //debug('Form->add() : '.get_class($element).' -- '.$element->getName().' -- '.$element->getId());\n if(is_object($element)) {\n if(false == $this->idIsAvailable($element)) {\n throw new Exception('Element name ('.$element->getId().') already exist');\n } else {\n $this->elements[] = $element;\n $this->aIds[] = $element->getId();\n $this->nbElements++;\n\n //debug('Form->add() : fireEvent(\\'addedToParent\\')');\n //debug('Form->add() : $this->errorMethod : '.$this->errorMethod);\n $element->fireEvent('addedToParent', array(\n 'parent' => $this,\n 'showError' => $this->errorMethod\n ));\n\n //~ $element->setParent($this);\n }\n } else {\n throw new Exception('Can\\'t add element : it must be an object');\n }\n\n //debug('Form->add() ; END');\n return $element;\n }", "public function add($elem) {\n\t\t$this->elems[] = $elem;\n\t}", "public function add($element) {\n $type = strtolower(current(array_reverse(explode(\"\\\\\", get_class($element)))));\n parent::add($element);\n if ($type == \"hidden\")\n $this->_hiddenElements[] = $element;\n else\n $this->_inputElements[] = [$element, $this->_currentFieldset];\n }", "public function addElement(FormItBuilder_baseElement $o_formElement){\n\t\t$this->_formElements[]=$o_formElement;\n\t}", "function &add(& $element)\n {\n if (!is_a($element, 'Image_Graph_Font')) {\n $this->_elements[] = &$element;\n }\n $element->_setParent($this);\n return $element;\n }", "public function addChildElement(HtmlElementInterface $element);", "public function addElement(FormElementInterface $element): void;", "public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function addElement($element)\n\t{\n\t\tif (count(parent::getElements()) < 2)\n\t\t{\n\t\t\tparent::addElement($element);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function addProduct(ProductElementInterface $product);", "public function add(RuleElement\\Element $element) {\n $this->elements[] = $element;\n\n return $this;\n }", "public function add(string $key, $element): void;", "public function addElement(TestInterface $element);", "public function addElement(Tx_FormBase_Core_Model_FormElementInterface $formElement) {\n\t\t$this->addRenderable($formElement);\n\t}", "function addElement($element, $type, $attrDefinition, $attr_collections = array(),\n $attributes = array()) {\n $config = &$this->htmlPurifier()->config;\n $def = &$config->getHTMLDefinition(TRUE);\n $def->addElement($element, $type, $attrDefinition, $attr_collections, $attributes);\n }", "function addFormElement($formElement) {\n\t\tif (!$formElement) {\n\t\t\treturn false;\n\t\t}\n\t\tarray_push($this->elementList, $formElement);\n\t\t\n\t\t// Add name of element, linked to it's object\n\t\t$this->elementListNames[$formElement->name] = $formElement;\n\t\t\n\t\t// Add reference to parent.\n\t\t$formElement->parent = $this;\n\t}", "protected function addElem($element)\r\n\t{\r\n\t\tforeach($this->getPools() as $pool) {\r\n\t\t\t$pool->add($element);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "public function addElement(AdaptiveCardElement $element)\n {\n if (!isset($this->body)) {\n $this->body = [];\n }\n\n $this->body[] = $element;\n\n return $this;\n }", "public function append($element)\n {\n $this->_data[] = $element;\n return $this;\n }", "public function addElement($id, &$element = NULL)\n\t{\n\t\t\n\t\t// a bit shaky, but who cares?\n\t\tif(is_null($element))\n\t\t{\n\t\t\t$element = $id;\n\t\t\t$id = reset($element->getNames());\n\t\t}\n\t\t\n\t\tif (!is_a($element,'FormElement'))\n\t\t\tthrow new FormException('Element is not a Form element: '.$id);\n\t\t\t\n\t\tif (array_key_exists($id,$this->elements))\n\t\t\tthrow new FormException('Element with id '.$id.' already exists!');\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t$this->elements[$id]=$element;\n\t\t\n\t\t//don't change the way the names are found! some Elements rely on this to stay hidden\n\t\tforeach($element->getNames() as $name)\n\t\t{\n\t\t\tif(isset($this->relay[$name]))\n\t\t\t\t$this->relay[$name] []= $id;\n\t\t\t\t//return;\n\t\t\t\t//throw new FormException('another element with variable name '.$name.' already exists!');\n\t\t\telse\t\n\t\t\t\t$this->relay[$name] = array($id);\t\t\t\n\t\t}\n\t\t\t\n\t}", "public function push($element): void\n {\n if ($this->isFull()) {\n throw new \\BadMethodCallException('Cannot push element onto full stack.');\n }\n\n ++$this->size;\n\n $this->elements[] = $element;\n }", "public function hydrateAdd($element)\n {\n $this->collection->add($element);\n // If _backRefFieldName is set and its a one-to-many association,\n // we need to set the back reference.\n if ($this->backRefFieldName && $this->association['type'] === ApiMetadata::ONE_TO_MANY) {\n // Set back reference to owner\n $this->metadata->getReflectionProperty($this->backRefFieldName)->setValue(\n $element,\n $this->owner\n );\n $this->manager->getUnitOfWork()->setOriginalEntityProperty(\n spl_object_hash($element),\n $this->backRefFieldName,\n $this->owner\n );\n }\n }", "abstract protected function helperGetOrAdd(ElementInterface $element);", "public function addElementAtStart(IElement $element): IFormBuilder;", "public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}", "public function addElement($type) {\n\t\t$element = $this->newElement($type)->setParent($this);\n\t\t\n\t\t$this->add($element);\n\t\t\n\t\treturn $element;\n\t}", "public function push(Element ...$elem): Element\n {\n foreach ($elem as $e) {\n $this->element = $this->element.$e;\n }\n\n return $this;\n }", "public function add(IWhereCondition $element) {\n $this->elements[] = $element;\n }", "public function add(Element $element): ElementCollection\n {\n if (isset($this->elements[$element->getId()])) {\n throw new \\InvalidArgumentException('Input array has more than 1 elements with the same ID: ' . $element->getId());\n }\n\n $this->elements[$element->getId()] = $element;\n\n return $this;\n }", "public function addCategoryRegisterElement ($element) {\n $this->categoryRegisterElements[] = $element;\n }", "public function push($element)\n {\n array_unshift($this->stack,$element);\n }", "public function add_element($elements)\n {\n if (is_array($elements)) {\n foreach ($elements as $element) {\n if (in_array($element, $this->elements, true)) {\n continue;\n }\n $this->elements[] = $element;\n }\n } else {\n if (in_array($elements, $this->elements, true)) {\n return;\n }\n $this->elements[] = $elements;\n }\n }", "private function addRawElement($newElement)\n {\n $this->elements[] = $newElement;\n }", "public function addElement(PageElement $element): bool {\n\t\treturn $this->insertElement($element, $this->elementCount());\n\t}", "public function add($element): self\n {\n $collection = clone $this;\n $collection->cursor = 0;\n $collection->items[] = $element;\n $collection->length++;\n\n return $collection;\n }", "public function enqueue($element) {\n $this->queue[] = $element;\n }", "public function addElement(FormElement $element)\n {\n if ($this->elements->has($element->getName()) === true) {\n throw FormFieldException::alreadyDefined($element->getName(), $this);\n }\n $element->setForm($this);\n $this->elements->put($element->getName(), $element);\n return $this;\n }", "public function addField(Element &$field)\n {\n $this->fields[] = $field;\n }", "public function addElement(ElementInterface $formElement) : ServiceInterface\n {\n $elementName = $formElement->getName();\n $elementName = $this->name.'['.$elementName.']';\n\n if (isset($this->formElements[$elementName])) {\n throw new InvalidArgumentException(\n sprintf('The element \"%s\" in field list is ambiguous.', $elementName),\n 1001\n );\n }\n\n $formElement->setName($elementName);\n $this->formElements[$elementName] = $formElement;\n\n return $this;\n }", "public function add(DiagramInterface $element);", "public function addElementAtEnd(IElement $element): IFormBuilder;", "public function addElements($elements);", "public function withAddedNestedElements(IElement ...$Elements): IContainerElement;", "public function addElement( $tagName, $params = array() ) {\n $elt = new Element( $tagName, $params );\n $elt->closeTag = $this->closeTags;\n $this->elements[] = $elt;\n return $elt;\n }", "public function add ($elType, $param = NULL, $place = 'head');", "public function add($element) {\n $result = !$this->contains($element);\n $this->elements[$element] = true;\n return $result;\n }", "public function addElement($data)\n {\n return $this->save($data);\n }", "public function addArray($element){\n array_push($this->array,$element);\n }", "public function addElementInMiddle(IElement $element): IFormBuilder;", "public function add_element($elementName, $content, $attributes = null)\n\t{\n\t\t$this->elements[$elementName]['name'] = $elementName;\n\t\t$this->elements[$elementName]['content'] = $content;\n\t\t$this->elements[$elementName]['attributes'] = $attributes;\n\t}", "public function addCategory(CategoryElementInterface $category);", "public static function add(array $element){\n array_push(self::$data, $element);\n }", "public function addTargetElement($element)\n {\n if ( !in_array($element, $this->getSupportedTargetElements()) ) {\n /**\n * @uses Parsonline_Exception_ValueException\n */\n require_once('Parsonline/ExceptionValueException.php');\n throw new Parsonline_Exception_ValueException(\"element '$element' is not supported\");\n }\n $this->_targetElements[] = $element;\n return $this;\n }", "public function addElementGroup(FormElementGroupInterface $elementGroup): void;", "function add($element, $controller)\r\n\t\t{\r\n\t\t\t//go through each element in the node\r\n\t\t\tfor ($i = 0; $i < count($this->elements); $i++)\r\n\t\t\t{\r\n\t\t\t\t//if we get to a key that's greater than this element's key, we insert\r\n\t\t\t\t//the element right before it\r\n\t\t\t\tif ($controller->compare($this->elements[$i]->key, $element->key) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($this->elements, $i, 0, array($element));\r\n\t\t\t\t\treturn $i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if we still haven't found an element greater than the new one, insert the\r\n\t\t\t//new one at the end.\r\n\t\t\t$this->elements[] = $element;\r\n\t\t\treturn count($this->elements) - 1;\r\n\t\t}", "function _StartElement($parser, $name, $attrs) {\n $this->_CurrentNode =& $this->_CurrentNode->AppendNode($name);\n }", "public function addBrand(BrandElementInterface $brand);", "public function buildElement() {\n\n // Set the element type\n $this->addType('example');\n\n // Add the element attributes\n $this->addAttributes(array(\n // Some attributes\n ));\n\n // Example if we need to add child object\n // to this element\n $object = new VTCore_Form_Base();\n $object->addType('example_child');\n $object->addAttributes(array(\n // Some Attributes\n ));\n\n // Adding a plaing text as child of subchild\n $object->addText('some text');\n\n // Inject the child and subchild back to parent\n $this->addChildren($object);\n\n // No need to echo or print anything, all the\n // actual rendering will be performed by\n // VTCore_Form_Base() when user is invoking\n // the render or __toString method.\n }", "private function pushResult($element) {\n array_push($this->records, $element);\n\t}", "public function testAddingAnElementWillReturnTrue()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $response = $Collection->add($element1);\n $this->assertTrue($response);\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1), $elements);\n }", "protected function add() {\n\t}", "function dynamical_add_elements($element)\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$output .= '<div class=\"ace_dynamical_add_elements_container\">';\n\t\t$output .= '\t<span class=\"ace_style_wrap ace_dynamical_add_elements_style_wrap\">';\n\t\t$output .= '<span class=\"ace_select_unify\"><select class=\"'.$element['class'].' ace_dynamical_add_elements_select\">';\n\t\t$output .= '<option value=\"\">Select Element</option> ';\n\t\n\n\t\t//gets the option array with available elements\n\t\tif(! @include(ACE_BASE.$element['options_file']))\n\t\t{\n\t\t\t@include($element['options_file']);\n\t\t}\n\n\t\tforeach ($elements as $dynamic_element)\n\t\t{\n\t\t\tif(empty($dynamic_element['name'])) $dynamic_element['name'] = $dynamic_element['id'];\n\t\t\t$output .= \"<option value='\". $dynamic_element['id'].\"'>\". $dynamic_element['name'].\"</option>\";\n\t\t}\n\t\t\n\t\t$output .= '</select>';\n\t\t$output .= '<span class=\"ace_select_fake_val\">Select Element</span></span>';\n\t\t$output .= '\t<a href=\"#\" class=\"ace_button ace_dynamical_add_elements\" title=\"'.$element['name'].'\" id=\"ace_'.$element['id'].'\">Add Element</a>';\n\t\t$output .= '\t<span class=\"ace_loading ace_beside_button_loading\"></span>';\n\t\t$output .= '\t</span>';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_parent\" type=\"hidden\" value=\"'.$element['slug'].'\" />';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_config_file\" type=\"hidden\" value=\"'.$element['options_file'].'\" />';\n\t\n\t\t$output .= '</div>';\n\t\treturn $output;\n\t}", "public function append(int $structureId, ElementInterface $element, $parentElement, string $mode = self::MODE_AUTO): bool\n {\n $parentElementRecord = $this->_getElementRecord($structureId, $parentElement);\n\n if ($parentElementRecord === null) {\n throw new Exception('There was a problem getting the parent element.');\n }\n\n return $this->_doIt($structureId, $element, $parentElementRecord, 'appendTo', $mode);\n }", "protected function setElement()\n {\n $this->result[$this->attribute]['element'] = $this->field['element'];\n return $this;\n }", "public function __construct($element = null) { \r\n\t\t\r\n\t if (isset($element)) {\r\n\t\t\t\r\n\t\t\tif (@get_class($element) === 'DOMElement') {\r\n\t\t\t\t$this->add($element);\r\n\t\t\t} elseif (is_array($element)) {\r\n\t\t\t\tforeach ($element as $node) {\r\n\t\t\t\t\tif (is_object($node) AND get_class($node) === 'DOMElement') {\r\n\t\t\t\t\t\t$this->add($node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function add_element_array($elementArray)\n\t{\n\t\tif(! is_array($elementArray)) return;\n\t\tforeach ($elementArray as $elementName => $content) \n\t\t{\n\t\t\t$this->add_element($elementName, $content);\n\t\t}\n\t}", "public function addElement($tag = '')\n {\n $htmlTag = (\n is_object($tag) && $tag instanceof self ?\n $tag :\n new static($tag)\n );\n $htmlTag->top = $this->getTop();\n $htmlTag->parent = &$this;\n $this->content[] = $htmlTag;\n return $htmlTag;\n }", "public function addElement(Control $element, $order = 0): Div\n {\n if ($order == 0) {\n $this->elements[] = $element;\n } else {\n $this->elements[$order] = $element;\n }\n return $this;\n }", "public function element($element) {\n $this->element = $element;\n if ($element >= self::$maxElement) {\n self::$maxElement = $element + 1;\n }\n return $this;\n }", "public function add($elementOrFieldset, array $flags = array())\n {\n if (!$elementOrFieldset instanceof ElementInterface) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s requires that $elementOrFieldset be an object implementing %s; received \"%s\"',\n __METHOD__,\n __NAMESPACE__ . '\\ElementInterface',\n (is_object($elementOrFieldset) ? get_class($elementOrFieldset) : gettype($elementOrFieldset))\n ));\n }\n\n $name = $elementOrFieldset->getName();\n if (empty($name) && (!array_key_exists('name', $flags) || empty($flags['name']))) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s: element or fieldset provided is not named, and no name provided in flags',\n __METHOD__\n ));\n }\n\n if (array_key_exists('name', $flags) && !empty($flags['name'])) {\n $name = $flags['name'];\n\n // Rename the element or fieldset to the specified alias\n $elementOrFieldset->setName($name);\n }\n $order = 0;\n if (array_key_exists('priority', $flags)) {\n $order = $flags['priority'];\n }\n\n $this->iterator->insert($elementOrFieldset, $order);\n $this->byName[$name] = $elementOrFieldset;\n\n if ($elementOrFieldset instanceof FieldsetInterface) {\n $this->fieldsets[$name] = $elementOrFieldset;\n return $this;\n }\n\n $this->elements[$name] = $elementOrFieldset;\n return $this;\n }", "function addElement( $element )\r\n\t\t{\r\n\t\t\t$id = NULL;\r\n\t\t\t$class = NULL;\r\n\t\t\t$eValue = NULL;\r\n\t\t\t$caption = NULL;\r\n\t\t\t$label = NULL;\r\n\t\t\t$placeholder = NULL;\r\n\t\t\t$value = NULL;\r\n\t\t\t$type = NULL;\r\n\t\t\t$name = NULL;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tforeach( $element as $attribute => $eValue ) \r\n\t\t\t{\r\n\t\t\t\t# ELEMENT ATTRIBUTES\r\n\t\t\t\tswitch ( $attribute ) \r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'type':\r\n\t\t\t\t\t\tswitch ( $eValue ) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 'button': // Defines a clickable button\r\n\t\t\t\t\t\t\tcase 'btn': // Defines a clickable button\r\n\t\t\t\t\t\t\t\t$type = 'button';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'checkbox': // Defines a checkbox\r\n\t\t\t\t\t\t\t\t$type = 'checkbox';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'color': // Defines a color picker\r\n\t\t\t\t\t\t\t\t$type = 'color';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'date': // Defines a date control (year, month and day (no time))\r\n\t\t\t\t\t\t\t\t$type = 'date';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second, based on UTC time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime-local': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime-local';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'email': // Defines a field for an e-mail address\r\n\t\t\t\t\t\t\t\t$type = 'email';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'file': // Defines a file-select field and a \"Browse...\" button (for file uploads)\r\n\t\t\t\t\t\t\t\t$type = 'file';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'hidden': // Defines a hidden input field\r\n\t\t\t\t\t\t\t\t$type = 'hidden';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'image': // Defines an image as the submit button\r\n\t\t\t\t\t\t\t\t$type = 'image';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'month': // Defines a month and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'month';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'number': // Defines a field for entering a number\r\n\t\t\t\t\t\t\t\t$type = 'number';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'password': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\tcase 'pass': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\t\t$type = 'password';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'radio': // Defines a radio button\r\n\t\t\t\t\t\t\t\t$type = 'radio';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'range': // Defines a control for entering a number whose exact value is not important (like a slider control)\r\n\t\t\t\t\t\t\t\t$type = 'range';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'reset': // Defines a reset button (resets all form values to default values)\r\n\t\t\t\t\t\t\t\t$type = 'reset';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'search': // Defines a text field for entering a search string\r\n\t\t\t\t\t\t\t\t$type = 'search';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'submit': // Defines a submit button\r\n\t\t\t\t\t\t\t\t$type = 'submit';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'tel': // Defines a field for entering a telephone number\r\n\t\t\t\t\t\t\t\t$type = 'tel';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'text': // Default. Defines a single-line text field (default width is 20 characters)\r\n\t\t\t\t\t\t\tcase 'textbox':\r\n\t\t\t\t\t\t\t\t$type = 'text';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'textarea': // Defines a nulti-line text field\r\n\t\t\t\t\t\t\t\t$type = 'textarea';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'time': // Defines a control for entering a time (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'time';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'url': // Defines a field for entering a URL\r\n\t\t\t\t\t\t\t\t$type = 'url';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'week': // Defines a week and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'week';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Invalid attribute with new Element Class. Please check your form. Please use one of the following as defined in W3 Attribute Values. <a href=\"http://www.w3schools.com/tags/att_input_type.asp\" target=\"_blank\">Valid Attribute Values</a>' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} // end switch ( $eValue ) type\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'name':\r\n\t\t\t\t\t\t\tif( $eValue != '' && $eValue != NULL && $eValue != FALSE )\r\n\t\t\t\t\t\t\t\t$name = $this->form_id . '-'. preg_replace( '/[^A-Za-z-_]/', \"\", $eValue );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Please set a name for your form element.' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} // end else\t\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'class':\r\n\t\t\t\t\t\tcase 'classes':\r\n\t\t\t\t\t\t\t$class = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'id':\r\n\t\t\t\t\t\tcase 'ids':\r\n\t\t\t\t\t\t\t$id = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'placeholder':\r\n\t\t\t\t\t\t\t$placeholder = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'label':\r\n\t\t\t\t\t\t\t$label = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'caption':\r\n\t\t\t\t\t\tcase 'captions':\r\n\t\t\t\t\t\t\t$caption = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'value':\r\n\t\t\t\t\t\t\t$value = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\r\n\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\r\n\t\t\t$errors = array();\r\n\t\t\t\r\n\t\t\t# VALIDATION\r\n\r\n\t\t\tif( $this->isSubmitted() )\r\n\t\t\t{\r\n\t\t\t\tforeach( $element as $rule => $msg ) \r\n\t\t\t\t{\r\n\t\t\t\t\tswitch ( $rule ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'val_req':\r\n\t\t\t\t\t\tcase 'val_required':\r\n\t\t\t\t\t\t\tif( empty( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = 'This field is required. Please enter a value.';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_email':\r\n\t\t\t\t\t\t\tif( $this->vEmail( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $this->sEmail( $_POST[$name] ) );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NEW_EMAIL;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_name':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $this->vName( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NAME;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alpha':\r\n\t\t\t\t\t\t\tif( $this->vAlpha( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHA;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alphanumeric':\r\n\t\t\t\t\t\t\tif( $this->vAlphanumeric( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHANUMERIC;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_int':\r\n\t\t\t\t\t\t\tif( $this->vInt( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_INT;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_number':\r\n\t\t\t\t\t\t\tif( $this->vNumber( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NUMBER;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_pass':\r\n\t\t\t\t\t\tcase 'val_password':\r\n\t\t\t\t\t\t\tif( $this->vPassword( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_PASS;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_match':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $_POST[$name] == $msg['match'] )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !array_key_exists('message', $msg ) )\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_MM_VALUE;\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = $msg['message'];\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t/* ----------- SANITIZE DATA ------------*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 's_query':\r\n\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\t\r\n\t\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* ####################################### */\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ################# */\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t\r\n\t\t\t# Add label if there is one\r\n\t\t\tif( !empty( $label ) )\t\r\n\t\t\t\techo \"<label>$label</label>\";\r\n\t\t\t\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t/* ################# */\r\n\t\t\t\r\n\t\t\t/* ######################## */\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t/* -------------------- Text, Textbox, or Password -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'text' || $type == 'textbox' || $type == 'password' || $type == 'email' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' placeholder='$placeholder' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'text' || $type == 'textbox' || $type == 'password' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Textarea -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'textarea' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<textarea type='$type' name='$name' id='$name' placeholder='$placeholder\"; \r\n\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close tag\t\r\n\t\t\t\t\t$element .= \"' >\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$element .= '</textarea>';\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Submit -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'submit' || $type == 'button' || $type == 'btn' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( $value != '' || $value != FALSE || $value != NULL ) $element .= $value;\r\n\t\t\t\t\telse $element .= 'Submit';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name btn btn-default $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t/* ######################## */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t\r\n\t\t\t# Check for errors\r\n\t\t\t$error_msg = NULL;\r\n\t\t\tif( array_key_exists( $name, $errors ) )\t\r\n\t\t\t\t$error_msg = \"<small class='error'>$errors[$name]</small>\";\r\n\t\t\t\t\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t/* ################### */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !empty( $caption ) )\t\r\n\t\t\t\t$error_msg .= \"<div class='caption mbs'>&uarr; $caption</div>\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t/* ################### */\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t/* ####################################### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( isset( $_POST[$name] ) )\r\n\t\t\t{\r\n\t\t\t\t$output = $_POST[$name];\r\n\t\t\t\t$error_field = \"<style>input.$name, textarea.$name{ border-color: #c60f13; background-color:rgba(198,15,19,0.1);}</style>\".$element;\r\n\t\t\t\tif( empty( $errors ) )\r\n\t\t\t\t\t$valid = TRUE;\r\n\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\t$valid = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output = FALSE;\r\n\t\t\t\t$valid = FALSE;\r\n\t\t\t\t$error_msg = FALSE;\r\n\t\t\t\t$error_field = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t \r\n\t\t\t\t\r\n\t\t\treturn array( 'element' => $element.$error_msg,\r\n\t\t\t\t\t\t 'e' => $element.$error_msg,\r\n\t\t\t\t\t\t 'field' => $element,\r\n\t\t\t\t\t\t 'f' => $element,\r\n\t\t\t\t\t\t 'error_field' => $error_field,\r\n\t\t\t\t\t\t 'ef' => $error_field,\r\n\t\t\t\t\t\t 'error_msg' => $error_msg,\r\n\t\t\t\t\t\t 'em' => $error_msg,\r\n\t\t\t\t\t\t 'output' => $output,\r\n\t\t\t\t\t\t 'o' => $output,\r\n\t\t\t\t\t\t 'valid' => $valid, \r\n\t\t\t\t\t\t 'v' => $valid,\r\n\t\t\t\t\t\t 'name' => $name,\r\n\t\t\t\t\t\t 'n' => $name );\r\n\t\t\t\r\n\t\t}", "function add($str) {\n\t $this->xml .= $str;\n\t}", "public function addElement($elementType, $name) {\n $elementTypes = $this->getElementTypes(TRUE);\n\n if(!array_key_exists($elementType, $elementTypes)) {\n throw new formWizardException(\n 'unknown elementtype',\n $this->name,\n $name\n );\n }\n\n $className = $elementTypes[$elementType];\n\n $element = array(\n 'name' => $name,\n 'object' => new $className()\n );\n\n $interfaceCheck = ($element['object'] instanceof formElementHandles) ? TRUE : FALSE;\n\n if(!$interfaceCheck) {\n throw new formWizardException('formelement does not implement required interface');\n }\n\n /* new element was added, count id */\n $this->elementCounter++;\n\n $element['object']->name = $name;\n $element['object']->form = $this;\n $element['object']->id = $this->name.'_'.$this->elementCounter;\n\n if($this->isSubmitted() && isset($_REQUEST[$name])) $element['object']->setValue($_REQUEST[$name]);\n\n $this->elements[] = $element;\n\n\n return $element['object'];\n }", "public function push($el){\r\n\r\n array_push($this->data,$el);\r\n\r\n }", "public function addElement($item)\n {\n $this->items[$this->itemsCount] = $item;\n $this->itemsCount++;\n }", "public function addSubElement(OutputInterface $subElement)\n {\n $this->subelements[] = $subElement;\n\n if ($this->isSubelementGoingToAppend($subElement)) {\n $this->subelementsThatAppend[get_class($subElement)] = $subElement;\n }\n\n return $this;\n }", "public function add(array $elements);", "public function appendElement(string $name, $content = '', array $attributes = NULL): Element {\n $this->appendChild(\n $node = $this->createElement($name, $content, $attributes)\n );\n return $node;\n }", "public function AddElement(Request $request,User $user,Room $room,Element $element) \n {\n logger()->info(__METHOD__);\n $this->model->addModel($room,'elements',$element);\n return $this->getView();\n }", "public function add(string $name, $element, array $dependencies = []) {\n $this->addElement($element, [self::INFO_INDEX_KEY=>$name, $name, $dependencies]);\n $this->noteCollectionChanged();\n }", "public static function addpurifierelement($elementname, $elementconfig = Array())\n\t {\n\t // Create a new configuration object, or load it if there is already one set\n\t\tif (Security::$htmlpurifierconfig != False)\n\t\t{\n\t\t $config = Security::$htmlpurifierconfig;\n\t\t}\n\t\telse\n\t\t{\n\t\t $config = HTMLPurifier_Config::createDefault();\n\t\t $config->autoFinalize = false; // To allow for later changes to the config\n\n\t\t if (is_array($settings = Kohana::config('purifier.settings')))\n\t\t {\n\t\t\t // Load the settings\n\t\t\t $config->loadArray($settings);\n\t\t }\n\t }\n\t\t\n\t\tif (!isset($elementconfig[\"attributes\"]) OR !is_array($elementconfig[\"attributes\"]))\n\t\t{\n\t\t $elementconfig[\"attributes\"] = Array();\n\t\t}\n \n $config->set('Core.Encoding', \"UTF-8\");\n $config->set('HTML.DefinitionID', 'cms-specific');\n $config->set('Cache.DefinitionImpl', null); // Do not use caching\n \n $def = $config->getHTMLDefinition(true);\n $element = $def->addElement(\n $elementname, // name\n 'Inline', // content set\n 'Flow', // allowed children\n 'Common', // attribute collection\n $elementconfig[\"attributes\"]\n );\n\t // Save configuration for later use\n\t Security::$htmlpurifierconfig = $config;\n\t }", "public function add();", "public function add();", "public function editorAttach(&$element, &$settings);", "public function testAttributeElementWithParentThrowsExceptionWhenSchemaElementAddAttributeElement(): void\n {\n $parent1 = new SchemaElement();\n $parent1->addAttributeElement($this->sut);\n \n $parent2 = new SchemaElement();\n $this->expectInvalidOperationExceptionChildOfAnotherElement($this->sut, $parent2);\n $parent2->addAttributeElement($this->sut);\n }", "public function addElements(array $elements)\n {\n foreach ($elements as $element) {\n $this->addelement($element);\n }\n return $this;\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function appendTo(Element $parentNode): void {\n foreach ($this->_document->childNodes as $node) {\n if ($node instanceof \\DOMElement) {\n $this->addNode($parentNode, $node);\n }\n }\n }", "public function add (DOMElement $node) {\r\n\t \r\n\t if (array_push($this->list, $node)) {\r\n\t\t\t$this->length++;\r\n\t\t\treturn true;\r\n\t\t} else return false;\r\n\t}" ]
[ "0.7385612", "0.7385612", "0.7385612", "0.711237", "0.70537096", "0.69821554", "0.68644524", "0.6839557", "0.67371434", "0.66939396", "0.6678994", "0.66630507", "0.6650355", "0.6647935", "0.65579474", "0.6531691", "0.637973", "0.6374794", "0.63567895", "0.63519037", "0.63189346", "0.62603253", "0.6240721", "0.6171364", "0.6165769", "0.6088316", "0.6071776", "0.60677594", "0.6053592", "0.5977747", "0.5966967", "0.5962752", "0.5911994", "0.5908355", "0.5895804", "0.5893091", "0.58810407", "0.5880478", "0.58687204", "0.584231", "0.5824051", "0.580371", "0.57983994", "0.579388", "0.57436794", "0.5698539", "0.568953", "0.5669529", "0.56571686", "0.5656858", "0.5609241", "0.55816144", "0.5579783", "0.5559251", "0.55358344", "0.55173975", "0.5512717", "0.5497121", "0.5464855", "0.54585207", "0.54337525", "0.5426651", "0.5423348", "0.54167384", "0.54085493", "0.53805006", "0.53765476", "0.53219074", "0.5278404", "0.526298", "0.52629703", "0.52298653", "0.52283204", "0.5218349", "0.5191079", "0.5162811", "0.5161167", "0.51531523", "0.5130301", "0.511175", "0.50951", "0.5090829", "0.5086211", "0.50694543", "0.5067776", "0.50602645", "0.50475967", "0.50444007", "0.50422287", "0.50356436", "0.5030116", "0.5026224", "0.5026224", "0.5023145", "0.5014383", "0.5012078", "0.49812257", "0.49812257", "0.49769032", "0.4974758" ]
0.6084147
26
Compare the specified GAZEL version string $version with the current Gazel_Version::VERSION of GAZEL.
public static function compareVersion($version) { $version = strtolower($version); $version = preg_replace('/(\d)pr(\d?)/', '$1a$2', $version); return version_compare($version, strtolower(self::VERSION)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function compareVersion($version)\n {\n return version_compare($version, Zend::VERSION);\n }", "public static function compare($version)\n\t{\n\t\t$currentVersion = str_replace(' ', '', strtolower(self::VERSION));\n\t\t$version = str_replace(' ', '', $version);\n\n\t\treturn version_compare($version, $currentVersion);\n\t}", "public static function compare($version)\n {\n $currentVersion = str_replace(' ', '', strtolower(self::VERSION));\n $version = str_replace(' ', '', $version);\n\n return version_compare($version, $currentVersion);\n }", "function checkVersion($version)\n {\n return version_compare($this->getVersion(), $version, 'lt');\n }", "function verify_version($version) // Colorize: green\n { // Colorize: green\n return isset($version) // Colorize: green\n && // Colorize: green\n is_int($version) // Colorize: green\n && // Colorize: green\n $version >= 20190101000000 // Colorize: green\n && // Colorize: green\n $version <= 99999999999999; // Colorize: green\n }", "static function compareVersion($inVersion) {\n\t\treturn version_compare(self::SCORPIO_VERSION, $inVersion, '<=');\n\t}", "private function checkVersion($version){\n\t\tif(VersionMappingBackendQuery::create()->filterByServerRelease(YaffmapConfig::get('version'))->filterByClientRelease($version)->count() == 0){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}", "public static function compare($version, $operator)\n {\n $currentVersion = str_replace(' ', '', strtolower(static::VERSION));\n $version = str_replace(' ', '', strtolower($version));\n\n return version_compare($version, $currentVersion, $operator);\n }", "public function testVersionCompare(): void\n {\n $bag = Bag::create($this->tmpdir);\n $method = $this->getReflectionMethod('\\whikloj\\BagItTools\\Bag', 'compareVersion');\n\n // Current version is 1.0\n $this->assertEquals(-1, $method->invokeArgs($bag, ['0.97']));\n $this->assertEquals(0, $method->invokeArgs($bag, ['1.0']));\n $this->assertEquals(1, $method->invokeArgs($bag, ['1.1']));\n }", "function qa_qa_version_below($version)\n{\n\t$minqa = qa_version_to_float($version);\n\t$thisqa = qa_version_to_float(QA_VERSION);\n\n\treturn $minqa && $thisqa && $thisqa < $minqa;\n}", "function qa_php_version_below($version)\n{\n\t$minphp = qa_version_to_float($version);\n\t$thisphp = qa_version_to_float(phpversion());\n\n\treturn $minphp && $thisphp && $thisphp < $minphp;\n}", "public static function isNewerThan($version = '5.3')\n {\n return version_compare(App::VERSION(), $version) > 0;\n }", "function biblegateway_version($version) {\r\n if (preg_match('/^[0-9]+$/', $version)) return $version; \r\n\r\n // return chosen version: default to NIV\r\n return array_key_exists($version, $this->versionCodes) ? $this->versionCodes[$version] : 31;\r\n }", "function version_comparison($check_ver, $base_ver)\n{\n $ret = 0;\n\n // determine the parts of the version to compare to\n $base_tmp = split('\\.', $base_ver);\n $base = array();\n $base['major'] = $base_tmp[0] != '' ? $base_tmp[0]:0;\n $base['minor'] = $base_tmp[1] != '' ? $base_tmp[1]:0;\n $base['patch'] = $base_tmp[2] != '' ? $base_tmp[2]:0;\n $base['build'] = $base_tmp[3] != '' ? $base_tmp[3]:0;\n\n // determine the parts of the version to check\n $check_tmp = split('\\.', $check_ver);\n $check = array();\n $check['major'] = $check_tmp[0] != '' ? $check_tmp[0]:0;\n $check['minor'] = $check_tmp[1] != '' ? $check_tmp[1]:0;\n $check['patch'] = $check_tmp[2] != '' ? $check_tmp[2]:0;\n $check['build'] = $check_tmp[3] != '' ? $check_tmp[3]:0;\n\n // loop through each part of the version number\n foreach ($base as $key => $val)\n {\n if ($check[$key] != $val)\n {\n // determine higher or lower and set return var\n if ($check[$key] > $val)\n {\n\n $ret = 1;\n }\n else\n {\n $ret = -1;\n }\n\n // and break out of loop\n break;\n }\n }\n\n // return the verdict\n return $ret;\n}", "public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n return 0; \r\n } else if(!is_numeric($K1) || !is_numeric($K2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($K1 < $K2) {\r\n return -1;\r\n } else if($K1 > $K2) {\r\n return 1;\r\n } \r\n } else if(!is_numeric($M1) || !is_numeric($M2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($M1 < $M2) {\r\n return -1;\r\n } else if($M1 > $M2) {\r\n return 1;\r\n } \r\n } else if($N1 < $N2) {\r\n return -1;\r\n } else if($N1 > $N2) {\r\n return 1;\r\n } \r\n }", "protected function versionName($version=null) {\n\t\t$version = !empty($version) ? $version : $this->options['version']; \n\t\tif ($version === true) return true; \n\t\telse return $this->sanitize($version); \n\t}", "function verify_version_for_user($version) // Colorize: green\n { // Colorize: green\n return isset($version) // Colorize: green\n && // Colorize: green\n is_int($version) // Colorize: green\n && // Colorize: green\n $version >= 20190101 // Colorize: green\n && // Colorize: green\n $version <= 99999999; // Colorize: green\n }", "private function validateVersionNumber($version)\n\t{\n\t\treturn preg_match('/\\d+(?:\\.\\d+)+/', $version, $matches) ? $matches[0] : false;\n\t}", "public static function isConform($version)\n {\n return (string)self::fromString($version) === (string)$version;\n }", "protected static function _versionCompare($version = \"\", $reference = \"\", $operator = null){\nt_e('deprecated',__FUNCTION__);\n\t\t/*\n\t\t * will soon replace the code of following methods:\n\t\t * - we_util_Sys_Webedition::versionCompare()\n\t\t * - we_util_Sys_Webedition::toolVersionCompare()\n\t\t * - we_util_Sys_Php::versionCompare()\n\t\t * - we_util_Sys_Db_Mysql::versionCompare()\n\t\t * they'll call this method here insead of implementing the functionality themselves.\n\t\t */\n\t\treturn (!$version || !$reference ?\n\t\t\t\tfalse :\n\t\t\t\tversion_compare($version, $reference, $operator)\n\t\t\t);\n\t}", "public function isApiVersion($version)\n {\n return (float) $version === (float) $this->options['api_version'];\n }", "protected function parseVersion(string $version): bool\n {\n if (! preg_match('/\\\\d+\\\\.\\\\d+\\\\.\\\\d+/u', $version)) {\n return false;\n }\n\n $this->version = $version;\n\n [$this->major, $this->minor, $this->patch] = array_map('intval', explode('.', $this->version));\n\n return true;\n }", "function is_version( $version = '3.5' ) {\n\t\tglobal $wp_version;\n\t\treturn version_compare( $wp_version, $version, '>=' );\n\t}", "public static function compare(string $version1, string $version2, string $operator = self::EQUAL): bool\n {\n $floatSeparationSymbol = '.';\n if ((substr_count($version1, ',') + substr_count($version2, ',')) > 0) {\n $floatSeparationSymbol = ',';\n }\n $depthVersion1 = substr_count($version1, $floatSeparationSymbol);\n $depthVersion2 = substr_count($version2, $floatSeparationSymbol);\n if ($depthVersion1 > $depthVersion2) {\n $version2 = self::regularizeDepthVersion($version2, $depthVersion1, $floatSeparationSymbol);\n }\n if ($depthVersion2 > $depthVersion1) {\n $version1 = self::regularizeDepthVersion($version1, $depthVersion2, $floatSeparationSymbol);\n }\n return version_compare($version1, $version2, $operator);\n }", "function check_version( $version ) {\n\t$sql = \"SELECT * FROM movie_versions WHERE version_name = \".\n\t\t\tformat_sql( $version );\n\t$res = mysql_query( $sql );\n\tif ( mysql_num_rows( $res ) > 0 ) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "public function laterThan($version);", "function check_php_version($version)\n {\n // intval used for version like \"4.0.4pl1\"\n $testVer=intval(str_replace(\".\", \"\",$version));\n $curVer=intval(str_replace(\".\", \"\",phpversion()));\n if( $curVer < $testVer )\n return false;\n return true;\n }", "public function isStable($version)\n {\n return $this->stable($version);\n }", "protected function requerimentPhpVersion($version)\n {\n if (version_compare(PHP_VERSION, $version) < 0) {\n if (PHP_SAPI == 'cli') {\n $string = \"\\033[1;36m\";\n $string .= \"$version\\033[0m\";\n trigger_error(\"Your PHP version must be equal or higher than {$string} to use Lenevor Framework.\".PHP_EOL, E_USER_ERROR);\n }\n \n die(\"Your PHP version must be equal or higher than <b>{$version}</b> to use Lenevor Framework.\");\n }\n }", "function version_compare($version1, $version2, $operator = NULL)\n{\n}", "function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "public function page_check_version()\n\t{\n\t\tif (!$content = Http::get_file_on_server(FSB_REQUEST_SERVER, FSB_REQUEST_VERSION, 10))\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\t$content = explode(\"\\n\", $content);\n\n\t\tif (count($content) < 3)\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\tif (strpos('http', $content[2]) === false)\n\t\t{\n\t\t\tarray_shift($content);\n\t\t}\n\n\t\t@list($last_version, $url, $level) = $content;\n\t\t$last_version = trim($last_version);\n\n\t\t// Aucune redirection\n\t\tFsb::$session->data['u_activate_redirection'] = 2;\n\n\t\tif (!is_last_version(Fsb::$cfg->get('fsb_version'), $last_version))\n\t\t{\n\t\t\tDisplay::message(sprintf(Fsb::$session->lang('adm_old_version'), $last_version, Fsb::$cfg->get('fsb_version'), $url, $url, Fsb::$session->lang('adm_version_' . trim($level))) . '<br /><br />' . sprintf(Fsb::$session->lang('adm_click_view_newer'), $url));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::message('adm_version_ok', 'index.' . PHPEXT, 'index_adm');\n\t\t}\n\t}", "public function versionCheckAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n $currentVersion = \"1.6.3\";\n $clientVersion = $_GET['ver'];\n\n if ($clientVersion < $currentVersion) {\n echo \"upgrade\";\n } elseif ($clientVersion == $currentVersion) {\n echo \"latest\";\n } elseif ($clientVersion > $currentVersion) {\n echo \"development\";\n } else {\n echo \"unknown-version\";\n }\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "private static function _checkProjectVersion() {\n $composer_openfed = json_decode(file_get_contents('composer.openfed.json'), TRUE);\n $current_version = $composer_openfed['require']['openfed/openfed8'];\n preg_match('/(?:[\\d+\\.?]+[a-zA-Z0-9-]*)/', $current_version, $matches);\n // If current version is dev, we should ignore version check.\n if (strpos($current_version, 'dev') !== FALSE) {\n return FALSE;\n }\n\n return version_compare($matches[0], '10.0', '>=');\n }", "public function versionIsValid($version)\n {\n if (version_compare($version, 5.3, '>=')) {\n return true;\n }\n\n return false;\n }", "private function checkPHPVersion($version)\n\t{\n\t\t$version = $this->validateVersionNumber($version);\n\n\t\t// If the version number is invalid, don't go any further\n\t\tif ($version === false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$majorVersion = substr($version, 0, 1);\n\n\t\t// The version string should meet the minimum supported PHP version for 3.0.0 and be a released PHP version\n\t\tif (version_compare($version, '5.3.1', '<') || version_compare($version, '8.0.0', '>=') || $majorVersion == 6)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $version;\n\t}", "public function checkVersion($version) {\n return ( !$this->studip_min_version || version_compare($version, $this->studip_min_version) >= 0 )\n && ( !$this->studip_max_version || version_compare($version, $this->studip_max_version) <= 0 );\n }", "public function checkVersion($version) {\n return ( !$this->studip_min_version || version_compare($version, $this->studip_min_version) >= 0 )\n && ( !$this->studip_max_version || version_compare($version, $this->studip_max_version) <= 0 );\n }", "public static function getVersion($with_v = TRUE, $full = FALSE)\n\t{\n\t\t$version = $with_v ? 'v' . Gleez::VERSION : Gleez::VERSION;\n\t\t$version = $full ? 'Gleez CMS ' . $version : $version;\n\n\t\treturn $version;\n\t}", "public function test_library_version() {\n\t\t$path = route('v2_api_versionLatest',[],false);\n\t\t$params = implode('&', array_map(function ($v, $k) { return sprintf(\"%s=%s\", $k, $v); }, $this->params, array_keys($this->params)));\n\n\t\t$this->log(\"\\nTesting: \" . route('v2_api_versionLatest', $this->params),'light_cyan',true);\n\t\t$response = $this->get(route('v2_api_versionLatest'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure($this->getSchemaKeys('v2_api_versionLatest'));\n\t\t$this->compareToOriginal($path,$this->getSchemaKeys('v2_api_versionLatest'));\n\t}", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function has(string $version): bool;", "public function has(string $version): bool;", "public function checkout($version);", "function checkCurrentVersion() {\n $request = new Request();\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases';\n $url .= '?per_page=1';\n $response = $request->simpleRequest($url, array('absolute_url' => true));\n $release = array_shift($response['data']);\n Terminus::getCache()->putData(\n 'latest_release',\n array('version' => $release->name, 'check_date' => time())\n );\n return $release->name;\n}", "public function parseStability($version)\n {\n $version = preg_replace('{#.+$}i', '', $version);\n\n if ('dev-' === substr($version, 0, 4) || '-dev' === substr($version, -4)) {\n return 'dev';\n }\n\n preg_match('{' . self::$modifierRegex . '$}i', strtolower($version), $match);\n if (!empty($match[3])) {\n return 'dev';\n }\n\n if (!empty($match[1])) {\n if ('beta' === $match[1] || 'b' === $match[1]) {\n return 'beta';\n }\n if ('alpha' === $match[1] || 'a' === $match[1]) {\n return 'alpha';\n }\n if ('rc' === $match[1]) {\n return 'RC';\n }\n }\n\n return 'stable';\n }", "public function testGetVersions($version, $expected)\n {\n $lookup = new Lookup(array('version' => $version));\n $lookup->setVersionMap(array('4' => 'master', '3' => '3.6'));\n $this->assertSame($expected, $lookup->getVersion());\n }", "public function get_version();", "private function get_safari_version($version) {\n // versions less than 20 should actually be telling the truth.\n if ( (float)$version < 20 ) {\n return $version;\n }\n \n // correct version string => lowest Safari/version number\n $versions = array(\n '1.0' => '85.5',\n '1.0.3' => '85.8',\n '1.2' => '125.0',\n '1.2.2' => '125.7',\n '1.2.3' => '125.9',\n '1.2.4' => '125.12',\n '1.3' => '312.0',\n '1.3.1' => '312.3',\n '1.3.2' => '312.5',\n '2.0' => '412.0',\n '2.0.1' => '412.5',\n '2.0.2' => '416.12',\n '2.0.3' => '417.8',\n '2.0.4' => '419.3'\n );\n \n // default to no change\n $out = $this->version;\n // which of these is the highest version it might be?\n $version = explode('.', $version);\n foreach( $versions as $good => $lowest ) {\n $lowest = explode('.',$lowest);\n if ( count($version) >= 2 && $version[0] >= $lowest[0] && $version[1] >= $lowest[1] ) {\n $out = $good;\n }\n }\n return $out;\n }", "protected function checkEsVersion($version)\n {\n $result = true;\n // verify supported versions\n foreach (self::$supportedVersions as $check) {\n $result = $result && version_compare($version, $check['version'], $check['operator']);\n }\n return $result;\n }", "public static function version(/* ... */)\n {\n return PRGGMR_VERSION;\n }", "public function testVersion()\r\n {\r\n $version = '2.1';\r\n $this->vcard->setVersion($version);\r\n\r\n $this->assertSame(\"VERSION:{$version}\", $this->vcard->getVersion());\r\n }", "private function checkCMSVersion($version)\n\t{\n\t\t$version = $this->validateVersionNumber($version);\n\n\t\t// If the version number is invalid, don't go any further\n\t\tif ($version === false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Joomla only uses major.minor.patch so everything else is invalid\n\t\t$explodedVersion = explode('.', $version);\n\n\t\tif (count($explodedVersion) > 3)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// We are only collecting data for the 3.x series\n\t\tif (version_compare($version, '3.0.0', '<') || version_compare($version, '4.0.0', '>='))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $version;\n\t}", "public function setVersion(string $version);", "function pluginFusioninventoryGetCurrentVersion($version) {\n global $DB;\n if ((!TableExists(\"glpi_plugin_tracker_config\")) &&\n (!TableExists(\"glpi_plugin_fusioninventory_config\")) &&\n (!TableExists(\"glpi_plugin_fusioninventory_configs\"))) {\n return '0';\n } else if ((TableExists(\"glpi_plugin_tracker_config\")) ||\n (TableExists(\"glpi_plugin_fusioninventory_config\"))) {\n\n if ((!TableExists(\"glpi_plugin_tracker_agents\")) &&\n (!TableExists(\"glpi_plugin_fusioninventory_agents\"))) {\n return \"1.1.0\";\n }\n if ((!TableExists(\"glpi_plugin_tracker_config_discovery\")) &&\n (!TableExists(\"glpi_plugin_fusioninventory_config\"))) {\n return \"2.0.0\";\n }\n if (((TableExists(\"glpi_plugin_tracker_agents\")) &&\n (!FieldExists(\"glpi_plugin_tracker_config\", \"version\"))) &&\n (!TableExists(\"glpi_plugin_fusioninventory_config\"))) {\n return \"2.0.1\";\n }\n if (((TableExists(\"glpi_plugin_tracker_agents\")) &&\n (FieldExists(\"glpi_plugin_tracker_config\", \"version\"))) ||\n (TableExists(\"glpi_plugin_fusioninventory_config\"))) {\n\n $query = \"\";\n if (TableExists(\"glpi_plugin_tracker_agents\")) {\n $query = \"SELECT version FROM glpi_plugin_tracker_config LIMIT 1\";\n } else if (TableExists(\"glpi_plugin_fusioninventory_config\")) {\n $query = \"SELECT version FROM glpi_plugin_fusioninventory_config LIMIT 1\";\n }\n\n $data = array();\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result) == \"1\") {\n $data = $DB->fetch_assoc($result);\n }\n }\n\n if ($data['version'] == \"0\") {\n return \"2.0.2\";\n } else {\n return $data['version'];\n }\n }\n } else if (TableExists(\"glpi_plugin_fusioninventory_configs\")) {\n $query = \"SELECT value FROM glpi_plugin_fusioninventory_configs\n WHERE `type`='version'\n AND `plugins_id`='\".PluginFusioninventoryModule::getModuleId('fusioninventory').\"'\n LIMIT 1\";\n $data = array();\n if ($result=$DB->query($query)) {\n if ($DB->numrows($result) == \"1\") {\n $data = $DB->fetch_assoc($result);\n return $data['value'];\n }\n }\n }\n\n}", "abstract public function get_version();", "function acf_version_compare($left = '', $compare = '>', $right = '')\n{\n}", "function checkversion($checkversion, $width='200', $border=\"dashed\", $method=CHECK_METHOD, $dev = false, $version_server=CHECK_SERVER, $project_shortcut=CHECK_PROJECT_SC) {\n\tglobal $locale;\n\t\n\t//Set allow_urlfopen to true\n\tini_set('allow_url_fopen', true);\n\n\t//URL Prefix\n\t$urlprefix = !strstr($version_server, \"http://\") ? \"http://\" : \"\";\n\t\n\t//Compelte URL to the rss feed\n\t$vf_url = \"$urlprefix$version_server/infusions/version_updater/feed.php?project_sc=$project_shortcut&old_v=$checkversion\".($dev == true ? \"&dev\" : \"\"); \n\n\t//Download URL for new versions\n\t$vs_down = \"$urlprefix$version_server/infusions/version_updater/download_updater.php?ps=$project_shortcut&amp;version=$checkversion\".($dev == true ? \"&amp;dev\" : \"\");\n\n\tif (url_exists($vf_url)) {\t\t\t\n\t\tif (ini_get('allow_url_fopen') == '1') {\n\t\t\t$feed = $vf_url;\n\t\t\t//Open conection to the feed\n\t\t\t\t$fp = fopen($feed, 'r');\n\t\t\t\t$xml = '';\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\t$xml .= fread($fp, 128);\n\t\t\t\t}\n\t\t\t\tfclose($fp);\n\t\t\t//Connection closed and content stored\n\t\t\t//Render and display feed\n\t\t\t\t$items = untag($xml, 'item');\n\t\t\t\t$limit = 1; $count = 0;\n\t\t\t\tforeach ($items as $item) {\n\t\t\t\t\tif ($count == $limit) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t\t$version = untag($item, 'title');\n\t\t\t\t\t$description = untag($item, 'description');\n\t\t\t\t}\n\t\t\t//Render og display done\t\t\t\t\n\t\t\tif (!empty($version)) {\n\t\t\t\t//If a newer version is available \n\t\t\t\t$return = \"<table width='$width'>\\n<tr>\";\n\t\t\t\t$return .= \"<td align='left' valign='top' style='border: $border'>\\n\";\n\t\t\t\t$return .= \"<a href='$vs_down' target='_blank'>\";\n\t\t\t\t$return .= \"<img src='\".CHECKER_IMAGES.\"download_update.png' align='right' title='\".$locale['vup102'].\"' alt='\".$locale['vup102'].\"' border='0' />\\n\";\n\t\t\t\t$return .= \"</a>\\n\";\n\t\t\t\t$return .= \"<img src='\".CHECKER_IMAGES.\"version_old.gif' title='\".$locale['vup101'].\"' alt='\".$locale['vup101'].\"' border='0px' /><br />\\n\";\n\t\t\t\t$return .= \"<strong>\".$locale['vup104'].\"</strong> - v\".$version[0].\"\\n\";\n\t\t\t\tif ($method == \"rss\") {\n\t\t\t\t\t$return .= \"<br />\".$description[0].\"\\n\";\n\t\t\t\t}\n\t\t\t\t$return .= \"</td>\\n\";\n\t\t\t\t$return .= \"</tr>\\n</table>\\n\";\n\t\t\t\treturn $return;\n\t\t\t} else {\n\t\t\t\t//Else if you have the lates version\n\t\t\t\treturn \"<img src='\".CHECKER_IMAGES.\"version.gif' title='\".$locale['vup100'].\"' alt='' />\";\n\t\t\t}\n\t\t} else {\n\t\t\t//allow_url_fopen failture\n\t\t\treturn $locale['vup105'].\"<br />\".$locale['vup106'].\" <a href='\".SUPPORT_SITE_URL.\"' target='_blank'>\".SUPPORT_SITE_NAME.\"</a>.\";\n\t\t}\n\t} else {\n\t\t//Else if the url to the version file dos not exist\n\t\treturn $locale['vup103'].\"<a href='\".SUPPORT_SITE_URL.\"' target='_BLANK'>\".SUPPORT_SITE_NAME.\"</a>.\";\n\t}\n}", "public function setVersion($version)\n {\n if (!preg_match(\"/\\\\d+\\\\.\\\\d+\\\\.\\\\d+/i\", $version)) {\n throw new \\RuntimeException(sprintf('Invalid version string, expected VERSION=major.minor.patch'));\n }\n\n $string = \"VERSION=\" . $version;\n\n return file_put_contents($this->filepath, $string);\n }", "public function setVersion($version) {\n throw new \\BadFunctionCallException('Cannot set version number of graded version');\n }", "private function isValidVersionNumber($version) {\n if(strpos($version, '.') !== false) {\n $parts = explode('.', $version);\n \n if(count($parts) == 3) {\n foreach($parts as $part) {\n if(!is_numeric($part)) {\n return false;\n } // if\n } // foreach\n \n return true;\n } else {\n return false;\n } // if\n } else {\n return false;\n } // if\n }", "public function isComposerVersionAvailable($version = '1.6.0')\n {\n $requiredMinorVersion = $this->str->toMinorVersion($version);\n $command = 'composer --version';\n\n exec($command, $version, $returnValue);\n\n if ($returnValue === 0) {\n $availableMinorVersion = $this->str->toMinorVersion(\n explode(' ', $version[0])[1]\n );\n\n return version_compare(\n $requiredMinorVersion,\n $availableMinorVersion,\n '<='\n ) === true;\n }\n\n return true;\n }", "function nucleus_version_compare($version1, $version2, $operator = '')\n{\n $args = func_get_args();\n for($i = 0; $i<=1; $i++)\n {\n $args[$i] = str_replace(array('_','-','+','/'), '.', $args[$i]);\n $args[$i] = preg_replace('#^[^0-9]+#', '', $args[$i]);\n $ver = explode('.', $args[$i]);\n $major = intval($ver[0]);\n if ($major <= 3)\n { // minor version\n $x = @intval($ver[1]);\n if ($x >= 10)\n $ver[1] = sprintf('%d.%d', $x / 10 , $x % 10);\n else\n $ver[1] = sprintf('%d.0', $x);\n }\n $args[$i] = implode('.', $ver);\n }\n return call_user_func_array('version_compare', $args);\n}", "public function checkValidVersion(string $version): void\n {\n if (!$this->validVersions->contains($version)) {\n throw WrapperException::instance(\"invalid version for notion-api\", ['invalidVersion' => $version]);\n }\n }", "protected function validateVersionNumber($version) {\n\t\tif (1 !== preg_match('/^[\\\\d]{1,2}\\.[\\\\d]{1,2}\\.[\\\\d]{1,2}$/i', $version)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t'Invalid version number \"' . $version . '\" detected from tag, aborting upload',\n\t\t\t\t1426360822\n\t\t\t);\n\t\t}\n\t}", "abstract public function version();", "abstract public function version();", "public function setVersion($version) {}", "public function setVersion($version) {}", "public function compatVersionConditionMatchesSameRelease() {}" ]
[ "0.7128756", "0.69709426", "0.6881184", "0.65389067", "0.64177233", "0.6180569", "0.61701757", "0.60870814", "0.60100335", "0.6002441", "0.5902209", "0.58630055", "0.58542955", "0.5822278", "0.57993025", "0.57866085", "0.5784983", "0.57592624", "0.5755967", "0.56500965", "0.56486064", "0.56423455", "0.5634581", "0.5624356", "0.5612532", "0.56099796", "0.5596875", "0.55691755", "0.5568542", "0.5566408", "0.5562326", "0.55458575", "0.55458575", "0.55458575", "0.55458575", "0.5524428", "0.5522034", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5519879", "0.5498905", "0.5495468", "0.54659086", "0.5454894", "0.5454894", "0.54542667", "0.54413575", "0.54386306", "0.54386306", "0.54386306", "0.54386306", "0.54386306", "0.54105186", "0.54105186", "0.5406517", "0.5404506", "0.53950554", "0.5382641", "0.53747326", "0.53703135", "0.53696036", "0.5365951", "0.53657275", "0.535993", "0.5346264", "0.5345218", "0.53383803", "0.53348017", "0.5334048", "0.53336084", "0.53303", "0.5328641", "0.53282815", "0.53273463", "0.5326401", "0.53099984", "0.53014684", "0.53014684", "0.5294871", "0.5294871", "0.529443" ]
0.71253085
1
Add the Simple Pages link to the admin main navigation.
public function filterAdminNavigationMain($nav) { $nav[] = array( 'label' => __('Export'), 'uri' => url('export'), ); return $nav; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function admin_landing_page() {\n add_menu_page( 'Welcome | All Cycles Admin', 'Welcome', 'manage_options', 'admin_landing_page', 'create_admin_page', 'dashicons-menu', 5 );\n}", "static function admin_menu()\n\t{\n\t\t$icon = plugins_url( 'jumplead/assets/jumplead-icon.png' );\n\n\t\t// Main Menu\n\t\tadd_menu_page( 'Jumplead', 'Jumplead', 'edit_pages', 'jumplead', 'Jumplead::show_page_jumplead', $icon );\n\n\t\t// Subpages\n\t\tadd_submenu_page( 'jumplead', 'Integrations', 'Integrations', 'edit_pages', 'jumplead_integrations', 'Jumplead::show_page_integrations' );\n\t\tadd_submenu_page( 'jumplead', 'Settings', 'Settings', 'edit_pages', 'jumplead_settings', 'Jumplead::show_page_settings' );\n\t}", "function sr_frontpage_admin_menu() {\n add_menu_page(\n 'Home Sections',\n 'Home Sections',\n 'manage_options',\n 'front-sections',\n '',\n 'dashicons-admin-home',\n 40\n );\n}", "public function admin_menu(): void {\n\t\tif ( is_plugin_active_for_network( plugin_basename( WP_SENTRY_PLUGIN_FILE ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_management_page(\n\t\t\t'WP Sentry test',\n\t\t\t'WP Sentry test',\n\t\t\t'activate_plugins',\n\t\t\tself::ADMIN_PAGE_SLUG,\n\t\t\t[ $this, 'render_admin_page' ]\n\t\t);\n\t}", "public function admin_menu() {\n // Duplicate link into properties mgmt\n \tadd_submenu_page(\n \t\tself::SLUG,\n \t\t__('Settings'),\n \t\t__('Settings'),\n \t\t'manage_options',\n \t\tself::SLUG,\n \t\t1\n \t);\n }", "function mpp_Add_Admin_Link()\n{\n add_menu_page(\n 'Moses Post Piglatin page', // Title of the page\n 'Moses Post Piglatin', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'includes/mpp-post-piglatin-cp.php' // The 'slug' - file to display when clicking the link\n );\n}", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\n }", "public function add_menu()\n {\n add_options_page(__('Master Link Plugin Settings'), __('Master Link Plugin'), 'manage_options', 'master_link_plugin', array(\n &$this,\n 'plugin_settings_page'\n ));\n }", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "public static function registerAdminPages()\n {\n // First add main pages\n if (static::$adminPages) {\n $adminPages = new Collection(static::$adminPages);\n\n foreach ($adminPages as $adminPage) {\n add_menu_page(\n array_get($adminPage, 'label'),\n array_get($adminPage, 'title'),\n array_get($adminPage, 'capability'),\n array_get($adminPage, 'route'),\n array_get($adminPage, 'callback'),\n array_get($adminPage, 'icon'),\n array_get($adminPage, 'position')\n );\n }\n }\n\n // Then add sub pages\n if (static::$adminSubPages) {\n // Order by position\n usort(static::$adminSubPages, function($a, $b) {\n return $a['position'] > $b['position'];\n });\n\n // Add pages\n foreach (static::$adminSubPages as $adminSubPage) {\n $route = array_get($adminSubPage, 'route');\n $url = array_get($adminSubPage, 'options.url');\n\n if (! $route and $url) {\n add_submenu_page(\n array_get($adminSubPage, 'parent'),\n array_get($adminSubPage, 'title'),\n array_get($adminSubPage, 'label'),\n array_get($adminSubPage, 'capability'),\n $url\n );\n } else {\n add_submenu_page(\n array_get($adminSubPage, 'parent'),\n array_get($adminSubPage, 'title'),\n array_get($adminSubPage, 'label'),\n array_get($adminSubPage, 'capability'),\n $route,\n array_get($adminSubPage, 'callback')\n );\n }\n }\n }\n\n // We also need to rename the first item in the navigation\n global $submenu;\n\n if (isset($submenu['op-suite'])) {\n $submenu['op-suite'][0][0] = __('Dashboard', 'op3');\n }\n }", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "function spsn_admin_tab() {\n\n add_menu_page('Share blog post with social network', 'Share blog post with social network', 'manage_options', __FILE__, 'spsn_admin_page');\n}", "function bit_admin_page() {\n\t//Creates admin page\n}", "public function admin_page()\n {\n echo $this->return_admin_page();\n }", "public static function admin_menu() {\n\t\t$title = 'Micropub';\n\t\t// If the IndieWeb Plugin is installed use its menu.\n\t\tif ( class_exists( 'IndieWeb_Plugin' ) ) {\n\t\t\t$options_page = add_submenu_page(\n\t\t\t\t'indieweb',\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t} else {\n\t\t\t$options_page = add_options_page(\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t}\n\n\t}", "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "function add_admin_pages () {\n define( \"CLRANGER_PATHS\", ['clarity-ranger'] );\n add_menu_page( 'Marc Moeller Clarity Ranger', 'Clarity Ranger', 'manage_options', 'clarity-ranger', array($this, 'clranger_internal_links_page') , CLARITY_URL . '/images/icon2.png' , 6 );\n\t\t\n\t\tadd_submenu_page( 'clarity-ranger', 'Reverse Silo', 'Reverse Silo','manage_options', 'clarity-reverse-silo' ,array($this, 'clranger_reverse_silo_page') );\n }", "public function show_navigation() {\n\n echo '<h1>' . esc_html( get_admin_page_title() ) . '</h1>';\n echo '<h2 class=\"nav-tab-wrapper\">';\n foreach ( $this->settings_tabs as $tab ) {\n printf( '<a href=\"#%1$s\" class=\"nav-tab\" id=\"%1$s-tab\">%2$s</a>', $tab['id'], $tab['title'] );\n }\n echo '</h2>';\n\n //settings_errors();\n\n }", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "function myplugin_Add_My_Admin_Link()\n{\n add_menu_page(\n 'Plugin TOTO Page', // Titre de la page\n 'Plugin TOTO', // Texte du lien dans le menu\n 'manage_options', // capacité nécessaire pour accéder au lien\n 'ShotcodeAndSEO/includes/toto-acp-page.php' // fichier à afficher quand on clique sur le lien\n );\n}", "function admin_menu(){\t\tif(!empty($this->settings_manager->sections)){\n\t\t\tadd_theme_page(__('Theme Settings'), __('Theme Settings'), 'edit_theme_options', $this->options->option_name, array($this, 'theme_settings'));\n\t\t}\n\t}", "function section_linkadmin (){\n section_links_links (true);\n}", "public function addAdminMenu() {\n add_submenu_page(\n 'options-general.php',\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n 'edit_plugins',\n 'ncstate-wrap-authentication',\n array($this, 'settingsPage')\n );\n }", "public static function admin()\n {\n HRHarvardTheme::get_template_part( 'admin', 'nav-widget' );\n }", "public function add_admin_pages() {\n\n\t\tif ( ! function_exists( 'acf_add_options_page' ) ) {\n\t\t\t$this->add_default_options_page();\n\t\t\treturn;\n\t\t}\n\n\t\tacf_add_options_page(\n\t\t\t[\n\t\t\t\t'page_title' => self::OPTIONS_TITLE,\n\t\t\t\t'menu_title' => self::OPTIONS_MENU_TITLE,\n\t\t\t\t'capability' => self::OPTIONS_USER_CAP,\n\t\t\t\t'menu_slug' => self::OPTIONS_MENU_SLUG,\n\t\t\t] );\n\n\t\t$this->add_acf_fields();\n\t}", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "public static function _admin_menu(){\n\t\tadd_options_page( 'aitch ref! Settings', 'aitch ref!', 'manage_options', 'aitch-ref', 'AitchRef::_options_page' );\n\t}", "public function admin_menu()\n\t{\n\t\tadd_theme_page( 'Theme Git Info', 'Theme Git Info', 'edit_posts', 'go-git', array( $this, 'theme_page' ) );\n\t}", "public function register_admin_page()\n {\n }", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "public function admin_menu() {\n\n $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );\n\n $this->menu_page = add_options_page(\n __( 'Custom Login Settings', CUSTOM_LOGIN_DIRNAME ),\n __( 'Custom Login', CUSTOM_LOGIN_DIRNAME ),\n $capability,\n CUSTOM_LOGIN_DIRNAME,\n array( $this, 'settings_page' )\n );\n }", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "public function add_page() {\n\t\tadd_theme_page(\n\t\t\t\t__('Manage Sidebars', self::TEXT_DOMAIN),\n\t\t\t\t__('Manage Sidebars', self::TEXT_DOMAIN),\n\t\t\t\t'edit_theme_options',\n\t\t\t\t'ups_sidebars',\n\t\t\t\tarray( $this, 'admin_page' )\n\t\t\t);\n\t}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public function admin_page() {\n echo $this->generateView('main', []);\n }", "public static function modify_admin_menu_links() {\n\t\t$post_type = Registrations::get_post_type();\n\t\t$path = 'edit.php?post_type=' . $post_type;\n\n\t\t// Remove 'Add New' link.\n\t\tremove_submenu_page( $path, 'post-new.php?post_type=' . $post_type );\n\n\t\t// Add 'Queue' link.\n\t\t$post_type_obj = get_post_type_object( $post_type );\n\t\tadd_submenu_page(\n\t\t\t$path,\n\t\t\t__( 'Photos In Moderation', 'wporg-photos' ),\n\t\t\t__( 'Queue', 'wporg-photos' ),\n\t\t\t$post_type_obj->cap->edit_posts,\n\t\t\tesc_url( add_query_arg( [ 'post_status' => 'pending' ], $path ) ),\n\t\t\t'',\n\t\t\t1\n\t\t);\n\t}", "public function add_menu_page()\n\t{\n\t\tadd_menu_page( \n\t\t\t'mmenu',\n\t\t\t'mmenu',\n\t\t\t'manage_options',\n\t\t\t'mmenu',\n\t\t\tarray( $this, 'create_admin_page' ),\n\t\t\t'dashicons-menu'\n\t\t);\n\t}", "function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "public function addAdminMenu()\n\t {\n\t add_menu_page('Create Metas', 'Create Metas', 'manage_options', 'create-metas', array( $this, 'optionsPage' ), 'dashicons-admin-tools', 66 );\n\t }", "function abc_admin_dashboard()\n{\n add_menu_page('Awesome BMI Dashboard', 'Awesome BMI', 'manage_options', 'awesome-bmi', 'abc_admin_dashboard_init');\n}", "public function addMainMenuLink()\n {\n return '<a href=\"/Plugins/Products/Actions/Products.php\">Products</a> ';\n }", "public function add_network_admin_pages() {\n\n\t\t// Add our main settings page.\n\t\tadd_menu_page(\n\t\t\tsprintf( __( 'Manage %s', 'wpcampus-network' ), 'WPCampus' ),\n\t\t\t'WPCampus',\n\t\t\t'manage_wpc_network',\n\t\t\t'manage-wpc-network',\n\t\t\t[ $this, 'print_manage_network_page' ]\n\t\t);\n\t}", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "public function getSearchAdminLinkForObject() {\n return getLinkAdminHref(\"pages\", \"list\", \"&systemid=\".$this->getSystemid());\n }", "public function adminMenu() {\n add_submenu_page(\n 'tools.php',\n self::NAME,\n self::NAME,\n 'import',\n __CLASS__ . '_opt_menu',\n array(&$this, 'showBackupPage')\n );\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public function add_page() {\n\t\t\tif ( ! defined( 'WPEX_THEME_PANEL_SLUG' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add page\n\t\t\tadd_submenu_page(\n\t\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\t\t__( 'Demo Importer', 'total' ),\n\t\t\t\t__( 'Demo Importer', 'total' ),\n\t\t\t\t'administrator',\n\t\t\t\tWPEX_THEME_PANEL_SLUG .'-demo-importer',\n\t\t\t\tarray( $this, 'demos_page' )\n\t\t\t);\n\n\t\t}", "public function onNavigationMainFirst($event) {\n // add the blog\n if (Config::get('cms.blogging')) {\n Navigation::addMain('default', array('title' => 'Blog', 'slug' => 'blog/posts', 'icon' => 'book'));\n }\n\n // add the events\n if (Config::get('cms.events')) {\n Navigation::addMain('default', array('title' => 'Events', 'slug' => 'events', 'icon' => 'calendar'));\n }\n\n if ($this->user) {\n // add the storage\n if (Config::get('cms.storage')) {\n Navigation::addMain('default', array('title' => 'Storage', 'slug' => 'storage/folders', 'icon' => 'folder-open'));\n }\n\n // add the admin links\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addMain('admin', array('title' => 'Logs', 'slug' => 'logviewer', 'icon' => 'wrench'));\n Navigation::addMain('admin', array('title' => 'Caching', 'slug' => 'caching', 'icon' => 'tachometer'));\n Navigation::addMain('admin', array('title' => 'CloudFlare', 'slug' => 'cloudflare', 'icon' => 'cloud'));\n Navigation::addMain('admin', array('title' => 'Queuing', 'slug' => 'queuing', 'icon' => 'random'));\n }\n\n // add the view users link\n if (Sentry::getUser()->hasAccess('mod')) {\n Navigation::addMain('admin', array('title' => 'Users', 'slug' => 'users', 'icon' => 'user'));\n }\n }\n }", "function add_admin_menu() {\r\n\t\tadd_management_page( __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), 'manage_options', 'regenthumbs-stamina', array(&$this, 'regenerate_interface') );\r\n\t}", "public function admin_menu()\n\t{\n\t\tadd_options_page( 'BuddyBoss Members', 'BuddyBoss Members', 'manage_options', __FILE__, array( $this, 'options_page' ) );\n\t}", "function adminSpecial() {\n\t\t$this->adminDefault();\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=picture_gallery';\n\t\t$this->setView('admin_list');\n\t}", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "function scs_admin_menu()\n\t{\n\t\t// follow page-options.php\n\t\t$page = add_options_page('Simple Coming Soon and Under Construction', 'Simple Coming Soon', 'manage_options', 'simple_coming_soon', 'scs_manage_options');\n\t\tadd_action( \"admin_print_styles-$page\", 'scs_admin_head' );\n\t}", "public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}", "function page_nav() {\n global $user;\n global $xtpl;\n \n $xtpl->assign('nav_base', trim(simpleid_url(' ', '', true)));\n \n if ($user != NULL) {\n if (isset($user['administrator']) && ($user['administrator'] == 1)) $xtpl->parse('main.nav.nav_admin');\n \n }\n $xtpl->parse('main.nav');\n}", "public function adminMenu()\n {\n add_menu_page( 'Barcode', 'Barcode', 'manage_options', 'wp-barcode', [$this, 'adminPage'] );\n }", "public static function add_page() {\n\t\tadd_submenu_page(\n\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\t'administrator',\n\t\t\tWPEX_THEME_PANEL_SLUG . '-under-construction',\n\t\t\tarray( 'WPEX_Under_Construction', 'create_admin_page' )\n\t\t);\n\t}", "public function admin_menus() {\n\t\t// this is an empty title because we do not want it to display.\n\t\tadd_dashboard_page( '', '', 'manage_options', 'wsal-setup', '' );\n\t\t// hide it via CSS as well so screen readers pass over it.\n\t\tadd_action(\n\t\t\t'admin_head',\n\t\t\tfunction() {\n\t\t\t\t?>\n\t\t\t\t<style>\n\t\t\t\t.wp-submenu a[href=\"wsal-setup\"]{\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<?php\n\t\t\t}\n\t\t);\n\t}", "public function admin_page()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n echo $this->return_admin_page();\n }", "public static function simple_social_meta_create_menu() {\n\t\tadd_options_page( 'Simple Social Meta Settings', 'Simple Social Meta', 'administrator', 'simple_social_meta', __CLASS__ . '::simple_social_meta_settings_page' );\n\n\t\t//call register settings function\n\t\tadd_action( 'admin_init', __CLASS__ . '::register_mysettings' );\n\n\t}", "public function add_admin_menu()\r\n\t{\r\n\t add_menu_page(__('BookingSearch','Booking-search'), __('BookingSearch','Booking-search'), 'manage_options', 'bookingSearch', array($this, 'menu_html'));\r\n\t}", "function linkdoni_admin_actions() {\r\n $icon_url = '';\r\n $position = '';\r\n // Add a new top-level menu (ill-advised):\r\n add_menu_page(__('myLinksDump', 'myLinksDump'), __('myLinksDump', 'myLinksDump'), 'administrator', 'myLinksDump', 'linkdoni_admin_page');\r\n\r\n // Add a submenu to the custom top-level menu:\r\n add_submenu_page('myLinksDump', __('EditLinksDump', 'myLinksDump'), __('EditLinksDump', 'myLinksDump'), 'administrator', 'list_links', 'linkdoni_edit_page');\r\n \r\n // Add a submenu to the custom top-level menu:\r\n add_submenu_page('myLinksDump', __('Settings', 'myLinksDump'), __('Settings', 'myLinksDump'), 'administrator', 'option_page', 'myLinksDump_options');\r\n}", "public function add_page() {\n\t\t\tadd_submenu_page(\n\t\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\t\t__( 'Theme Skins', 'wpex' ),\n\t\t\t\t__( 'Theme Skins', 'wpex' ),\n\t\t\t\t'administrator',\n\t\t\t\tWPEX_THEME_PANEL_SLUG .'-skins',\n\t\t\t\tarray( $this, 'create_admin_page' )\n\t\t\t);\n\t\t}", "function templ_add_mainadmin_menu_()\r\n{\r\n\t$menu_title = __('Tevolution', 'templatic');\r\n\tif (function_exists('add_object_page'))\r\n\t{\r\n\t\t$hook = add_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_system_menu', 'dashboard_bundles', '',25); /* title of new sidebar*/\r\n\t}else{\r\n\t\tadd_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_wp_admin_menu', 'design','');\t\t\r\n\t} \r\n}", "public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}", "public function initAdminNavigation()\n {\n $naviPath = APPLICATION_PATH . '/../modules/mazelab/storage/configs/navigation/admin.ini';\n if (file_exists($naviPath)) {\n $view = Zend_Layout::getMvcInstance()->getView();\n $view->navigation()->getContainer()->findBy('resource', 'dashboard')\n ->addPages(new Zend_Config_Ini($naviPath));\n }\n }", "private function set_admin_menu() {\n $TSB_settings_admin_menu = new Admin_Menu( Initial_Value::TSB_main_settings_page() );\n $this->loader->add_action( 'admin_menu', $TSB_settings_admin_menu, 'add_admin_menu_page' );\n\n// $plugin_name_sample_admin_sub_menu1 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page1() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu1, 'add_admin_sub_menu_page' );\n//\n// $plugin_name_sample_admin_sub_menu2 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page2() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu2, 'add_admin_sub_menu_page' );\n\n }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\n }", "function wooadmin_eshopbox_admin_bar() {\n global $wp_admin_bar;\n //Add a link called 'My Link'...\n $wp_admin_bar->add_menu( array(\n 'id' => 'my-link',\n 'title' => 'My Link',\n 'href' => admin_url()\n ));\n}", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "function my_admin_bar_link() {\n global $wp_admin_bar;\n if ( !is_super_admin() || !is_admin_bar_showing() )\n return;\n $wp_admin_bar->add_menu( array(\n 'id' => 'sharpmachine',\n 'parent' => 'wp-logo',\n 'title' => __( 'Sharp Machine Media'),\n 'href' => 'http://www.sharpmachinemedia.com'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'mailchimp',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Mailchimp'),\n 'href' => 'http://login.mailchimp.com'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'analytics',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Analytics'),\n 'href' => 'http://www.google.com/analytics'\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'mail',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Mail'),\n 'href' => 'http://mail.'. substr(get_bloginfo('url'), 7).''\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'calendar',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Calendar'),\n 'href' => 'http://calendar.'. substr(get_bloginfo('url'), 7).''\n ) );\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'docs',\n 'parent' => 'wp-logo-external',\n 'title' => __( 'Docs'),\n 'href' => 'http://docs.'. substr(get_bloginfo('url'), 7).''\n ) );\n}", "function add_menu() {\n\tadd_menu_page(\n\t\t__( 'Google Drive Documents Settings', 'skaut-google-drive-documents' ),\n\t\t__( 'Google Drive Documents', 'skaut-google-drive-documents' ),\n\t\t'manage_options',\n\t\t'sgdd_basic',\n\t\t'\\\\Sgdd\\\\Admin\\\\SettingsPages\\\\Basic\\\\display',\n\t\tplugins_url( trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) . '/icon.png' )\n\t);\n}", "public function add_page() {\n\t\tadd_submenu_page(\n\t\t\t'oceanwp-panel',\n\t\t\tesc_html__( 'Rec. Plugins', 'ocean-extra' ),\n\t\t\tesc_html__( 'Rec. Plugins', 'ocean-extra' ),\n\t\t\t'manage_options',\n\t\t\t'oceanwp-panel-rec-plugins',\n\t\t\tarray( $this, 'create_admin_page' )\n\t\t);\n\t}", "public static function add_admin_menus()\n\t{\n\t}", "function admin_menu() {\n\t\t\n\t\t// Bail early if ACF is hidden.\n\t\tif( !acf_get_setting('show_admin') ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Vars.\n\t\t$slug = 'edit.php?post_type=acf-field-group';\n\t\t$cap = acf_get_setting('capability');\n\t\t\n\t\t// Add menu items.\n\t\tadd_menu_page( __(\"Custom Fields\",'acf'), __(\"Custom Fields\",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', '80.025' );\n\t\tadd_submenu_page( $slug, __('Field Groups','acf'), __('Field Groups','acf'), $cap, $slug );\n\t\tadd_submenu_page( $slug, __('Add New','acf'), __('Add New','acf'), $cap, 'post-new.php?post_type=acf-field-group' );\n\t\t\n\t\t// Only register info page when needed.\n\t\tif( isset($_GET['page']) && $_GET['page'] === 'acf-settings-info' ) {\n\t\t\tadd_submenu_page( $slug, __('Info','acf'), __('Info','acf'), $cap,'acf-settings-info', array($this,'info_page_html') );\n\t\t}\n\t}", "public function admin_page_init () {\n add_menu_page( __( 'Users List', 'ct-admin-list' ), __( 'Users list', 'ct-admin-list' ), 'list_users', 'ct-users-list', [ $this, 'list_page_content' ] );\n }", "function spreadshop_admin_menu_entry($content) \n\t{\n add_menu_page(\"Spreadshop Admin\", \"Spreadshop\", 1, \"Spreadshop_Admin\", \"spreadshop_admin\"); \n\t}", "public function addMenu(){\n\t\tadd_menu_page(\n\t\t\t$this->plugin->name,\n\t\t\t$this->plugin->name,\n\t\t\t'publish_pages',\n\t\t\t$this->plugin->varName,\n\t\t\tarray($this, 'page'),\n\t\t\t$this->plugin->uri . 'assets/images/icn-menu.png'\n\t\t);\n\t}", "public function acfedu_add_admin_pages() {\n\t\t\t\tadd_options_page( 'ACF Faculty Selector', 'Faculty Selector', 'manage_options', 'acfedu-options', 'acfedu_options' );\n\t\t\t\tadd_submenu_page( null, 'Settings', 'Settings', 'manage_options', 'acfedu-settings', 'acfedu_settings' );\n\t\t\t\tadd_submenu_page( null, 'Pro', 'Pro', 'manage_options', 'acfedu-pro', 'acfedu_pro' );\n\t\t\t}", "function scoreSystemManager_add_pages() {\r\n // Add a new top-level menu (ill-advised):\r\n add_menu_page('Score System', 'Score System', 'edit_pages', 'scoreSystemManager-dashboard', 'scoreSystemManager_dashboard');\r\n}", "function classicpress_register_admin_page() {\n\tadd_management_page(\n\t\t__( 'Switch to ClassicPress', 'switch-to-classicpress' ),\n\t\t__( 'Switch to ClassicPress', 'switch-to-classicpress' ),\n\t\t'read',\n\t\t'switch-to-classicpress',\n\t\t'classicpress_show_admin_page'\n\t);\n}", "function admin_index()\n\t{\n\t\t$this->pageTitle = 'Admin Navigation - ' . $this->Session->read('Auth.User.id');\n\t\t$this->set('pageName', $this->Session->read('Auth.User.id') . ' - Admin Navigation');\n\n\t\tif($this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$conditions = array();\n\n\t\t\t$parent_id = null;\n\t\t\tif(isset($this->params['form']['node']) && !preg_match('/xnode-/', $this->params['form']['node']))\n\t\t\t{\n\t\t\t\t$parent_id = $this->params['form']['node'];\n\t\t\t\t\n\t\t\t\t$parent = $this->Navigation->find('first', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'Navigation.id' => $parent_id,\n\t\t\t\t\t),\n\t\t\t\t\t'recursive' => -1,\n\t\t\t\t));\n\t\t\t\tif(empty($parent))\n\t\t\t\t{\n\t\t\t\t\t$this->cakeError('invalid_field', array('field' => 'Parent ID'));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'Navigation.lft >' => $parent['Navigation']['lft'],\n\t\t\t\t\t'Navigation.rght <' => $parent['Navigation']['rght'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$navigation = $this->Navigation->find('threaded', array(\n\t\t\t\t'conditions' => $conditions,\n\t\t\t\t'order' => 'Navigation.lft',\n\t\t\t\t'recursive' => 1,\n\t\t\t));\n\t\t\ttry {\n\t\t\t\t$nodes = $this->Navigation->toNodes($navigation);\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$this->cakeError('internal_error', array('action' => 'Convert', 'resource' => 'Navigation Entry'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->set('nodes', $nodes);\n\t\t}\n\t}", "function admin_menu() {\r\n global $wp_version;\r\n $pages[] = add_submenu_page('edit-pages.php', \"Custom Page Extensions Options\", \"Page Extension\", 'manage_options', $this->menuName, array(&$this, \"options_panel\"));\r\n $pages[] = add_options_page($this->pluginName . __(' Settings', 'custom-page-extensions'), $this->pluginName, 'manage_options', $this->menuName, array(&$this, 'options_panel'));\r\n\r\n foreach ( $pages as $page ) {\r\n add_action('admin_print_styles-' . $page, array(&$this, 'admin_print_styles'));\r\n add_action('admin_print_scripts-' . $page, array(&$this, 'admin_print_scripts'));\r\n }\r\n }", "public function admin_menu() { \r\n\t\tadd_options_page( 'MF Timeline Settings', 'MF-Timeline', 'manage_options', 'mf-timeline', array( &$this, 'get_plugin_options_page' ) );\r\n\t}", "function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}", "public function load_admin_page()\n {\n include 'admin-page.html';\n }", "function aman_add_admin_page() {\n\t//Add admin page menu\n\tadd_menu_page('Theme Settings', 'Theme Settings', 'manage_options', 'aman_settings_page', 'aman_create_page');\n\tadd_submenu_page( 'aman_settings_page', 'Theme Settings', 'General', 'manage_options', 'aman_settings_page', 'aman_create_page' );\n\n\tadd_submenu_page( 'aman_settings_page', 'Social Links', 'Social', 'manage_options', 'social_settings_page', 'social_create_page' );\n\n\tadd_submenu_page( 'aman_settings_page', 'Content Settings', 'Content', 'manage_options', 'content_settings_page', 'content_settings_create_page' );\n\n\n}", "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n }", "public function admin_menu() \n\t{\n\t\tadd_options_page('Generuoti laiškus', 'Generuoti laiškus', 'manage_options', 'kd-letters', array($this, 'admin_menu_options'));\n\t}", "function add_page() {\n\t\tif ( current_user_can ( 'manage_options' ) ) {\n\t\t\t$this->options_page_hookname = add_plugins_page ( __( 'GitHub Updates', 'github_plugin_updater' ), __( 'GitHub Updates', 'github_plugin_updater' ), 'manage_options', 'github-updater', array( $this, 'admin_page' ) );\n\t\t\tadd_filter( \"network_admin_plugin_action_links_{$this->plugin_basename}\", array( $this, 'filter_plugin_actions' ) );\n\t\t\tadd_filter( \"plugin_action_links_{$this->plugin_basename}\", array( $this, 'filter_plugin_actions' ) );\n\t\t}\n\t}" ]
[ "0.7416629", "0.7328767", "0.7320969", "0.72271425", "0.7220139", "0.7159752", "0.7139072", "0.70771307", "0.7076977", "0.7066402", "0.7041394", "0.70371985", "0.70371985", "0.70208603", "0.70103854", "0.6998375", "0.6962196", "0.6946797", "0.69406754", "0.69116986", "0.6905811", "0.69021463", "0.68833965", "0.68494576", "0.6829982", "0.6826607", "0.6805476", "0.6792921", "0.6788264", "0.6786856", "0.6785698", "0.6780273", "0.67776716", "0.6773669", "0.6763016", "0.67529607", "0.6733538", "0.6731701", "0.67308915", "0.6729001", "0.67184937", "0.6712986", "0.6706627", "0.67007756", "0.66880345", "0.6661671", "0.6649683", "0.6645262", "0.66418403", "0.66266274", "0.6623562", "0.66153467", "0.6609627", "0.66091144", "0.6605874", "0.6605874", "0.6605874", "0.6597245", "0.658457", "0.65776855", "0.65768427", "0.6575259", "0.6571579", "0.6567444", "0.65600175", "0.6552014", "0.654881", "0.6542045", "0.65396726", "0.65309393", "0.6513787", "0.65092206", "0.64919865", "0.6491132", "0.648885", "0.6488134", "0.64871675", "0.6485379", "0.64803386", "0.648003", "0.6479074", "0.6476985", "0.6469929", "0.64696056", "0.64690596", "0.64642227", "0.6463587", "0.6462528", "0.6461371", "0.6459919", "0.645679", "0.6450279", "0.64465165", "0.6442302", "0.6437313", "0.6436811", "0.64353013", "0.643502", "0.6432366", "0.64317995", "0.6431504" ]
0.0
-1
Get the portion of request class
public function getRequest($request) { $id = $request->get('estate_type_id'); return array_merge($request->all(), [ 'spec_id' => $id ? (EstateType::find($id)->spec->id ?? null) : null, 'coordinates' => ($request->get('lat') && $request->get('lng')) ? new Point($request->get('lat'), $request->get('lng')) : null, 'is_active' => auth()->user()->can('active-estate'), 'reject_reason' => null ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetRequestClass ();", "public static function requestClass(): string;", "abstract protected function requestClass(): string;", "protected function getRequestHandler() : string\n {\n return Request::class;\n }", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}", "public static function getRequestDetailsClass(): string\n {\n return config('laravel-server-analytics.request_details_class');\n }", "public function GetResponseClass ();", "protected function _request() {\n\t\treturn $this->_container->request;\n\t}", "public function getCurrentResource() {\n\t\treturn $this->request->get('class','Undefined');\n\t}", "public function getClassName(){return \"Core.Http.ApiRequest\";}", "public function getClass() {\n \treturn $this->_class;\n }", "function getClass(){\n\t\treturn $this->_class;\n\t}", "public function getClass()\n {\n \treturn $this->class;\n }", "public function getRequest()\n\t{\n\t\treturn $this->compose('Request', 'Http\\Requests');\n\t}", "public function GetRouteClass ();", "public function request()\r\n {\r\n return $this->request;\r\n }", "public function getResponseClass();", "public function getClass() {}", "public function getClass() {}", "public function getClass() {}", "public function getClass()\n {\n return $this->class;\n }", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function request()\n {\n return $this->request;\n }", "public function request()\n {\n return $this->request;\n }", "public function getClass() {\n return $this->class;\n }", "protected function getClass()\n {\n return __CLASS__;\n }", "public function request()\n\t{\n\t\treturn $this->request;\n\t}", "final public static function getClass(){\n return get_called_class();\n }", "public function getDeclaringClass() {}", "public function getDeclaringClass() {}", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass() {\r\n\t\treturn $this->class;\r\n\t}", "public function getClass()\t{\n\t\treturn $this->class;\n\t}", "public function model()\n {\n return Request::class;\n }", "private static function getMethodRequest(){\n return $_SERVER[\"REQUEST_METHOD\"];\n }", "protected function getRequest()\n {\n return app(Request::class);\n }", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function getClass();", "public function request() {\n return $this->requestStack->getCurrentRequest();\n }", "public function GetControllerClass ();", "function getClass();", "public static function getHandlerClass(): string;", "public function & GetRequest ();", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}", "protected function getClassField() {}", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getRequest()\n {\n return $this->data->request;\n }", "function getRequestType() {\n\t\treturn $this->sapiType;\n\t}", "public function get_class()\n {\n return $this->class;\n }", "public function getHttpPartInstance()\n {\n return $this->getRequest()->getHttpPartInstance();\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getClass() {\n\t\t$classPath = explode('\\\\', get_class());\n\t\treturn end($classPath);\n\t}", "public function getClass() {\n\t\t$classPath = explode('\\\\', get_class());\n\t\treturn end($classPath);\n\t}", "public function getClass()\n {\n return $this->method->getClass();\n }", "public function getInfo() \n {\n return $this->requestInfo;\n }", "public function GetViewClass ();", "public function getClass(): string\n {\n return $this->class;\n }", "public function getRequest() {\n return $this->request;\n }", "public function getRequest() {\n return $this->_request;\n }" ]
[ "0.8087207", "0.78197545", "0.7456875", "0.6753483", "0.6633948", "0.6418588", "0.62349695", "0.6177126", "0.6165012", "0.61617404", "0.6094762", "0.60651326", "0.5973856", "0.59608364", "0.59594786", "0.59552324", "0.59426355", "0.59371847", "0.59371847", "0.59371644", "0.5912874", "0.5903637", "0.5903637", "0.58929116", "0.58929116", "0.58898646", "0.5886722", "0.5872743", "0.5856828", "0.58547795", "0.58547795", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.58526605", "0.5841", "0.58345497", "0.58325154", "0.58007026", "0.5799499", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.579762", "0.57619226", "0.5756554", "0.5751342", "0.57454157", "0.5729386", "0.5724781", "0.5724781", "0.57097656", "0.57097656", "0.5681134", "0.5667428", "0.5667428", "0.5667428", "0.5667428", "0.5667428", "0.5667428", "0.5662117", "0.5652929", "0.564967", "0.5648533", "0.56381536", "0.56381536", "0.56381536", "0.56381536", "0.5628869", "0.5628869", "0.56229514", "0.5610967", "0.55966604", "0.5581471", "0.5576992", "0.5568336" ]
0.0
-1
Check the request to it'has image or not, then create a data with appropirate method
public function storeData($request) { if (!auth()->user()->can('create-estate')) { if (auth()->user()->remaining_registered_count > 0 && (!auth()->user()->validity_end_at || !auth()->user()->validity_end_at->isPast())) auth()->user()->decrement('remaining_registered_count'); else { die(json_encode([ 'status' => 400, 'true' => 'متاسفانه اعتبار شما برای ثبت ملک کافی نیست', ])); } } $estate = $this->createNewModel( array_merge($this->getRequest($request), [ 'role_id' => auth()->user()->roles()->first()->id ?? null, 'office_id' => auth()->user()->workplace->id ?? null, ]) ); if ($request->get('photos')) { foreach ($request->get('photos') as $item) $estate->addMedia($item)->toMediaCollection('photos'); } auth()->user()->increment('registered_estate_count'); return $estate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index_post()\n\n\t\t{\n $input = file_get_contents(\"php://input\");\n $json = decoder($input);\n $name = $json->name;\n $email = $json->email;\n $id=$json->id;\n $phone_number=$json->phone_number;\n $country_code=$json->country_code;\n $isNumNotExits=false;\n $isEmailNotExits=false;\n $isimage=false;\n\n if(!empty($json->image))\n {\n $isimage=true;\n }\n\n // To check if the ID is empty or the length is less then 24...name:sasi,date:13/08/2019\n \n if(empty($id)||strlen($id)<24)\n {\n $res = array(\n \"status\" => 0,\n \"message\" =>\"Illegal Access\"\n );\n $encoded = encoder($res);\n $this->response($encoded); }\n else\n {\n//-------------------------------------------------------------------------------------------------------------\n // Image Upload........ name:sasi , date:12/08/2019\n\n if($isimage)\n {\n if (!empty($input)) \n {\n // $object = json_decode($input);\n if ($json->image != \"\") \n {\n $path = \"./uploads/images/\";\n $img = $json->image;\n $img = str_replace('data:image/*;base64,', '', $img);\n $img = str_replace(' ', '+', $img);\n $data = base64_decode($img);\n $image_name = $json->id;\n $filename = $image_name . '.png';\n $get_image_names = scandir(\"./uploads/images/\", 1);\n $check_image = array_map(function ($e) {\n return pathinfo($e, PATHINFO_FILENAME);\n }, $get_image_names);\n\n if (in_array($image_name, $check_image)) {\n $file_pattern = \"./uploads/images/$image_name.*\";\n array_map(\"unlink\", glob($file_pattern));\n file_put_contents($path . $filename, $data);\n $message = \"profile image updated\";\n } else {\n file_put_contents($path . $filename, $data);\n $message = \"profile image uploaded\";\n }\n $data = array(\n 'id' => $json->id,\n 'image_path' => $filename\n );\n $this->Update_model->image_path($data);\n }\n }\n }\n//-------------------------------------------------------------------------------------------------------------\n\n\n //TO make a data as a array format for easy handling.. name:sasi, date :12/8/2019\n\n $data = array(\"name\" => $name,\"email\" => $email, \"phone_number\" => $phone_number, \n \t\t\t \"country_code\" => $country_code);\n\n $this->form_validation->set_data($data);\n $this->form_validation->set_rules($this->validate);\n\n\n //Form validation... name:sasi, date :12/8/2019\n \n if ($this->form_validation->run() == false) \n {\n \t$error = $this->form_validation->error_array();\n $res = array(\n \"status\" => 0,\n \"message\" => $error\n );\n $encoded = encoder($res);\n $this->response($encoded);\n }\n else\n {\n\n //To Check if the mail and number are unique....name:sasi,date:12/08/2019\n\n $oldData=$this->Update_model->userDetails($id);\n\n\n if($oldData[0]->email==$email)\n {\n $isEmailNotExits=true;\n }\n else\n {\n $emailExits = $this->Registration_model->emailExits($data);\n\n // to check if the Email is already exists\n\n if(!empty($emailExits[0]->email)&&$emailExits[0]->email==$email)\n {\n $res = array(\n \"status\" => 3,\n \"message\" => \"The Email is Already Exits Use Anathor Email\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n return false;\n }\n else\n {\n $isEmailNotExits=true;\n }\n }\n\n if($oldData[0]->phone_number==$phone_number)\n {\n $isNumNotExits=true;\n }\n else\n {\n $numberExits = $this->Update_model->numberExits($data);\n\n // to check if the phone number is already exists\n\n if($numberExits)\n {\n $res = array(\n \"status\" => 4,\n \"message\" => \"The Phone Number is Already Exists Please Use Anathor Number\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n return false;\n }\n else\n {\n $isNumNotExits=true;\n }\n }\n\n //update user details...name:sasi date:12/8/2019\n\n if($isNumNotExits&&$isEmailNotExits)\n {\n $update=$this->Update_model->user_update($id,$data);\n if($update)\n {\n $responceData = $this->Update_model->userDetails($id);\n $responceData=image_url($responceData);\n\n //if phone number change...name:sasi date:12/8/2019\n\n if($responceData[0]->phone_number!=$phone_number)\n {\n $otp = generateNumericOTP();\n $this->Api_model->newPhoneVerify($id,$otp);\n $detail = $this->Api_model->getDetails($id);\n $res = array(\n \"status\" => 5,\n \"details\"=> $detail[0],\n \"message\" => \"Your Phone Number is Changed So You Have Verify Your OTP\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n }\n else\n {\n $res = array(\n \"status\" => 1,\n \"details\" =>$responceData[0],\n \"message\" => \"successfully updated\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n } \n }\n }\n else\n {\n $res = array(\n \"status\" => 0,\n \"message\" => \"user details cannot be update\"\n );\n $encoded = encoder($res);\n $this->response($encoded); \n }\n \t}\n }\n\t }", "public function savenormalimageAction()\n {\n $response = $this->getResponse();\n $data = $this->params()->fromPost();\n\n $dm = $this->getDocumentService();\n $userid = $data['userid'];\n if(substr($data['imageType'],-4, 1) == \".\")\n {\n $imageType = substr($data['imageType'], -3,3);\n }\n else\n {\n $imageType = substr($data['imageType'], -4,4);\n }\n $createdTime = $data['createdTime'];\n $descript = $data['descript'];\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageNormal($userid,$createdTime, $descript, $imageType, $dm);\n\n if($result!=null)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => $result,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n\n\n }", "public function details_post()\n{\n\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $msg = \"\";\n if(isset($data['id']))\n {\n $id = $data['id'];\n }\n $company_name = $data['company_name'];\n $lat = $data['lat'];\n $long = $data['long'];\n $gst_no = $data['gst_no'];\n $punch_line = $data['punch_line'];\n //$company_id = $data['company_id'];\n\n $insert_data = array(\n 'company_name' => $company_name,\n 'lat' => $lat,\n 'long' => $long,\n 'gst_no' => $gst_no,\n 'punch_line' => $punch_line,\n //'company_id' => $company_id,\n 'created_at' => date('Y-m-d H:i:s')\n );\n\n\n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['logo']; \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n \n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $insert_data['logo'] = $image;\n\n // $id = $this->model->getAllwhere('details','','id');\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n\n else{\n if(empty($img) || !empty($img)){\n $result = $this->model->insertData('details', $insert_data);\n $msg = \"Detail insert successfully\";\n }\n }\n }\n else{\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n }\n\n$resp = array('rccode' => 200,'message' =>$msg);\n$this->response($resp);\n}", "public function upload(Request $request){\n\n\n $rules = array(\n 'image' => 'required|mimes:jpeg,jpg,png,gif|max:2048'\n );\n\n $validator = Validator::make($request->only('image'), $rules);\n\n if ($validator->fails()){\n return $this->returnError($validator->errors()->first());\n }\n\n //PREPARE API CALL\n //CONVERT TO BASE64\n //MAKE CALL\n //CONFIRM RESPONSE\n //RETRIEVE RESPONSE URL\n //\n //IN CASE OF ERROR RETURN ERROR MESSAGE\n try {\n\n $client = new \\GuzzleHttp\\Client();\n $image = base64_encode(file_get_contents($request->file('image')->path()));\n\n //send request\n $response = $client->post(\"https://test.rxflodev.com\",[\n 'form_params' => [\n 'imageData' => $image\n ]\n ]);\n\n //formate response\n $resp = json_decode($response->getBody()->getContents(),true);\n\n //Check if the response has an error\n if(Arr::get($resp,'status') == 'error' && Arr::has($resp,'message')){\n return $this->returnError(Arr::get($resp,'message'));\n }\n\n //Confirm the response as expected\n if(Arr::get($resp,'status') == 'success' && Arr::has($resp,'url')){\n\n return response()->json([\n 'status' => 'success',\n 'data' => [\n 'image' => Arr::get($resp,'url')\n ]\n ]);\n\n } else {\n return $this->returnError('Unexpected Response');\n }\n\n } catch (Exception | ServerException | ConnectException $e ) {\n return $this->returnError($e->getMessage());\n }\n }", "public function test_api_create(){\n // $image_b64_i = file_get_contents(\"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png\");\n // $image_b64 = ('data:image;base64,' . $image_b64_i);\n $r = $this->ajaxRequest('POST', 'product/api_create/', [\n 'name' => \"PRODUCT NAME\",\n 'price' => 101,\n 'desc' => \"Check string\",\n // 'image' => $image_b64_i\n ]);\n // check return json key\n $ajax_return = json_decode($r, TRUE);\n $this->assertArrayHasKey('isError', $ajax_return);\n $this->assertArrayHasKey('msg', $ajax_return);\n }", "private function addData()\n {\n $data=new Image();\n $file =Input::file('gallery');\n $image_name=time().\"-gallery-\".$file->getClientOriginalName();\n $file->move(public_path().'/upload',$image_name);\n $data->image=$image_name;\n $data->save();\n return true;\n }", "public function add(){\n $uploaded_image = Input::file('image_file_actual');\n $allowedTypes = array(\"image/jpeg\", \"image/png\", \"image/jpg\");\n \n \tif( !Input::hasFile('image_file_actual') ){\n return $this->jsonResponse(\"error\", \"No image provided\", Input::get('callback'));\n \t}\n if( !in_array($uploaded_image->getMimeType(),$allowedTypes) ){\n return $this->jsonResponse(\"error\", \"Uploaded invalided file type\", Input::get('callback'));\n }\n \t\n $image = new Image;\n $image->user_id = isset(Auth::user()->id) ? Auth::user()->id : \"guest\";\n $image->id = strtoupper(str_random(\"5\"));\n\twhile( isset(Image::find($image->id)->file) ){\n\t\t$image->id = strtoupper(str_random(\"5\"));\n\t}\n $imageName = $image->id . \".\" . $uploaded_image->getClientOriginalExtension();\t\n\t$image->file = URL::asset('images/'.$imageName);\n $image->rating = 0;\n $image->raters_count = 0;\n \n if(!$image->save()){\n return $this->jsonResponse(\"error\", \"Cannot add image\", Input::get('callback'), $image->errors());\n }\n \t\n $uploaded_image->move(public_path('images'), $imageName);\n \n if(!empty(Auth::user()->id)){\n $user = User::find(Auth::user()->id);\n $user->uploaded_count = $user->uploaded_count + 1;\n $user::$rules['password'] = '';\n if(!$user->updateUniques()){\n return $this->jsonResponse(\"error\", \"Unable to increase upload_count of user\", Input::get('callback'), $user->errors());\n }\n }\n \n return $this->jsonResponse(\"ok\", \"Succesfully added image\", Input::get('callback'), $image);\n }", "public function image_upload_post()\n {\n \n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n $required_parameter = array('product_id','product_image');\n $chk_error = $this->controller->check_required_value($required_parameter, $data);\n if ($chk_error) \n {\n $resp = array('code' => 'MISSING_PARAM', 'message' => 'Missing ' . strtoupper($chk_error['param']));\n @$this->response($resp);\n }\n $product_id = $data['product_id'];\n //$image = $data['product_image'];\n \n $product_image = array(); \n if(!empty($product_id)){\n $p_img = $this->model->getAllwhere('product',array('id'=> $product_id),'product_image');\n \n if(!empty($p_img)){\n $product_image = @unserialize($p_img[0]->product_image);\n }\n }\n\n \n \n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['product_image']; \n \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n $msg = '';\n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $product_image[] = $image;\n //$data['product_image'] = serialize($image);\n $insert_data = array('product_image' => serialize($product_image));\n \n }\n$where = array('id'=> $product_id);\n $result = $this->model->updateFields('product', $insert_data, $where);\n $resp = array('rccode' => 200,'message' =>\"image upload succesfully\");\n $this->response($resp);\n}", "public function setProfileImageAction( $header_data, $post_data ){ \n if( empty($post_data['image']) && empty($_FILES[\"images\"]) ) {\n Library::logging('alert',\"API : setProfileImage : \".ERROR_INPUT.\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_INPUT, null);\n } else {\n try {\n if( !empty($_FILES[\"images\"]['name']) && !empty($_FILES[\"images\"]['tmp_name']) && empty($_FILES[\"images\"]['error']) ){\n $imgName = rand().$_FILES[\"images\"]['name'];\n $uploadFile= $_FILES[\"images\"]['tmp_name'];\n \n }elseif( !empty($post_data['image']) ){\n $uploadFile = $post_data['image'];\n $img = explode(\"/\", $uploadFile);\n $imgName = end($img);\n }else{\n Library::logging('alert',\"API : setProfileImage : \".ERROR_INPUT.\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_INPUT, null);\n }\n \n $amazon = new AmazonsController();\n $amazonSign = $amazon->createsignatureAction($header_data,10);\n $url = $amazonSign['form_action'];\n $headers = array(\"Content-Type:multipart/form-data\"); // cURL headers for file uploading\n $ext = explode(\".\", $imgName);\n $extension = trim(end($ext));\n if( !in_array($extension, array(\"jpeg\", \"png\", \"gif\"))){\n $extension = \"jpeg\";\n }\n $postfields = array(\n \"key\" => \"profiles/\".$imgName,//$amazonSign[\"key\"],\n \"AWSAccessKeyId\" => $amazonSign[\"AWSAccessKeyId\"],\n \"acl\" => $amazonSign[\"acl\"],\n \"success_action_redirect\" => $amazonSign[\"success_action_redirect\"],\n \"policy\" => $amazonSign[\"policy\"],\n \"signature\" => $amazonSign[\"signature\"],\n \"Content-Type\" => \"image/$extension\",\n \"file\" => file_get_contents($uploadFile)\n );\n $ch = curl_init();\n $options = array(\n CURLOPT_URL => $url,\n //CURLOPT_HEADER => true,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => $postfields,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true\n ); // cURL options\n curl_setopt_array($ch, $options);\n $imageName = curl_exec($ch);\n $result['image'] = FORM_ACTION.$imageName;\n curl_close($ch);\n if(is_string ( $imageName )){\n $user = Users::findById($header_data['id']);\n $user->profile_image = $imageName;\n if ($user->save() == false) {\n foreach ($user->getMessages() as $message) {\n $errors[] = $message->getMessage();\n }\n Library::logging('error',\"API : setProfileImage amazon controller : \".$errors.\" : user_id : \".$header_data['id']);\n Library::output(false, '0', $errors, null);\n } else {\n Library::output(true, '1', USER_PROFILE_IMAGE, $result );\n }\n }else{\n Library::logging('error',\"API : setProfileImage : \".ERROR_REQUEST.\" \".\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n }\n \n } catch (Exception $e) {\n Library::logging('error',\"API : setProfileImage : \".$e.\" \".\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n } \n }\n }", "public function saveimageAction()\n {\n $response = $this->getResponse();\n\n $userid= $this->params()->fromPost('userid');\n $createdTime= $this->params()->fromPost('createdtime');\n $imageType = $this->params()->fromPost('imagetype');\n $imageType = substr($imageType, -3, 3);\n $AVAorCOV = $this->params()->fromPost('albumtype');\n\n $documentService = $this->getDocumentService();\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageAvatar($userid, $createdTime,$documentService, $imageType, $AVAorCOV );\n\n if($result)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 1,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n }", "public function upload_image()\n {\n $obj = json_decode(file_get_contents(\"php://input\"));\n //$obj->file;\n return ;\n // var_dump(request()->get('file'));\n $retjson['errno'] = 0;\n $file = request()->file(\"file\");\n if ($file)\n {\n $info = $file->move(ROOT_PATH . 'public' . DS .\"uploads/mail_img\");\n if ($info)\n {\n $imgurl = Request::domain(). DS . 'public' . DS . 'uploads/mail_img' . DS . $info->getSaveName();\n $retjson['errno'] = 0;\n $retjson['data']['url'] = $imgurl;\n }\n else\n {\n $retjson['errno'] = 3000;\n $retjson['errmsg'] = $file->getError();\n }\n }\n return json($retjson);\n }", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "public function image()\n {\n header('Content-Type:', 'image/jpeg');\n // checks Image for UPLOAD\n $image = $_FILES['image']['name'];\n $tempImage = $_FILES['image']['tmp_name'];\n \n if(!empty($image))\n {\n // $img_size = $_FILES['image']['size'];\n $upload = move_uploaded_file($tempImage,'uploads/images/'.$image);\n \n // prepare array of user data\n $dataImage = array\n (\n 'complaint_type_id' => $this->input->post('complaint_type_id'),\n 'signup_id' => $this->input->post('signup_id'),\n 'complaints_status_id'=> 2,\n 'latitude' => $this->input->post('latitude'),\n 'longitude' => $this->input->post('longitude'),\n 'description' => $this->input->post('description'),\n 'image' => $image,\n 'dated' => date('Y-m-d')\n );\n //print_r($dataImage);die;\n $insert = $this->Complaintsmodel->InsertDB($dataImage);\n $lastId = $this->db->insert_id();\n if($insert)\n {\n $Response = array('message' => 'Complaint is done!', 'status' => true, 'data'=>$lastId); \n echo json_encode($Response);\n }\n else\n {\n $Response = array('message' => 'Sorry, Try again!', 'status' => false);\n echo json_encode($Response);\n }\n }\n else\n {\n //$image = '';\n $Response = array('message' => 'Choose an image to upload', 'status' => false);\n echo json_encode($Response);\n } \n }", "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "public function dataImageShowAction(Request $request)\n {\n $post = $request->request;\n $donneesSaisie = null;\n\n $height = $post->get('height');\n\n $height = floatval($height) - 40;\n $imageId = Boost::deboost($post->get('imageId'),$this);\n if (is_bool($imageId)) return new Response('security');\n\n $image = $this->getDoctrine()->getRepository('AppBundle:Image')->createQueryBuilder('im')\n ->where('im.id = :id')\n ->setParameter('id', $imageId)\n ->getQuery()\n ->getOneOrNullResult();\n\n if($image == null) return new Response('Image introuvable');\n\n\n//PICDATA\n\n $chemin = $_SERVER['DOCUMENT_ROOT'].'/IMAGES/' . $image->getLot()\n ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n\n//LOCAL\n// $chemin = $_SERVER['DOCUMENT_ROOT'].'/picdata/web/IMAGES/' . $image->getLot()\n// ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n\n//192.168.0.5\n// $chemin = $_SERVER['DOCUMENT_ROOT'].'/newpicdata/web/IMAGES/' . $image->getLot()\n// ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n\n $fileExist = file_exists($chemin);\n\n if($fileExist == true){\n\n//PICDATA\n $chemin = '/IMAGES/' . $image->getLot()\n ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n\n//LOCAL\n// $chemin = '/picdata/web/IMAGES/' . $image->getLot()\n// ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n\n//192.168.0.5\n// $chemin = '/newpicdata/web/IMAGES/' . $image->getLot()\n// ->getDossier()->getSite()->getClient()->getId() . '/' . $image->getNom() . '.' . $image->getExtImage();\n }\n\n else {\n $chemin = 'http://picdata.fr/picdataovh/' . 'images/' .\n $image->getLot()->getDossier()->getSite()->getClient()->getNom() . '/' .\n $image->getLot()->getDossier()->getNom() . '/' .\n $image->getExercice() . '/' .\n $image->getLot()->getDateScan()->format('Y-m-d') . '/' .\n $image->getLot()->getLot() . '/' .\n $image->getNom() . '.' . $image->getExtImage();\n }\n\n\n /*$chemin = 'http://picdata.fr/picdataovh/' . 'images/' .\n $image->getLot()->getDossier()->getSite()->getClient()->getNom() . '/' .\n $image->getLot()->getDossier()->getNom() . '/' .\n $image->getExercice() . '/' .\n $image->getLot()->getDateScan()->format('Y-m-d') . '/' .\n $image->getLot()->getLot() . '/' .\n $image->getNom() . '.' . $image->getExtImage();*/\n\n\n $embed = '<embed src=\"' . $chemin . '\" width=\"100%\" height=\"100%\" class=\"js_embed\" />';\n\n $infos = $this->getDoctrine()\n ->getRepository('AppBundle:Image')\n ->getInfosImageByImageId($image->getId());\n\n $infosSep = $this->getDoctrine()\n ->getRepository('AppBundle:Separation')\n ->getListeImageSeparationByClientIdImage($image->getId());\n\n if($infosSep != null){\n /** @var $infoSep Separation*/\n $infosSep = $infosSep[0];\n }\n\n /** @var $dossier Dossier*/\n $dossier = $image->getLot()->getDossier();\n\n\n if ($infos != null) {\n $etape = $infos[0]['tableSaisie'];\n }\n\n else{\n\n if($infosSep != null) {\n\n $etape = 'Catégorisée';\n }\n else{\n $etape = 'Reçue';\n }\n }\n\n $tvaSaisie = null;\n\n switch ($etape) {\n case 'Saisie 1':\n /**@var $donneesSaisie Saisie1 */\n $donneesSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:Saisie1')\n ->findOneByImage($imageId);\n\n $etape = 'Saisie';\n\n break;\n\n case 'Saisie 2':\n /**@var $donneesSaisie Saisie2 */\n $donneesSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:Saisie2')\n ->findOneByImage($imageId);\n\n $etape = 'Saisie';\n\n break;\n\n case 'Controle Saisie':\n /**@var $donneesSaisie \\AppBundle\\Entity\\SaisieControle */\n $donneesSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:SaisieControle')\n ->findOneByImage($imageId);\n\n $etape = 'Saisie';\n\n break;\n\n case 'Imputation':\n /** @var $donneesSaisie Imputation */\n $donneesSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:Imputation')\n ->findOneByImage($imageId);\n\n /** @var $tvaSaisie TvaImputation */\n $tvaSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:TvaImputation')\n ->findByImage($imageId);\n\n $etape = 'Imputée';\n\n break;\n\n case 'Controle Imputation':\n /** @var $donneesSaisie ImputationControle */\n $donneesSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:ImputationControle')\n ->findOneByImage($imageId);\n\n /** @var $tvaSaisie TvaImputation */\n $tvaSaisie = $this->getDoctrine()\n ->getRepository('AppBundle:TvaImputationControle')\n ->findByImage($imageId);\n\n $etape = 'Imputée';\n\n break;\n\n }\n\n $image = $this->getDoctrine()\n ->getRepository('AppBundle:Image')\n ->find($imageId);\n\n\n return $this->render('ConsultationPieceBundle:Default:dataImage.html.twig', array(\n 'img' => $image,\n 'etape' => $etape,\n 'saisie' => $donneesSaisie,\n 'tvaSaisie' => $tvaSaisie,\n 'dossier' => $dossier,\n 'embed' => $embed,\n 'height' => $height,\n 'separation' => $infosSep\n ));\n }", "private function _imgSave(){\r\n\r\n\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n $url = strtok($_POST['url'], '?');\r\n\r\n $sourcePath = ROOT.'/site/files/_tmp/'.basename($url);\r\n $img = getimagesize($sourcePath);\r\n $new_name = uniqid();\r\n\r\n switch($img['mime']){\r\n case 'image/png':\r\n $new_name .= '.png';\r\n break;\r\n case 'image/jpeg':\r\n $new_name .= '.jpg';\r\n break;\r\n case 'image/gif':\r\n $new_name .= '.gif';\r\n break;\r\n default:\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n }\r\n\r\n $targetPath = ROOT.'/site/files/'.$new_name;\r\n $webPath = WEBROOT.'/site/files/'.$new_name;\r\n\r\n if(rename($sourcePath, $targetPath)){\r\n $result->url = $webPath;\r\n $result->size = [$img[0],$img[1]];\r\n $result->alt = 'an image';\r\n $response = 200;\r\n } else {\r\n $response = 400;\r\n }\r\n\r\n }\r\n }\r\n\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "public function addFilteredImage(Request $request){\n $request->image = base64_decode(preg_replace('#^data:image/\\w+;base64,#i', '', $request->image));\n $request->image = imagecreatefromstring($request->image);\n $s3 = Storage::disk('s3');\n $filePath = '/profilePhotos/'.$$request->imageUrl;\n $s3->put($filePath, file_get_contents($$request->image), 'public');\n unlink($request->path);\n return json_encode(gettype($request->image));\n }", "public function store(Request $request)\n {\n \n \n $temp = $request->all();\n\n\n if(isset($temp['type']) && $temp['type']=='single') {\n\n $validator = Validator::make($request->all(), [\n 'image' => 'required|base64image:jpeg,jpg,png'\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors'=>$validator->errors()->all()]);\n }\n\n $path1 = public_path('uploads');\n if (!File::exists($path1)) {\n File::makeDirectory($path1, 0777, true);\n }\n\n $path2 = public_path('uploads/team');\n if (!File::exists($path2)) {\n File::makeDirectory($path2, 0777, true);\n }\n $sport_icon = \"team-\".time().\".png\";\n $path = public_path().'/uploads/team/' . $sport_icon;\n Image::make(file_get_contents($request['image']))->save($path);\n $temp['image'] = $sport_icon; \n return response()->json(new JsonResponse(['status' => 'success','data' => $temp]));\n }\n \n\n $validator = Validator::make($request->all(), [\n 'sport_name' => 'required',\n 'sport_icon' => 'required|base64image:jpeg,jpg,png'\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errors'=>$validator->errors()->all()]);\n }\n else {\n $data = $request->all();\n $path1 = public_path('uploads');\n if (!File::exists($path1)) {\n File::makeDirectory($path1, 0777, true);\n }\n\n $path2 = public_path('uploads/sport');\n if (!File::exists($path2)) {\n File::makeDirectory($path2, 0777, true);\n }\n $sport_icon = \"icon-\".time().\".png\";\n $path = public_path().'/uploads/sport/' . $sport_icon;\n Image::make(file_get_contents($request->sport_icon))->save($path); \n\n $data['sport_icon'] = $sport_icon;\n $data['added_by'] = Auth::user()->id;\n $this->model->create($data);\n $last_id = Sport::orderBy('id', 'DESC')->first();\n\n $teamIcon = array_filter($request->team_icon);\n $teamName = array_filter($request->team_name);\n \n $adminId = Auth::user()->id;\n $sportId = $last_id->id;\n foreach ($teamName as $key => $value) {\n $saveTeam = array(\n 'added_by' => $adminId,\n 'team_icon' => $teamIcon[$key],\n 'team_name' => $value,\n 'sport_id' => $sportId\n );\n $this->saveTeamIcon($saveTeam);\n }\n\n\n //System Logs\n $log_action = \"Create Sport\";\n $log_type = 1;\n $description = Auth::user()->first_name.\" \".Auth::user()->last_name.\" add a new sport \".$request->sport_name.\" (ID::\".$last_id->id.\")\";\n SystemLogs::GenerateLogs($log_action,$description,$log_type);\n return response()->json(new JsonResponse(['status' => 'success']));\n }\n \n }", "public function testPeopleImagesCreate()\n { \n $randomId = self::$f1->randomId('person');\n $checkNoImage = self::$f1->get('/v1/people/'.$randomId['person'].'.json');\n if($checkNoImage['body']['person']['@imageURI'] != null){\n $this->testPeopleImagesCreate();\n } else {\n $img = file_get_contents('../tests/img/smilley.jpg');\n $r = self::$f1->post_img($img, '/v1/people/'.$randomId['person'].'/images'); \n $this->assertEquals('201', $r['http_code']);\n return $personId = $randomId['person'];\n }\n }", "public function photorequest($data) {\n\n $this->db->insert($this->_imgrequest, $data);\n return $this->db->insert_id();\n }", "public function create($request)\n {\n\n // Begin database transaction\n DB::beginTransaction();\n\n $escortImagesExist = Image::where('escort_id',$request->escort_id)->orWhere('user_id' , $request->user_id)->get();\n Escort::whereId($request->escort_id)->update(['profile_image' => $request->image_1]);\n\n if (count($escortImagesExist) == 0) {\n\n $image = Image::create([\n 'user_id' => $request->user_id,\n 'escort_id' => $request->escort_id,\n 'image_1' => $request->image_1,\n 'image_2' => $request->image_2,\n 'image_3' => $request->image_3,\n 'image_4' => $request->image_4,\n 'image_5' => $request->image_5,\n 'image_6' => $request->image_6,\n 'image_7' => $request->image_7,\n 'image_8' => $request->image_8,\n 'image_9' => $request->image_9,\n 'image_10' => $request->image_10,\n ]);\n\n }else {\n\n\n }\n\n if (!$image) {\n\n // If User isn't created, rollback database to initial state\n DB::rollback();\n\n return $image = \"Oops! Sorry there was an error. Please try again\";\n\n }else {\n\n // If User is created, commit transaction to the database\n DB::commit();\n\n return $image;\n\n }\n\n }", "public function postAddImage(Request $request ,$id){\n // Upload hình ảnh tại đây\n // Hình ảnh upload sẽ được chuyển vào thư mục ../public/Product/\n $this->validate($request,[\n 'ImageProduct'=>'required'\n ],[\n 'ImageProduct.required'=>'Please chose a images'\n ]);\n if($request->hasFile('ImageProduct')){\n $file = $request->file('ImageProduct');\n $fileExtendtion = $file->getClientOriginalExtension();\n if($fileExtendtion == \"jpg\" || $fileExtendtion == \"png\" || $fileExtendtion == \"JPG\" || $fileExtendtion == \"PNG\" || $fileExtendtion == \"jpeg\"){\n $fileName = $file->getClientOriginalName();\n $Name = str_random(3) . $fileName;\n if($file->move(\"upload/Product/\",$Name) && $this->callFunctionPostImage($Name, $id)){\n // Sau khi lưu hình ảnh vào thư mục thì gọi dến phương thức thêm hình ảnh trong Repository\n return redirect()->back()->with('thong_bao','Upload image success!');\n }else{\n return redirect()->back()->with('thong_bao','Upload file failed, please check again system!');\n }\n }else{\n return redirect()->back()->with('thong_bao','The image is not formatted correctly!');\n }\n }else{\n return redirect()->back()->with('thong_bao','Please chose a images');\n }\n }", "public function postPicture(){\r\n if(!$this->hasLoginCheck())\r\n return;\r\n $blogItem = new BlogItemModel();\r\n// $path,$desc,$tag\r\n $path=$_POST['path'];\r\n $desc=$_POST['content'];\r\n $tag=$_POST['tag'];\r\n $blogItem->addPicture($path,$desc,$tag);\r\n echo json_encode(array('status'=>'true'));\r\n }", "public function uploadImage()\r\n {\r\n /*\r\n * Response codes\r\n * 000 - Нет ошибок\r\n * 001 - Нет данных\r\n * 002 - Ошибка получения параметров файла\r\n * 003 - Ошибка получения пути файла\r\n * 004 - Ошибка перемещения файла\r\n * 005 - Требования не соблюдены\r\n * 006 - Нет папки салона\r\n */\r\n if (isset($_POST) &&\r\n isset($_FILES) &&\r\n array_key_exists('upload', $_FILES) &&\r\n count($_FILES['upload']) > 0 &&\r\n array_key_exists('slug', $_POST) &&\r\n array_key_exists('img_name', $_POST) &&\r\n array_key_exists('type', $_POST)\r\n ) {\r\n $type = $_POST['type'];\r\n if ($this->authentication->has_permission($type . '_upload')) {\r\n $img_name = $_POST['img_name'];\r\n $tmpFilePath = $_FILES['upload']['tmp_name'][0];\r\n $tmpFileType = $_FILES['upload']['type'][0];\r\n $tmpFileExtension = pathinfo($_FILES['upload']['name'][0], PATHINFO_EXTENSION);\r\n $tmpFileSize = $_FILES['upload']['size'][0];\r\n $tmpImageInfo = getimagesize($_FILES['upload']['tmp_name'][0]);\r\n if (array_key_exists('img_slug', $_POST)) {\r\n $fileParams = $this->FieldsModel->getFile($_POST['img_slug'], $_POST['img_slug']);\r\n } else {\r\n $fileParams = $this->FieldsModel->getFile($type, $img_name);\r\n }\r\n if ($fileParams) {\r\n if (\r\n $tmpFileType != $fileParams['mime'] ||\r\n $tmpImageInfo['mime'] != $fileParams['mime'] ||\r\n $tmpFileExtension != $fileParams['ext'] ||\r\n $tmpFileSize > $fileParams['max_size'] ||\r\n $tmpImageInfo[0] > $fileParams['max_width'] ||\r\n $tmpImageInfo[0] < $fileParams['min_width'] ||\r\n $tmpImageInfo[1] > $fileParams['max_height'] ||\r\n $tmpImageInfo[1] < $fileParams['min_height']\r\n ) {\r\n if ($tmpFileExtension === 'svg') {\r\n //Do nothing\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не удовлетворяет требованиям.', 'code' => '005', 'fileparams' => $fileParams));\r\n return;\r\n }\r\n }\r\n // Make sure we have a file path\r\n if ($tmpFilePath != '') {\r\n // Setup new file path\r\n if (!file_exists('./media/' . $_POST['type'] . '/' . $_POST['slug'] . '/')) {\r\n mkdir('./media/' . $_POST['type'] . '/' . $_POST['slug']);\r\n //echo json_encode(array('status' => 'fail', 'message' => 'Салон не сконфигурирован. Обратитесь к поставщику услуг.', 'code' => '006'));\r\n //return;\r\n }\r\n $newFilePath = './media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n // Upload the file into the temp dir\r\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\r\n // Create path to update image in frontend\r\n $path = base_url() . 'media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n echo json_encode(array('status' => 'ok', 'message' => 'Изображение загружено.', 'code' => '000', 'path' => $path));\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '004'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '003'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '002'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, у вас нет прав!', 'code' => '999'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '001'));\r\n }\r\n }", "public function create(Request $request){\n $response=[\n 'result' => 'error',\n 'type' => 'error'\n ];\n $fields = [];\n\n try{\n $encode = json_encode($request->data);\n $decode = json_decode($encode);\n \n foreach($decode as $key ){\n $fields[$key->name] = $key->value;\n }\n\n $validator = Validator::make($fields ,\n [\n 'name' => 'required',\n 'last_name' => 'required',\n 'phone' => 'required',\n 'age' => 'required|Integer',\n 'ingresed_at' => 'required|date',\n ]);\n \n if ($validator->fails()) {\n $response ['message'] = $validator->messages()->first();\n return $response;\n }\n \n $file_base_64 = $request->file;\n \n if (preg_match('/^data:image\\/(\\w+);base64,/', $file_base_64))\n {\n $data = substr($file_base_64, strpos($file_base_64, ',') + 1);\n $data = base64_decode($data);\n $new_file_name = 'user_' . uniqid();\n Storage::disk('public')->put($new_file_name, $data);\n\n $user = User::create([\n 'name' => $fields['name'],\n 'last_name' => $fields['last_name'],\n 'age' => $fields['age'],\n 'phone' => $fields['phone'],\n 'ingresed_at' => $fields['ingresed_at'],\n 'file' => $new_file_name\n ]);\n \n $response['result'] = 'Ok';\n $response['message'] = 'Usuario registrado correctamente';\n $response['type'] = 'success';\n $response['user'] = $user;\n }else\n {\n $response['result'] = 'error';\n $response['message'] = 'El archivo no es una imagen';\n }\n\n }catch(\\Exception $ex){\n \\Log::info($ex->getMessage());\n $response['message'] = $ex->getMessage();\n }\n\n return $response;\n }", "public function uploadCropImg() {\n \n $type = $this->input->post('type');\n if($type == 'create'){\n $json = array();\n $image_url = $this->input->post('image_url'); \n $user_id = base64_decode($this->input->post('member_id')); //image view use code only member id\n $upltype = $this->input->post('upltype');\n $json['img'] = $image_url;\n $json['user_id'] = $user_id;\n $json['upl'] = $upltype;\n\n $img_path = $this->session->userdata['img'];\n array_push($img_path, $image_url);\n $this->session->set_userdata('img',$img_path);\n $json['img_path_v'] = $this->session->userdata('img');\n\n header('Content-Type: application/json');\n echo json_encode($json);\n }else if($type == 'edit'){\n //echo 'edit';\n $json = array();\n $ad_id = $this->input->post('ad_id');\n $image_url = $this->input->post('image_url');\n $user_id = base64_decode($this->input->post('member_id')); //image view use code only member id\n $json['img'] = $image_url;\n $json['user_id'] = $user_id;\n $json['id'] = $ad_id;\n $imageData = array(\n 'AdsID'=>$ad_id,\n 'Images'=>$image_url,\n );\n $json['return_img_id'] = $this->Myads->insert_image($imageData);\n header('Content-Type: application/json');\n echo json_encode($json);\n }\n \n }", "public function store(Request $request)\n {\n // $date = date(\"Y-m-d\");\n $now = date(\"Y-m-d H-i-s\");\n $now_new = str_replace(\" \", \"-\", $now);\n $now_new = str_replace(\"-\", \"\", $now_new);\n // echo '<pre> acá';\n // print_r($request->file('file'));\n // print_r($request->all());\n // die;\n $file_type = request()->get('key');\n $cedula = Request()->get('driver_information_dni_id');\n // $cedula = request()->get('driver_information_dni_id');\n $file = $request->file('file')[$file_type];\n $size = $file->getSize() / 1024;\n $extension = $file->getClientOriginalExtension();\n $extensions_permited = ['jpg'];\n if (!in_array($extension, $extensions_permited)) {\n return response()->json(['response' => 'validator errors', 'errors' => ['file' => ['Los formatos permitidos son: jpg']]]);\n }\n if ($size > 5120) {\n return response()->json(['response' => 'validator errors', 'errors' => ['file' => ['El archivo supera el máximo peso permitido (5MB).']]]);\n }\n $check_document = DB::table('imagenes')\n ->where('imagenes.tipo_doc', '=', $file_type)\n ->where('imagenes.driver_information_dni_id', '=', $cedula)\n ->select(DB::raw(\n 'imagenes.image_id, \n imagenes.tipo_doc,\n imagenes.url,\n imagenes.operation'\n ))->first();\n // El nombre del archivo es el tipo de imagemn + la cédula + la fecha del momento horas, minutos y segundos\n $filename = $file_type . '_' . $cedula . '_' . $now_new . '.jpg';\n //el path almacena las imágenes en una carpeta con la cédula del conductor y el nombre del archivo\n $path = $cedula . '/' . $filename;\n\n if (!empty($check_document)) {\n // Si el registro del documento existe y está delete, entonces actualiza el registro y \n //lo pone en el s3 y también borra el anterior documento del s3\n if ($check_document->operation == 'D') {\n $image_id = $check_document->image_id;\n $path_old = $check_document->url;\n $upload = Storage::disk('s3')->put($path, file_get_contents($file));\n if ($upload) {\n $delete_file = Storage::disk('s3')->delete($path_old);\n $response = Imagenes::where('image_id', $image_id)->update([\n 'url' => $path,\n 'size_image' => $size,\n 'type_image' => $extension,\n 'operation' => 'U',\n 'user_id' => auth()->id(),\n 'date_operation' => $now\n ]);\n return response()->json(['response' => 'ok', 'errors' => []]);\n } else {\n return response()->json(['response' => 'Carga fallida', 'errors' => ['response' => 'Carga fallida', 'message' => 'El archivo no se pudo cargar']]);\n }\n } else {\n return response()->json(['response' => 'file exists', 'errors' => [\n 'message' => 'Este archivo ya fue cargado ¿Desea reemplazarlo?',\n 'id' => $check_document->image_id,\n 'path' => $check_document->url\n ]]);\n }\n } else {\n $upload = Storage::disk('s3')->put($path, file_get_contents($file));\n if ($upload) {\n Imagenes::create([\n 'tipo_doc' => $file_type,\n 'url' => $path,\n 'size_image' => $size,\n 'type_image' => $extension,\n 'user_id' => auth()->id(),\n 'driver_information_dni_id' => $cedula\n ]);\n return response()->json(['response' => 'ok', 'errors' => []]);\n } else {\n return response()->json(['response' => 'Carga fallida', 'errors' => ['response' => 'Carga fallida', 'message' => 'El archivo no se pudo cargar']]);\n }\n }\n }", "public function create(Request $request)\n {\n $slide=new ApiController;\n $data=[\n 'sdid' => $_POST['sdid'],\n 'slide_title' =>$_POST ['slide_title'],\n 'slide_page_url' => $_POST['slide_pageurl'],\n 'image'=>$request->slide_image,\n // if(!$request->hasFile('fileName')) {\n // return response()->json(['upload_file_not_found'], 400);\n // }\n \n // $allowedfileExtension=['pdf','jpg','png'];\n // $files = $request->file('fileName'); \n // $errors = [];\n \n // foreach ($files as $file) { \n \n // $extension = $file->getClientOriginalExtension();\n \n // $check = in_array($extension,$allowedfileExtension);\n \n // if($check) {\n // foreach($request->fileName as $mediaFiles) {\n \n // $path = $mediaFiles->store('public/images');\n // $name = $mediaFiles->getClientOriginalName();\n \n // //store image file into directory and db\n // $save = new Image();\n // $save->title = $name;\n // $save->path = $path;\n // $save->save();\n // }\n // } else {\n // return response()->json(['invalid_file_format'], 422);\n // }\n \n // return response()->json(['file_uploaded'], 200);\n \n // }\n\n\n\n 'slide_target_url' => $_POST['slide_target_url'],\n 'slide_text' => $_POST['slide_text'],\n 'sid' => $_POST['sid']\n ];\n //var_dump($data);\n \n $url=env('PDLCAPIHOST').'/slide/createslide';\n // var_dump($url);\n $da=$slide->Curlapirequest($data,$url);\n \n\n // var_dump($da);\n \n return redirect('/admindashboard');\n }", "public function saveImageSuggestion(Request $request){\n $fields = $request->all();\n $image = $request->get('image');\n $suggestion_id = $request->get('suggestion_id');\n if($image == \"\" || $image == null){\n return response()->json(['estado'=>false, 'code'=>'200', 'message'=>\"Campo Imagen requerido\", 'data'=>[]]);\n\n }else if($suggestion_id == \"\" || $suggestion_id == null){\n return response()->json(['estado'=>false, 'code'=>'200', 'message'=>\"Campo ID sugerencia requerido\", 'data'=>[]]);\n\n }else{\n $imageSuggestion = ImageSuggestion::create($fields);\n return response()->json(['estado'=>true, 'code'=>'201', 'message'=>\"Peticion Exitosa\", 'data'=>$imageSuggestion]);\n\n }\n }", "public function newNoticiaimgAction(Request $request)\n {\n $image = new Image();\n //$form = $this->createFormBuilder($image)->add('file')->add('ruta');\n //$form->handleRequest($request);\n //$name = $form['name']->getData();\n\n $em = $this->getDoctrine()->getManager();\n\n\n// $tipo = gettype($request->get('username'));\n //$image->upload();\n $dale1 = $request->get('name');\n $dale = $request->get('file');\n $mit = $request->files->get('file');\n //$mit = $this->getRequest()->files->get('file'); este funciona\n $datos = array('name' => $dale1, 'imagen'=> $mit);\n\n $image->setFile($mit);\n $image->upload();\n $em->persist($image);\n\n $em->flush();\n\n //return the response whit status ok\n $data = array(\"estado\" => \"realizado\");\n $view = $this->view($data, 200);\n return $this->handleView($view);\n\n\n }", "public function create(Request $request)\n\t{\n\t\t// Check request are made with file or base64\n\t\tif($request->hasFile('image_1') && $request->hasFile('image_1') && $request->has('title'))\n\t\t{\n\t\t\t// Get the files to storage and create entry\n\t\t\t$file_1 \t\t\t= $request->file('image_1');\n\t $extension_1 \t= $file_1->getClientOriginalExtension();\n\t $fileNameWithExt_1 = $file_1->getClientOriginalName();\n\t $fileName_1\t\t= pathinfo($fileNameWithExt_1, PATHINFO_FILENAME);\n\t $fileName_1 \t= time() . '_' . mt_rand() . '.' . $extension_1;\n\t $folderpath \t= base_path().'/storage/app/images/users/';\n\t $file_1->move($folderpath, $fileName_1);\n\t\t\t$this->compress($folderpath.$fileName_1, $folderpath.$fileName_1, 75);\n\n\t $image_1 = Image::create([\n\t\t\t\t\t\t \t'path' => $folderpath.$fileName_1,\n\t\t\t\t\t\t \t]);\n\n\t $file_2 \t\t\t= $request->file('image_2');\n\t $extension_2 \t= $file_2->getClientOriginalExtension();\n\t $fileNameWithExt_2 = $file_2->getClientOriginalName();\n\t $fileName_2 \t= pathinfo($fileNameWithExt_2, PATHINFO_FILENAME);\n\t $fileName_2 \t= time() . '_' . mt_rand() . '.' . $extension_2;\n\t $folderpath \t= base_path().'/storage/app/images/users/';\n\t $file_2->move($folderpath, $fileName_2);\n\t\t\t$this->compress($folderpath.$fileName_2, $folderpath.$fileName_2, 75);\n\n\t $image_2 = Image::create([\n\t\t\t\t\t\t \t'path' => $folderpath.$fileName_2,\n\t\t\t\t\t\t \t]);\n\n\n\t if( $image_1->id == null || $image_2->id == null ) {\n\t\t\t\tunlink($image_1->path);\n\t\t\t\tunlink($image_2->path);\n\n\t \t$image_1->delete();\n\t \t$image_2->delete();\n\t \treturn response()->json(['message' => 'Unable to create post. Image storage errors.'], 404);\n\t }\n\n\t // Create post entry of the 2 images\n\t $post = Post::create([\n\t \t'title' \t\t\t => $request->title,\n\t \t\t'image_1_id' => $image_1->id,\n\t \t\t'image_2_id' => $image_2->id\n\t \t]);\n\n\t // Crete user relationship to the post\n\t $user = $request['req']->getUser();\n\t $userPost = UserPost::create([\n\t \t'user_id' => $user->id,\n\t \t'post_id' => $post->id\n\t \t]);\n\n\t\t\treturn response()->json(['message' => \"Post submitted successful.\"], 200);\n\t\t}\n\t\telse if($request->has('image_1') && $request->has('image_1') && $request->has('title')) {\n\n\t\t\t$binary_1 \t= $request->image_1;\n\t\t\t$extension_1 = 'png';\n\t\t\tif( strpos($binary_1, 'data:image/jpeg;base64') !== false ) {\n\t\t\t\t$extension_1 = 'jpeg';\n\t\t\t}\n\n\t\t\t$binary_1 \t\t= preg_replace('/^data:image\\/[a-z]+;base64,/', '', $binary_1);\n\t\t\t$tempImage_1 \t= base64_decode(str_replace(' ', '+', $binary_1));\n\t \n\t $imageName_1\t= time() . '_' . mt_rand() . '.' .$extension_1;\n\t\t\t$imagePath_1 \t= base_path().'/storage/app/images/users/'.$imageName_1;\n\t\t\tfile_put_contents($imagePath_1, $tempImage_1);\n\t\t\t$this->compress($imagePath_1, $imagePath_1, 75);\n\n\t $image_1 = Image::create([\n\t\t\t\t\t\t \t'path' => $imagePath_1,\n\t\t\t\t\t\t \t]);\n\n\n\t $binary_2 \t\t= $request->image_2;\n\t\t\t$extension_2 \t= 'png';\n\t\t\tif( strpos($binary_2, 'data:image/jpeg;base64') !== false ) {\n\t\t\t\t$extension_2 = 'jpeg';\n\t\t\t}\n\n\t\t\t$binary_2 \t\t= preg_replace('/^data:image\\/[a-z]+;base64,/', '', $binary_2);\n\t\t\t$tempImage_2 \t= base64_decode(str_replace(' ', '+', $binary_2));\n\t \n\t $imageName_2\t= time() . '_' . mt_rand() . '.' . $extension_2;\n\t\t\t$imagePath_2 \t= base_path().'/storage/app/images/users/'.$imageName_2;\n\t\t\tfile_put_contents($imagePath_2, $tempImage_2);\n\t\t\t$this->compress($imagePath_2, $imagePath_2, 75);\n\n\t $image_2 = Image::create([\n\t\t\t\t\t\t \t'path' => $imagePath_2,\n\t\t\t\t\t\t \t]);\n\n\n\t if( $image_1->id == null || $image_2->id == null ) {\n\t\t\t\tunlink($image_1->path);\n\t\t\t\tunlink($image_2->path);\n\n\t \t$image_1->delete();\n\t \t$image_2->delete();\n\t \treturn response()->json(['message' => 'Unable to create post. Image storage errors.'], 404);\n\t }\n\n\t // Create post entry of the 2 images\n\t $post = Post::create([\n\t \t\t'title' \t\t\t=> $request->title,\n\t \t\t'image_1_id' \t=> $image_1->id,\n\t \t\t'image_2_id' \t=> $image_2->id\n\t \t]);\n\n\t // Crete user relationship to the post\n\n\t $user = $request['req']->getUser();\n\t $userPost = UserPost::create([\n\t \t'user_id' => $user->id,\n\t \t'post_id' => $post->id\n\t \t]);\n\n\t\t\treturn response()->json(['message' => \"Post submitted successful.\"], 200);\n\t\t} else {\n\t \treturn response()->json(['message' => 'Unable to create post. Incorrect request'], 404);\n\t\t}\n\t}", "public function addImage()\n {\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\n\t\t\t$image = new ImageModel();\n\t\t\t$this->saveImageModel($image, $user);\n\t\t\treturn $this->sendResponse('Your image has been successfully uploaded');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to add an image');\n }", "public function create()\n {\n\n $postData = $this->request->request->all();\n $imageData = $postData['image'];\n\n $user = $this->user;\n $user->setUpdateDate(new \\DateTime());\n $timeStamp = $user->getUpdateDate()->getTimestamp();\n\n # Ensure directory is created\n $dirPath = '/images/photos/checkins/' . $user->getId();\n\n if (!file_exists(ROOTDIR . \"/\" . $dirPath)) {\n mkdir(ROOTDIR . \"/\" . $dirPath, 0777, true);\n }\n\n $filePath = $dirPath . '/' . (time() * rand(100, 1000)) . '.jpg';\n $photoUrl = filter_var($imageData, FILTER_VALIDATE_URL);\n\n if ($photoUrl !== false) {\n $uri = $photoUrl;\n } else {\n ImageHelper::saveImageFromBase64($imageData, ROOTDIR . $filePath);\n $uri = $filePath . \"?\" . $timeStamp;\n }\n\n $postData['uri'] = $uri;\n\n $checkIn = $this->checkInRepo->map($postData, $this->user);\n $this->checkInRepo->insert($checkIn);\n\n return $this->_generateResponse($checkIn->toArray(), Status::CREATED);\n }", "public function StaticImageUpload(){\n $design_id = $_POST['new_filename'];\n $uid = $_POST['uid'];\n $uid = empty($uid) ? 0 : $uid;\n $exp = explode(\".\", $_FILES[\"file\"][\"name\"])[1];\n $filename = $design_id.'.'.$exp;\n $new_file = 'public://files/'.$uid.'/kmds/images/static_image/' . $filename;\n $uploaded_image = file_get_contents($_FILES[\"file\"][\"tmp_name\"]);\n file_put_contents($new_file, $uploaded_image);\n $source_original = array(\"src\" => file_create_url($new_file));\n return new JsonResponse($source_original);\n }", "private function uploadImagePost(Request $request){\n\t\t// Handles data\n\t\t$target = explode('.',$request->target);\n\t\t$class = '\\App\\\\'.ucwords($target[0]);\n\t\t$object = $class::find($request->id);\n\n\t\t// Handles image\n\t\t$image = \\Gumlet\\ImageResize::createFromString(base64_decode($request->data));\n\t\t$image->quality_jpg = 50;\n\n\t\t// Saving image\n\t\t$object->image = (string) $image;\n\t\t$object->save();\n\t}", "function add_img(){\n\t\t/*if ($ext==\"jpg\" || $ext==\"png\" || $ext=\"gif\"){*/\n\t\t$data = array();\n\t\t$filePath=\"data/upload/\";\n\n\t\tif (!file_exists($filePath)){//如果指定文件夹不存在,则创建文件夹\n\t\t\tmkdir($filePath, 0777, true);\n\t\t}\n\n\t\t/*if(move_uploaded_file($_FILES['file1']['tmp_name'],$name))\n\t\t{\n\t\t\t$is_success=1;\n\t\t\t$reason=$name;\n\t\t}*/\n\t\t$image_data = $_POST['data'];\n\t\t$index = 0;\n\t\tforeach ($image_data as $image) {\n\t\t\t$newfile = microtime().\".jpg\";\n\t\t\t$name=$filePath.$newfile;\n\t\t\tif (preg_match('/^(data:\\s*image\\/(\\w+);base64,)/', $image['src'], $result)){\n\t\t\t\t$type = $result[2];\n\t\t\t\tif (file_put_contents($name, base64_decode(str_replace($result[1], '', $image['src'])))){\n\t\t\t\t\t$data[$index]['sort'] = $image['sort'];\n\t\t\t\t\t$data[$index]['src'] = $name;\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo $data=$this->JSON($data);\n\t\t/*}else {\n\t\t\techo 'error';\n\t\t}*/\n\t}", "function test(){\n\t\t// See http://www.atk14.net/api/en/file_uploads/create_new/\n\n\t\t$adf = new ApiDataFetcher(\"http://www.atk14.net/api/\",array(\n\t\t\t\"logger\" => new Logger()\n\t\t));\n\t\t$data = $adf->postFile(\"file_uploads/create_new\",\"sandokan.jpg\");\n\n\t\t$this->assertEquals(201,$adf->getStatusCode());\n\t\t$this->assertEquals(\"POST\",$adf->getMethod());\n\t\t$this->assertEquals(\"http://www.atk14.net/api/en/file_uploads/create_new/?format=json\",$adf->getUrl());\n\t\t$this->assertEquals(\"sandokan.jpg\",$data[\"filename\"]);\n\t\t$this->assertEquals(\"image/jpeg\",$data[\"mime_type\"]);\n\t\t$this->assertEquals(\"d5d4599e3586064e0524d18e8ee8bce5\",$data[\"md5sum\"]);\n\t}", "public function createImage()\n\t{\n\t\t$now = Carbon::now()->timestamp;\n\n\t\t$image = new Ot_Images();\n\t\t$image->spherical_id = $now;\n\t\t$image->title = Input::get('title');\n\t\t$pathUpload = 'uploads/images';\n\t\tif (Input::hasFile('image_url')) {\n\t\t\t$img = Input::file('image_url');\n\t\t\t$name = $now . '-' . $img->getClientOriginalName();\n\t\t\tImage::make($img->getRealPath())->resize(180, 90)->save($pathUpload . '/thumb/' . $name);\n\t\t\t$img->move($pathUpload, $name);\n\n\t\t\t$image->image_url = $name;\n\t\t}\n\t\t$image->description = Input::get('description');\n\t\tif (Input::get('is_public') == true) {\n\t\t\t$image->is_public = 1;\n\t\t} else {\n\t\t\t$image->is_public = 0;\n\t\t}\n\t\t$image->created_by = Auth::user()->name;\n\t\t$image->updated_by = Auth::user()->name;\n\t\t$image->view_url = \"/image/\" . $now;\n\t\t$image->save();\n\n\t\treturn Redirect::to('admincp/image/new');\n\t}", "public function testPostImage()\n {\n }", "public function makeProfilePicture(Request $request){\n $result = User::where('id', $request->id)->update(['dpUrl' => $request->url]);\n ProfilePhoto::where('userId', $request->id)->where('isDp', '1')->update(['isDp'=> '0']);\n ProfilePhoto::where('userId', $request->id)->where('imgUrl', $request->url)->update(['isDp'=> '1']);\n if($result)\n return json_encode(['code' => 200, 'message' => 'success', 'response'=>$result]);\n else\n return json_encode(['code' => 500, 'message'=> 'Internal Server Error']);\n\n }", "public function upload_image(){\n\n // user user-id from session\n $encodedkey = $this->session->userdata('PariKey_session');\n $user_id='';\n $key=base64_decode($encodedkey);\n $keyarr=explode('|', $key);\n //session key format is $keyarr[0]=PARInaayKEY|$keyarr[1]=email_id|$keyarr[2]=user_id\n // print_r($_POST);die();\n extract($_FILES);\n extract($_POST);\n \n $data = $_POST;\n $filepath = '';\n\n // check image count\n $imgCount = $this->user_model->checkImageCount($keyarr[2]);\n if (!$imgCount) { //for prod images\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> You are allowed to upload only <b>3 Images</b> in Gallery!',\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n\n $file_name = $_FILES['selected_image']['name'];\n if (!empty(($_FILES['selected_image']['name']))) {\n //file validating---------------------------//\n if ($_FILES['selected_image']['size'] > 10485760) { //for prod images\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image size exceeds size limit of 10MB. Upload image file having size less than 10MB!',\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n\n $extension = pathinfo($_FILES['selected_image']['name'], PATHINFO_EXTENSION);\n $_FILES['userFile']['name'] = $img_title.'_0'.$keyarr[2].'_'.time().'.'.$extension;\n $_FILES['userFile']['type'] = $_FILES['selected_image']['type'];\n $_FILES['userFile']['tmp_name'] = $_FILES['selected_image']['tmp_name'];\n $_FILES['userFile']['error'] = $_FILES['selected_image']['error'];\n $_FILES['userFile']['size'] = $_FILES['selected_image']['size'];\n\n $uploadPath = 'assets/users/gallery/'; //upload images in images/desktop/ folder\n\n $config['upload_path'] = $uploadPath;\n $config['overwrite'] = TRUE;\n $config['allowed_types'] = 'gif|jpg|png'; //allowed types of files\n $this->load->library('upload', $config); //load upload file config.\n $this->upload->initialize($config);\n // print_r($config);die();\n $image_path = '';\n\n if ($this->upload->do_upload('userFile')) {\n $fileData = $this->upload->data();\n $filepath = 'assets/users/gallery/'.$fileData['file_name'];\n }\n else{\n $response=array(\n 'status' => 'validation',\n 'message' => $this->upload->display_errors('<p><b>Image upload Error: </b>', '</p>'),\n 'field' => 'selected_image'\n );\n echo json_encode($response);\n die();\n }\n // print_r($filepath);die();\n }\n\n $data['filepath'] = $filepath;\n if($filepath==''){\n $response=array(\n 'status' => 'validation',\n 'message' => '<b>Warning:</b> Image file not uploaded Successfully!',\n 'field' => 'document_file'\n );\n echo json_encode($response);\n die();\n}\n$result = $this->user_model->upload_image($data,$keyarr[2]);\n\nif($result){\n $response=array(\n 'status' => 'success',\n 'message' => '<b>Success:</b> You Have Successfully uploaded <b>'.$img_title.'</b> Image!'\n );\n}\nelse{\n $response=array(\n 'status' => 'error',\n 'message' => '<b>Error:</b> <b>'.$img_title.'</b> Image was not uploaded Successfully!'\n );\n} \necho json_encode($response);\n}", "public function saveImage($data)\n\t{\n if (!empty($data)) {\n return $this->imagesModel->create($data);\n }\n\t}", "function upImagenAction(){\n\t\t\n\t\t$request = $this->get('request');\n\t\t\n\t\t$estetica=$request->request->get('id');\n\t\t$img=$request->request->get('img');\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t$hcEstetica = $em->getRepository('HcBundle:Hc')->find($estetica);\n\t\t\n\t\t\t\t\n\t\tif($hcEstetica){\t\t\n\t\t\t$ruta = $this->container->getParameter('dlaser.directorio.imagenes');\n\t\t\t\n\t\t\tif ($img) {\n\t\t\t\t\n\t\t\t\t$imgData = base64_decode(substr($img,22));\n\t\t\t\t\n\t\t\t\t$file = $ruta.'grafico_'.$estetica.'.png';\n\t\t\t\t\n\t\t\t\tif (file_exists($file)) { unlink($file); }\n\t\t\t\t$fp = fopen($file, 'w');\n\t\t\t\tfwrite($fp, $imgData);\n\t\t\t\tfclose($fp);\n\t\t\t\t\n\t\t\t\t$response=array(\"responseCode\"=>200, \"msg\"=>\"La operación ha sido exitosa.\");\n\t\t\t}\n\t\t}else{\n\t\t\t$response=array(\"responseCode\"=>400, \"msg\"=>\"Ha ocurrido un error al crear la imagen.\");\n\t\t}\n\t\t\n\t\t$return=json_encode($response);\n\t\treturn new Response($return,200,array('Content-Type'=>'application/json'));\n\t}", "public function update_or_store(Request $request)\n {\n // dd($request);\n $validator = $this->validatedata($request);\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'msg' => 'input salah',\n 'error' => $validator->messages(),\n ], 400);\n }\n\n\n\n\n $imageData = $request->get('imagePayload');\n\n\n if ($imageData != null) {\n\n\n $pos = strpos($imageData, ';');\n $type = explode('/', substr($imageData, 0, $pos))[1];\n\n $dir = time() . str_random(10) . \".\" . $type;\n\n $image = Image::make($imageData);\n\n $image->save(public_path('storage') . '/' . $dir);\n $request->logo = $dir;\n\n $datas_update = $request->all();\n $datas_update['logo'] = $dir;\n } else {\n $datas_update = $request->all();\n }\n\n // dd($datas_update);\n // $img = Image::make(Input::file('photo'));\n\n $kop_surat_company = Company::first();\n\n\n if ($kop_surat_company == null) {\n $this->createHeader($datas_update);\n } else {\n // $kop_surat_company->update([\n // 'companyname' => $request['name'],\n // 'address' => $request['address'],\n // 'email' => $request['email'],\n // 'website' => $request['website'],\n // 'phonenumber' => $request['number'],\n // 'logo' => $dir\n // ]);\n // dd($request->all());\n\n $kop_surat_company->update($datas_update);\n }\n\n\n return response()->json(\"sukses\", 200);\n }", "public function uploadImage()\n {\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online */\n if ($user) {\n\n /* Checking if image was upload */\n if (is_uploaded_file($_FILES['image']['tmp_name'])) {\n\n /* Creating new Upload's object */\n $upload = new Upload([\n 'subfolder' => 'answers/',\n 'name' => $_FILES['image']['name'],\n 'type' => $_FILES['image']['type'],\n 'tmp_name' => $_FILES['image']['tmp_name'],\n 'error' => $_FILES['image']['error'],\n 'size' => $_FILES['image']['size'],\n ]);\n\n /* Setting new random title for image */\n $upload->name = $upload->getRandomFilename(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));\n\n /* Uploading image */\n if ($upload->upload()) {\n\n /* Return response */\n header('Content-Type: application/json');\n echo json_encode('/media/images/answers/'.$upload->name);\n }\n }\n }\n\n return false;\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'nama' => 'required|string',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|string',\n 'foto' => 'file|image',\n 'kode_member' => 'integer',\n 'no_hp' => 'string',\n 'umur' => 'integer',\n 'alamat' => 'string',\n 'role' => 'required'\n ]);\n\n if ($validator->fails()) {\n return $this->responseError('User gagal ditambahkan', 422, $validator->errors());\n }\n\n $image = base64_encode(file_get_contents(request('foto')));\n $client = new Client();\n $res = $client->request('POST', 'https://freeimage.host/api/1/upload', [\n 'form_params' => [\n 'key' => '6d207e02198a847aa98d0a2a901485a5',\n 'action' => 'upload',\n 'source' => $image,\n 'format' => 'json'\n ]\n ]);\n\n $get = $res->getBody()->getContents();\n $data = json_decode($get);\n $foto = $data->image->display_url ?? null;\n\n $params = [\n 'nama' => $request->nama,\n 'email' => $request->email,\n 'password' => bcrypt($request->password),\n 'foto' => $foto,\n 'kode_member' => $request->kode_member ?? rand(999999999, 999999999999),\n 'no_hp' => $request->no_hp,\n 'umur' => $request->umur,\n 'alamat' => $request->alamat,\n ];\n\n $user = User::create($params);\n $user->assignRole(request('role'));\n\n return $this->responseOk($user, 201, 'User berhasil ditambahkan');\n }", "public function image_promotional() {\n // por el metodo de HTTP\n\n $api = $this->Api->findByTag(\"IMAGE_PROMOTIONAL\");\n $vdata[\"image\"] = $api->value;\n\n if ($this->input->server(\"REQUEST_METHOD\") == \"POST\") {\n $save = array(\"value\" => $this->do_upload('api'));\n $this->Api->update($api->api_id, $save);\n }\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/api/image_promotional/save\", $vdata, TRUE);\n $view['title'] = \"Registrar película\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function store(Request $request)\n {\n //dd($request->all());\n if(isset($request->picture)){\n $pic = $request->picture;\n $ajax = 1;\n }else{\n $pic = $request->all();\n $ajax = 0;\n }\n DB::beginTransaction();\n try {\n $img_helper = new ImageHelper;\n //0 is the fullsize, 1 is the thumb\n $pic['thumb'] = '';\n $img_helper->process_image($pic);\n\n } catch (Exception $e) {\n DB::rollBack();\n }\n try {\n $picture = Picture::create($pic);\n } catch (\\Illuminate\\Database\\QueryException $e) {\n //dd($e);\n DB::rollback();\n return response()->json(array(\"success\" => 0), 200);\n }\n if(!$picture){\n DB::rollback();\n return response()->json(array(\"success\" => 0), 200);\n }\n DB::commit();\n if($ajax)\n return response()->json(array(\"success\" => 1, \"redirect\" => $redirect), 200);\n else\n return redirect()->action('AdminController@index');\n }", "public function testimg_post()\n {\n echo \"FALSE\";\n $result = $this->input->post();\n $filename = $this->input->post(\"filename\");\n $string = $this->input->post(\"data\");\n $img = imagecreatefromstring(base64_decode($string));\n $img2 = imagecreatefromstring(base64_decode($result));\n if ($img != false) {\n imagejpeg($img, \"/resources/image/prueba1.jpg\");\n echo \"prueba1\";\n }\n if ($img2 != false) {\n echo \"prueba2\";\n imagejpeg($img2, \"/resources/image/prueba2.jpg\");\n }\n $config['upload_path'] = './resources/image/service';\n $config['allowed_types'] = 'gif|jpg|png';\n $config['max_size'] = 10000;\n $config['max_width'] = 9024;\n $config['max_height'] = 2768;\n $this->load->library('upload', $config);\n if (!$this->upload->do_upload()) {\n $error = array('error' => $this->upload->display_errors());\n $this->load->view('upload_form', $error);\n //print_r($error);\n }else{\n $data[\"upload_data\"] = $this->upload->data();\n }\n// $img = $this->input->post(\"image\");\n// $imgarr = explode(',', $this->image_string);\n// $image = base64_decode($imgarr[1]);\n// $results[\"data\"] = $result;\n// $results[\"parsed\"]= $result;\n// $temp_file_path = tempnam(sys_get_temp_dir(), 'androidtempimage'); // might not work on some systems, specify your temp path if system temp dir is not writeable\n// file_put_contents($temp_file_path, base64_decode($_POST['imageString']));\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function create(Request $request,$id)\n {\n $data = new Image;\n\n $data->title=$request->input('Title');\n $data->product_id=$id;\n $data->image=Storage::putFile('images',$request->file('Image') );\n $data->save();\n\n return $this->show($id);\n }", "private function checkImage(){\r\n \r\n $images = $this->image;\r\n @$imageName = $images['name'];\r\n @$imageTmp = $images['tmp_name'];\r\n @$imageSize = $images['size'];\r\n @$imageError = $images['error'];\r\n $imageExe = explode('.', $imageName);\r\n $imageExe = strtolower(end($imageExe));\r\n $newName = uniqid('post' , FALSE) . '.' . $imageExe;\r\n \r\n $allowed = [\"jpg\",\"jpeg\" ,\"bmp\" , \"gif\",\"png\"];\r\n// if(in_array($imageExe, $allowed) != 1) {\r\n// Messages::setMsg(\"خطأ\", \"يجب اختيار صورة حقيقية\", \"danger\") ;\r\n// echo Messages::getMsg();\r\n if(0) {\r\n \r\n }else if($imageSize > 1024 * 1024) {\r\n echo \"حجم الصورة جدا كبير\";\r\n }else if($imageError != 0) {\r\n echo \"يرجى ادخال صورة صحيحة\";\r\n }\r\n else{\r\n $dir = __DIR__ . \"/../libs/photos/\" ;\r\n if(!file_exists($dir)){\r\n mkdir($dir,TRUE);\r\n }\r\n $filedire = $dir.$newName;\r\n if(move_uploaded_file($imageTmp, $filedire)) {\r\n $this->uploadImage = $newName;\r\n }\r\n return TRUE;\r\n } // end else\r\n \r\n return false;\r\n }", "public function store(Request $data)\n { \n $produit = new produit;\n $produit->nom = $data->get('nom');\n $produit->description = $data->get('description');\n $produit->stock = $data->get('stock');\n $produit->prix = $data->get('prix');\n\nif($data->hasFile('image')){\n $file = $data->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = time() . '.' . $extension;\n $destinationPath = public_path().'/images/produit' ;\n $file->move($destinationPath,$filename);\n $produit->image = $filename; }else{$produit->image = \"test\";}\n\n $produit->save();\n \n }", "public function new(Request $r){\n $rules = array(\n 'title' => 'required|min:3',\n 'desc' => 'required',\n 'type' => 'nullable|numeric',\n 'category' => 'required',\n 'lat' => 'required',\n 'lng' => 'required',\n 'image' => 'nullable',\n 'gender' => 'required|min:0|max:1',\n 'age' => 'required|min:0|max:360',\n 'image.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n );\n\n $validator = \\Validator::make($r->all(), $rules);\n\n if($validator->fails()){\n return \\Redirect::back()->with([\"error\" => $validator->errors()]);\n }\n $title = $r->input(\"title\");\n $desc = $r->input(\"desc\");\n $cate = $r->input(\"category\");\n $lat = $r->input(\"lat\");\n $lng = $r->input(\"lng\");\n $gender = $r->input(\"gender\");\n $age = $r->input(\"age\");\n $files = $r->file(\"image\");\n $featured = $r->input(\"featured\");\n @$img_before_delete = json_decode($r->input(\"img_list\"),true);\n\n $insert = new AdoptThread;\n $insert->title = $title;\n $insert->description = $desc;\n\n $insert->category_pet = $cate;\n if($r->has(\"type\")) $insert->category_pet = $r->input(\"type\");\n $insert->poster_id = \\Session::get(\"id\");\n $insert->lati = $lat;\n $insert->longi = $lng;\n $insert->status = 1;\n $insert->gender = $gender;\n $insert->age = $age;\n $insert->post_date = date('Y-m-d h:i:s',time());\n\n try{\n $insert->save();\n\n $id = md5($insert->id);\n $path = public_path().\"/img/product/\".$id.\"/\";\n $url = array();\n\n if(($files) && (!empty($img_before_delete))){\n if(!in_array($featured,$img_before_delete)) $featured = $img_before_delete[0];\n\n\n foreach($files as $file){\n $name = $file->getClientOriginalName();\n $ext = $file->getClientOriginalExtension();\n\n if(in_array($name,$img_before_delete)){\n $filename = md5(time().$name).\".\".$ext;\n $file->move($path,$filename);\n\n if($featured == $name){\n $url[] = array(\"open_adoption_id\" => $insert->id,\"link_name\" => $id.\"/\".$filename, \"is_featured\" => 1);\n }else{\n $url[] = array(\"open_adoption_id\" => $insert->id,\"link_name\" => $id.\"/\".$filename, \"is_featured\" => 0);\n }\n\n }\n }\n }\n\n\n Gallery::insert($url);\n\n //send email notif for nearby seeker\n //get the pet category\n $pet_type = PetCategory::find($cate)->name;\n //haversine formula\n $distance_select = sprintf(\n \t\t\t\t\t \"ROUND(( 6371 * acos( cos( radians(%s) )\" .\" * cos( radians( lati ) )\" .\n \t\t\t\t\t \"* cos( radians( longi ) - radians(%s) )\" .\n \t\t\t\t\t \"+ sin( radians(%s) ) * sin( radians( lati ) )\" .\n \t\t\t\t\t \")\" .\n \t\t\t\t\t \"), 2 ) \" .\"AS distance\",$lat,$lng,$lat);\n\n $data = User::select( \\DB::raw(\"*\" .\",\". $distance_select) )->where(\"id\",\"!=\",\\Session::get(\"id\"))->where(\"active\",1)->having( 'distance', '<=', 5 )\n ->orderBy( 'distance', 'ASC' )->get();\n\n $notif = new Email;\n\n\n foreach($data as $d){\n $notif->postNearby($d->email,$d->username,$insert->id,$title,$pet_type,$age);\n }\n\n return \\Redirect::to(url(\"/open\"));\n }\n catch(\\Exception $e){\n $msg = $e->getMessage();\n\n return \\Redirect::back()->with([\"fatal\" => $msg]);\n }\n }", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "private function uploadPhoto()\n {\n try\n {\n \n $request = $_POST;\n\n //check if user logged in\n if(!userid())\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n //check if title provided\n if( !isset($request['photo_title']) || $request['photo_title']==\"\")\n throw_error_msg(\"photo_title not provided\");\n else\n $insert_array['photo_title'] = mysql_clean($request['photo_title']);\n\n //check if description provided\n if( !isset($request['photo_description']) || $request['photo_description']==\"\")\n throw_error_msg(\"photo_description not provided\");\n else\n $insert_array['photo_description'] = mysql_clean($request['photo_description']);\n\n //check if tags provided\n if(!isset($request['photo_tags']) || $request['photo_tags']==\"\")\n throw_error_msg(\"photo_tags not provided\");\n else\n $insert_array['photo_tags'] = mysql_clean($request['photo_tags']);\n\n //check if collection provided\n if(!isset($request['collection_id']) || $request['collection_id']==\"\")\n throw_error_msg(\"collection_id not provided\");\n elseif(!is_numeric($request['collection_id']))\n throw_error_msg('invalid collection_id');\n else\n $insert_array['collection_id'] = mysql_clean($request['collection_id']);\n\n if(!isset($_FILES['photo_file']))\n throw_error_msg(\"photo file not provided\");\n\n $info = pathinfo($_FILES['photo_file']['name']);\n \n $extension = strtolower($info['extension']);\n\n $tmp_file = FILES_DIR.'/temp/temp_photo_'.time().'.'.$extension;\n \n @move_uploaded_file($_FILES['photo_file']['tmp_name'], $tmp_file);\n\n $photo_upload_url = BASEURL.\"/actions/photo_uploader.php\";\n\n $post_array['plupload'] = 'yes';\n $post_array['name'] = $_FILES['photo_file']['name'];\n $post_array['file'] = '@'.$tmp_file;\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$photo_upload_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec ($ch);\n\n curl_close ($ch);\n \n $output = json_decode($server_output,true);\n\n if(isset($output['error']))\n {\n throw_error_msg( $output['error'] ) ;\n }\n else\n {\n //get ouput \n /*$insert_array['filename'] = $output['filename'];\n \n $insert_array['folder'] = createDataFolders(PHOTOS_DIR);*/\n $post_insert_array['insertPhoto'] = 'yes';\n $post_insert_array['photo_title'] = $insert_array['photo_title'];\n $post_insert_array['photo_description'] = $insert_array['photo_description'];\n $post_insert_array['photo_tags'] = $insert_array['photo_tags'];\n $post_insert_array['collection_id'] = $insert_array['collection_id']; \n $post_insert_array['file_name'] = $output['file_name'];\n $post_insert_array['title'] = $info['filename']; //$_FILES['photo_file']['name'];\n $post_insert_array['ext'] = $output['extension'];\n $post_insert_array['userid'] = userid();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$photo_upload_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_insert_array);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec ($ch);\n\n curl_close ($ch);\n \n $output = json_decode($server_output,true);\n \n if(isset($output['success']))\n {\n global $cbphoto;\n\n $photo = $cbphoto->get_photo($output['photoID']);\n $cbphoto->collection->add_collection_item($photo['photo_id'],$photo['collection_id']);\n \n $photo_details = format_photos( array($photo) );\n }\n else\n {\n throw_error_msg( $output['error'] ) ; \n }\n\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $photo_details);\n $this->response($this->json($data));\n } \n \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n }", "protected function getData(Request $request)\n {\n $rules = [\n 'club_id' => 'nullable',\n 'Titre' => 'string|min:1|nullable',\n 'description' => 'string|min:1|max:1000|nullable',\n 'photo' => ['file','nullable'],\n 'date' => 'nullable',\n 'lieu' => 'string|min:1|nullable',\n 'publuc' => 'nullable',\n 'etudiant_id' => 'nullable', \n ];\n\n\n \n $data = $request->validate($rules);\n\n if ($request->has('custom_delete_photo')) {\n $data['photo'] = null;\n }\n if ($request->hasFile('photo')) {\n // $data['photo'] = $this->moveFile($request->file('photo'));\n $path = Storage::disk('images')->put('post', $request->file('photo'));\n // Save thumb\n $img = InterventionImage::make($request->file('photo'))->widen(100);\n Storage::disk('thumbs')->put($path, $img->encode());\n $data['photo'] = $path;\n }\n if($data['publuc']==\"on\"){\n $data['publuc'] = 1; \n }else{\n $data['publuc'] = 0; \n }\n\n\n\n return $data;\n }", "public function store()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n if($this->crop())\n {\n try {\n $this->_propertyImage->pid = $this->_pid;\n $this->_propertyImage->image_full_path = $this->_imageOut;\n $this->_propertyImage->save();\n }catch(Exception $e) {\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'success',\n 'url' => $this->_imageOut\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }", "public function create($data)\n {\n return $data->file('file')->store('images');\n }", "public function add_post() {\n\n //get parameter\n $nama = $this->post(\"username\");\n $email = $this->post(\"email\");\n\n //check if api_key is not empty\n if ($nama == \"\" || $email == \"\") {\n //return NG , api_key , nama , email must not empty\n $err_message = str_replace(\"%FIELD%\", \"Name , Email\" ,ERROR_CODE_13);\n $this->response($this->_result_NG ($err_message, 13), REST_Controller::HTTP_OK);\n }\n\n //begin trans\n $this->db->trans_begin();\n\n $arrayToDB = array(\n 'username' => $nama,\n 'email' => $email,\n );\n\n foreach(count_chars($nama) as $key => $val ) {\n }\n if( $val == 1) {\n $arrayToDB['note'] = \"true\";\n } else {\n $arrayToDB['note'] = \"false\";\n }\n // if(count(array_count_values(str_split($nama))) == 1) {\n \n // if (!preg_match('/^[A-Za-z0-9]+$/', $nama))\n\t\t// {\n\t\t// $arrayToDB['note'] = \"true\";\n\t\t// } else {\n\t\t// \t$arrayToDB['note'] = \"false\";\n\t\t// }\n\n if (isset($_FILES['foto']['size']) && $_FILES['foto']['size'] > 0) {\n \t// print_r($this->input->post());\n //upload file image\n //prepare config.\n $config = array(\n \"allowed_types\" => \"png|gif|jpg\",\n \"file_ext_tolower\" => true,\n \"overwrite\" => false,\n \"max_size\" => \"102400\",\n \"file_target\" => array(\n \"upload_path\" => \"uploads/\",\n \"filename\" => \"files\",\n ),\n );\n\n //load the uploader library.\n $this->load->library('Uploader');\n\n //try to upload the image.\n $upload_result = $this->uploader->upload_files(\"foto\", false, $config);\n\n if ($upload_result['is_error'] == true) {\n if ($upload_result['result'][0]['error_code'] == 1) {\n //return NG , error messages\n $err_message = str_replace(\"%ERROR%\", $upload_result['result'][0]['error_msg'] ,ERROR_CODE_17);\n $this->response($this->_result_NG ($err_message, 17), REST_Controller::HTTP_OK);\n }\n } else {\n $arrayToDB['image'] = $upload_result['result'][0]['uploaded_path'];\n }\n }\n // print_r($$upload_result['result'][0]['uploaded_path']);exit();\n //update user data\n $result = $this->db->insert(\"user\",$arrayToDB);\n\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n\n $this->response($this->_result_NG (ERROR_CODE_16, 16), REST_Controller::HTTP_OK);\n\n } else {\n $this->db->trans_commit();\n\n //return user data and user reports\n $this->response($this->_result_OK(array(\n \"response\" => $result)) \n , REST_Controller::HTTP_OK);\n }\n }", "public function updatePhoto(Request $request)\n {\n// 'photo' => 'required', // required| SEPONE ESTO mimes:jpeg,bmp,png'\n// 'apodo'=>'required',\n// 'altura'=>'required',\n// 'peso'=>'required',\n// 'pie_dominante'=>'required'\n// ]);\n\n $token=$request->get('api_token');\n $jugador=DB::table('jugador')\n ->select('id_jugador')\n ->where('api_token','=',$token)\n ->get();\n\n $datos = Jugador::find($jugador[0]->id_jugador);\n\n// OPC Foto\n $file = $request->get('img');\n $publicId=\"fotoPerfil\".$jugador[0]->id_jugador;\n if(Cloudder::upload(\"data:image/png;base64,\".$file,$publicId,array(\"width\" => 250, \"height\" => 250))){\n $datos->tiene_imagen=1;\n $datos->update();\n return response()->json(['success' => true]);\n }else{\n return response()->json(['success' => false]);\n }\n\n }", "public function postImage(Request $request)\n\t{\n\t\t// Validating the user requests\n\t\t$this->validate($request, [\n\t\t\t'status' => 'required|max:2000',\n\t\t\t'images' => 'required|max:3000|image',\n\t\t]);\n\t\t//Deals with the image posted by the user\n\t\tif (Input::hasFile('images')) {\n\t\t\t//The variable containing the image\n\t\t\t$imageFile = Input::file('images');\n\t\t\t\n\t\t\t$urlString = strtolower($request->input('status'));\n\t\t\t$urlString = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $urlString);\n\t\t\t\n\t\t\t//The Filename and path is created\n\t\t\t$filename = str_slug($imageFile->getClientOriginalName() . substr(5,uniqid())).'.'.$imageFile->getClientOriginalExtension();\n\t\t\t$path = 'uploads/statusImages/' . Auth::user()->getIdentifier() . '/images' . '/';\n\t\t\t$urlString = $urlString.$filename;\n\t\t\t\n\t\t\t//Dealing with large images.\n\t\t\t$userImage = Images::make($imageFile);\n\t\t\t$height = $userImage->height();\n\t\t\tif ($height > '999') {\n\t\t\t\t$largeThumbnailPath = public_path($path);\n\t\t\t\t$largeThumbnailName = 'lg' . $filename;\n\t\t\t\t$this->largeImageHandler($userImage, $largeThumbnailPath, $largeThumbnailName);\n\t\t\t};\n\t\t\t$imageFile->move($path, $filename);\n\t\t\t// Enters the image in the database\n\t\t\tif ($height > '999') {//if deals with large images\n\t\t\t\tAuth::user()->image()->create([\n\t\t\t\t\t\t\t\t\t\t\t\t 'body' => $request->input('status'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'image_path' => $request->input($path, $path . $largeThumbnailName),\n\t\t\t\t\t\t\t\t\t\t\t\t 'largeImage_path' => $request->input($path, $path . $filename),\n\t\t\t\t\t\t\t\t\t\t\t\t 'url' => $request->input($path, $urlString)\n\t\t\t\t\t\t\t\t\t\t\t ]);\n\t\t\t} else {\n\t\t\t\tAuth::user()->image()->create([\n\t\t\t\t\t\t\t\t\t\t\t\t 'body' => $request->input('status'),\n\t\t\t\t\t\t\t\t\t\t\t\t 'image_path' => $request->input($path, $path . $filename),\n\t\t\t\t\t\t\t\t\t\t\t\t 'url' => $request->input($path, $urlString)\n\t\t\t\t\t\t\t\t\t\t\t ]);\n\t\t\t}\n\t\t}\n\t\treturn redirect()->route('home')->with('success', 'Image Posted');\n\t}", "public function fileisinvalid($request,$addeditid=0)\n {\n \n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"jpg\";\n $allowedFileExtAr[]=\"jpeg\";\n $allowedFileExtAr[]=\"png\";\n \n $filecontrolname=\"image_name\";\n \n \n\t\t\t\t$allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['jpg']=(5*1024*1024);\n\t\t\t\t$allowedFileExtSizeAr['jpeg']=(5*1024*1024);\n $allowedFileExtSizeAr['png']=(5*1024*1024);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//max_width & max_height ,min_width & min_height,equal_width & equal_height \n\t\t\t\t$allowedFileResolAr=array();\n\t\t\t\t\n\t\t\t\t$allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n\t\t\t\t$allowedFileResolAr['jpg']=array('min_width'=>537,'min_height'=>507);\n $allowedFileResolAr['png']=array('min_width'=>537,'min_height'=>507);\n $func=\"validatefile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/venueimage/source-file/\"; \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid,$destinationsourcePath,$errfileAr=array()) ;\n \n \n \n \n \n /* echo \"==chkimg1==><pre>\";\n print_r($chkimgresp);\n echo \"</pre>\"; */ //exit();\n \n \n $invalidresp=false;\n \n $errormsgs=''; $fileuploadednames=array(); $errfileAr=array();\n $totalfileposted=0;\n \n if(!empty($chkimgresp))\n {\n \n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('errfileAr',$chkimgresp))\n {\n $errfileAr=$chkimgresp['errfileAr'];\n }\n \n if(array_key_exists('totalfileposted',$chkimgresp))\n {\n $totalfileposted=$chkimgresp['totalfileposted'];\n }\n \n }\n \n $resparray=array();\n $resparray['errormsgs']=$errormsgs;\n $resparray['errfileAr']=$errfileAr;\n $resparray['totalfileposted']=$totalfileposted;\n \n return $resparray;\n }", "public function store(Request $request)\n {\n\n if (Auth::check()) {\n if($request->hasfile('img'))\n {\n foreach($request->file('img') as $image)\n {\n $name=$image->getClientOriginalName();\n $image->move(public_path().'/item_images/', $name); \n $dataimg[] = uniqid().\"_\".$name; \n }\n }\n $userid = Auth::user()->id;\n\n $data= new Post;\n $data->title=$request->get('title');\n $data->user_id=$userid;\n $data->price=$request->get('price');\n $data->owner=$request->get('owner');\n $data->city=$request->get('city');\n $data->township=$request->get('township');\n $data->street=$request->get('street');\n $data->btype=$request->get('btype');\n $data->ptype=$request->get('ptype');\n $data->bedroom=$request->get('bedroom');\n $data->aircon=$request->get('aircon');\n $data->area=$request->get('area');\n $data->floor=$request->get('floor');\n $data->others=$request->get('others');\n $data->action=\"0\";\n $data->img=json_encode($dataimg);\n $data->save();\n\n Session::flash('flash_message', 'Post successfully added!');\n return redirect()->back();\n\n }else{\n return redirect('home');\n }\n\n \n }", "public function createUpdatedImage($request)\n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'POST');\n $options = $this->createHttpClientOptions();\n \n try {\n $response = $this->client->send($request, $options);\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n } catch (RequestException $e) {\n $this->processException($e);\n }\n }", "public function postAvatar()\n {\n if (isset($_SERVER['HTTP_ORIGIN'])) {\n ImageUpload::enableCORS($_SERVER['HTTP_ORIGIN']);\n }\n\n if (Request::server('REQUEST_METHOD') == 'OPTIONS') {\n exit;\n }\n\n $json = ImageUpload::handle(Input::file('filedata'));\n\n if ($json !== false) {\n return Response::json($json, 200);\n }\n\n return Response::json('error', 400);\n }", "public function store(Request $request)\n { \n if($request->get('image'))\n {\n $image = $request->get('image');\n $name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n \\Image::make($request->get('image'))->save(storage_path('app/public/') . $name);\n\n $newImage = WorkImage::create([\n 'image' => $name,\n 'work_id' => $request->work_id,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n return response()->json(['data' => $newImage, 'success' => 'Fotoğraf başarılı bir şekilde yüklendi.'], 200);\n }\n else\n {\n return response()->json(['error' => 'Fotoğraf yüklenemedi.'], 422);\n }\n }", "private function _getDataImg(){\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO, 0755);\n $idUser = $this->User->getIdUser($_SESSION['login']);\n\t\t$this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS, 0755);\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS.'min'.DS, 0755);\n\n if (isset($_SESSION['filter']) && $_SESSION['filter'] !== 'none'){\n $filter = $_SESSION['filter'];\n } else {\n $filter = 'none';\n }\n if (!empty($_SESSION['objFilter']) && $_SESSION['objFilter'] !== null){\n $filterObj = $_SESSION['objFilter'];\n } else {\n $filterObj = 'noneObj';\n }\n $tabPathId = $this->Photo->savePhotoTmpToDb($idUser, $_POST['img64'], REPO_PHOTO.DS.$idUser, $filter, $filterObj);\n $_POST['img64'] = \"\";\n return $tabPathId;\n\t}", "public function upload(Request $req)\n {\n //$customer = DB::table('customerstransactions')->where('email', '=', $email)->get();\n\n //$users = Officer::orderBy('id','DESC')->get(); //change Officer to (Agent)->tablename\n\n // return response()->json([\n // 'status' => 200,\n // 'customers' => $req->data\n // ]);\n //$newName= $random().'.'.$req->data->getClientOriginalExtension();\n //$newName=$req->file('data')->getClientOriginalName();\n // $fielnames = $request->input('name');\n // $email = $request->input('email');\n // $filepath = $request->file('file')->store('products');\n \n // $upload=DB::table('image')->insert([\n // 'name' => $fielnames ,\n // 'img_path' => $filepath,\n // 'email'=> $email\n // ]); \n // if($upload)\n // {\n // return response()->json($upload);\n\n // }else{\n // return response()->json($upload);\n // }\n return response()->json($upload);\n }", "public function save_image(Request $request)\n {\n $user=Auth::user();\n $lang=$request->header('lang');\n if($request->image){\n BaseController::deleteFile('users',$user->image);\n $name=BaseController::saveImage('users',$request->file('image'));\n $user->image=$name;\n }else{\n $msg=$lang=='ar' ? 'من فضلك ارفع الصورة' : 'please upload image';\n return $this->apiResponseMessage(0,$msg,200);\n }\n $user->save();\n $msg=$lang=='ar' ? 'تم رفع الصورة بنجاح' : 'image uploaded successfully';\n return $this->apiResponseData(new UserResource($user),$msg,200);\n\n }", "public function postAddImage() {\n if (Request::ajax()) {\n // A list of permitted file extensions\n $allowed = array('png', 'jpg', 'gif');\n\n $returnArr = array();\n $returnArr['error'] = false;\n\n if (Input::file('upl')->isValid() && $_FILES['upl']['error'] == 0) { // laravel check if valid\n $fullFileName = $this->tmpImgFolder . $_FILES['upl']['name'];\n $extension = pathinfo($fullFileName, PATHINFO_EXTENSION);\n\n if (!in_array(strtolower($extension), $allowed)) { // check extension\n $returnArr['error'] = true;\n $returnArr['msg'] = \"The extension '$extension' is not allowed.\";\n } else {\n $fileSize = $this->convertFileSize($_FILES['upl']['size'], 'MB');\n\n if ($extension != 'gif' && $fileSize <= self::MAX_UPLOAD_SIZE || $extension == 'gif' && $fileSize <= self::GIF_MAX_UPLOAD_SIZE) { // check on size\n if (!File::exists($fullFileName)) { // make sure file isn't already in temp folder\n $fileSpaceReplace = str_replace(' ', '_', $_FILES['upl']['name']);\n\n if (Input::file('upl')->move($this->tmpImgFolder, $fileSpaceReplace)) { // attempt to move file to tmp folder\n } else {\n $returnArr['error'] = true;\n $returnArr['msg'] = 'There was an error moving the file.';\n }\n }\n } else {\n $returnArr['error'] = true;\n $returnArr['msg'] = 'The file your are trying to upload is too large.';\n }\n }\n } else {\n $returnArr['error'] = true;\n $returnArr['msg'] = 'There was an error uploading this file.';\n }\n\n return Response::json($returnArr);\n }\n\t}", "function create(){\r\n $base = \"data:image/jpeg;base64\";\r\n $query = \"INSERT INTO\r\n \" . $this->table_name . \"\r\n SET\r\n usuCreacion=:origen, identificador='ccc', fk_proveedor=:proveedor, fk_obra=:obra, foto=:img\";\r\n\r\n //--Preparando el query para ejecucion\r\n $stmt = $this->conn->prepare($query);\r\n \r\n //$this->identificador = htmlspecialchars(strip_tags($this->identificador));\r\n $this->origen = htmlspecialchars(strip_tags($this->origen));\r\n $this->proveedor = htmlspecialchars(strip_tags($this->proveedor));\r\n $this->obra = htmlspecialchars(strip_tags($this->obra));\r\n $this->img = htmlspecialchars(strip_tags($this->img)); \r\n\r\n // bind values\r\n //$stmt->bindParam(\":identificador\", $this->identificador);\r\n $stmt->bindParam(\":origen\", $this->origen);\r\n $stmt->bindParam(\":proveedor\", $this->proveedor);\r\n $stmt->bindParam(\":obra\", $this->obra);\r\n $stmt->bindParam(\":img\", $this->img);\r\n \r\n\r\n // execute query\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n return false;\r\n }", "public function store(Request $request)\n {\n header('Access-Control-Allow-Origin: *');\n $data = array();\n $data['pro_name'] = $request->pro_name;\n $data['type_pro'] = $request->type_pro;\n $data['number'] = $request->number;\n $data['price_old'] = $request->price_old;\n $data['price_sale'] = $request->price_sale;\n $data['delivery_price'] = $request->delivery_price;\n $data['address'] = $request->address;\n $data['status'] = 'ກໍາລັງສັ່ງ';\n $data['detail'] = $request->detail;\n\n $image = $request->file('image');\n\n if($image){\n $image_name = str_random(20);\n $ext = strtolower($image->getClientOriginalExtension());\n $image_full_name = $image_name.'.'.$ext;\n $upload_path = 'img/';\n $image_url = $upload_path.$image_full_name;\n $success = $image->move($upload_path,$image_full_name);\n $data['image'] = $image_url;\n }\n\n if($data == null){\n return response()->json(['status' => 'error']);\n }else{\n DB::table('products')->insert($data);\n return response()->json(['status' => 'success']);\n }\n\n }", "public function imageCropPost(Request $request)\n {\n $data = $request->image;\n\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n\n $data = base64_decode($data);\n $image_name= time().'.png';\n $path = public_path() . \"/upload/\" . $image_name;\n\n\n file_put_contents($path, $data);\n\n\n return response()->json(['success'=>'done']);\n }", "public function img(){\n\t\t$ret = array('img'=>'','thumb'=>'','msg'=>'');\n\t\tdo{\n\t\t\t//get parameters\n\t\t\t$must = array();\n\t\t\t$fields = array('is_thumb','thumb_width','thumb_height','is_resize','resize_width','resize_height');\n\t\t\t$params = array();\n\t\t\tforeach ( $fields as $v ){\n\t\t\t\t$params[$v] = intval($this->input->post($v));\n\t\t\t}\n\t\t\tunset($v);\n\t\t\t//check request\n\t\t\t/**\n\t\t\tif( !self::$user ){\n\t\t\t\t$ret['msg'] = 'user is not login';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t*/\n\t\t\t$img = uploadFile('img');\n\t\t\tif( !($img && file_exists($img['file'])) ){\n\t\t\t\t$ret['msg'] = 'image upload failure';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$imgInfo = getImageInfo($img['file']);\n\t\t\tif( !($imgInfo && isset($imgInfo['type']) && in_array($imgInfo['type'], array('jpeg','png','gif','bmp'))) ){\n\t\t\t\t$ret['msg'] = 'image type is not allowed';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$ret = array(\n\t\t\t\t'msg'\t=> 'success',\n\t\t\t\t'img'\t=> $img['url'],\n\t\t\t\t'thumb'\t=> '',\n\t\t\t);\n\t\t\t//create thumb\t\t\t\n\t\t\tif( $params['is_thumb']==1 ){\n\t\t\t\t$config = array();\n\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t$config['source_image'] = $img['file'];\n\t\t\t\t$config['quality'] = 100;\n\t\t\t\t$config['create_thumb'] = TRUE;\n\t\t\t\t$config['width'] = $params['thumb_width'];\n\t\t\t\t$config['height'] = $params['thumb_height'];\n\t\t\t\t$this->load->library('image_lib', $config);\n\t\t\t\t$this->image_lib->resize();\n\t\t\t\t$this->image_lib->clear();\n\t\t\t\t$ext = strrchr($img['url'], '.');\n\t\t\t\t$ret['thumb']\t= str_replace($ext, '_thumb'.$ext, $img['url']);\n\t\t\t}\n\t\t\t//resize\n\t\t\tif( $params['is_resize']==1 ){\n\t\t\t\t$config = array();\n\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t$config['source_image'] = $img['file'];\n\t\t\t\t$config['quality'] = 100;\n\t\t\t\t$config['width'] = $params['resize_width'];\n\t\t\t\t$config['height'] = $params['resize_height'];\n\t\t\t\t$this->load->library('image_lib', $config);\n\t\t\t\t$this->image_lib->resize();\n\t\t\t\t$this->image_lib->clear();\n\t\t\t}\n\t\t} while (false);\n\t\techo json_encode($ret);\n\t\texit;\t}", "public function storeImage(Request $request)\n {\n $request->validate([\n 'recipe_id' => 'required',\n 'image' => 'nullable',\n ]);\n\n if (!$request->image) {\n return response()->json([\n 'message' => 'No new image provided'\n ]);\n }\n\n $recipe = Recipe::findOrFail($request->recipe_id);\n\n list($type, $imageData) = explode(';', $request->image);\n list(, $imageData) = explode(',', $imageData);\n\n\n $imageData = base64_decode($imageData);\n // Get file mime type\n preg_match(\n '/data:[a-z]*\\/([a-z]*)/',\n substr($type, 0, 50),\n $imageMimeMatches\n );\n\n $mimeType = $imageMimeMatches[1];\n $fileType = $mimeType;\n\n // Validate type of file\n if(in_array($fileType, [ 'jpeg', 'png', 'gif' ])) {\n // Set a unique name to the file and save\n $file_name = 'images/' . uniqid() . '.' . $fileType;\n Storage::disk('local')->put('public/'.$file_name, $imageData);\n // $path = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix();\n\n $recipe->image = $file_name;\n $recipe->save();\n\n return response()->json([\n 'message' => 'Successfully stored recipe image!',\n // 'path' => $path.$file_name,\n 'path' => $file_name,\n ]);\n }\n else {\n // echo 'Error : Only JPEG, PNG & GIF allowed';\n return response()->json([\n 'message' => 'Error : Only JPEG, PNG & GIF allowed'\n ]);\n }\n }", "public function uploadNewImageAction(Request $request)\n {\n $id = (int)$request->attributes->get('id');\n $userAttrs = $this->user->getAttributes();\n $result = array('isError' => 1, 'message' => \"Vous n'avez pas le droit d'exécuter cette action\");\n $isTest = (int)$request->attributes->get('test');\n $testResult = (int)$request->attributes->get('result');\n if($isTest == 1 && $testResult == 0)\n {\n $userAttrs = array('id' => (int)$request->attributes->get('user'));\n }\n elseif($isTest == 1 && $testResult == 1)\n {\n $userAttrs = array('id' => (int)$request->attributes->get('elUser1'));\n }\n $offerData = $this->enMan->getRepository('CatalogueOffersBundle:Offers')->getOfferData($id, (int)$userAttrs['id']);\n if(isset($offerData['id_of']) && $offerData['id_of'] == $id)\n {\n // access tests case\n if($isTest == 1)\n {\n return new Response(parent::testAccess($testResult, 1), 200);\n }\n $images = $this->enMan->getRepository('CatalogueImagesBundle:OffersImages')->getImagesByOfferAndUser($id, $userAttrs['id']);\n $newName = 1;\n foreach($images as $image)\n {\n $part = explode('.', $image['imageName']);\n $newNameTmp = (int)$part[0] + 1;\n if($newNameTmp > $newName)\n {\n $newName = $newNameTmp;\n }\n }\n if(count($images) >= $this->config['images']['configuration']['offer']['maxImages'])\n {\n return $this->render('::frontend_ajax_error.html.php', array(\"text\" => \"Vous avez dépassé le nombre d'images pour cette offre\", \"id\" => \"error\".time(), \"class\" => \"autoGenerated\"));\n }\n $frontendHelper = new FrontendHelper();\n $ext = $frontendHelper->getFileExtension($_FILES['imageField']['name'], 'jpg|gif|jpeg|png');\n $options = array('maxSize' => $this->config['images']['maxSize'], 'extensions' => $this->config['images']['extensions'], \n 'files' => array('imageField'),\n 'required' => array(false),\n 'isUploadify' => true,\n 'names' => array($newName.'.'.$ext));\n $imgClass = new Image($options, $frontendHelper);\n if($imgClass->hasErrors == true) \n {\n $values = array($this->config['images']['extensions'], Tools::convertSize('b', 'mb', $options['maxSize']).' mb');\n $result['message'] = $imgClass->errors[0]['type']; //str_replace($this->config['images']['variables'], $values, $this->config['images']['messages'][$imgClass->errors[0]['type']]);\n $result['isError'] = 1;\n }\n else\n {\n $fileOptions = array('directory' => $this->config['images']['offersDir'].$id.'/',\n 'alias' => $this->config['images']['configuration']['offer']['prefix'],\n 'dimensions' => $this->config['images']['configuration']['offer']['dims'],\n 'ratio' => $this->config['images']['configuration']['offer']['ratio'],\n 'thumbs' => true);\n try\n {\n $imgClass->uploadFiles($fileOptions);\n $offerRef = $this->enMan->getReference('Catalogue\\OffersBundle\\Entity\\Offers', (int)$id);\n $oimEnt = new OffersImages();\n $oimEnt->setData(array('imageOffer' => $offerRef, 'imageName' => $newName.'.'.$ext, 'imageDate' => ''));\n $this->enMan->persist($oimEnt);\n $this->enMan->flush();\n $result['isError'] = 0;\n $result['fileName'] = $oimEnt->getImageName();\n return $this->render('CatalogueImagesBundle:Images:uploadTemporary.html.php', array('file' => $oimEnt->getImageName(),\n 'ticket' => $this->sessionTicket, 'dir' => $this->config['view']['dirs']['offersImg'].$id, 'id' => $oimEnt->getIdOi(), 'route' => 'offersImagesDelete'));\n }\n catch(Exception $e)\n {\n $result['isError'] = 1;\n $result['message'] = $this->config['messages']['errorGeneral'];\n $logger->debug(sprintf('[IMGERROR] Error during image upload. Catched exception : %s', $e->getMessage()));\n }\n }\n }\n // access tests case\n if($isTest == 1)\n {\n return new Response(parent::testAccess($testResult, 0), 200);\n }\n if($result['isError'] == 1) \n {\n return $this->render('::frontend_ajax_error.html.php', array(\"text\" => $result['message'], \"id\" => \"error\".time(), \"class\" => \"autoGenerated\"));\n }\n }", "private function uploadPhoto($p){\t\t\t\t\n\t\tinclude_once('Zend/File/Transfer/Adapter/Http.php');\n\t\tinclude_once('default/views/filters/ImageFilter.php');\t\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeAd.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_insVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_selVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_delVPic.php');\n\t\t\n\t\t$return = array('r' => false);\t\n\t\t$imgCtrl = new Zend_File_Transfer_Adapter_Http();\n\t\t\n\t\t//This is the bike advertisement\n\t\t//$p = $this -> bikeNS -> bikeAds;\t\t\t\n\t\tif(isset($p['bikeID']) && ($imgCtrl->isUploaded() == true)){\n\t\t\tif (!isset($p['bikeDetail'])){\n\t\t\t\t$bikeDetail = db_selBikeAd(array('bikeID'=>$p['bikeID']));\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$bikeDetail = $p['bikeDetail'];\n\t\t\t}\n\t\t\t\n\t\t\t//Check if bike advertisement exists\n\t\t\tif (($bikeDetail != false) && (count($bikeDetail) == 1)){\n\t\t\t\t$bikeDetail = $bikeDetail[0];\n\t\t\t\t$bikeID = $bikeDetail['bikeID'];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$vPicID = db_insVPic(array(\t'vType' => System_Properties::BIKE_ABRV\n\t\t\t\t\t\t\t\t\t \t\t, 'vID' => $bikeID\n\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\tif (($vPicID != false) && is_numeric($vPicID)){\t\t\n\t\t\t\t\t$imgCtrl -> setOptions(array('useByteString' => false));\n\t\t\t\t\t$imgCtrl -> addValidator('FilesSize', false, System_Properties::PIC_FILE_SIZE);\n\t\t\t\t\t$imgCtrl -> addValidator('Extension', false, System_Properties::$PIC_EXT);\n\t\t\t\t\t\n\t\t\t\t\t//$imgHash = session_id().'_'.$imgCtrl -> getHash();\n\t\t\t\t\t$destURI = System_Properties::PIC_PATH.'/'.System_Properties::BIKE_ABRV.'_'.$bikeID.'_'.$vPicID.'.jpeg';\t\t\t\t\n\t\t\t\t\t$imgCtrl -> addFilter('Rename', array('target' => '.'.$destURI, 'overwrite' => true));\n\t\t\t\t\t\n\t\t\t\t\t//$mimeTypeDetails = explode('/',$imgCtrl -> getMimeType());\n\t\t\t\t\t$mimeTypeDetails = explode('.', basename($imgCtrl -> getFileName()));\n\t\t\t\t\t$mimeTypeDetails = $mimeTypeDetails[1];\n\t\t\t\t\t$imgFilter = new ImageFilter(array(\t'imgTrgWidth' => System_Properties::PIC_SIZE_W,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgTrgHeight' => System_Properties::PIC_SIZE_H,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgSrcExtension' => $mimeTypeDetails));\n\t\t\t\t\t$imgCtrl -> addFilter($imgFilter);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Upload photo\n\t\t\t\t\t//if ($imgCtrl -> isUploaded() && $imgCtrl -> isValid()){\n\t\t\t\t\t//if (!isset($this -> bikeNS -> bikePhoto[$imgHash]) && $imgCtrl -> receive()){\t\n\t\t\t\t\tif (in_array(strtolower($mimeTypeDetails), System_Properties::$PIC_EXT) \n\t\t\t\t\t\t&& ($imgCtrl -> receive())){\n\t\t\t\t\t\t$bikePhoto = db_selVPic(array('vPicID' => $vPicID\n\t\t\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif($bikePhoto != false){\n\t\t\t\t\t\t\t$bikePhoto = $bikePhoto[0];\n\t\t\t\t\t\t\t$bikePhoto['destURI'] = $destURI;\n\t\t\t\t\t\t\t$bikePhoto['vPicNew'] = true;\n\t\t\t\t\t\t\t$return['r'] = true;\n\t\t\t\t\t\t\t$return['bikePhoto'] = $bikePhoto;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tdb_delVPic(array('vPicID'=>$vPicID));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\t\t\n\t}", "public function addPhoto(Request $request) {\n\n // Log::info($request->all());\n \n if(Input::hasFile('file') && Input::file('file')->isValid() && !is_null($request->id))\n {\n\n $file = Input::file('file');\n\n $extension = $file->getClientOriginalExtension(); \n\n $fileName = str_random(10) .'.'. $extension;\n\n $clientMimeType = $file->getClientMimeType();\n\n if(!preg_match(\"/^(image).+$/\", $clientMimeType)) {\n Log::info(\"error not an image \". $clientMimeType);\n return response()->json([\"error\" => \"Not an Image\"], 200);\n }\n\n $original = config('image.profile.original.path') . $fileName;\n\n \\Storage::disk('public')->put( $original , file_get_contents( $file->getRealPath()) );\n \n //persist the record to the db\n $photo = new Photo();\n $photo->property_id = $request->id;\n $photo->url = $original;\n $photo->save();\n\n return response()->json([\"url\" => $original], 200);\n }\n \n return response()->json([\"error\" => \"No File Selected\"], 504);\n }", "public function sumate(Request $request){\n\n //Recoger POST\n $json = $request->input('json',null);\n $params = json_decode($json);\n $params_array = json_decode($json,true);\n \n //guardamos las variables\n $nombre = (!is_null($json) && isset($params->nombre)) ? $params->nombre : null;\n $apellido = (!is_null($json) && isset($params->apellido)) ? $params->apellido : null;\n $email =(!is_null($json) && isset($params->email)) ? $params->email : null;\n $telefono = (!is_null($json) && isset($params->telefono)) ? $params->telefono : null; \n $profesion = (!is_null($json) && isset($params->profesion)) ? $params->profesion : null; \n $imagen= $request->file('imagen',null);\n $cv= $request->file('cv',null);\n\n //si existen datos: validamos datos\n if(!is_null($params_array)){\n\n //validar datos\n $validate = \\Validator::make( $params_array, [\n 'email' => 'required|email|max:45',\n 'nombre' => 'required', \n 'apellido' => 'required', \n 'telefono' => 'required', \n ]);\n\n if($validate->fails()){\n $data = array(\n 'status' => 'error',\n 'code' => '404',\n 'errores' => $this->errores($validate->errors()),\n 'mensaje' => 'No se creó el usuario'\n );\n return response()->json($data,200); \n }\n\n // verificar imagen\n if(!is_null($imagen)){\n \n $validar=\\Validator::make([\"imagen\"=>$imagen],[\n 'imagen' => 'mimes:jpeg,gif,png|required'\n ]);\n \n if($validar->fails()){\n $data = array(\n 'status' => 'error',\n 'code' => 400,\n 'errores' => $this->errores($validar->errors()),\n 'messages' => 'Campos no validos',\n );\n return response()->json($data,200); \n \n }else{\n //Foto valida\n $imagen_original_path = $imagen->getClientOriginalName();\n $imagen_new_path = time().$imagen->hashName();\n \\Storage::disk('public')->put($imagen_new_path, \\File::get($imagen)); \n }\n }else{\n $data = array(\n 'status' => 'error',\n 'code' => 400,\n 'messages' => 'Campos no validos',\n 'errores' => ['La imagen es obligatoria']\n );\n return response()->json($data,200); \n }\n\n //obtener cv\n $cv=$request->file('cv',null);\n\n //VALIDAR CV\n if(!is_null($cv)){\n\n $validar=\\Validator::make([\"cv\"=>$cv],[\n 'cv'=> 'required'\n ]);\n\n if($validar->fails()){\n $data = array(\n 'status' => 'error',\n 'code' => 400,\n 'errores' => $this->errores($validar->errors()),\n 'messages' => 'Error CV',\n );\n return response()->json($data,200); \n\n }else{\n //CV valido\n $cv_original_path=$cv->getClientOriginalName();\n $cv_new_path=time().$cv->hashName();\n \\Storage::disk('public')->put($cv_new_path, \\File::get($cv));\n }\n\n }else{\n $data = array(\n 'status' => 'error',\n 'code' => 400,\n 'messages' => 'Error CV',\n 'errores' => ['No ingresó el cv']\n );\n return response()->json($data,200); \n } \n \n $avisos = new Avisos();\n $avisos->sumate($nombre, $apellido, $email, $telefono, $imagen, $cv);\n $avisos->enviarAvisos();\n\n $data = array(\n 'status' => 'success',\n 'mensaje' => 'Se envio la solicitud'\n );\n\n // no hay datos por post \n }else{\n $data = array(\n 'status' => 'error',\n 'code' => '404',\n 'errores' => ['no hay datos por POST'],\n 'mensaje' => 'No se creó el usuario'\n );\n }\n return $data;\n }", "public function store(Request $request)\n {\n\n $folderPath = \"images/\";\n// return strlen ( $_POST['image1']);\n// return $_POST['image1']=='null';\n// exit;\n if ($_POST['image1']=='' ||$_POST['image1']=='null'){\n $path1=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image1']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path1=$file;\n }\n\n\n\n if ($_POST['image2']=='' ||$_POST['image2']=='null'){\n $path2=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image2']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path2=$file;\n }\n\n if ($_POST['image3']=='' ||$_POST['image3']=='null'){\n $path3=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image3']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path3=$file;\n }\n\n if ($_POST['image4']==''||$_POST['image4']=='null'){\n $path4=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image4']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path4=$file;\n }\n\n// $request->hasFile('image1')?$path1 = $request->file('image1')->store('images'):$path1='';\n// $request->hasFile('image2')?$path2 = $request->file('image2')->store('images'):$path2='';\n// $request->hasFile('image3')?$path3 = $request->file('image3')->store('images'):$path3='';\n// $request->hasFile('image4')?$path4 = $request->file('image4')->store('images'):$path4='';\n// $path = $request->file('image2')->store('images');\n// $path = $request->file('image3')->store('images');\n// $path = $request->file('image4')->store('images');\n\n// return $path;\n//\n// exit;\n $d=New Asistencia();\n// $d->objetos=$request->objetos;\n isset($request->objetos)&&$request->objetos!='undefined'?$d->objetos=strtoupper($request->objetos):$d->objetos='';\n $d->recinto=Auth::user()->tipo;\n// $d->motivo=$request->motivo;\n isset($request->motivo)&&$request->motivo!='undefined'?$d->motivo=strtoupper($request->motivo):$d->motivo='';\n// $d->targeta=$request->targeta;\n isset($request->targeta)&&$request->targeta!='undefined'?$d->targeta=strtoupper($request->targeta):$d->targeta='';\n $d->image1=$path1;\n $d->image2=$path2;\n $d->image3=$path3;\n $d->image4=$path4;\n $d->persona_id=$request->persona_id;\n $d->destino_id=$request->destino_id;\n $d->user_id=Auth::user()->id;\n $d->save();\n// return $d;\n return Asistencia::with('persona')\n ->with('destino')\n ->with('user')\n ->where('recinto','=',Auth::user()->tipo)\n ->where('user_id','=',Auth::user()->id)\n ->where('id','=',$d->id)\n ->get();\n\n }", "public function uploadHeaderImage(Request $request) {\n try {\n\n $phone_header_image = $request->file('phone_header_image');\n $tablet_header_image = $request->file('tablet_header_image');\n $imageData = $request->all();\n //phone header image\n $imageRules = ['phone_header_image' => 'mimes:jpeg,jpg,png|max:' . MAX_FILE_UPLOAD_SIZE, 'tablet_header_image' => 'mimes:jpeg,jpg,png|max:' . MAX_FILE_UPLOAD_SIZE];\n $imageValidator = Validator::make($imageData, $imageRules);\n if ($imageValidator->fails()) {\n throw new Exception(json_encode($imageValidator->errors()));\n }\n if (!empty($phone_header_image)) {\n $image1 = self::_uploadImage($phone_header_image, self::getPhoneHeaderImageUploadPath(), 640, 264);\n $phoneURL = self :: getPhoneHeaderImageUploadUrl();\n $image['phone_header_image'] = $phoneURL . '/' . $image1;\n }\n //tablet header image\n if (!empty($tablet_header_image)) {\n $image1 = self::_uploadImage($tablet_header_image, self::getTabletHeaderImageUploadPath(), 1536, 634);\n $tabURL = self :: getTabletHeaderImageUploadUrl();\n $image['tablet_header_image'] = $tabURL . '/' . $image1;\n }\n\n $result = [\n 'success' => TRUE,\n 'data' => $image\n ];\n } catch (Exception $ex) {\n $result = [\n 'success' => FALSE,\n 'message' => $ex->getMessage(),\n ];\n }\n return response()->json($result);\n }", "public function store() {\n\n //trim all input data\n //Input::merge(array_map('trim', Input::all()));\n //echo '<pre>';print_r(Input::file('images'));die('======Debugging=======');\n\n // validate\n $rules = array(\n 'device_phone' => 'required',\n 'make_region' => 'required',\n 'model' => 'required',\n 'make' => 'required',\n 'title' => 'required',\n 'phone' => 'required',\n 'price' => 'required',\n 'description' => 'required',\n //'status' => 'required',\n );\n//echo '<pre>';print_r(Input::hasFile('images*'));die('======Debugging=======');\n $validator = Validator::make(Input::all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n $response = array( 'status'=> 'fail', 'message'=> $validator->messages()->first() );\n } else {\n\n $apiUser = Apiuser::where('token','=',trim(Input::get('device_phone')))->first();\n\n if( !empty($apiUser->api_users_id) && !empty($apiUser->is_active) ){\n\n\n $mobileUser = Usermobile::where('api_users_id','=',$apiUser->api_users_id)->first();\n\n //User already registered\n if( !empty($mobileUser->user_mobile_id) && $mobileUser->status == '1'){\n\n $maxNumberOfPostPerDay = \\Config::get('constant.max_number_post_per_day',2);\n $today = date('Y-m-d');\n\n if( !empty($mobileUser->last_post_date) ){\n\n $todayObj = new \\DateTime($today);\n $lastPostDateObj = new \\DateTime($mobileUser->last_post_date);\n\n $isEligibleToPost = false;\n\n if( $mobileUser->number_post_today == $mobileUser->max_number_post){\n\n if( $todayObj == $lastPostDateObj ){\n //Last update today and current number is meets max number\n $isEligibleToPost = false;\n\n }elseif( $todayObj > $lastPostDateObj ){\n //Last update yesterday, allowed for max quota\n $isEligibleToPost = true;\n }else{\n //Last update tommorow ( Not possible )\n $isEligibleToPost = false;\n }\n\n } elseif ( $mobileUser->number_post_today < $mobileUser->max_number_post){\n //Number does not meet max number of post\n $isEligibleToPost = true;\n }\n\n\n if( $isEligibleToPost ){\n\n //User already exists\n $makeRegion = Makeregion::where('slug','=',trim(Input::get('make_region')))->first();\n //echo '<pre>';print_r($makeRegion);die('======Debugging=======');\n //dd(DB::getQueryLog());die;\n\n if( !empty($makeRegion->make_region_id) ){\n\n $make = Make::where('slug','=',trim(Input::get('make')))\n ->where('make_region_id', '=', $makeRegion->make_region_id)->first();\n\n// DB::table('make')\n// ->join('make_region', 'make.make_region_id', '=', 'make_region.make_region_id')\n// ->where('make.slug', '=', Input::get('make'))\n// ->where('make.slug', '=', Input::get('make'))\n// ->select('users.id', 'contacts.phone', 'orders.price')\n// ->get();\n\n if( !empty($make->make_id) ){\n\n // Add forsale data\n $forsale = new Forsale();\n $forsale->make_id = $make->make_id;\n $forsale->user_mobile_id = $mobileUser->user_mobile_id;\n $forsale->api_users_id = $apiUser->api_users_id;\n $forsale->model = trim(Input::get('model'));\n $forsale->title = trim(Input::get('title'));\n $forsale->phone = trim(Input::get('phone'));\n $forsale->price = trim(Input::get('price'));\n $forsale->description = trim(Input::get('description'));\n $forsale->status = '1';\n //$forsale->save();\n\n if( ! $forsale->save() ){\n $response = array( 'status'=> 'fail', 'message'=> 'Something went wrong.' );\n }else{\n\n //Update quota for this user\n\n //Upload Images, new logic - Start here\n $image_sizes = \\Config::get('constant.image_sizes');\n\n $imagePath = public_path('uploads') .'/images/';\n\n $filnalDestinationPath = $imagePath . \"foresale/\";\n\n if( !file_exists($filnalDestinationPath) ){\n mkdir($filnalDestinationPath, 0755, true);\n }\n\n $imagenumber = \\Config::get('constant.number_of_image',10);\n for($i=1; $i <= $imagenumber; $i++){\n\n if (Input::hasFile('image'.$i) ) {\n $file = Input::file('image'.$i);\n $validrules = array('file' => 'required|mimes:png,gif,jpeg,jpg'); // 'required|mimes:png,gif,jpeg,txt,pdf,doc'\n $validator = Validator::make(array('file'=> $file), $validrules);\n\n if($validator->passes()) {\n\n\n //get File Name\n $fileExtension = $file->getClientOriginalExtension();\n\n if( empty($fileExtension) ){\n continue;\n }\n\n $newFilename = uniqid(). \"_\" . time() . '.' . $fileExtension;\n\n //Upload original image\n $fileOriginalPath = $filnalDestinationPath . \"original/\" . $newFilename;\n \\Image::make( $file->getRealPath() )\n ->save($fileOriginalPath);\n\n\n\n if( !empty($image_sizes) && is_array($image_sizes) ){\n\n foreach($image_sizes as $image_size){\n\n $filePathImageSize = $filnalDestinationPath . \"$image_size/\" . $newFilename;\n\n \\Image::make( $file->getRealPath() )\n ->resize($image_size,null, function ($constraint) { $constraint->aspectRatio(); })\n ->save($filePathImageSize);\n\n //Unset\n unset($filePathImageSize);\n unset($image_size);\n\n }\n\n\n }\n\n //Save into db\n $photo = new Photos();\n $photo->forsale_id = $forsale->forsale_id;\n $photo->photo_name = $newFilename;\n $photo->save();\n\n }else{\n continue;\n }\n\n //Unset\n unset($fileExtension);\n unset($newFilename);\n unset($photo);\n\n }else{\n continue;\n }\n\n\n }\n //Upload Images, new logic - Ends here\n\n\n //$maxNumberOfPostPerDay = \\Config::get('constant.max_number_post_per_day',2);\n\n //$usermobile = new Usermobile();\n //$usermobile->phone = trim(Input::get('device_phone'));\n //$usermobile->max_number_post = $maxNumberOfPostPerDay;\n\n if( $todayObj == $lastPostDateObj ){\n $mobileUser->number_post_today = $mobileUser->number_post_today + 1;\n }else{\n $mobileUser->number_post_today = '1';\n $mobileUser->last_post_date = date('Y-m-d');\n\n }\n\n if( ! $mobileUser->save() ){\n $response = array( 'status'=> 'fail', 'message'=> 'Something went wrong.' );\n }else{\n $response = array( 'status'=> 'success', 'message'=> 'Successfully added' );\n }\n\n }\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Sorry, Requested manufacturing or make not exist.' );\n }\n\n\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Sorry, Requested manufacturing or make region not exist.' );\n }\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Sorry, you exceeded you per day quota.' );\n }\n\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Something went wrong.' );\n }\n\n }elseif( !empty($mobileUser->user_mobile_id) && empty($mobileUser->status) ){\n\n $response = array( 'status'=> 'fail', 'message'=> 'Unauthorize access.' );\n\n }else{\n //New User\n $makeRegion = Makeregion::where('slug','=',trim(Input::get('make_region')))->first();\n //echo '<pre>';print_r($makeRegion);die('======Debugging=======');\n //dd(DB::getQueryLog());die;\n\n if( !empty($makeRegion->make_region_id) ){\n\n $make = Make::where('slug','=',trim(Input::get('make')))\n ->where('make_region_id', '=', $makeRegion->make_region_id)->first();\n\n// DB::table('make')\n// ->join('make_region', 'make.make_region_id', '=', 'make_region.make_region_id')\n// ->where('make.slug', '=', Input::get('make'))\n// ->where('make.slug', '=', Input::get('make'))\n// ->select('users.id', 'contacts.phone', 'orders.price')\n// ->get();\n\n if( !empty($make->make_id) ){\n\n // Add forsale data\n $forsale = new Forsale();\n $forsale->make_id = $make->make_id;\n $forsale->api_users_id = $apiUser->api_users_id;\n $forsale->model = trim(Input::get('model'));\n $forsale->title = trim(Input::get('title'));\n $forsale->phone = trim(Input::get('phone'));\n $forsale->price = trim(Input::get('price'));\n $forsale->description = trim(Input::get('description'));\n $forsale->status = '1';\n //$forsale->save();\n\n if( ! $forsale->save() ){\n $response = array( 'status'=> 'fail', 'message'=> 'Something went wrong.' );\n }else{\n\n //Add this user\n\n //Upload Images, new logic - Start here\n $image_sizes = \\Config::get('constant.image_sizes');\n\n $imagePath = public_path('uploads') .'/images/';\n\n $filnalDestinationPath = $imagePath . \"foresale/\";\n\n if( !file_exists($filnalDestinationPath) ){\n mkdir($filnalDestinationPath, 0755, true);\n }\n\n $imagenumber = \\Config::get('constant.number_of_image');\n for($i=1; $i <= $imagenumber; $i++){\n\n if (Input::hasFile('image'.$i) ) {\n $file = Input::file('image'.$i);\n $validrules = array('file' => 'required|mimes:png,gif,jpeg,jpg'); // 'required|mimes:png,gif,jpeg,txt,pdf,doc'\n $validator = Validator::make(array('file'=> $file), $validrules);\n\n if($validator->passes()) {\n\n\n //get File Name\n $fileExtension = $file->getClientOriginalExtension();\n\n if( empty($fileExtension) ){\n continue;\n }\n\n $newFilename = uniqid(). \"_\" . time() . '.' . $fileExtension;\n\n //Upload original image\n $fileOriginalPath = $filnalDestinationPath . \"original/\" . $newFilename;\n \\Image::make( $file->getRealPath() )\n ->save($fileOriginalPath);\n\n\n if( !empty($image_sizes) && is_array($image_sizes) ){\n\n foreach($image_sizes as $image_size){\n\n $filePathImageSize = $filnalDestinationPath . \"$image_size/\" . $newFilename;\n\n \\Image::make( $file->getRealPath() )\n ->resize($image_size,null, function ($constraint) { $constraint->aspectRatio(); })\n ->save($filePathImageSize);\n\n //Unset\n unset($filePathImageSize);\n unset($image_size);\n\n }\n\n\n }\n\n //Save into db\n $photo = new Photos();\n $photo->forsale_id = $forsale->forsale_id;\n $photo->photo_name = $newFilename;\n $photo->save();\n\n }else{\n continue;\n }\n\n //Unset\n unset($fileExtension);\n unset($newFilename);\n unset($photo);\n\n }else{\n continue;\n }\n\n\n }\n //Upload Images, new logic - Ends here\n\n\n $maxNumberOfPostPerDay = \\Config::get('constant.max_number_post_per_day',2);\n\n $usermobile = new Usermobile();\n $usermobile->api_users_id = $apiUser->api_users_id;\n //$usermobile->phone = trim(Input::get('device_phone'));\n $usermobile->max_number_post = $maxNumberOfPostPerDay;\n $usermobile->number_post_today = '1';\n $usermobile->last_post_date = date('Y-m-d');\n $usermobile->status = '1';\n\n if( ! $usermobile->save() ){\n $response = array( 'status'=> 'fail', 'message'=> 'Something went wrong.' );\n }else{\n\n $forsale->user_mobile_id = $usermobile->user_mobile_id;\n $forsale->save();\n $response = array( 'status'=> 'success', 'message'=> 'Successfully added' );\n }\n\n }\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Sorry, Requested manufacturing or make not exist.' );\n }\n\n\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Sorry, Requested manufacturing or make region not exist.' );\n }\n\n\n }\n\n\n\n }else{\n $response = array( 'status'=> 'fail', 'message'=> 'Unauthorize access.' );\n }\n\n\n\n }\n\n return $response ;\n\n }", "public function set_release_img(){\n $name = [\"name\"];\n $baseImgCode = $this->input->post ( \"img\" );\n $mid = $this->input->post ( \"mid\" );\n $msg = $this->input->post(\"msg\");\n $uname = $this->input->post(\"uname\");\n $result = \"failed\";\n $imgurls = \"\";\n $image = \"\";\n $error = \"no data upload\";\n //时间戳来命名\n $fileName = $this->saveFileName;\n $filePath = $this->saveFilePath .date(\"ymd\").\"/\". $fileName;\n\n if (! empty ( $baseImgCode )) {\n //$img = preg_match ( '/^(data:\\s*image\\/(\\w+);base64,)/', $baseImgCode, $result );\n //除 data:image/jpeg;base64, 之外\n for($i=0;$i<sizeof($baseImgCode);$i++){\n if (preg_match ( '/^(data:\\s*image\\/(\\w+);base64,)/', $baseImgCode[$i], $result )) {\n $type = $result [2]; //jpge格式\n $new_file = $filePath .$i . \".\" . $type;\n //$fileName = $fileName . \".\" . $type;\n // 例如: 20161219120134999700 .jpeg 把一个字符串写入文件中。\n //判断图片目录里面有没有该当天上传日期的文件夹,如果没有就创建该文件夹,有的话就不创建 直接插入图片\n if(!file_exists($this->saveFilePath.date(\"ymd\"))){\n mkdir($this->saveFilePath.date(\"ymd\"));\n }\n if (file_put_contents ( $new_file, base64_decode ( str_replace ( $result [1], '', $baseImgCode[$i]) ) )) {\n// $image = $this->remoteFilePath . $fileName;\n $imageInnerUrl = $this->saveFileinnerPath .date(\"ymd\").\"/\". $fileName.$i.\".\".$type;\n }\n\n }\n $imgurls .= $imageInnerUrl .\",\";\n\n }\n /*for($i = 0; $i < sizeof($baseImgCode);$i++){\n if (preg_match ( '/^(data:\\s*image\\/(\\w+);base64,)/', $baseImgCode[$i], $result )) {\n $type = $result [2]; //jpge格式\n $new_file = $filePath . \".\" . $type;\n $fileName = $fileName . \".\" . $type;\n // 例如: 20161219120134999700 .jpeg 把一个字符串写入文件中。\n if (file_put_contents ( $new_file, base64_decode ( str_replace ( $result [1], '', $baseImgCode[$i] ) ) )) {\n\n $image = $this->remoteFilePath . $fileName;\n $imageInnerUrl = $this->saveFileinnerPath . $fileName;\n // /Dedecms/uploads/uploads/appup/ 20161219121150703264.jpeg\n //this->__handlerUpRelImg ( $imageInnerUrl, $mid );\n }\n }\n $flag = \"success\";\n }*/\n }\n $this->load->model ( \"release_model\" );\n $result1 = $this->release_model->set_release_img($mid,$msg,$uname,$imgurls);\n if($result1 == true){\n $result = \"success\";\n }\n $reDataArr = array (\n \"result\" => $result,\n \"res\" => $result1\n );\n $this->result_data = $reDataArr;\n $this->__outmsg ();\n }", "public function store(Request $request)\n {\n /*foreach ($request->photos as $photo)\n {\n if ($photo->extension() !== 'jpeg')\n {\n dd($photo->extension());\n }\n }\n\n $photo = $request->except('_token');\n\n $type = HotelPhotoType::where('name', $photo['type_name'])->first();\n $photo['type_id'] = $type->id;\n\n if($photo['type_name'] == 'main')\n {\n unset($photo['type_name']);\n $file = $photo['photos'][0];\n unset($photo['photos']);\n $photo['img'] = $file->getClientOriginalName();\n\n $required_width = $type->width;\n $required_height = $type->height;\n list($current_width, $current_height) = getimagesize($file);\n\n if($required_width != $current_width || $required_height != $current_height)\n {\n if($required_width > $current_width || $required_height > $current_height)\n {\n dd('выбранное изобржение меньше нужных размеров');\n } else {\n $photo['optimized'] = false;\n }\n } else {\n $photo['optimized'] = true;\n }\n\n $type->photos()->create($photo);\n } else {\n unset($photo['type_name']);\n $file = $photo['photos'][0];\n unset($photo['photos']);\n $photo['img'] = $file->getClientOriginalName();\n\n $required_width = $type->width;\n $required_height = $type->height;\n list($current_width, $current_height) = getimagesize($file);\n\n if($required_width != $current_width || $required_height != $current_height)\n {\n if($required_width > $current_width || $required_height > $current_height)\n {\n dd('выбранное изобржение меньше нужных размеров');\n } else {\n $photo['optimized'] = false;\n }\n } else {\n $photo['optimized'] = true;\n };\n }*/\n\n //dd($photo);\n\n //$type->photos()->create($photo);\n\n $hotel = Hotel::find($request->hotel_id);\n\n $photo_type = HotelPhotoType::find($request->type_id);\n\n /*foreach ($data['photos'] as $photo)\n {\n if($photo->extension() == 'jpeg')\n {\n $arr['img'] = $photo->getClientOriginalName();\n $arr['hotel_id'] = $data['hotel_id'];\n $arr['optimized'] = false;\n $hotel->photos()->create($arr);\n\n $photo->move('public/img/photo', $arr['img']);\n }\n }*/\n\n $array = $request->except('photos');\n\n $file = $request->photos;\n $array['img'] = $hotel->slug . '_' . $photo_type->name . '.jpg';\n\n $file->move(env('DIR_IMG') . 'photo/', $array['img']);\n\n $delete = $hotel->photos()->where('type_id', $request->type_id)->delete();\n //dd($delete);\n\n $hotel->photos()->create($array);\n \n return redirect(route('hotels.show', $hotel->id));\n }", "public function store(Request $request)\n {\n $uname = $request->session()->get('logged');\n\n $this->validate($request,[\n 'title'=>'required',\n 'bedroom'=>'required',\n 'bathroom'=>'required',\n 'size'=>'required',\n 'rent'=>'required',\n 'location'=>'required',\n 'mobile'=>'required',\n 'description'=>'required',\n 'image'=>'required|image',\n ]);\n\n $image = new Image([\n //$image = new Image;\n //'name' => $request->get('name'),\n 'username' => $uname,\n 'image' => $request->image->store('public/images'),\n 'title' => $request->get('title'),\n 'bedroom' => $request->get('bedroom'),\n 'bathroom' => $request->get('bathroom'),\n 'size' => $request->get('size'),\n 'rent' => $request->get('rent'),\n 'location' => $request->get('location'),\n 'mobile' => $request->get('mobile'),\n 'description' => $request->get('description')\n ]);\n $image->save();\n return $image->title;\n\n // if($request->hasFile('image')){\n // $request->image->store('public/images');\n // }\n // $image->save();\n // return redirect('/reg');\n }", "public function documentsimageUpload(Request $request){\n try{\n $appCustomerId = $request['customer_id'];\n //check request have data or not\n if(!empty($appCustomerId) && isset($appCustomerId)){\n $customer = Customer::where('id',$appCustomerId)->first();\n //check customer is in database\n if (!empty($customer) && isset($customer)) {\n $validator = Validator::make($request->all(), ['image1' => 'required','image2' => 'required','image3' => 'required',]);\n if ($validator->fails()) {\n return response()->json([\n 'message'=>$validator->messages(),\n 'status'=>'error'\n ]);\n }\n if($request->image1 && $request->image2 && $request->image3){\n #image1\n $file_name1 = 'public/customer_extra_document/_doc1'.time().'.png';\n $path = Storage::put($file_name1, base64_decode($request->image1),'public');\n if($path==true){\n //upload document image \n $customer = Customer::where('id', $appCustomerId)->first();\n $customer->update(['image1' => $file_name1]);\n }else{\n return response()->json([\n 'message'=>'Something went wrong with image1 request.Please try again later',\n 'status'=>'error'\n ]);\n }\n #image2\n $file_name2 = 'public/customer_extra_document/_doc2'.time().'.png';\n $path = Storage::put($file_name2, base64_decode($request->image2),'public');\n if($path==true){\n //upload document image \n $customer = Customer::where('id', $appCustomerId)->first();\n $customer->update(['image2' => $file_name2]);\n }else{\n return response()->json([\n 'message'=>'Something went wrong with image2 request.Please try again later',\n 'status'=>'error'\n ]);\n }\n #image3\n $file_name3 = 'public/customer_extra_document/_doc3'.time().'.png';\n $path = Storage::put($file_name3, base64_decode($request->image3),'public');\n if($path==true){\n //upload document image \n $customer = Customer::where('id', $appCustomerId)->first();\n $customer->update(['image3' => $file_name3]);\n }else{\n return response()->json([\n 'message'=>'Something went wrong with image2 request.Please try again later',\n 'status'=>'error'\n ]);\n }\n #return response\n return response()->json([\n 'message'=>\"documents successfully uploaded\",\n 'status' =>'success',\n 'code' =>200,\n ]);\n }else{\n return response()->json([\n 'message'=>'Please provide image for uploading',\n 'status'=>'error'\n ]);\n }\n }else{\n return response()->json([\n 'message'=>'User not found',\n 'status'=>'error'\n ]);\n }\n }else{\n return response()->json([\n 'message'=>'You are not able to performe this task',\n 'status'=>'error'\n ]);\n }\n }catch(\\Exception $e){\n return response()->json([\n \"message\" => \"Something went wrong. Please contact administrator.\".$e->getMessage(),\n \"error\" =>true,\n ]);\n }\n }", "public function store(Request $request)\n {\n //\n $request->validate([\n \"name\"=>\"required|min:3\", \n \"image\"=>\"required|image|mimetypes:image/webp|max:2048|dimensions:max_width=500,max_height=500\"\n \n ]);\n if($request->hasFile('image')) {\n $image = $request->file('image');\n $filename =rand() . '.' . $image->getClientOriginalExtension();\n $image->move(public_path('imagestest/'), $filename);\n $filename='imagestest/'.$filename;\n \n }\n \n Image::create([\n \"name\"=>$request[\"name\"],\n \"image\"=>$filename,\n \n ]);\n //\n // dd($images);\n return redirect(route(\"images.index\")); \n }", "public function getPicture(Request $request){\n $this->validate($request,['id' => 'required']);\n $id = $request->input('id');\n $paciente = Paciente::find($id);\n $foto =(string) Image::make(storage_path('recursos/perfiles/'.$paciente->foto))->encode(\"data-url\");\n\n return response()->json([\n 'status' => 'ok',\n 'code' => 200,\n 'result' => ['foto' => $foto,'domicilio' => $paciente->domicilio,'telefono' => $paciente->telefono]\n ],200)\n ->header('Access-Control-Allow-Origin','*')\n ->header('Content-Type', 'application/json');\n\n }", "public function correctImage(){\n parent::isImage();\n parent::exist();\n parent::sizeFile();\n return $this->uploadOk;\n }", "public function saveimage(Request $request)\n { \n\n\n }", "public function store(Request $request)\n { \n $data=$request->all();\n if($request->file('img')!= null){\n\n $path;\n if(request()->file('img')->isValid()){\n $path = $request->file('img')->storeAs('public', time().'.jpg');\n $img_name=str_replace('public/', '', $path);\n if(empty($path)){\n return response()->json([],400);\n }\n\n }\n category::category_insert($data['name'],$data['description'],$img_name);\n return redirect('/admin/categories/index');\n }\n return Redirect::back()->withErrors('The image input must not be empty');\n\n\n }", "function build_post()\n{\n $user_id = $_SESSION['id'];\n $body = $_POST['file'];\n $sticker_id = $_POST['sticker_id'];\n $sticker_coord_x = $_POST['sticker_coord_x'];\n $sticker_coord_y = $_POST['sticker_coord_y'];\n $description = $_POST['description'];\n\n if (empty($body) || empty($user_id))\n {\n echo \"oooops\";\n return FALSE;\n }\n\n // Trim off encoding string\n $prefix = strpos($body, ',') + strlen(',');\n $data = substr($body, $prefix);\n\n // Decode into binary image\n $selected_photo = base64_decode($data);\n\n // Call file name function and render image function\n $filename = generate_filename($user_id);\n// error_log(\"!!!!!\");\n// error_log($sticker_id);\n// error_log(empty($sticker_coord_x));\n// error_log($sticker_coord_y);\n// error_log(\"Tuta:\". boolval(empty($selected_photo)));\n// error_log($filename);\n $result = render_image($sticker_id, $sticker_coord_x, $sticker_coord_y, $selected_photo, $filename);\n\n if (!$result)\n {\n echo 'error';\n return FALSE;\n }\n\n if (!add_post($user_id, $filename, $description))\n {\n echo '<p class=\"error\"> Could not upload :( </p>';\n return FALSE;\n }\n echo $filename;\n return TRUE;\n}", "protected function create(array $data)\n {\n // if ($request->hasFile('image')) {\n // // your code here\n // }\n \n if(isset($data['image'])){\n if($data['image']->getClientOriginalName()){\n $ext = $data['image']->getClientOriginalExtension();\n $file = date('YmdHis').'_'.rand(1,999).'.'.$ext;\n $data['image']->storeAs('public/profile',$file);\n }else{\n $file = NULL;\n }\n }else{\n $file = NULL; \n }\n \n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'lab_id' => NULL,\n 'phone' => $data['phone'],\n 'role' => 1,\n 'power' => 0,\n 'image' => $file,\n 'edu_dept' => $data['edu_dept'],\n 'edu_varsity' => $data['edu_varsity'],\n 'edu_country' => $data['edu_country'],\n 'bkash_trxid' => $data['trxid'],\n\n\n ]);\n }", "public function uploadImage($formname) {\n if ($formname['size'] > 10240000) {\n redirect ('error');\n } \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$image = base64_encode(file_get_contents($formname['tmp_name']));\n\n $options = array('http'=>array(\n 'method'=>\"POST\",\n 'header'=>\"Authorization: Bearer fbec2d0f2c259944907341aeedb0a387f85fae12\\n\".\n \"Content-Type: application/x-www-form-urlencoded\",\n 'content'=>$image\n ));\n\n $context = stream_context_create($options);\n\n $imgurURL = \"https://api.imgur.com/3/image\";\n\n \n\n $response = file_get_contents($imgurURL, false, $context);\n\t\t\t\tif($response === false)\n\t\t\t\t{\t\n\t\t\t\t\t//echo \"<script type='text/javascript'>alert('Connection Error');</script>\";\n\t\t\t\t\tredirect ('error');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $response = json_decode($response);\t\n\t\t\t\t$link=$response->data->link;\n\t\t\t\treturn $link;\n\t\t\t\t}\n\t\t\t\t}\n }", "public function presskitfileisinvalid($request,$addeditid=0)\n {\n \n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"pdf\";\n \n \n $filecontrolname=\"presskit_name\";\n \n \n\t\t\t\t$allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['pdf']=(5*1024*1024);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//max_width & max_height ,min_width & min_height,equal_width & equal_height \n\t\t\t\t$allowedFileResolAr=array();\n\t\t\t\t\n\t\t\t\t//$allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n\t\t\t\t\n $func=\"validatefile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/venue-press-kit/source-file/\"; \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid,$destinationsourcePath,$errfileAr=array()) ;\n \n \n \n \n \n /* echo \"==chkimg1==><pre>\";\n print_r($chkimgresp);\n echo \"</pre>\"; */ //exit();\n \n \n $invalidresp=false;\n \n $errormsgs=''; $fileuploadednames=array(); $errfileAr=array();\n $totalfileposted=0;\n \n if(!empty($chkimgresp))\n {\n \n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('errfileAr',$chkimgresp))\n {\n $errfileAr=$chkimgresp['errfileAr'];\n }\n \n if(array_key_exists('totalfileposted',$chkimgresp))\n {\n $totalfileposted=$chkimgresp['totalfileposted'];\n }\n \n }\n \n $resparray=array();\n $resparray['errormsgs']=$errormsgs;\n $resparray['errfileAr']=$errfileAr;\n $resparray['totalfileposted']=$totalfileposted;\n \n return $resparray;\n }", "public function store(Request $request)\n {\n\n \n// return $request->all();\n $this->validate($request, [\n 'name' => ['required']\n ]);\n $name = $request->name;\n $slug = Str::slug($name);\n if($request->destaca){\n $destaca = $request->destaca;\n }else{\n $destaca = 1;\n };\n $destaca = $request->destaca;\n $description= $request->description;\n\n $validateBrand = Brand::where('slug', $slug)->get();\n\n if(count($validateBrand)>=1){\n return response()->json([\"message\" => \"Marca \".$name.\" ya existe!!!\"], 400);\n }else{\n\n\n $brand = new Brand;\n $brand->name = $name;\n $brand->slug = $slug;\n $brand->destaca = $destaca;\n $brand->description = $description;\n $brand->save();\n\n if($request->file('image_url')){\n $img = $request->file('image_url');\n\n $path = Storage::disk('public')->put('images/logos-marcas', $img);\n // $product->fill(['file' => asset($path)])->save();\n // return $path;\n $brand->fill(['image_url' => $path])->save();\n \n return $brand;\n }\n\n return response()->json($brand, 200);\n }\n }", "public function create()\n {\n $path = request()->file('photo')->store('testing');\n return response()->json(['path' => $path], 200);\n }", "public function obat_post()\n\t{\n\t\t\n\t\t$name = base64_decode($this->post('image'));\n\t\t$config = array(\n\t\t\t'upload_path' => \"asset/img/obat\",\n\t\t\t'allowed_types' => \"jpg|png|jpeg\",\n\t\t\t'max_size' => '100',\n\t\t\t'file_name' => $name\n\t\t);\n\t\t\n\t\t$this->load->library('upload', $config);\n\n\t\tif ($this->upload->do_upload('image')) {\n\t\t\t$data = array('upload_data' => $this->upload->data());\n\t\t\t$path =\"http://192.168.43.83/Apotek/\" . $config['upload_path'] . '/' . $data['upload_data']['file_name'];\n\t\t\t$obat = [\n\t\t\t\t'nama_obat'=>$this->post('nama_obat'),\n\t\t\t\t'harga'=>$this->post('harga'),\n\t\t\t\t'jumlah'=>$this->post('jumlah'),\n\t\t\t\t'image'=>$path\n\t\t\t];\n\t\t\tif ($this->Obat->postObat($obat)>0) {\n\t\t\t\t$returndata = array('error' => false, 'message' => 'Insert berhasil');\n\t\t\t\t$this->set_response($returndata, 200);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$returndata = array('error' => false, 'message' => 'Insert gagal');\n\t\t\t\t$this->set_response($returndata, 200);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$error = array('error' => $this->upload->display_errors());\n\t\t\t$returndata = array('error' => true, 'message' => $error);\n\t\t\t$this->set_response($returndata, 200);\n\n\t\t\t}\n\t}", "function image_record(){\n\t\t\t$picIMEI=$_POST['picIMEI'];\n\t\t\t$time_stamp=$_POST['time_stamp'];\n\t\t\t$piclat=$_POST['piclat'];\n\t\t\t$piclon=$_POST['piclon'];\n\t\t\t$image_name=$_POST['image_name'];\n\t\t\t$accel_x=$_POST['accel_x'];\n\t\t\t$accel_y=$_POST['accel_y'];\n\t\t\t$accel_z=$_POST['accel_z'];\n\t\t\n\t\t\t\t$insert = $this -> conn -> insertnewrecords('image_record','imei_number, reading_timesamp,lat,log,accel_x,accel_y,accel_z,image_filename', '\"' . $picIMEI . '\",\"' . $time_stamp . '\",\"' . $piclat . '\",\"' . $piclon . '\",\"' . $accel_x . '\",\"' . $accel_y . '\",\"' . $accel_z . '\",\"' . $image_name . '\"');\n\t\t\t\tif(!empty($insert)){\n\t\t\t\t\t$post = array('status' => \"true\",\"message\" => \"Thanks for your feedback\");\n\t\t\t\t}else{\n\t\t\t\t\t$post = array('status' => \"false\",\"message\" => \"error\");\n\t\t\t\t}\n\t\t\t\n\t\t\techo $this -> json($post);\n\t\t}", "public static function userInstallImage($formname, $query, $params) {\n\n // image type will be this php function! tam arastir sonra! \n $image = base64_encode(file_get_contents($_FILES[$formname]['tmp_name']));\n\n // I am fetcing to all information to array..\n $options = array('http'=>array(\n 'method'=>\"POST\",\n 'header'=>\"Authorization: Bearer fd7e6e5d3546b813f57abd5204c8c9485957d2fd\\n\".\n \"Content-Type: application/x-www-form-urlencoded\",\n 'content'=>$image\n ));\n\n // php ozel isleme.. \n $context = stream_context_create($options);\n //resmin url si benim hesaba gelcek imgur/ermansahintatar a \n\n $imgurURL = \"https://api.imgur.com/3/image\";\n \n // fazla mb resimleri almamak icin! unutma bug degil resim cok buyukse codition var.\n if ($_FILES[$formname]['size'] > 10240000) {\n die('Image too big, must be 10MB or less!');\n }\n\n $response = file_get_contents($imgurURL, false, $context);\n $response = json_decode($response);\n\n $preparams = array($formname=>$response->data->link);\n\n $params = $preparams + $params;\n\n access::create_query($query, $params);\n\n }", "public function store(Request $r)\n\t{\n\t\t// Validate Post Data\n\t\t$validator = Validator::make($r->all(), [\n\t\t\t// 'com_logo' => 'required|image|max:2048',\n\t\t]);\n\n\t\t// if Validate Errors\n\t\tif ($validator->fails()) {\n\t\t\treturn redirect()->back()\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\t\t}\n\n\t\tif ($this->globalNotitfy->permission($this->module)=='true') {\n\t\t\t$agr_files = [];\n\t\t\t\n\t\t\tif($r->hasFile('agr_file')){\n\t\t\t\tforeach ($r->file('agr_file') as $i => $file) {\n\t\t\t\t\tif ($file->getClientOriginalExtension()=='pdf') {\n\t\t\t\t\t\t$agr_file=str_replace(' ', '-', strtok($file->getClientOriginalName(), '.')).'_'.time().'_'.$i.'.pdf';\n\t\t\t\t\t\tif (!File::exists($this->path.$r->agr_company_id.'/')) {\n\t\t\t\t\t\t\tFile::makeDirectory($this->path.$r->agr_company_id.'/');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$file->move($this->path.$r->agr_company_id.'/', $agr_file);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif ($file->getClientOriginalExtension()=='png') {\n\t\t\t\t\t\t\t$agr_file=str_replace(' ', '-', strtok($file->getClientOriginalName(), '.')).'_'.time().'_'.$i.'.png';\n\t\t\t\t\t\t\tif (!File::exists($this->path.$r->agr_company_id.'/')) {\n\t\t\t\t\t\t\t\tFile::makeDirectory($this->path.$r->agr_company_id.'/');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tImage::make($file->getRealPath())->save($this->path.$r->agr_company_id.'/'.$agr_file);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$agr_file=str_replace(' ', '-', strtok($file->getClientOriginalName(), '.')).'_'.time().'_'.$i.'.jpg';\n\t\t\t\t\t\t\tif (!File::exists($this->path.$r->agr_company_id.'/')) {\n\t\t\t\t\t\t\t\tFile::makeDirectory($this->path.$r->agr_company_id.'/');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tImage::make($file->getRealPath())->save($this->path.$r->agr_company_id.'/'.$agr_file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$agr_files[$i] = $agr_file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Insert Agreegments\n\t\t\t$agreements = new agreements;\n\t\t\t$agreements->agr_files = serialize($agr_files);\n\t\t\t$agreements->agr_description = $r->agr_description;\n\t\t\t$agreements->agr_company_id = $r->agr_company_id;\n\t\t\t$agreements->agr_created_by = Auth::id();\n\t\t\t$agreements->agr_updated_by = Auth::id();\n\t\t\t$agreements->save();\n\t\t\t// Redirect\n\t\t\treturn redirect()->route('agreements.index')\n\t\t\t\t->with('success', 'កិច្ចសន្យាបានបញ្ចូលដោយជោគជ័យ: ' . Companies::find($r->agr_company_id)->com_name);\n\t\t}else{\n\t\t\treturn redirect(route('errors.permission'));\n\t\t}\n\n\t}" ]
[ "0.6489661", "0.6424645", "0.63821775", "0.6356045", "0.63164264", "0.63028854", "0.6281487", "0.6268823", "0.62394685", "0.62368053", "0.618571", "0.61762315", "0.614797", "0.61320776", "0.612722", "0.6109176", "0.6098419", "0.6072932", "0.60501987", "0.6048899", "0.603592", "0.60357475", "0.6027012", "0.60200053", "0.6012976", "0.60098034", "0.60049045", "0.59994465", "0.5998351", "0.59857404", "0.59821105", "0.59818596", "0.59727424", "0.5959757", "0.594831", "0.5942584", "0.59355235", "0.59315246", "0.5928997", "0.59220606", "0.5918209", "0.5917564", "0.5917418", "0.59135395", "0.59027773", "0.589582", "0.589076", "0.58776283", "0.5868973", "0.58618826", "0.5855347", "0.585219", "0.58499306", "0.5849316", "0.5842837", "0.5842764", "0.5840152", "0.5839706", "0.58362436", "0.58302", "0.5828571", "0.5826709", "0.58235097", "0.58214843", "0.5817769", "0.58165026", "0.5815911", "0.58130413", "0.58119935", "0.58008736", "0.57999784", "0.5798747", "0.5794741", "0.5792307", "0.5791718", "0.5791252", "0.57868445", "0.57841086", "0.57839113", "0.57718354", "0.576682", "0.5766505", "0.57656246", "0.5764819", "0.5764418", "0.5757606", "0.5748726", "0.5748145", "0.5747427", "0.5742148", "0.5737221", "0.5733003", "0.5727391", "0.5727281", "0.5727128", "0.5724922", "0.5716401", "0.57161266", "0.57113874", "0.5711098", "0.5709466" ]
0.0
-1
Check the request to it'has image or not, then update the data with appropirate method
public function updateData($request, $estate) { $this->old_spec = $estate->spec_id; $estate->update($this->getRequest($request)); if ($request->get('photos')) { foreach ($request->get('photos') as $item) $estate->addMedia($item)->toMediaCollection('photos'); } if ($request->get('deleted_images')) Media::whereIn('id', $request->get('deleted_images'))->delete(); return $estate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updatePhoto(Request $request)\n {\n// 'photo' => 'required', // required| SEPONE ESTO mimes:jpeg,bmp,png'\n// 'apodo'=>'required',\n// 'altura'=>'required',\n// 'peso'=>'required',\n// 'pie_dominante'=>'required'\n// ]);\n\n $token=$request->get('api_token');\n $jugador=DB::table('jugador')\n ->select('id_jugador')\n ->where('api_token','=',$token)\n ->get();\n\n $datos = Jugador::find($jugador[0]->id_jugador);\n\n// OPC Foto\n $file = $request->get('img');\n $publicId=\"fotoPerfil\".$jugador[0]->id_jugador;\n if(Cloudder::upload(\"data:image/png;base64,\".$file,$publicId,array(\"width\" => 250, \"height\" => 250))){\n $datos->tiene_imagen=1;\n $datos->update();\n return response()->json(['success' => true]);\n }else{\n return response()->json(['success' => false]);\n }\n\n }", "public function update(Request $request, $id)\n {\n\n\n if($request->status == 1){\n $status = 1;\n }else{\n $status=0;\n }\n\n $imagearray=[];\n if ( $request->hasFile('image')) {\n foreach ($request->image as $image) {\n\n $paths = 'images/page/';\n $fileNameToStore = CommonController::save_image($image, $paths);\n $imagearray[] = $fileNameToStore;\n\n }\n $abc=array_merge($imagearray,$request->updateimage);\n\n\n\n } else {\n\n\n $abc =$request->updateimage;\n\n }\n\n if($abc == null){\n $abc = Array('noimage.jpg');\n }\n\n\n\n $page = page::find($id);\n $page->title = $request->name;\n $page->summary = $request->editor1;\n $page->page_category_id = $request->category;\n $page->image = serialize($abc);\n $page->publish=$status;\n\n $page->save();\n\n return redirect()->route('page.index');\n\n }", "public function update(Request $request)\n { \n $id=$request['id'];\n $data=$request->all();\n if($request->file('img')!= null){\n\n $path;\n if(request()->file('img')->isValid()){\n $path = $request->file('img')->storeAs('public', time().'.jpg');\n $img_name=str_replace('public/', '', $path);\n if(empty($path)){\n return response()->json([],400);\n }\n\n }\n\n\n category::category_update($id,$data['name'],$img_name);\n }\n else\n {\n $category=Category::get($id);\n\n category::category_update($id,$data['name'],$category->image);\n }\n\n return redirect('/admin/categories/index');\n }", "public function update_or_store(Request $request)\n {\n // dd($request);\n $validator = $this->validatedata($request);\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'msg' => 'input salah',\n 'error' => $validator->messages(),\n ], 400);\n }\n\n\n\n\n $imageData = $request->get('imagePayload');\n\n\n if ($imageData != null) {\n\n\n $pos = strpos($imageData, ';');\n $type = explode('/', substr($imageData, 0, $pos))[1];\n\n $dir = time() . str_random(10) . \".\" . $type;\n\n $image = Image::make($imageData);\n\n $image->save(public_path('storage') . '/' . $dir);\n $request->logo = $dir;\n\n $datas_update = $request->all();\n $datas_update['logo'] = $dir;\n } else {\n $datas_update = $request->all();\n }\n\n // dd($datas_update);\n // $img = Image::make(Input::file('photo'));\n\n $kop_surat_company = Company::first();\n\n\n if ($kop_surat_company == null) {\n $this->createHeader($datas_update);\n } else {\n // $kop_surat_company->update([\n // 'companyname' => $request['name'],\n // 'address' => $request['address'],\n // 'email' => $request['email'],\n // 'website' => $request['website'],\n // 'phonenumber' => $request['number'],\n // 'logo' => $dir\n // ]);\n // dd($request->all());\n\n $kop_surat_company->update($datas_update);\n }\n\n\n return response()->json(\"sukses\", 200);\n }", "public function update(Request $request)\n {\n// $id = $request->id;\n $deliveryMethods = DeliveryMethod::find($request->id);\n\n $request->validate([\n 'name' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,bmp,svg|max:2048',\n ], [\n 'image.image' => 'يجب ان يكون المرفق صوره',\n 'image.mimes' => 'يجب ان تكون صيغة الصوره jpeg,png,jpg,gif,bmp,svg',\n 'name.required' => 'يرجي ادخال الاسم',\n ]);\n $request_data = $request->except(['image']);\n\n if ($request->hasFile('image')) {\n// $filename = date('Y-m-d-H:i:s').\"-\".$image->getClientOriginalName();\n if ($deliveryMethods->image != 'default.png') {\n Storage::disk('public_uploads')->delete('/delivery_methods/' . $deliveryMethods->image);\n }//end of inner if\n\n Image::make($request->file('image'))\n ->resize(300, null, function ($constraint) {\n $constraint->aspectRatio();\n })\n ->save(public_path('/uploads/delivery_methods/' . $request->file('image')->hashName()));\n\n $request_data['image'] = $request->file('image')->hashName();\n\n }//end of if\n// dd($request_data);\n $deliveryMethods->update($request_data);\n session()->flash('edit', 'تم التعديل بنجاج');\n return redirect('/delivery-method');\n }", "public function update(){\n if ($this->postId != null){\n $this->validate();\n\n /**\n * if change image\n * try to upload image and resize by ImageSaverController config\n * delete old images from upload directory\n */\n if (isset($this->image) && $this->image != null){\n $this->validate(['image' => 'required|image']);\n try {\n $imageSaver = new ImageSaverController();\n $newImagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n ImageSaverController::DeleteAllPhotos($this->imagePath);\n $this->imagePath = $newImagePath;\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n }\n\n $this->PostSaver();\n $this->resetAll();\n $this->ChangeUpdateMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully updated',\n 'icon' => 'success'\n ]);\n $this->render();\n\n }\n }", "public function updateuserprofileimage_post( )\n {\n $this->input->raw_input_stream;\n $input_data = json_decode($this->input->raw_input_stream, true);\n foreach($input_data as $val){\n\n $userData = array();\n $Uid = $val['uid'];\n $img = $val['profileimage'];\n $pimg = uniqid() . '.png';\n $img = str_replace('data:image/png;base64,', '', $img);\n $img = str_replace(' ', '+', $img);\n $data = base64_decode($img);\n $file = './uploads/profileimage/' . $pimg;\n $success = file_put_contents($file, $data);\n $userData['profileimage'] = 'https://buymenow.app/uploads/profileimage/' . $pimg;\n $userData['modified'] = date(\"Y-m-d H:i:s\"); \n $update = $this->db->update( 'users', $userData, array('id'=> $Uid ));\n if($update){\n $this->response([\n 'profileimage' => 'https://buymenow.app/uploads/profileimage/'.$pimg,\n 'message' => 'Profile image updated successfully.'\n ], REST_Controller::HTTP_OK);\n \n }else{\n $this->response(['Nothing is updated.'], REST_Controller::HTTP_OK); \n }\n }\n\n }", "public function makeProfilePicture(Request $request){\n $result = User::where('id', $request->id)->update(['dpUrl' => $request->url]);\n ProfilePhoto::where('userId', $request->id)->where('isDp', '1')->update(['isDp'=> '0']);\n ProfilePhoto::where('userId', $request->id)->where('imgUrl', $request->url)->update(['isDp'=> '1']);\n if($result)\n return json_encode(['code' => 200, 'message' => 'success', 'response'=>$result]);\n else\n return json_encode(['code' => 500, 'message'=> 'Internal Server Error']);\n\n }", "public function update (Request $request, $id)\n {\n /** dd($request);*/\n if ($request->file('image')!==\"\") {\n $this->validate($request, [\n 'image.*' => 'mimes:jpeg,jpg,png',\n 'image' => 'dimensions:max_width=844,max_height=63',\n 'page_foot' => 'required'\n ]);\n } else {\n $this->validate($request, [\n \n 'page_foot' => 'required'\n ]);\n }\n\n if ($request->file('image')!==\"\") {\n $empresa=empresa::find($id);\n unlink(public_path().'/'.$empresa->url_image);\n \n\n $name=$request->file('image')->getClientOriginalName();\n $ok=$request->file('image')->move(public_path().'/images/', $name); \n //dd($ok);\n $url = '/images/'.$name;\n\n \n $empresa->nombre=$request->nombre;\n $empresa->tipo_documento=$request->tipo_documento;\n $empresa->rif=$request->rif; \n $empresa->email=$request->email;\n $empresa->direccion=$request->direccion;\n $empresa->codigo=$request->codigo;\n $empresa->telefono=$request->telefono;\n $empresa->decreto_max_auto=$request->decreto_max_auto;\n $empresa->slogan=$request->slogan;\n $empresa->image_name=$name;\n $empresa->url_image=$url;\n $empresa->page_foot=$request->page_foot;\n $empresa->save();\n\n } else {\n \n $empresa=empresa::find($id);\n $empresa->nombre=$request->nombre;\n $empresa->tipo_documento=$request->tipo_documento;\n $empresa->rif=$request->rif; \n $empresa->email=$request->email;\n $empresa->direccion=$request->direccion;\n $empresa->codigo=$request->codigo;\n $empresa->telefono=$request->telefono;\n $empresa->decreto_max_auto=$request->decreto_max_auto;\n $empresa->slogan=$request->slogan;\n $empresa->user_id=$request->user_id;\n $empresa->page_foot=$request->page_foot;\n $empresa->save();\n }\n \n \n flash('<i class=\"icon-circle-check\"></i>¡Información de la empresa actualizada exitosamente!')->success()->important();\n\n return redirect()->to('empresa');\n }", "public function update(Request $request)///////////////////////////////////////\n {\n $id=Auth::user()->id;\n $data = member::find($id);\n $this->validate($request,[ \n 'email' => 'required|email',\n 'name' => 'required',\n 'phno' =>'required|numeric',\n 'gender' =>'required',\n 'age' => 'required|numeric|max:100',\n 'username' => 'required',\n 'image'=>'sometimes|image|file|max:12000',\n ]);\n \n \n $data->email = $request->input('email');\n $data->name=$request->input('name');\n $data->phno=$request->input('phno');\n $data->gender=$request->input('gender');\n $data->age=$request->input('age');\n $data->username=$request->input('username');\n $data->save();\n $this->storeImage($data);\n return redirect()->route('member.view');\n }", "public function updateAlternateImageStatus(Request $request){\n if($request->ajax()){\n $data = $request->all();\n // echo \"<pre>\"; print_r($data); die;\n if($data['status'] == 'Active'){\n $status = 0;\n }else{\n $status = 1;\n }\n ProductImage::where('id', $data['image_id'])->update(['status'=>$status]);\n return response()->json([\n 'status' => $status,\n 'image_id' => $data['image_id']\n ]);\n }\n }", "public function update(){\n $data = new Validation();\n if(empty($data->image))\n $sql = \"UPDATE {$this->table} SET `tel` = '$data->phone', `email` = '$data->email',`description` = '$data->description' WHERE {$this->id} = '$data->id'\";\n else\n $sql = \"UPDATE {$this->table} SET `tel` = '$data->phone', `email` = '$data->email',`description` = '$data->description', `profile_pic` = '$data->image' WHERE {$this->id} = '$data->id'\";\n \n // echo $sql;exit;\n return Parent::$conn->query($sql);\n }", "public function update(Request $request, $id)\n {\n if($strpos=strpos($request->image,';' ))\n {\n\n $strpos=strpos($request->image,';' );\n $sub=substr($request->image,0,$strpos);\n $ex=explode('/',$sub)[1];\n $name=time().\".\".$ex;\n $img=Image::make($request->image)->resize(200,200);\n $upload_path=public_path().\"/images/\";\n $img->save($upload_path.$name);\n\n MemberEntry::where('memberId',$id)->update([\n 'memberName' => $request->memberName,\n 'mobile' => $request->mobile,\n 'email' => $request->email,\n 'nid' => $request->nid,\n 'designationId' => $request->designationId,\n 'password' => $request->password,\n 'joiningDate' => $request->joiningDate,\n 'userName' => $request->userName,\n 'transectionPin' => $request->transectionPin,\n 'image' => $name,\n 'created_at' => Carbon::now(),\n ]);\n return response()->json('successfully updated');\n }\n else{\n MemberEntry::where('memberId',$id)->update([\n 'memberName' => $request->memberName,\n 'mobileNo' => $request->mobileNo,\n 'email' => $request->email,\n 'nid' => $request->nid,\n 'designationId' => $request->designationId,\n 'password' => $request->password,\n 'joiningDate' => $request->joiningDate,\n 'userName' => $request->userName,\n 'transectionPin' => $request->transectionPin,\n 'created_at' => Carbon::now(),\n ]);\n return response()->json('successfully updated');\n }\n }", "public function update(Request $request, $produto)\n {\n $rules = [\n 'name' => ['required', 'string', 'max:255'],\n 'category_id' => ['required'],\n 'price' => ['required'],\n 'status' => ['required'],\n 'imagem' => ['required|image|mimes:jpeg,png,jpg,gif,svg|max:1500'],\n ];\n\n $re = $request->all();\n\n //return response()->json($re);\n\n\n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n\n return response()->json(['status'=>false,'msg'=>$validator->errors()]);\n }\n\n try {\n\n $model = $this->model::findOrFail($produto);\n\n $image_before_update = $model->image; \n\n $model->category_id = $request->category_id;\n $model->name = $request->name;\n $model->price = $request->price;\n $model->status = $request->status;\n $model->image = $request->image;\n $save = $model->save();\n\n $response = 'Produto';\n\n $response .= ' Editado com Sucesso!';\n\n if($file = $request->file('image')) {\n \n $image_name = time().time().'.'.$file->getClientOriginalExtension(); \n try{\n $target_path = public_path('images/products');\n \n $is_uploaded = $file->move($target_path, $image_name);\n \n if ($is_uploaded) {\n //Save image name into db\n $update_model = $this->model->findOrFail($model->id);\n $update_model->image = $image_name;\n $update_model->save();\n\n $model->image = $image_name; \n \n $storage = Storage::disk('public');\n if(\\File::exists('images/products/'.$image_before_update)) {\n \\File::delete('images/products/'.$image_before_update);\n }\n \n } else {\n $response .= ' (a imagem não foi salva)';\n }\n } catch (\\Exception $e){\n $response .= ' (Erro: '.$e->getMessage().')';\n }\n \n }else{\n \n if(strlen($image_before_update)>0){\n \n if(!\\File::exists('images/products/'.$image_before_update)) {\n $response .= ' (a imagem não foi salva)';\n }\n }else{\n $response .= ' (a imagem não foi salva)';\n }\n \n }\n\n $category = \\App\\Models\\Category::find($request->category_id);\n $model->category = $category;\n\n return response()->json(['status'=>true,'msg'=>$response,'item'=>$model]);\n\n } catch (\\Exception $e) {//errors exceptions\n\n $response = null;\n\n switch (get_class($e)) {\n case QueryException::class:$response = $e->getMessage();\n case Exception::class:$response = $e->getMessage();\n case ValidationException::class:$response = $e;\n default: $response = get_class($e);\n }\n\n $response = method_exists($e,'getMessage')?$e->getMessage():get_class($e);\n\n return response()->json(['status'=>false,'msg'=>$response]);\n\n }\n }", "public function update(Request $request, $id)\n {\n $data = array();\n $data['customer_name'] = $request->customer_name;\n $data['customer_email'] = $request->customer_email;\n $data['phone_number'] = $request->phone_number;\n $data['address'] = $request->address;\n $image = $request->newimage;\n\n if($image){\n //first select position from where to start\n $position = strpos($image,';');\n\n //which index to take\n $sub = substr($image,0,$position);\n //remove slash from image link\n\n $ext = explode('/',$sub)[1];\n\n //image naming //\n\n $name = time().\".\".$ext;\n\n //image making & resizing with intervention //\n $image = Image::make($image)->resize(240,200);\n\n //upload path//\n $upload_path = 'ims/customer/';\n $image_url = $upload_path.$name;\n $img = $image->save($image_url);\n\n if($img){\n $data['image'] = $image_url;\n $oldImage= Customer::where('id',$id)->first();\n $oldImagePath = $oldImage->image;\n $unbind = unlink($oldImagePath);\n\n $update = Customer::where('id',$id)->update($data);\n return response()->json('updated');\n }\n }else{\n $oldphoto = $request->image;\n $data['image'] = $oldphoto;\n $update = Customer::where('id',$id)->update($data);\n\n return response()->json('updated');\n }\n }", "public function testUpdateAvatarImage()\n {\n }", "public function updatePhoto()\n {\n //Intenta subir la foto que viene en el campo 'photo'\n if ($photo = $this->uploadPhoto('photo')) {\n //Modifica el campo photo del usuario y lo intenta actualizar\n $this->photo = $photo;\n return $this->update();\n }\n }", "public function update(Request $request, $id)\n {\n\n\n\n $earthreminderscheck = EarthReminders::findOrFail($id);\n\n if (url($earthreminderscheck->image) === $request->image) {\n } else if ($request->image === \"\") {\n } else {\n\n if ($request->image) {\n /**\n * Image upload Start\n *\n */\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n\n $extension = $request->file('image')->getClientOriginalExtension();\n\n $FileNameToStore = $filename . '_' . time() . \".\" . $extension;\n\n $path = $request->file('image')->storeAs('public/upload_earthreminders', $FileNameToStore);\n $FileNameToStore = 'storage/upload_earthreminders/' . $FileNameToStore;\n\n /**\n * Image upload End\n *\n */\n }\n }\n\n\n $earthreminders = EarthReminders::findOrFail($id);\n\n $earthreminders->title = $request->title;\n $earthreminders->subtitle = $request->subtitle;\n $earthreminders->event_date = $request->event_date;\n $earthreminders->country = $request->country;\n $earthreminders->author = $request->author;\n $earthreminders->content = $request->content;\n $earthreminders->publish = $request->publish;\n\n if ($request->publish == 1) {\n $earthreminders->publish_text = 'draft';\n } else {\n $earthreminders->publish_text = 'publish';\n }\n\n if (url($earthreminderscheck->image) === $request->image) {\n\n $earthreminders->image = '';\n } else if ($request->image == \"\") {\n\n $earthreminders->image = '';\n } else {\n\n if ($request->image) {\n\n $earthreminders->image = $FileNameToStore;\n } else {\n }\n }\n\n $earthreminders->update();\n\n $earthremindersagain = EarthReminders::findOrFail($id);\n\n if ($request->image == \"\") {\n $image = '';\n } else {\n $image = url($earthremindersagain->image);\n }\n\n\n\n\n return response()->json([\n 'save' => $earthreminders,\n 'success' => 1,\n 'image' => $image,\n 'user' => $request->user(),\n '_benchmark' => microtime(true) - $this->time_start,\n ], 200);\n }", "public function update_profileImage() {\n \n $data = $_POST['image'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n $data = base64_decode($data);\n $imageName = time().'.png';\n\n file_put_contents('files/uploads/users/'.$imageName, $data);\n $data = $this->request->data;\n $id = $this->Auth->user('id');\n $profile_image = $imageName;\n if (!empty($profile_image)) {\n $ext = substr(strtolower(strrchr($profile_image, '.')), 1);\n $arr_ext = array(\n 'jpg',\n 'jpeg',\n 'gif',\n 'png',\n );\n if (in_array($ext, $arr_ext)) {\n move_uploaded_file($profile_image, WWW_ROOT . 'files/uploads/users/' . $profile_image);\n \n $data['profile_image'] = $profile_image;\n $update = $this->User->updateUser($id, $data);\n if ($update == 1) {\n $this->Session->write('Auth.User.profile_image', $profile_image);\n die();\n }\n }\n }\n \n \n \n }", "public function update(updateImage $request)\n {\n $request->title = ($request->title !== null) ? $request->title : '';\n $request->description = ($request->description !== null) ? $request->description : '';\n\n $image = Image::where('type', $request->type)\n ->where('title', $request->title)\n ->where('description', $request->description)\n ->where('position', $request->position)\n ->first();\n\n $path = $image->path;\n $ext = $image->ext;\n\n switch ($request->type) {\n case 'slideshow':\n $folder = 'sports';\n break;\n case 'whyJil':\n $folder = 'why';\n break;\n case 'tracks':\n $folder = 'tracks';\n break;\n }\n\n if ($request->hasFile('path')) {\n $file = $request->file('path')->store(\"images/$folder\", 'public');\n $exists = Storage::disk('public')->url($file);\n// dd($exists);\n $segments = explode('/', $exists);\n $noExt = explode('.', $segments[6]);\n// dd($segments);\n $path = $segments[4].'/'.$segments[5].'/'.$noExt[0];\n// dd($path);\n $ext = \\File::extension($exists);\n// dd($exists);\n }\n\n// return \"request has no file\";\n $image->update([\n 'path' => $path,\n 'ext' => $ext,\n 'type' => $request->type,\n 'title' => $request->title,\n 'description' => $request->description,\n 'position' => $request->position,\n ]);\n\n return back();\n\n }", "public function updateprofilepic(Request $request)\n {\n $data = $request->all();\n $validator = Validator::make($data, [\n 'user_id' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg|max:2048',\n ]);\n if ($validator->fails()) {\n return response()->json(['stat' => \"errors\", \"errors\" => $validator->errors()]);\n } else {\n\n if ($request->hasFile('image')) {\n\n $image = $request->file('image');\n\n $data['images'] = time() . '.' . $image->getClientOriginalExtension();\n $destinationPath = public_path('uploads/avator/');\n $image->move($destinationPath, $data['images']);\n }\n\n\n if (!empty($data['images'])) {\n $user = User::find($request->user_id);\n $filename = public_path('uploads/avator/' . $user->image);\n File::delete($filename);\n $user->image = $data['images'];\n $user->save();\n }\n $user_info = [\n 'id'=>$user->id,\n 'image'=>asset('public/uploads/avator/'.$user->image)\n ];\n return response()->json(['stat' => 'success', 'msg' => \"profile picture updated successfully\", 'data' => $user_info]);\n }\n }", "function updateDataProduct(){\n\t\t$data = $this->input->post();\n\t\t//var_dump($_FILES['photoLoyalty']);\n\n\t\tif($_FILES['photoAward']){\n\n\t\t\t// Set preference\n\t\t\t$config['upload_path'] = 'images/'; \n\t\t\t$config['allowed_types'] = '*';\n\t\t\t$config['max_size'] = '7167800'; // max_size in kb\n\t\t\t$config['file_name'] = $_FILES['photoAward']['name'];\n\n\t\t\t//Load upload library\n\t\t\t$this->load->library('upload',$config); \n\t\t\t\t// File upload\n\t\t\tif($this->upload->do_upload('photoAward')){\n\t\t\t// Get data about the file\n\t\t\t$uploadData = $this->upload->data();\n\n\t\t\t$data['IMAGEN'] = 'images/'.$uploadData['file_name'];\n\n\t\t\t}else{\n\t\t\t\t//echo \"error\";\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\techo json_encode($this->GuestDashboardModel->updateDataProduct($data,$data['ID_PROD']));\n\t}", "public function update(Request $request)\n {\n if($request->file('image')){\n $find_image = Event::find($request->id);\n $old_img = $find_image->image;\n if($old_img){\n unlink($old_img);\n }\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension();\n $image->move(public_path('ciltimage'), $new_name);\n $data = Event::find($request->id);\n $data->image = 'ciltimage/'.$new_name;\n $data->title = $request->title;\n $data->date = $request->date;\n\n $data->description = $request->description;\n $data->save();\n return response()->json($data);\n }else{\n $data = Event::find($request->id);\n $data->title = $request->title;\n $data->date = $request->date;\n $data->description = $request->description;\n $data->save();\n return response()->json($data);\n }\n \n }", "public function update(Request $request, $id)\n {\n\n $getdata=user::where('id', $id)->FirstorFail();\n $input=$request->all();\n\n $this->validate($request,[\n 'name' => 'max:255',\n 'email' => 'email|max:255',\n 'password' =>'string|min:8',\n 'img' => 'max:5124',\n 'nid' => 'max:5100',\n 'singature' => 'max:5100',\n ],[\n 'img.max' => 'Maximum Upload size 5MB',\n 'nid.max' => 'Maximum Upload size 5MB',\n 'singature.max' => 'Maximum Upload size 5MB',\n 'name.required' => 'Name is required',\n 'email.required' => 'Email is required',\n 'email.unique' => 'This Eemail has already taken',\n 'password.min' => 'Password minimum lenght 8 character',\n ]);\n\n\n if($request->hasFile('img')){\n $image=$request->file('img');\n $imageName='profile_photo'.'_'.time().'.'.$image->getClientOriginalExtension();\n Image::make($image)->save(base_path('public/contents/uploads/customer/'.$imageName));\n $input['img']=$imageName;\n if($getdata->img){\n if (file_exists(public_path().'/contents/uploads/customer/'.$getdata->img)) {\n unlink(public_path().'/contents/uploads/customer/'.$getdata->img);\n }\n }\n }\n\n\n\n\n // Nid Card\n if($request->hasFile('nid')){\n $image=$request->file('nid');\n $imageName='nid'.'_'.time().'.'.$image->getClientOriginalExtension();\n Image::make($image)->save(base_path('public/contents/uploads/customer/'.$imageName));\n $input['nid']=$imageName;\n if($getdata->nid){\n if (file_exists(public_path().'/contents/uploads/customer/'.$getdata->nid)) {\n unlink(public_path().'/contents/uploads/customer/'.$getdata->nid);\n }\n }\n }\n\n\n // sigature\n if($request->hasFile('singature')){\n $image=$request->file('singature');\n $imageName='singature'.'_'.time().'.'.$image->getClientOriginalExtension();\n Image::make($image)->save(base_path('public/contents/uploads/customer/'.$imageName));\n $input['singature']=$imageName;\n if($getdata->singature){\n if (file_exists(public_path().'/contents/uploads/customer/'.$getdata->singature)) {\n unlink(public_path().'/contents/uploads/customer/'.$getdata->singature);\n }\n }\n }\n\n if($getdata->password!==$input['password']){\n $input['password'] = Hash::make($input['password']);\n }\n\n\n $updatedata=$getdata->fill($input)->save();\n if($updatedata){\n Session::flash('status','value');\n return redirect()->back();\n }else{\n Session::flash('error','value');\n return redirect()->back();\n }\n\n\n\n\n\n\n }", "public function update(Request $request)\n {\n $action = new Action();\n $rules = [\n 'image_update' => 'nullable|max:2000',\n 'title_update' => 'required|min:3|max:100',\n 'description_update' => 'required|max:100|min:10',\n 'cat_update' => 'required|not_in:0 '\n ];\n\n $messages = [\n 'cat_update.required' => 'User role must be selected.'\n ];\n $request->validate($rules,$messages);\n $galleryModel = new GalleryModel();\n if($request->hasFile('image_update')){\n try {\n $file = $request->file('image_update')->getClientOriginalName();\n $dest = public_path() . '\\images';\n $request->file('image_update')->move($dest, $file);\n $galleryModel->image = $file;\n $galleryModel->title = $request->get(\"title_update\");\n $galleryModel->description = $request->get(\"description_update\");\n $galleryModel->category = $request->get(\"cat_update\");\n $galleryModel->id_update = $request->get(\"id_gallery\");\n $galleryModel->update();\n $action->writeAction(\"Post successfuly update with image!\");\n return redirect(route(\"gallery.index\"))->with('Success','Gallery successfuly update with image');\n }catch (QueryException $exception){\n return \\response(['message' => $exception->getMessage()],404);\n }\n }else{\n try {\n $galleryModel->title = $request->get(\"title_update\");\n $galleryModel->description = $request->get(\"description_update\");\n $galleryModel->category = $request->get(\"cat_update\");\n $galleryModel->id_update = $request->get(\"id_gallery\");\n $galleryModel->update();\n $action->writeAction(\"Post successfuly update without image!\");\n return redirect(route(\"gallery.index\"))->with('Success','Gallery successfuly update without image');\n }catch (QueryException $exception){\n return response(['message' => $exception->getMessage()],404);\n }\n }\n\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function add(){\n $uploaded_image = Input::file('image_file_actual');\n $allowedTypes = array(\"image/jpeg\", \"image/png\", \"image/jpg\");\n \n \tif( !Input::hasFile('image_file_actual') ){\n return $this->jsonResponse(\"error\", \"No image provided\", Input::get('callback'));\n \t}\n if( !in_array($uploaded_image->getMimeType(),$allowedTypes) ){\n return $this->jsonResponse(\"error\", \"Uploaded invalided file type\", Input::get('callback'));\n }\n \t\n $image = new Image;\n $image->user_id = isset(Auth::user()->id) ? Auth::user()->id : \"guest\";\n $image->id = strtoupper(str_random(\"5\"));\n\twhile( isset(Image::find($image->id)->file) ){\n\t\t$image->id = strtoupper(str_random(\"5\"));\n\t}\n $imageName = $image->id . \".\" . $uploaded_image->getClientOriginalExtension();\t\n\t$image->file = URL::asset('images/'.$imageName);\n $image->rating = 0;\n $image->raters_count = 0;\n \n if(!$image->save()){\n return $this->jsonResponse(\"error\", \"Cannot add image\", Input::get('callback'), $image->errors());\n }\n \t\n $uploaded_image->move(public_path('images'), $imageName);\n \n if(!empty(Auth::user()->id)){\n $user = User::find(Auth::user()->id);\n $user->uploaded_count = $user->uploaded_count + 1;\n $user::$rules['password'] = '';\n if(!$user->updateUniques()){\n return $this->jsonResponse(\"error\", \"Unable to increase upload_count of user\", Input::get('callback'), $user->errors());\n }\n }\n \n return $this->jsonResponse(\"ok\", \"Succesfully added image\", Input::get('callback'), $image);\n }", "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "public function editImage(Request $request)\n {\n // get user to update image\n $user = User::findOrFail($request->get('user_id'));\n\n // role id\n $role_id = $request->get('role_id');\n\n // pre imagen\n //$preImage = $request->get('preImage');\n\n // image and image path\n $image = $request->file('img');\n $image_path = $user->id . '.jpg';\n\n if ($role_id == '1') {\n // Eliminar imagen existente\n // \\Storage::disk('imagesAdmin')->delete($preImage);\n\n // Actualizar imagen\n \\Storage::disk('imagesAdmin')->put($image_path, \\File::get($image));\n\n // url image\n $image_url =\n 'https://telemedicina.today/images/user/admin/' . $image_path;\n\n // actualizamos en base de datos\n $user->img = $image_url;\n $user->save();\n\n // retorno json\n return response()->json([\n 'estado' => true,\n 'code' => '200',\n 'message' => 'Actualizacion Exitosa',\n 'data' => $image_url,\n ]);\n } elseif ($role_id == '2') {\n // Eliminar imagen existente\n // \\Storage::disk('imagesDoctor')->delete($preImage);\n\n // Actualizar imagen\n \\Storage::disk('imagesDoctor')->put(\n $image_path,\n \\File::get($image)\n );\n\n // url image\n $image_url =\n 'https://telemedicina.today/images/user/doctor/' . $image_path;\n\n // actualizamos en base de datos\n $user->img = $image_url;\n $user->save();\n\n // retorno json\n return response()->json([\n 'estado' => true,\n 'code' => '200',\n 'message' => 'Actualizacion Exitosa',\n 'data' => $image_url,\n ]);\n } elseif ($role_id == '3') {\n // Eliminar imagen existente\n // \\Storage::disk('imagesPaciente')->delete($preImage);\n\n // Actualizar imagen\n \\Storage::disk('imagesPaciente')->put(\n $image_path,\n \\File::get($image)\n );\n\n // url image\n $image_url =\n 'https://telemedicina.today/images/user/paciente/' . $image_path;\n\n // actualizamos en base de datos\n $user->img = $image_url;\n $user->save();\n\n // retorno json\n return response()->json([\n 'estado' => true,\n 'code' => '200',\n 'message' => 'Actualizacion Exitosa',\n 'data' => $image_url,\n ]);\n } elseif ($role_id == '4') {\n // Eliminar imagen existente\n // \\Storage::disk('imagesSecretaria')->delete($preImage);\n\n // Actualizar imagen\n \\Storage::disk('imagesSecretaria')->put(\n $image_path,\n \\File::get($image)\n );\n\n // url image\n $image_url =\n 'https://telemedicina.today/images/user/secretaria/' . $image_path;\n\n // actualizamos en base de datos\n $user->img = $image_url;\n $user->save();\n\n // retorno json\n return response()->json([\n 'estado' => true,\n 'code' => '200',\n 'message' => 'Actualizacion Exitosa',\n 'data' => $image_url,\n ]);\n } else {\n // Eliminar imagen existente\n // \\Storage::disk('imagesLaboratorio')->delete($preImage);\n\n // Actualizar imagen\n \\Storage::disk('imagesLaboratorio')->put(\n $image_path,\n \\File::get($image)\n );\n\n // url image\n $image_url =\n 'https://telemedicina.today/images/user/laboratorio/' . $image_path;\n\n // actualizamos en base de datos\n $user->img = $image_url;\n $user->save();\n\n // retorno json\n return response()->json([\n 'estado' => true,\n 'code' => '200',\n 'message' => 'Actualizacion Exitosa',\n 'data' => $image_url,\n ]);\n }\n }", "public function index_post()\n\n\t\t{\n $input = file_get_contents(\"php://input\");\n $json = decoder($input);\n $name = $json->name;\n $email = $json->email;\n $id=$json->id;\n $phone_number=$json->phone_number;\n $country_code=$json->country_code;\n $isNumNotExits=false;\n $isEmailNotExits=false;\n $isimage=false;\n\n if(!empty($json->image))\n {\n $isimage=true;\n }\n\n // To check if the ID is empty or the length is less then 24...name:sasi,date:13/08/2019\n \n if(empty($id)||strlen($id)<24)\n {\n $res = array(\n \"status\" => 0,\n \"message\" =>\"Illegal Access\"\n );\n $encoded = encoder($res);\n $this->response($encoded); }\n else\n {\n//-------------------------------------------------------------------------------------------------------------\n // Image Upload........ name:sasi , date:12/08/2019\n\n if($isimage)\n {\n if (!empty($input)) \n {\n // $object = json_decode($input);\n if ($json->image != \"\") \n {\n $path = \"./uploads/images/\";\n $img = $json->image;\n $img = str_replace('data:image/*;base64,', '', $img);\n $img = str_replace(' ', '+', $img);\n $data = base64_decode($img);\n $image_name = $json->id;\n $filename = $image_name . '.png';\n $get_image_names = scandir(\"./uploads/images/\", 1);\n $check_image = array_map(function ($e) {\n return pathinfo($e, PATHINFO_FILENAME);\n }, $get_image_names);\n\n if (in_array($image_name, $check_image)) {\n $file_pattern = \"./uploads/images/$image_name.*\";\n array_map(\"unlink\", glob($file_pattern));\n file_put_contents($path . $filename, $data);\n $message = \"profile image updated\";\n } else {\n file_put_contents($path . $filename, $data);\n $message = \"profile image uploaded\";\n }\n $data = array(\n 'id' => $json->id,\n 'image_path' => $filename\n );\n $this->Update_model->image_path($data);\n }\n }\n }\n//-------------------------------------------------------------------------------------------------------------\n\n\n //TO make a data as a array format for easy handling.. name:sasi, date :12/8/2019\n\n $data = array(\"name\" => $name,\"email\" => $email, \"phone_number\" => $phone_number, \n \t\t\t \"country_code\" => $country_code);\n\n $this->form_validation->set_data($data);\n $this->form_validation->set_rules($this->validate);\n\n\n //Form validation... name:sasi, date :12/8/2019\n \n if ($this->form_validation->run() == false) \n {\n \t$error = $this->form_validation->error_array();\n $res = array(\n \"status\" => 0,\n \"message\" => $error\n );\n $encoded = encoder($res);\n $this->response($encoded);\n }\n else\n {\n\n //To Check if the mail and number are unique....name:sasi,date:12/08/2019\n\n $oldData=$this->Update_model->userDetails($id);\n\n\n if($oldData[0]->email==$email)\n {\n $isEmailNotExits=true;\n }\n else\n {\n $emailExits = $this->Registration_model->emailExits($data);\n\n // to check if the Email is already exists\n\n if(!empty($emailExits[0]->email)&&$emailExits[0]->email==$email)\n {\n $res = array(\n \"status\" => 3,\n \"message\" => \"The Email is Already Exits Use Anathor Email\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n return false;\n }\n else\n {\n $isEmailNotExits=true;\n }\n }\n\n if($oldData[0]->phone_number==$phone_number)\n {\n $isNumNotExits=true;\n }\n else\n {\n $numberExits = $this->Update_model->numberExits($data);\n\n // to check if the phone number is already exists\n\n if($numberExits)\n {\n $res = array(\n \"status\" => 4,\n \"message\" => \"The Phone Number is Already Exists Please Use Anathor Number\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n return false;\n }\n else\n {\n $isNumNotExits=true;\n }\n }\n\n //update user details...name:sasi date:12/8/2019\n\n if($isNumNotExits&&$isEmailNotExits)\n {\n $update=$this->Update_model->user_update($id,$data);\n if($update)\n {\n $responceData = $this->Update_model->userDetails($id);\n $responceData=image_url($responceData);\n\n //if phone number change...name:sasi date:12/8/2019\n\n if($responceData[0]->phone_number!=$phone_number)\n {\n $otp = generateNumericOTP();\n $this->Api_model->newPhoneVerify($id,$otp);\n $detail = $this->Api_model->getDetails($id);\n $res = array(\n \"status\" => 5,\n \"details\"=> $detail[0],\n \"message\" => \"Your Phone Number is Changed So You Have Verify Your OTP\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n }\n else\n {\n $res = array(\n \"status\" => 1,\n \"details\" =>$responceData[0],\n \"message\" => \"successfully updated\"\n );\n $encoded = encoder($res);\n $this->response($encoded);\n } \n }\n }\n else\n {\n $res = array(\n \"status\" => 0,\n \"message\" => \"user details cannot be update\"\n );\n $encoded = encoder($res);\n $this->response($encoded); \n }\n \t}\n }\n\t }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function update(Request $request, Image $image)\n {\n //\n }", "public function correctImage(){\n parent::isImage();\n parent::exist();\n parent::sizeFile();\n return $this->uploadOk;\n }", "public function updateProfileImage(Request $request)\n {\n $validator = Validator::make($request->all(),['image'=>'required']);\n\n if($validator->fails()){ $errors = $validator->errors()->toArray();\n \n return $this->responseData->httpbadREQUEST(reset($errors)[0]);\n }\n $user = Auth::user();\n $user_id = $user->id;\n\n if (!empty($request->file('image'))) {\n\n $image = $request->file('image');\n $imgName = time() . '.' . $image->getClientOriginalExtension();\n $destinationPath = public_path('/uploads/user-profile/');\n $image->move($destinationPath, $imgName);\n $imageName = $imgName;\n User::where('id', $user_id)->where('deleted_at', null)->update(['image' => $imageName]);\n return $this->responseData->objectHTTPOK(trans('lang.update_profile'),$user);\n\n }else{\n \n return $this->responseData->httpbadREQUEST(trans('lang.please_try_again'));\n }\n\n }", "public function update(Request $request, Post $post,$id)\n {\n // dd($id);\n\n\n // validation \n $request->validate([\n 'title' => 'required|unique:posts|max:50|min:4',\n 'details' => 'required|min:4',\n 'image' => 'mimes:jpeg,jpg,png,JPG,PNG,JPEG | max:1000',\n ]);\n \n $data = array();\n $data['employee_id'] = $request->employee_id;\n $data['title'] = $request->title;\n $data['details'] = $request->details;\n $data['title'] = $request->title;\n\n // image upload part \n $image=$request->file('image'); //ইমেজ ধরব এখানে input এর নাম image \n\n if($image){\n\n // ডাটা ফোল্ডার এ ইন্সারট করার জন্য \n\n $image_name = hexdec(uniqid()); // একটা random নামের জন্য ।\n $ext = strtolower($image->getClientOriginalExtension()); // member function সকল ডাটা ছোট হাতের করার জন্য ।\n $image_full_name = $image_name.'.'.$ext; //conket কিংবা যোগ করার জন্য ।\n $upload_path = 'public/frontend/image/' ; // Image Path , অবশ্যই শেষে '/' দিতে হবে ।\n $image_url = $upload_path.$image_full_name; // Image url টা আপলোড করে url store করে দিলাম ।\n $success=$image->move($upload_path,$image_full_name); //Image path দিয়ে , image er ফুল্ল নাম দিয়ে move করলাম ।\n\n $data['image'] = $image_url; //$data['image'] হল ডাটাবেস এর ফিল্ড , $image_url holo iage path dekhano .\n \n unlink($request->old_image);\n DB::table('posts')->where('id',$id)->update($data);\n\n // dd($data);\n // return response($data);\n $notification = array(\n 'message' => 'Data Updated Successfully',\n 'alert-type' =>'success'\n );\n return redirect()->route('IndexPost')->with($notification);\n }else{\n $data['image'] = $request->old_image;\n DB::table('posts')->where('id',$id)->update($data);\n $notification = array(\n 'message' => 'Data Updated Successfully',\n 'alert-type' =>'success'\n );\n return redirect()->route('IndexPost')->with($notification);\n }\n }", "public function update(Request $request, $id)\n {\n //echo $request->title;die;\n $data=request()->all();\n $vali = Validator::make($request->all(), [\n 'title'=>'required',\n 'mrp_price'=>'required', \n 'gst'=>'required',\n 'category_id'=>'required',\n 'discount'=>'required',\n ]);\n if ($vali->fails())\n {\n return redirect()->back()->withErrors($vali->errors())->withInput();\n }\n if($file = $request->hasFile('image')) {\n $file = $request->file('image') ;\n \n $fileName = time().\"_\".$file->getClientOriginalName() ;\n $destinationPath = public_path().'/dist/img/product/' ;\n $file->move($destinationPath,$fileName);\n }else{\n $fileName=$request->old_image;\n }\n if(@count($data['zodiac_sign'])>0){\n $zod_count=1;\n }else{\n $zod_count=0;\n }\n if(@$data['planet']!=\"\"){\n $plan_count=1;\n }else{\n $plan_count=0;\n }\n $up_arr=array(\n 'title' => $data['title'],\n 'slug' => SlugService::createSlug(Product::class, 'slug', $data['title']),\n 'carat_id'=>$data['carat_id'],\n 'mrp_price' => $data['mrp_price'],\n 'gst' => $data['gst'],\n 'category_id' => $data['category_id'],\n 'discount' => $data['discount'],\n 'image' => $fileName,\n 'mrp_gst_price' => $data['mrp_gst_price'],\n 'price' => $data['price'],\n 'first_description' => $data['first_description'],\n 'second_description' => $data['second_description'],\n 'faq' => $data['faq'],\n 'planet' => $data['planet'],\n 'zodiac_sign' => json_encode($data['zodiac_sign']),\n 'zodiac_sign_check' => $zod_count,\n 'planet_check' => $plan_count,\n 'top_selling' => $data['top_selling'],\n 'stock' => $data['stock'],\n 'product_count' => $data['product_count'],\n 'updated_at' => date('Y-m-d H:i')\n ); \n DB::table('products')->where('id',$id)->update($up_arr);\n //return back()->with('success', 'Horoscope updated successfully');\n return redirect('admin/product')->with('success','Product updated successfully.');\n }", "public function details_post()\n{\n\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $msg = \"\";\n if(isset($data['id']))\n {\n $id = $data['id'];\n }\n $company_name = $data['company_name'];\n $lat = $data['lat'];\n $long = $data['long'];\n $gst_no = $data['gst_no'];\n $punch_line = $data['punch_line'];\n //$company_id = $data['company_id'];\n\n $insert_data = array(\n 'company_name' => $company_name,\n 'lat' => $lat,\n 'long' => $long,\n 'gst_no' => $gst_no,\n 'punch_line' => $punch_line,\n //'company_id' => $company_id,\n 'created_at' => date('Y-m-d H:i:s')\n );\n\n\n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['logo']; \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n \n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $insert_data['logo'] = $image;\n\n // $id = $this->model->getAllwhere('details','','id');\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n\n else{\n if(empty($img) || !empty($img)){\n $result = $this->model->insertData('details', $insert_data);\n $msg = \"Detail insert successfully\";\n }\n }\n }\n else{\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n }\n\n$resp = array('rccode' => 200,'message' =>$msg);\n$this->response($resp);\n}", "public function update(Request $request, $id)\n {\n //\n $update_product=Details::findOrFail($id);\n $this->validate($request,[\n 'name'=>'required',\n 'image'=>'max:1000',\n ]);\n $formInput=$request->all();\n $slider=array();\n if(empty($request->input('atelier'))){\n $slider['atelier']=\"null\";\n }\n else{\n \n \n $slider['atelier']=$request->input('atelier');\n }\n if(empty($request->input('domicile'))){\n $slider['domicile']=\"null\";\n }\n else{\n \n \n $slider['domicile']=$request->input('domicile');\n } \n $slider['name']=$request->name;\n $slider['description']=$request->description;\n $slider['type']=$request->type;\n if($update_product->image==''){\n $image=$request->file('image');\n if($image)\n { \n $image_name=str_random(20);\n $ext=strtolower($image->getClientOriginalExtension());\n $image_full_name=$image_name.'.'.$ext;\n $upload_path='images/';\n $image_url=$upload_path.$image_full_name;\n $success=$image->move($upload_path,$image_full_name);\n if($success)\n {\n \n \n $slider['image']=$image_url;\n DB::table('details')->where('id',$id)->update($slider);\n session()->flash('success','sous service modifier');\n return back(); \n \n }\n \n \n }\n }\n else\n {\n \n \n $slider['image']=$update_product->image;\n \n \n DB::table('details')->where('id',$id)->update($slider);\n session()->flash('success','sous service modifier');\n return back(); \n }\n }", "public static function update_data()\n {\n \t$data = \\Request::only(self::expected_input('update'));\n\n \t\n \t$image_list = ['featured_image','image1','image2','image3','image4','image5','image6','business_logo'];\n\n \t// loop through and upload \n \tforeach($image_list as $image_file):\n\n\t\t\t\tif(\\Request::hasFile($image_file))\n\t\t \t{\n\t\t \t\t$upload_folder = 'uploads/images/'.date(\"Y/m\");\n\t\t \t\t\n\t\t\t $extension = \\Request::file($image_file)->extension();\n\t\t\t $new_name = str_slug($image_file.'-'.$data['title'].microtime().rand(111,666));\n\n\t\t\t $full_file_name = \"$new_name.$extension\";\n\n\t\t\t $data[$image_file] = \\Request::file($image_file)->storeAs($upload_folder,$full_file_name,'uploads');\n\t\t \t}\n\n \tendforeach;\n\n \t$open_hours = ['monday','tuesday','wednesday','thursday','friday','saturday','sunday'];\n\n \t// loop through and upload \n \tforeach($open_hours as $weekday):\n\n\t\t\t\tif(strlen(\\Request::input($weekday.'_open_time')) > 4 )\n\t\t \t{\n\t\t \t\t$data[$weekday.'_status'] = 'open' ;\n\t\t \t}\n\n \tendforeach;\n \t\n \t$data['last_update_time'] = time();\n\n\n\n \treturn \\DB::table('9jb_listings')->where('id',$data['id']) \n\t\t\t\t\t\t\t\t\t\t\t->update($data);\n }", "public function update(Request $request, $id)\n {\n $resmsg = new ResponseMessage();\n\n try\n {\n if (preg_match(\"/[A-Za-z]/\", $id)) throw new Exception(\"Invalid Data\", 0);\n $request->validate([\n 'c_name' => 'required',\n 'u_username' => 'required',\n 'u_file' => 'image|mimes:jpeg,png,jpg|max:2048'\n ]);\n\n $photo = null;\n if ($request->hasFile('u_file'))\n {\n $photo = new Request();\n $imgExt = $request->file('u_file')->getClientOriginalExtension();\n $up_filename = 'C_'.$request->u_username.'_ProfilePhoto.'.$imgExt;\n $imgFile = $request->u_file;\n $up_photo = Image::make($imgFile)->resize(100, 100, function ($constraint) {\n $constraint->aspectRatio();\n });\n Response::make($up_photo->encode($imgExt));\n\n if ($request->up_id != null) {\n $photo->merge([\n 'up_photo' => $up_photo,\n 'up_filename' => $up_filename,\n 'up_rec_updatedby' => strlen(trim($request->creator)) == 0 ? 'system' : $request->creator,\n 'up_rec_updated' => DateTime::Now()\n ]);\n }\n else\n {\n $photo->merge([\n 'up_id' => rand(-2147483648,2147483647),\n 'up_u_id' => $id,\n 'up_photo' => $up_photo,\n 'up_filename' => $up_filename,\n 'up_rec_status' => 1,\n 'up_rec_createdby' => strlen(trim($request->creator)) == 0 ? 'system' : $request->creator,\n 'up_rec_created' => DateTime::Now()\n ]);\n }\n }\n\n $client = new Request();\n $client->merge([\n 'c_name' => $request->c_name,\n 'c_remark' => $request->c_remark,\n 'c_rec_updatedby' => strlen(trim($request->creator)) == 0 ? 'system' : $request->creator,\n 'c_rec_updated' => DateTime::Now()\n ]);\n\n $user = new Request();\n $user->merge([\n 'u_username' => '@'.$request->u_username,\n 'u_rec_updatedby' => strlen(trim($request->creator)) == 0 ? 'system' : $request->creator,\n 'u_rec_updated' => DateTime::Now()\n ]);\n\n DB::beginTransaction();\n try \n {\n if ($photo != null)\n if ($request->up_id != null)\n DB::table('user_photos')->where('up_u_id', '=', $id)->update($photo->all());\n else\n UserPhoto::create($photo->all());\n \n DB::table('users')->where('u_id', '=', $id)->update($user->all());\n DB::table('clients')->where('c_u_id', '=', $id)->update($client->all());\n\n DB::commit();\n $resmsg->code = 1;\n $resmsg->message = \"Data has edited\";\n }\n catch (Exception $sqlEx) {\n DB::rollBack();\n throw $sqlEx;\n }\n }\n catch (Exception $ex) \n {\n $resmsg->code = $ex->getCode();\n $resmsg->message = $ex->getMessage();\n }\n return response()->json([\n 'code' => $resmsg->code,\n 'message' => $resmsg->message\n ]);\n }", "public function update(Request $request, Image $image)\n {\n //\n $request->validate([\n \"name\"=>\"required|min:3|string\", \n \"image\"=>\"required|image|mimetypes:image/webp|max:2048|dimensions:max_width=500,max_height=500\"\n \n ]);\n if($request->hasFile('image')) {\n $imagee = $request->file('image');\n $filename =rand() . '.' . $imagee->getClientOriginalExtension();\n $imagee->move(public_path('imagestest/'), $filename);\n $filename='imagestest/'.$filename;\n \n }\n \n $image->update([\n \"name\"=>$request[\"name\"],\n \"image\"=>$filename,\n \n ]);\n \n return redirect(route(\"images.index\")); \n }", "public function update(Request $request, $id)\n { \n $this->validate(request(), [\n\n 'categoryName' => 'required',\n 'title' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'image'=>'required|mimes:svg',\n 'imageOnWall'=> 'required',\n ],\n \n [\n 'categoryName.required' => 'Enter Photo name',\n 'title.required' => 'Enter Title of photo',\n 'description.required' => 'Enter Description for Photo',\n 'price.required' => 'Enter Price',\n 'image'=>'required',\n 'imageOnWall.required' => 'Choose Photo on wall'\n\n ]);\n \n $user=Category::find($id);\n\n $user->categoryName=$request->input('categoryName');\n $user->title=serialize($request->input('title'));\n $user->description=serialize($request->input('description'));\n $user->state=$request->input('state');\n $user->is_approved=$request->input('is_approved');\n $multipleimg=$request->file('imageOnWall');\n $images=array();\n if($request->imageOnWall == null)\n {\n $request->imageOnWall= $user->imageOnWall;\n }\n else{\n for($x = 0; $x < count($multipleimg); $x++){\n $img_name=time(). '.' . $multipleimg[$x]->getClientOriginalExtension();\n $images[$x]=$img_name;\n $user->imageOnWall=implode(\",\",$images);\n \n $multipleimg[$x]->move(public_path('/images'), $img_name);\n // $users->width=Image::make('public/images/'. $img_name)->width();\n // $users->height=Image::make('public/images/'. $img_name)->height();\n \n } }\n // update price and price AFter discount\n if($user->price != $request->input('price')){\n \n $user->price=$request->input('price');\n \n if($user->price==0){\n $user->priceAfterOff=0;\n }\n elseif($user->offer_id ==0){\n $user->priceAfterOff=$user->price;\n }\n else{\n $offerId=Offer::where('id',$user->offer_id)->first();\n \n $Afteroffer=$user->price -($user->price*($offerId->offer/100));\n $user->priceAfterOff=$Afteroffer;\n \n \n }\n \n \n }\n $img_nameWall=time(). '.' . $request->image->getClientOriginalExtension();\n\n $user->image=$img_nameWall;\n $request->image->move(public_path('/images'), $img_nameWall);\n\n $user->save();\n \n Session::flash('save','Done, Updated Successfully');\n return redirect('admin/category');\n\n }", "public function update(Request $request, Post $post)\n {\n\n /*if(Gate::denies('admin')){\n abort('403');\n }*/\n $this->authorize('update',$post);\n\n $post= Post::findOrFail($post->id);\n $newFileName;\n $dataPost;\n if (request('img_url')!=\"\"){\n $dataPost=request()->validate([\n 'title'=> 'required|max:255',\n 'default-lang'=> 'required',\n 'img_url'=> 'required|image',\n 'category_id'=> 'required',\n 'summary'=> 'required',\n 'content'=> 'required',\n 'tags'=> 'required',\n 'keywords'=> 'required',\n ]);\n $newFileName=$this->manageImage(request('img_url'));\n\n $this->delImage($post->img_url);\n $post->img_url=$newFileName;\n }\n else{\n $dataPost=request()->validate([\n 'title'=> 'required|max:255',\n 'default-lang'=> 'required',\n 'category_id'=> 'required',\n 'summary'=> 'required',\n 'content'=> 'required',\n 'tags'=> 'required',\n 'keywords'=> 'required',\n ]);\n }\n\n $tags = explode(\",\", request('tags'));\n $keywords = explode(\",\", request('keywords'));\n $slug = Str::slug($post->title, '-');\n $post->title=request('title');\n $post->default_lang=request('default-lang');\n $post->content=request('content');\n $post->publicate_state=false;\n $post->summary=request('summary');\n $post->category_id=request('category_id');\n $post->cant_access_read=0;\n $post->cant_likes=0;\n $post->cant_shares=0;\n $post->tags=request('tags');\n $post->keywords=request('keywords');\n $post->slug=Str::slug($post->title, '-');\n $post->qr_img_url='qrcode_'.$post->id.'_'.$post->slug.'.svg';\n $post->update();\n QrCode::format('svg')->color(33, 56, 175)->generate(url('/post-list/'.$post->id),public_path('storage/qrcodes/posts/qrcode_'.$post->id.'_'.$post->slug.'.svg'));\n $post->retag($tags);\n $post->keywords()->detach();\n foreach($keywords as $keyword){\n $existKey=$this->getKeywordIf($keyword);\n\n\n $post->keywords()->attach($existKey->id);\n }\n\n $postToUpd=$this->getPost($post->id);\n return $postToUpd;\n }", "public function updateImage($request)\n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'GET');\n $options = $this->createHttpClientOptions();\n \n try {\n $response = $this->client->send($request, $options);\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n } catch (RequestException $e) {\n $this->processException($e);\n }\n }", "public function updateUserPhoto($app) {\n $user = Users::findFirstById($this->request->get('user_id'));\n if ($user) {\n $extension;\n if ($this->request->hasFiles()) {\n //DEVUELVE SI O SI UN ARRAY\n $files = $this->request->getUploadedFiles();\n foreach ($files as $file) {\n $arrayextension = explode('.', $file->getName());\n $extension = $arrayextension[sizeof($arrayextension) - 1];\n if ($extension == 'jpg' || $extension == 'jpeg' || $extension == 'png') {\n $time = time();\n $file->moveTo('files/' . $user->id . $time . '.' . $extension);\n $user->photo = $user->id . $time . '.' . $extension;\n $user->update();\n return array('response' => true, 'user' => $user);\n } else {\n $resultado = array('response' => false, 'message' => 'Formato de la foto no valido');\n }\n }\n }\n } \n }", "public function update(Request $request, $idBouteille)\n {\n // $prixUnitBouteille = DB::select(\"SELECT prix from bouteilles where idBouteille = $request->bouteille_id\");\n // $prixTotal_ancien = DB::select(\"SELECT prixTotale from vente_laits, bouteilles where vente_laits.bouteille_id = bouteilles.idBouteille\");\n // $prixTotal_ancien_maj = $prixTotal_ancien[0]->prixTotale;\n\n $nbr_vendu = DB::select(\"SELECT * from bouteilles where bouteilles.idBouteille = $idBouteille\");\n\n $nbrDispo_ancien = $nbr_vendu[0]->nombreDispo;\n // dd($nbrDispo_ancien);\n\n $request->validate([\n 'nombreDispo' => 'required|integer',\n 'prix' => 'required|integer',\n 'description' => 'required|string',\n ]);\n \n $image_name = $request->hidden_image;\n $photo = $request->file('photo');\n\n if($photo != '') // here is the if part when you dont want to update the image required\n {\n // unlink(public_path('images').'/'.$image_name);\n\n $request->validate([\n 'photo' => 'image|max:2048'\n ]);\n \n $image_name = rand() . '.' . $photo->getClientOriginalExtension();\n $photo->move(public_path('images'), $image_name);\n }\n else // this is the else part when you dont want to update the image not required\n {\n \n }\n \n $nbrDispo = DB::select(\"SELECT * from bouteilles where idBouteille = $request->bouteille_id\");\n \n $nbrBouteille_total = $nbrDispo[0]->nombreDispo + $nbrDispo_ancien;\n\n if($request->nombreDispo <= $nbrBouteille_total){\n \n $image_bouteille = array(\n 'photo' => $image_name,\n 'description' => $request->description,\n 'prix' => $request->prix,\n 'nombreDispo' => $nbrBouteille_total - $request->nombreDispo,\n );\n }\n else{\n return redirect()->route('ventelaits.edit', $idBouteille)\n ->with('error','Le nombre de bouteilles de lait '.$nbrDispo[0]->capacite .' litre(s) saisie est supérieur à celle dans le stock.\n Stock Actuel = '. $nbrBouteille_total .' Bouteille(s)');\n } \n\n Bouteille::whereidbouteille($idBouteille)->update($image_bouteille);\n \n return redirect()->route('ventelaits.index')\n ->with('success','Mise à jour de la vente de lait réussie !');\n }", "public function update(Request $request)\n {\n \n $user = User::find(Auth::user()->id);\n $request->merge(['name' => str_replace('\"','',request('name'))]);\n\n if($request->hasFile('image') && $request->file('image')->isValid()){\n \n $name = $user->id;\n\n $extension = $request->image->extension();\n $nameFile = \"{$name}.{$extension}\";\n \n request('image')->storeAs('public/users', $nameFile);\n \n $request->request->add(['photo' => Storage::url('public/users/'.$nameFile)]);\n }\n \n $user->update($request->all());\n return response()->json($user, 200);\n }", "public function updatefile(Request $request, $id)\n {\n //\n\n $validar=validator::make($request->all(),[\n 'imagenup'=>'image|mimes:jpeg,jpg,png,gif',\n ]);\n if($validar->passes()){\n $noticiaold=Noticia::find($id);\n\n //$Tesiold->delete();\n $archivo=$request->file('imagenup');\n $nombre=$archivo->getClientOriginalName();\n $carpeta=\"img/noticias/\".$nombre;\n /* $fileregistro = new Tesi;\n $fileregistro->documento =$nombre;\n $fileregistro->directorio=$carpeta;\n */\n // \\Storage::disk('local')->put($nombre, \\File::get($archivo));\n $archivo->move('img/noticias',$nombre);\n // $entrada['documento']=$nombre;\n\n $noticiaold->fill($request->all());\n $noticiaold->save();\n\n return response()->json();\n }else{\n foreach ($validar->errors()->all() as $message) {\n\n return response()->json(['error'=>$message]);\n }\n\n }\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'nama' => 'string',\n 'email' => 'email|unique:users',\n 'password' => 'string',\n 'foto' => 'file|image',\n 'kode_member' => 'integer',\n 'no_hp' => 'string',\n 'umur' => 'integer',\n 'alamat' => 'string',\n 'role' => 'string'\n ]);\n\n if ($validator->fails()) {\n return $this->responseError('User gagal diupdate', 422, $validator->errors());\n }\n\n $image = base64_encode(file_get_contents(request('foto')));\n $client = new Client();\n $res = $client->request('POST', 'https://freeimage.host/api/1/upload', [\n 'form_params' => [\n 'key' => '6d207e02198a847aa98d0a2a901485a5',\n 'action' => 'upload',\n 'source' => $image,\n 'format' => 'json'\n ]\n ]);\n\n $get = $res->getBody()->getContents();\n $data = json_decode($get);\n\n $user = User::find($id);\n $role = Role::pluck('name', 'name')->all();\n\n $foto = $data->image->display_url ?? $user->foto;\n\n $params = [\n 'nama' => $request->nama ?? $user->nama,\n 'email' => $request->email ?? $user->email,\n 'password' => bcrypt($request->password) ?? $user->password,\n 'foto' => $foto ?? $user->foto,\n 'kode_member' => $request->kode_member ?? $user->kode_member,\n 'no_hp' => $request->no_hp ?? $user->no_hp,\n 'umur' => $request->umur ?? $user->umur,\n 'alamat' => $request->alamat ?? $user->alamat,\n ];\n\n $user->update($params);\n $user->assignRole(request('role') ?? $user->role);\n\n return $this->responseOk($user, 200, 'User berhasil diupdate');\n }", "public function updateProfile(Request $request){\n\n $user = User::where('id',$request['user_id'])->first();\n if(empty($user)){\n $response = ['status'=>'false','message'=>'User not identified'];\n return response()->json($response); \n }\n\n $file = $request->file('image');\n $fileArray = array('image' => $file, 'name'=>$request['name']);\n\n /** validation */\n $validator = Validator::make($fileArray, [\n 'name' => 'required',\n 'image' => 'mimes:jpeg,jpg,png,gif|required|max:10000|dimensions:max_width=256,max_height=256'\n ],[]);\n\n if ($validator->fails()) {\n $response = ['status'=>'false','message'=>'Validation errors','errors'=>$validator->errors()];\n return response()->json($response);\n }\n\n $user->avatar = upload_img($file);\n $user->name = $request['name'];\n if( $user->save() ){\n $response = ['status'=>'true','message'=>'Profile updated successfully'];\n return response()->json($response); \n }else{\n $response = ['status'=>'false','message'=>'Something wrong'];\n return response()->json($response); \n }\n\n }", "public function update_profile_image(){\n $customer_id = $_REQUEST['customer_id'];\n $old_img = $_REQUEST['old_customer_img'];\n\n if(isset($_FILES['customer_img']['name'])){\n $time = time();\n $image_name = 'customer_'.$customer_id.'_'.$time;\n $config['upload_path'] = 'assets/images/customer/';\n $config['allowed_types'] = 'png|jpg|jpeg|gif';\n $config['file_name'] = $image_name;\n $filename = $_FILES['customer_img']['name'];\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n $this->upload->initialize($config);\n if ($this->upload->do_upload('customer_img') && $image_name && $filename){\n $up_image['customer_img'] = $image_name.'.'.$ext;\n $this->User_Model->update_info('customer_id', $customer_id, 'customer', $up_image);\n // Delete Old Profile Image...\n if($old_img){ unlink(\"assets/images/customer/\".$old_img); }\n $response[\"status\"] = TRUE;\n $response[\"msg\"] = 'Profile Image Uploaded Successfully';\n }\n else{\n $error = $this->upload->display_errors();\n $response[\"status\"] = FALSE;\n $response[\"msg\"] = $error;\n }\n } else{\n $response[\"status\"] = FALSE;\n $response[\"msg\"] = 'Image Not Selected';\n }\n $json_response = json_encode($response,JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);\n echo str_replace('\\\\/','/',$json_response);\n }", "public function updateProductImage($request) {\n\n $json = array('success' => false);\n\n $this->load->model('catalog/product');\n $this->load->model('rest/restadmin');\n\n if (ctype_digit($request->get['id'])) {\n $product = $this->model_catalog_product->getProduct($request->get['id']);\n //check product exists\n if(!empty($product)) {\n if(isset($request->files['file'])){\n $uploadResult = $this->upload($request->files['file'], \"products\");\n if(!isset($uploadResult['error'])){\n $json['success'] = true;\n $this->model_rest_restadmin->setProductImage($request->get['id'], $uploadResult['file_path']);\n }else{\n $json['error']\t= $uploadResult['error'];\n }\n } else {\n $json['error']\t= \"File is required!\";\n }\n }else {\n $json['success']\t= false;\n $json['error'] = \"The specified product does not exist.\";\n }\n } else {\n $json['success'] = false;\n }\n\n $this->sendResponse($json);\n }", "public function update(Request $request, ImgUplode $imgUplode)\n {\n //\n }", "public function image_upload_post()\n {\n \n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n $required_parameter = array('product_id','product_image');\n $chk_error = $this->controller->check_required_value($required_parameter, $data);\n if ($chk_error) \n {\n $resp = array('code' => 'MISSING_PARAM', 'message' => 'Missing ' . strtoupper($chk_error['param']));\n @$this->response($resp);\n }\n $product_id = $data['product_id'];\n //$image = $data['product_image'];\n \n $product_image = array(); \n if(!empty($product_id)){\n $p_img = $this->model->getAllwhere('product',array('id'=> $product_id),'product_image');\n \n if(!empty($p_img)){\n $product_image = @unserialize($p_img[0]->product_image);\n }\n }\n\n \n \n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['product_image']; \n \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n $msg = '';\n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $product_image[] = $image;\n //$data['product_image'] = serialize($image);\n $insert_data = array('product_image' => serialize($product_image));\n \n }\n$where = array('id'=> $product_id);\n $result = $this->model->updateFields('product', $insert_data, $where);\n $resp = array('rccode' => 200,'message' =>\"image upload succesfully\");\n $this->response($resp);\n}", "function utility_refreshImage($request) {\n global $uw_db;\n\n $pi_id = isset($request['pi_id']) ? $request['pi_id'] : 0;\n $p_id = isset($request['p_id']) ? $request['p_id'] : 0;\n $projectImages = isset($request['projectImages']) ? $request['projectImages'] : array();\n $offset = 0;\n $page_offset = 0;\n\n // Fetch a new image for this page\n $img = utility_getProjectImage($request, $offset, $page_offset, $projectImages);\n $s = utility_scaleImage($img['width'], $img['height']);\n $img['width'] = $s['width'] . \"px\"; $img['height'] = $s['height'] . \"px\";\n\n // Return image data\n return $img;\n}", "public function update_image(){\r $query=\"update `\".$this->tablename.\"` set `image`='\".$this->image.\"' where `id`='\".$this->id.\"'\";\r $result=mysqli_query($this->conn,$query);\r return $result;\r }", "public function update(Request $request) //////// Update user's Info\n {\n $id = Auth::id();\n\n $request->validate([\n 'image' => 'image|mimes:jpeg,jpg,png,gif|max:248',\n 'password' => 'required|password',\n 'email' => 'required',\n ]);\n $username= $request->username;\n $gender =$request->gender;\n $password =$request->password;\n //$membership =$request->membership;\n $email =$request->email;\n $altmail =$request->altmail;\n $phone =$request->phone;\n $web =$request->web;\n $social =$request->social;\n $country =$request->country;\n $city =$request->city;\n $surbub =$request->surbub;\n $street =$request->street;\n $discription =$request->discription;\n $goal =$request->goal;\n $dob = $request->dob;\n $filename = $request->image;\n\n //proccess avater if user uploads it\n if($filename != null){\n if($request->hasFile('image')){\n $avater = DB::table('users')->select('avater')->where('id', '=' , $id)->get();\n $filename = $request->image->getClientOriginalName();\n $ext = $request->image->extension();\n //writing avater/image name, to be unique\n function uniqFile($id,$filename,$ext) {\n $file = md5($filename).\"\".uniqid($filename, true);\n return \"pro\".$id.\"\".md5($file).\"le.\".$ext ;\n }\n // storing user avater to storage\n $filename = uniqFile($id,$filename,$ext);\n Storage::delete('public/profile/'.$avater[0]->avater);\n $request->image->storeAs('profile',\"$filename\",'public');\n }\n }else{\n $filename = $request->img;\n }\n // update users general info\n DB::table('users')\n ->where('id', $id)\n ->update([\n 'avater' => $filename,\n 'email' => $email,\n 'dob' => $dob,\n // 'membership' => $membership,\n 'gender' => $gender,\n 'username' => $username,\n 'password' => Hash::make($password)]);\n\n DB::table('contacts')\n ->where('id', $id)\n ->update([\n 'altmail' => $altmail,\n 'phone' => $phone,\n 'web' => $web,\n 'social' => $social,\n 'country' => $country,\n 'city' => $city,\n 'surbub' => $surbub,\n 'street' => $street,\n 'discription' => $discription,\n 'goal' => $goal]);\n\n return redirect()->to('admin/profile/profile')->with('success','Profile updated successfully!');\n\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n // 'name' => 'required|max:255',\n // 'new_image' => 'required|image|mimes:jpeg,png,jpg,gif,svg',\n 'tour_id' => 'integer',\n 'category_id' => 'integer'\n ],[\n // 'name.required' => 'Yêu cầu không để trống',\n // 'new_image.required' => 'Yêu cầu không để trống',\n 'tour_id.integer' => 'Sai định dạng số',\n 'category_id.integer' => 'Sai định dạng số'\n ]);\n\n $image = Image::findOrFail($id);\n $image->name = $request->input('name');\n\n if ($request->hasFile('new_image')) {\n // xoa link file cu\n @unlink(public_path($image->image));\n // get file\n $file = $request->file('new_image');\n // get ten\n $filename = time().'_'.$file->getClientOriginalName();\n // duong dan upload\n $path_upload = 'uploads/image/';\n // upload file\n $request->file('new_image')->move($path_upload,$filename);\n\n $image->image = $path_upload.$filename;\n }\n\n $image->tour_id = $request->input('tour_id');\n $image->category_id = $request->input('category_id');\n $image->position = $request->input('position');\n\n $is_active = 0;\n if ($request->has('is_active')) {\n $is_active = $request->input('is_active'); \n }\n $image->is_active = json_decode($is_active);\n $image->user_id = Auth::user()->id;\n $image->save();\n\n // dd($image);\n \n return redirect()->route('admin.image.index');\n \n }", "public function update(Request $request,$user_id, $apropos_id)\n {\n //\n \n $a=Apropos::find($apropos_id); \n $a->update($request->all()); \n\n\n $image = $request->source_profil;\n $name = $request->photo_profil.\"-\".time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n \\Image::make($request->source_profil)->save(public_path('photos_profils/').$name);\n\n\n $a->photo_profil='http://127.0.0.1:8887/photos_profils/'.$name;\n $a->save();\n\n return response()->json($image,200);\n }", "public function update(Request $request, $id)\n {\n //multi language variables\n $lang = \\Session::get('lang');\n $title = 'title_'.$lang;\n $date = 'date_'.$lang;\n $short_desc = 'short_desc_'.$lang;\n $description = 'description_'.$lang;\n // validation\n $this->validate($request,[\n $title=>'required|max:250',\n $date=>'required',\n $short_desc=>'required|max:250',\n $description=>'required',\n ]);\n // president data storage\n $the_president = President::findOrFail($id);\n $search_obj = Search::where('table_name','=','president')->where('table_id','=',$id)->first();\n $the_president->$title = $request->$title;\n // if($request->$date!='') {\n if($lang!='en'){\n $the_president->date_pa = $request->$date;\n $the_president->date_dr = $request->$date;\n }\n else{\n $the_president->date_en = $request->$date; \n }\n // }\n $the_president->$short_desc = $request->$short_desc;\n $the_president->$description = $request->$description;\n\n\n if($request->image!=null) {\n \n $image = Image::make($request->image);\n\n if($request->type=='order' || $request->type=='decree'){\n File::delete('uploads/'.$request->type.'/default.jpg');\n //resize image for thumbnail\n $driver = new imageManager(array('driver'=>'gd'));\n $image = $driver->make($request->image)->resize(200,150);\n $image_name= 'default.jpg';\n $image_path = 'uploads/'.$request->type.'/';\n $image->save($image_path.$image_name);\n }\n else{\n \n // validation\n $this->validate($request,[\n 'image'=>'required|mimes:jpg,jpeg,png,bmp',\n ]);\n\n //remove existing images\n File::delete($search_obj->image_thumb);\n File::delete(str_replace('_t','',$search_obj->image_thumb));\n\n //set new images name\n $image_name = $id.'.'.$request->image->getClientOriginalExtension();\n $image_thumb_name = $id.'_t.'.$request->image->getClientOriginalExtension();\n\n //resize image for thumbnail\n $driver = new imageManager(array('driver'=>'gd'));\n $image_thumb = $image->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n //construct image path\n $image_path = 'uploads/'.$request->type.'/';\n\n //move i.e.(to storage) image\n $image_thumb->save($image_path.$image_name);\n $request->image->move($image_path,$image_thumb_name);\n\n //store in db\n $the_president->image = $image_name;\n $the_president->image_thumb = $image_thumb_name;\n }\n }\n\n if($the_president->save()) {\n $search_obj->$title = $request->$title;\n if($request->$date!='') {\n if($lang!='en'){\n $search_obj->date_dr = $request->$date;\n $search_obj->date_pa = $request->$date;\n }\n else{\n $search_obj->date_en = $request->$date; \n }\n }\n $search_obj->$short_desc = $request->$short_desc;\n $search_obj->$description = $request->$description;\n $search_obj->save();\n }\n \n $log = new Log();\n\n $log->table_name = 'president';\n $log->table_item_id = $id;\n $log->activity = 'update';\n $log->user_id = Auth::user()->id;\n $log->save();\n\n Session::put('lang','');\n // Log::info(\"Record ID No. '\".$id.\"' President record updated by \".Session::get('email').\" on \".date('l jS \\of F Y h:i:s A'));\n return Redirect()->route(\"admin_\".$request->type);\n\n }", "public function updatePhoto(\\Illuminate\\Http\\Request $request)\r\n {\r\n try {\r\n $user = $this->userRepo->getUser($request->get(\"user_id\"));\r\n if (!is_null($request->get(\"image_data\"))) {\r\n try {\r\n $user->profile_image_filename = $user->name . \".\" . $request->get('file_ext');\r\n $imageData = $request->get('image_data');\r\n $this->cloudinaryService->upload(\"data:image/png;base64,\" . $imageData, $user->name, [\r\n \"folder\" => \"userimage\"\r\n ]);\r\n $url = $this->cloudinaryService->getUrl();\r\n $user->profile_image_data = $url;\r\n if ($user->save()) {\r\n return $this->sendResponseMessage(200, \"User Profile Updated\");\r\n }\r\n } catch (\\Exception $e) {\r\n Log::error(\" Something went wrong while updating Image profile\" . $e->getMessage());\r\n return $this->sendResponseMessage(500, \"Something went wrong. Please try again\", $e->getMessage());\r\n }\r\n }\r\n return $this->sendResponseMessage(404, \"Received empty image file\");\r\n } catch (UserNotFoundException $e) {\r\n return $e->sendUserNotFoundExceptionResponse();\r\n }\r\n }", "public function update(Request $request) {\n $rules = array(\n 'id' => 'numeric',\n 'Title' => 'required',\n 'DisplayOrder' => 'required|numeric|min:1',\n 'Image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n );\n // run the validation rules on the inputs from the form\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return BaseResult::error(400, $validator->messages()->toJson());\n } else {\n $user = Session::get('user');\n $banner = Banner::find($request->input('id'));\n if ($banner) {\n try {\n $banner->Title = $request->Title;\n $banner->DisplayOrder = $request->DisplayOrder; \n $banner->IsDeleted = 0;\n $banner->UpdatedDate = now();\n $banner->UpdatedBy = $user->USE_ID;\n\n $banner->save();\n\n if ($request->hasFile('Image')) {\n \n // delete old file\n $oldFile = $banner->Banner;\n if (File::exists(public_path('data/banners/' . $oldFile))) {\n File::delete(public_path('data/banners/' . $oldFile));\n }\n\n $filename = pathinfo($request->Image->getClientOriginalName(), PATHINFO_FILENAME);\n $imageName = $banner->BAN_ID . '_' . $filename . '_' . time() . '.' . $request->Image->extension();\n $request->Image->move(public_path('data/banners'), $imageName);\n $banner->Banner = $imageName;\n $banner->save();\n }\n\n return BaseResult::withData($banner);\n } catch (\\Exception $e) {\n return BaseResult::error(500, $e->getMessage());\n }\n } else {\n return BaseResult::error(404, 'Data not found!.');\n }\n }\n }", "public function setProfileImageAction( $header_data, $post_data ){ \n if( empty($post_data['image']) && empty($_FILES[\"images\"]) ) {\n Library::logging('alert',\"API : setProfileImage : \".ERROR_INPUT.\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_INPUT, null);\n } else {\n try {\n if( !empty($_FILES[\"images\"]['name']) && !empty($_FILES[\"images\"]['tmp_name']) && empty($_FILES[\"images\"]['error']) ){\n $imgName = rand().$_FILES[\"images\"]['name'];\n $uploadFile= $_FILES[\"images\"]['tmp_name'];\n \n }elseif( !empty($post_data['image']) ){\n $uploadFile = $post_data['image'];\n $img = explode(\"/\", $uploadFile);\n $imgName = end($img);\n }else{\n Library::logging('alert',\"API : setProfileImage : \".ERROR_INPUT.\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_INPUT, null);\n }\n \n $amazon = new AmazonsController();\n $amazonSign = $amazon->createsignatureAction($header_data,10);\n $url = $amazonSign['form_action'];\n $headers = array(\"Content-Type:multipart/form-data\"); // cURL headers for file uploading\n $ext = explode(\".\", $imgName);\n $extension = trim(end($ext));\n if( !in_array($extension, array(\"jpeg\", \"png\", \"gif\"))){\n $extension = \"jpeg\";\n }\n $postfields = array(\n \"key\" => \"profiles/\".$imgName,//$amazonSign[\"key\"],\n \"AWSAccessKeyId\" => $amazonSign[\"AWSAccessKeyId\"],\n \"acl\" => $amazonSign[\"acl\"],\n \"success_action_redirect\" => $amazonSign[\"success_action_redirect\"],\n \"policy\" => $amazonSign[\"policy\"],\n \"signature\" => $amazonSign[\"signature\"],\n \"Content-Type\" => \"image/$extension\",\n \"file\" => file_get_contents($uploadFile)\n );\n $ch = curl_init();\n $options = array(\n CURLOPT_URL => $url,\n //CURLOPT_HEADER => true,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => $postfields,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true\n ); // cURL options\n curl_setopt_array($ch, $options);\n $imageName = curl_exec($ch);\n $result['image'] = FORM_ACTION.$imageName;\n curl_close($ch);\n if(is_string ( $imageName )){\n $user = Users::findById($header_data['id']);\n $user->profile_image = $imageName;\n if ($user->save() == false) {\n foreach ($user->getMessages() as $message) {\n $errors[] = $message->getMessage();\n }\n Library::logging('error',\"API : setProfileImage amazon controller : \".$errors.\" : user_id : \".$header_data['id']);\n Library::output(false, '0', $errors, null);\n } else {\n Library::output(true, '1', USER_PROFILE_IMAGE, $result );\n }\n }else{\n Library::logging('error',\"API : setProfileImage : \".ERROR_REQUEST.\" \".\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n }\n \n } catch (Exception $e) {\n Library::logging('error',\"API : setProfileImage : \".$e.\" \".\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n } \n }\n }", "public function update(Request $request)\n {\n $image_name = $request->hidden_image;\n $image = $request->file('image');\n if ($image != '') {\n $rules = array(\n 'title' => 'required',\n 'content' => 'required',\n 'image' => 'required|image|max:2048'\n );\n $error = Validator::make($request->all(), $rules);\n if ($error->fails()) {\n return response()->json(['errors' => $error->errors()->all()]);\n }\n\n $image_name= $this->UserImageUpload($request['image'], 'notes');\n\n } else {\n $rules = array(\n 'title' => 'required',\n 'content' => 'required',\n );\n\n $error = Validator::make($request->all(), $rules);\n\n if ($error->fails()) {\n return response()->json(['errors' => $error->errors()->all()]);\n }\n }\n\n $form_data = array(\n 'title' => $request->title,\n 'content' => $request->content,\n 'note_image' => $image_name\n );\n Note::whereId($request->hidden_id)->update($form_data);\n\n return response()->json(['success' => 'Data is successfully updated']);\n }", "public function updateInstituteProfileInfo(Request $request)\n {\n $this->validate($request,[\n 'name' => 'required',\n 'mobile' => 'required|size:11',\n 'images' => 'mimes:jpeg,jpg,png|max:500',\n ]);\n\n $name = trim($request->name);\n $designation = trim($request->designation);\n $mobile = trim($request->mobile);\n $email = trim($request->email);\n $primary_id = $request->primary_id ;\n $images = $request->file('images') ;\n\n $check_count = DB::table('admin')\n ->where('mobile',$mobile)\n ->whereNotIn('id',[$primary_id])\n ->count();\n\n if ($check_count > 0) {\n Session()->put('failed', 'Sorry ! Mobile Number Already Exit.');\n return Redirect::to('editUser/'.$primary_id);\n }\n\n $data = array();\n $data['name'] = $name ;\n $data['designation'] = $designation ;\n $data['mobile'] = $mobile ;\n $data['email'] = $email ;\n\n if ($images) {\n $image_name = str_random(20);\n $ext = strtolower($images->getClientOriginalExtension());\n $image_full_name ='user-'.$image_name.'.'.$ext;\n $upload_path = \"images/\";\n $image_url = $upload_path.$image_full_name;\n $success = $images->move($upload_path,$image_full_name);\n $data['image'] = $image_url;\n }\n\n $data['updated_at'] = $this->rcdate ;\n\n DB::table('admin')->where('id',$primary_id)->update($data);\n\n Session()->put('success', 'Thanks ! User Information Update Successfully Completed.');\n return Redirect::to('instituteProfileInfo/'.$primary_id);\n }", "public function update(Request $request, Picture $image)\n {\n //\n }", "public function changeAvatar(Request $request)\n {\n\n $response = new stdClass();\n if ($request->isMethod('post')) {\n $postData = $request->all();\n $objUserModel = new User();\n\n $userId = \"\";\n if (isset($postData['user_id'])) {\n $userId = $postData['user_id'];\n }\n\n $authFlag = false;\n if (isset($postData['api_token'])) {\n if ($userId != '') {\n $apiToken = $postData['api_token'];\n if ($apiToken == $this->API_TOKEN) {\n $authFlag = true;\n } else {\n $where = [\n 'rawQuery' => 'id=?',\n 'bindParams' => [$userId]\n ];\n\n $selectColumn = array('login_token');\n $userCredentials = $objUserModel->getUsercredsWhere($where, $selectColumn);\n if ($userCredentials) {\n if ($apiToken == $userCredentials->login_token) {\n $authFlag = true;\n }\n }\n }\n }\n }\n\n if ($authFlag) {\n if ($userId != '') {\n if (Input::hasFile('file')) {\n $validator = Validator::make($request->all(), ['file' => 'image']);\n if (!$validator->fails()) {\n $destinationPath = $_SERVER['DOCUMENT_ROOT'] . '/../../web/public/assets/uploads/useravatar/';\n $fileName = $userId . '_' . time() . \".jpg\";\n File::makeDirectory($destinationPath, 0777, true, true);\n $filePath = $destinationPath . $fileName;\n\n $quality = 70;//$this->imageQuality(Input::file('file'));\n Image::make(Input::file('file'))->resize($this->imageWidth, $this->imageHeight, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath . $fileName, $quality);\n\n $filePathUpdate = '/assets/uploads/useravatar/' . $fileName;\n $updateData['profile_pic'] = $filePathUpdate;\n $where = [\n 'rawQuery' => 'id =?',\n 'bindParams' => [$userId]\n ];\n $userData = $objUserModel->getUsercredsWhere($where);\n $updatedResult = $objUserModel->UpdateUserDetailsbyId($where, $updateData);\n\n if ($updatedResult) {\n if ($userData->profile_pic != '') {\n File::delete(public_path() . '/../../web/public' . $userData->profile_pic);\n }\n $response->code = 200;\n $response->message = \"Successfully updated profile image.\";\n $response->data = $filePathUpdate;\n echo json_encode($response);\n } else {\n $response->code = 400;\n $response->message = \"Something went wrong, please try again.\";\n $response->data = null;\n echo json_encode($response);\n }\n } else {\n $response->code = 100;\n $response->message = $validator->messages();\n $response->data = null;\n echo json_encode($response);\n }\n } else {\n $response->code = 400;\n $response->message = \"Give correct input and Input Image files should be(jpg,gif,png,jpeg)only\";\n $response->data = null;\n echo json_encode($response, true);\n }\n } else {\n $response->code = 400;\n $response->message = \"You need to login to change Avtar.\";\n $response->data = null;\n echo json_encode($response, true);\n }\n } else {\n $response->code = 401;\n $response->message = \"Access Denied\";\n $response->data = null;\n echo json_encode($response, true);\n }\n } else {\n $response->code = 400;\n $response->message = \"Request not allowed\";\n $response->data = null;\n echo json_encode($response, true);\n }\n }", "public function update(Request $request,$id)\n {\n \n\n $validatedData = $request->all();\n $validatedData = $request->except('_token','_method');\n $validator = Validator::make($validatedData, [\n 'product_name' => 'required|max:255',\n 'product_desc' => 'required|max:1000',\n 'book_price' => 'required|numeric',\n 'product_image1' => 'required|image:jpeg,png,jpg,gif,svg|max:10000',\n ]);\n\n \n if ($validator->fails()) {\n $response = [\n 'success' => false,\n 'data' => 'Validation Error.',\n 'message' => $validator->errors()\n ];\n return response()->json($response, 404);\n }\n \n $book = Book::findOrFail($id);\n \n \n if($request->hasFile('product_image1'))\n {\n \n $originalImage= $request->file('product_image1');\n $thumbnailImage = Image::make($originalImage);\n $thumbnailPath = public_path().'/thumbnail/';\n $originalPath = public_path().'/images/';\n $thumbnailImage->save($originalPath.time().$originalImage->getClientOriginalName());\n $thumbnailImage->resize(150,150);\n $thumbnailImage->save($thumbnailPath.time().$originalImage->getClientOriginalName()); \n $book = new Book;\n $book->product_name = $request->product_name;\n $book->product_desc = $request->product_desc;\n $book->book_price = $request->book_price;\n $filepath = time().$originalImage->getClientOriginalName();\n $book->product_image1= $filepath;\n // $usersImage = public_path(\"thumbnail/\".$book->product_image1);\n // if (File::exists($usersImage)) { // unlink or remove previous image from folder\n // unlink($usersImage);\n // }\n \n BOOK::whereId($id)->update($validatedData);\n BOOK::whereId($id)->update(['product_image1'=>$filepath]);\n \n \n }\n \n \n \n // $book = Book::findOrFail($id);\n // $book=BOOK::whereId($id)->update(['product_image1'=>$filepath]);\n \n \n \n \n \n \n $data = $book->toArray();\n \n\n $response = [\n 'success' => true,\n 'data' => $data,\n 'message' => 'Book Updated successfully.'\n ];\n \n return response()->json($response, 200);\n \n \n // return redirect('/books')->with('success', 'Book is successfully updated');\n }", "public function AjaxUpdateProduct(){\n if( !isset($_POST['action'])){\n $_SESSION['error'] = ' an error is occurred';\n header('location:http://localhost/shopping-page-master/public/indexcontroller/index');\n return false;\n }\n if( $_POST['action'] != 'updateDB'){\n $_SESSION['error'] = ' an error is occurred';\n header('location:http://localhost/shopping-page-master/public/indexcontroller/index');\n return false;\n }\n // echo '<pre>'; print_r($_POST); die;\n // print_r($_FILES['image']);die;\n // $id = isset($_POST['id'])?$_POST['id']:null;\n // $name = isset($_POST['name'])?$_POST['name']:null;\n // // $detail = isset($_POST['detail'])?$_POST['detail']:null;\n // $type = isset($_POST['type'])?$_POST['type']:null;\n // $price = isset($_POST['price'])?$_POST['price']:null;\n // $promotion_price = isset($_POST['prmtPrice'])?$_POST['prmtPrice']:null;\n // $promotion = isset($_POST['promotion'])?$_POST['promotion']:null;\n // $status = isset($_POST['status'])?$_POST['status']:null;\n // $image = isset($_POST['imaga'])?$_POST['image']:null;\n // $new = isset($_POST['new'])?$_POST['new']:null;\n // $update_at = isset($_POST['date'])?$_POST['date']:null;\n $id = $_POST['id'];\n $type = $_POST['type'];\n $name = $_POST['name'];\n $price = $_POST['price'];\n $promotion_price = $_POST['promtPrice'];\n $promotion = $_POST['promotion'];\n $image = $_POST['image'];\n $status = $_POST['status'];\n $new = $_POST['new'];\n $update_at = $_POST['date'];\n $new = json_decode($new);\n $status = json_decode($status);\n // var_dump($status);\n // echo '<br>';\n // var_dump($new); \n // if it's not ENCODE -> string TRUE/FALSE is same result\n $status = $status? 1:0;\n $new = $new? 1:0;\n // die;\n $model = parent::model('UpdateProductModel');\n $id_type = $model->getIdTypeByType($type)->id; \n $data = $model->updateProduct( $id, $id_type, $name, $price,\n $promotion_price, $promotion, $image, $status, $new, $update_at); \n echo json_encode([\n 'success' => true,\n 'name' => $name,\n 'type' => $type,\n 'price' => $price,\n 'promtPrice' => $promotion_price,\n 'promotion' => $promotion,\n 'image' => $image,\n 'status' => $status,\n 'new' => $new,\n 'date' => $update_at,\n ]);\n // $mess = $status.'<br>'.$new;\n // return false;\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(Request $request, $id)\n {\n //\n if($request->all()){\n $descripcion = $request->get('descripcion');\n $usuario=Auth::user()->id;\n\n if($request->file('img') == null){\n $opcion = 3;\n $sql = \"call spCSL_CRUD_galeria\n (\n '\".$opcion.\"',\n 'no importa',\n '\".$descripcion.\"',\n '\".$usuario.\"',\n '\".$id.\"'\n )\";\n $datos = DB::select($sql,array(1,10));\n if($datos==null){\n return Redirect::to('administrador/galeria')->withErrors(['erroregistro'=> 'Error']);\n }\n return Redirect::to('administrador/galeria');\n }\n else{\n $imagenAnterior = DB::table('tbl_galeria') \n ->select('imagen')\n ->where('id_galeria','=',$id)\n ->first();\n $getImageAnterior = $imagenAnterior->imagen;\n $cadena=substr($getImageAnterior, 22,strlen ($getImageAnterior)); \n if(Storage::disk('local')->exists($cadena)){\n $dele= Storage::disk('local')->delete($cadena);\n }\n $path= Storage::disk('local')->put('uploads/galeria', $request->file('img'));\n $imagen = asset($path);\n $opcion = 4;\n $sql = \"call spCSL_CRUD_galeria\n (\n '\".$opcion.\"',\n '\".$imagen.\"',\n '\".$descripcion.\"',\n '\".$usuario.\"',\n '\".$id.\"'\n )\";\n $datos = DB::select($sql,array(1,10));\n if($datos==null){\n return Redirect::to('administrador/galeria')->withErrors(['erroregistro'=> 'Error']);\n }\n return Redirect::to('administrador/galeria');\n }\n\n\n }\n }", "public function update(Request $request, $id){\n Session::flash('error','তথ্য সফল্ভাবে সংরক্ষিত হয়নি');\n // field validations\n $this->validate($request,[\n\n 'news_name' => 'required',\n 'news_date'\t\t\t =>'required',\n 'news_text' => 'required',\n 'news_image' =>'sometimes|image',\n ]);\n\n //for image\n if($request->hasFile('news_image')){\n $image = $request->file('news_image');\n $or_name = $request->file('news_image')->getClientOriginalName();\n $filename = time().'_'.$or_name;\n /*return $filename;*/\n $location = public_path('bangla_abritti/uploaded_img/cultural_news_images/' .$filename);\n Image::make($image)->resize(400,250)->save($location);\n /*$post->image=$filename;*/\n }else{\n $file = DB::table('BA_CULTURAL_NEWS')\n ->select('IMAGE_FILE_PATH')\n ->where('CULTURAL_NEWS_ID', $id)\n ->first();\n\n $filename = $file->IMAGE_FILE_PATH;\n }\n\n // update query\n $update = DB::table('BA_CULTURAL_NEWS')\n ->where('CULTURAL_NEWS_ID', $id)\n ->update([\n\n 'NEWS_TITLE' => $request->get('news_name'),\n 'NEWS_DESC'\t\t \t => $request->get('news_text'),\n 'EVENT_DATE'\t => $request->get('news_date'),\n 'IMAGE_FILE_PATH'\t\t => $filename,\n 'ACTIVE_STATUS' => $request->get('active_status'),\n 'ENTERED_BY' => Auth::user()->USER_ID,\n 'ENTRY_TIMESTAMP' => Carbon::now(),\n\n ]);\n Session::flash('error','');\n Session::flash('success','তথ্য সফল্ভাবে সংরক্ষিত হয়েছে');\n\n return redirect('/admin/culturalNews/edit/'.$id);\n\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \n // 'member_image' => 'required|mimes:jpeg,jpg,bmp,png|unique:home_member_images',\n\n ]);\n \n $member_img=HomeMemberImage::find($id);\n $image_prev=$member_img->image;\n if($request->hasFile('member_image')){\n \n unlink($image_prev);\n $image = $request->file('member_image');\n $destinationPath = 'img/home/member/';\n $originalFile = $image->getClientOriginalName();\n $uniqueName = time().$originalFile;\n $image->move($destinationPath, $uniqueName);\n $originalPath = $destinationPath.$uniqueName;\n \n $data=array(\n 'image'=>$originalPath,\n );\n HomeMemberImage::where('id',$id)->update($data);\n session()->flash('update', 'Successfully updated');\n return redirect()->route('home_awards.index');\n\n }\n }", "public function update(Request $request)\n {\n\n $service_id=$request->id;\n $old_img=$request->old_image;\n if ($request->file('simage')) {\n unlink($old_img);\n $rimage=$request->file('simage');\n $make_name = hexdec(uniqid()).'.'.$rimage->getClientOriginalExtension();\n Image::make($rimage)->resize(500,333)->save('backend/assets/images/services/'.$make_name);\n $last_image = 'backend/assets/images/services/'.$make_name;\n\n Service::findOrFail($service_id)->update([\n 'service_title'=>$request->sname,\n 'service_description'=>$request->description,\n 'service_image'=>$last_image,\n ]);\n $notification=array(\n 'message'=>'Service Updated',\n 'alert_type'=>'info',\n );\n redirect()->route('services.all')->with('success','Category Updated Successfull');\n\n }else{\n Service::findOrFail($service_id)->update([\n 'service_title'=>$request->sname,\n 'service_description'=>$request->description,\n ]);\n $notification=array(\n 'message'=>'Service Updated',\n 'alert_type'=>'info',\n );\n redirect()->route('services.all')->with('success','Category Updated Successfull');\n\n }\n\n }", "public function image_promotional() {\n // por el metodo de HTTP\n\n $api = $this->Api->findByTag(\"IMAGE_PROMOTIONAL\");\n $vdata[\"image\"] = $api->value;\n\n if ($this->input->server(\"REQUEST_METHOD\") == \"POST\") {\n $save = array(\"value\" => $this->do_upload('api'));\n $this->Api->update($api->api_id, $save);\n }\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/api/image_promotional/save\", $vdata, TRUE);\n $view['title'] = \"Registrar película\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function update(Request $request, $id)\n {\n if ($request->hasFile('img_url')) {\n \n $attach_file = $request->img_url->store('upload/common/');\n $compkge=Common_pack::find($id);\n $compkge->commoncat_id=$request->category;\n $compkge->title=$request->title;\n $compkge->price=$request->price;\n $compkge->summary=$request->summary;\n /*$group->img_url=$request->img_url;*/\n $compkge->img_url=$attach_file;\n $compkge->update();\n\n Input::file('img_url')->move('upload/common/', $attach_file); // uploading file to given path\n Session::flash('info', 'updated successfully');\n return Redirect::route('commonpackge');\n }\n }", "public function update(Request $request, $id)\n {\n $validator_update = $this->validator_update($request->all());\n\n if($validator_update->fails()){\n return redirect()->back()->withErrors($validator_update)->withInput($request->all());\n }else{\n $imgPath = '/uploads/images/posts';\n\n $images = $request->file('image');\n\n if($request->hasFile('image')){\n $imgName = time().'_'.$images->getClientOriginalName();\n $images->move(public_path().$imgPath, $imgName);\n } else {\n $imgName = '';\n }\n \n if(Auth::check()){\n if ($imgName == '') {\n $inputData = array(\n 'title' => $request->title,\n 'alias' => Str::slug($request->title),\n 'content' => $request->content,\n 'tag' => $request->tag,\n 'keyword' => $request->keyword,\n 'description' => $request->description,\n 'type_id' => $request->type_id,\n 'status' => $request->status,\n ); \n } else {\n $inputData = array(\n 'title' => $request->title,\n 'alias' => Str::slug($request->title),\n 'image' => $imgName,\n 'content' => $request->content,\n 'tag' => $request->tag,\n 'keyword' => $request->keyword,\n 'description' => $request->description,\n 'type_id' => $request->type_id,\n 'status' => $request->status,\n );\n }\n }\n\n $post = Post::findOrFail($id);\n $post -> update($inputData);\n return redirect()->route('admin.post.edit',['id' => $id])->with('result','Sửa bài viết thành công!');\n }\n }", "function editCarousel($carousel, $id) {\n $data = [\n 'title' => $_POST['title'],\n 'caption' => $_POST['caption'],\n 'active' => isset($_POST['active'])? 1 : 0,\n 'visible' => isset($_POST['visible'])? 1 : 0\n ];\n \n if (!is_uploaded_file($_FILES['image']['tmp_name'])) {\n $stmt = $carousel->update($id, $data);\n header('location: confirm.php?action=update&query='.$stmt);\n } else {\n\n //upload the image and get url\n $image = new Image();\n $img_url = $image->uploadFile($_FILES['image']);\n\n //add the image url to data array\n $data['img_url'] = $img_url;\n\n $stmt = $carousel->update($id, $data);\n header('location: confirm.php?action=update&query='.$stmt);\n }\n}", "public function update(Request $request, Post $post)\n {\n if($request->image_one_new==null){\n $request->merge(['image_one_new'=>$request->old_image_one]);\n }\n $image=$request->file('image_one_new');\n if ($image) {\n $image_one_name=hexdec(uniqid()).'.'.$image->getClientOriginalExtension();\n Image::make($image)->resize(300,300)->save(public_path('/media/post/'.$image_one_name));\n unlink(public_path('/media/post/'.$request->old_image_one));\n $oneimage = $image_one_name;\n }else{\n $image_one_name=$request->old_image_one; \n }\n $fetchdata=Post::find($post->id);\n $fetchdata->post_title_en=$request->post_title_en;\n $fetchdata->post_title_ur=$request->post_title_ur;\n $fetchdata->category_id=$request->category_id;\n $fetchdata->details_en=$request->details_en;\n $fetchdata->details_ur=$request->details_ur;\n $fetchdata->post_image=$image_one_name;\n $fetchdata->save();\n $notification = array(\n 'message' => 'Data Update Successfully', \n 'alert-type' => 'success');\n return redirect('/blog/post')->with($notification);\n }", "public function update(Request $request, $id)\n {\t\n $validateDate = $request->validate([\n 'page_name'=>'required',\n 'page_name_en'=>'required',\n //'page_picture' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'page_gallery[]' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n ]);\n\n $new_data = Offer::find($id);\n\n $img_name = $new_data->picture;\n if($request->hasFile('page_gallery')){\n\n //delete old pictures\n if($img_name != \"\"){\n $pictures = explode(',',$img_name);\n foreach($pictures as $pic){\n $folder_path = public_path($pic);\n @unlink($folder_path);\n }\n } \n\n $gallery = [];\n foreach($request->file('page_gallery') as $pic){\n $img_name = $this->uploadFile($pic,'Offer');\n array_push($gallery,$img_name);\n }\n $img_name = implode(',',$gallery);\n }\n\n $new_data->country_id = $request->page_country_id;\n $new_data->city_id = $request->page_city_id;\n $new_data->area_id = $request->page_area_id;\n $new_data->offer_department_id = $request->page_offer_department_id;\n $new_data->sub_offer_department_id = $request->page_offer_subdepartment_id;\n $new_data->general_department_id = $request->page_general_department_id;\n $new_data->user_id = $request->page_user_id;\n $new_data->name = $request->page_name;\n $new_data->name_en = $request->page_name_en;\n $new_data->details = $request->page_details;\n $new_data->details_en = $request->page_details_en;\n $new_data->information = $request->page_information;\n $new_data->information_en = $request->page_information_en;\n $new_data->picture = $img_name;\n $new_data->discount_percent = $request->page_discount_percent;\n $new_data->price_before = $request->page_price_before;\n $new_data->price_after = $request->page_price_after;\n $new_data->promo_code = $request->page_promo_code;\n $new_data->special = $request->page_special;\n $new_data->active = $request->page_active;\n $new_data->save();\n\n //add gallery\n /*if($request->hasFile('page_gallery')){\n $gallery = [];\n foreach($request->file('page_gallery') as $pic){\n $img_name = $this->uploadFile($pic,'OfferGallery');\n array_push($gallery,$img_name);\n }\n\n $offer_gallery = implode(',',$gallery);\n \n $new_gallery = OfferGallery::where('offer_id',$id)->first();\n $new_gallery->user_id = $request->page_user_id;\n $new_gallery->offer_id = $new_data->id;\n $new_gallery->picture = $offer_gallery;\n $new_gallery->save();\n }*/\n\n return redirect(route('offer.index'));\n }", "public function postUpdateUserImage() {\n $allowed = array('png', 'jpg', 'gif');\n $error = false;\n $msg = '';\n $curUser = User::find((int)Input::get('userId'));\n\n if (Input::file('userImgUpl')->isValid() && $_FILES['userImgUpl']['error'] == 0) { // laravel check if valid\n $extension = Input::file('userImgUpl')->getClientOriginalExtension();\n\n if (!in_array(strtolower($extension), $allowed)) { // check extension\n $error = true;\n $msg = \"The extension '$extension' is not allowed.\";\n } else {\n $fileSize = $this->convertFileSize($_FILES['userImgUpl']['size'], 'MB');\n\n if ($extension != 'gif' && $fileSize <= self::MAX_UPLOAD_SIZE || $extension == 'gif' && $fileSize <= self::GIF_MAX_UPLOAD_SIZE) { // check on size\n $newFileName = $curUser->user_id. '.' .$extension;\n\n list($width, $height) = getimagesize(Input::file('userImgUpl'));\n\n if ($width == $height) { // check to see if the image is a square\n // remove old picture\n File::delete($this->userImgFolder . $curUser->profile_img);\n\n if (Input::file('userImgUpl')->move($this->userImgFolder, $newFileName)) { // attempt to move file to user image folder\n $curUser->profile_img = $newFileName;\n\n if ($curUser->save()) { // check if it saves correctly to the db\n } else {\n $error = true;\n $msg = 'The image uploaded successfully, but there was an error updating the database.';\n }\n } else {\n $error = true;\n $msg = 'There was an error moving the file.';\n }\n } else {\n $error = true;\n $msg = 'The image must have equal width and height.';\n }\n } else {\n $error = true;\n $msg = 'The file your are trying to upload is too large.';\n }\n }\n } else {\n $error = true;\n $msg = 'There was an error uploading this file.';\n }\n\n if ($error) {\n return Redirect::to('/profile/' .$curUser->username)\n ->with('error', 'Error: ' .$msg);\n } else {\n return Redirect::to('/profile/' .$curUser->username)\n ->with('success', 'Picture Updated.');\n }\n }", "public function update(Request $request, $id)\n {\n\n // dd($request->except('_token','_method'));\n // $this->validate($request,[\n // 'gimgs' => 'required',\n // ],[\n // 'gimgs.required' => '商品图片不能为空',\n // ]);\n // 表单验证\n $rs = Goodsimg::where('gid',$id)->get(); // 通过父表id 查询出子表信息\n\n // dd($rs);\n\n // 关联删除 gimgs\n if ($request->file('gimgs')) {\n $grr = []; // 定义一个数组\n foreach($rs as $v){\n $gr = $v->gimgs; // 获取图片名\n // $grr[] = $gr;\n unlink('.'.$v->gimgs); // 删除文件夹中的图片名文件\n $gs = Goodsimg::where('gimgs',$gr)->get(); // 通过图片名获取图片所有信息\n\n foreach ($gs as $v) { // 遍历图片信息\n $gid = $v->id; // 获取图片id\n $grr[] = $gid; // 写入数组\n Goodsimg::destroy($grr); // 删除图片id\n }\n }\n }\n // dd($grr);\n\n $res = $request->except('_token','_method','gimgs');\n\n if($request->hasFile('gpic') && $request->file('gpic')->isValid()){\n\n $photo = $request->file('gpic');\n //自定义名字\n $file_name = uniqid().'.'.$photo->getClientOriginalExtension();\n\n\n $file_path =public_path('uploads/goods');\n $thumbnail_file_path = $file_path . '/friend-'.$file_name;\n\n\n $image = Image::make($photo)->resize(500, 500)->save($thumbnail_file_path);\n\n\n $res['gpic'] = '/uploads/goods/'.$image->basename;\n\n\n }\n\n $data = Goods::where('gid',$id)->update($res);\n\n // 关联表的信息\n\n\n if($request->hasFile('gimgs') ){\n\n $photo = $request->file('gimgs');\n $arr = [];\n foreach($photo as $k => $v){\n $ar = [];\n\n $ar['gid'] = $id;\n //自定义名字\n $file_name = uniqid().'.'.$v->getClientOriginalExtension();\n\n\n $file_path =public_path('uploads/gimgs');\n $thumbnail_file_path = $file_path . '/friend-'.$file_name;\n\n\n $image = Image::make($v)->resize(500, 500)->save($thumbnail_file_path);\n\n\n $ar['gimgs'] = '/uploads/gimgs/'.$image->basename;\n\n $arr[] = $ar;\n\n }\n\n $rs = Goodsimg::where('gid',$id)->insert($arr);\n\n }\n\n\n\n\n\n // if($rs){\n\n return redirect('/admin/goods')->with('success','修改成功');\n // } else {\n // return redirect('/admin/goods')->with('success','修改成功');\n // }\n\n\n\n\n }", "public function update()\n {\n // Prepare data & var\n $data = $this->input->post();\n $id = $data['id'];\n $data['kode_kategori'] = explode('-', $data['kode_kategori'])[0];\n $uploadSukses = false;\n $data['updateAt'] = date('Y-m-d h:i:s');\n $data['updateBy'] = $this->ion_auth->get_user_id();\n // Unset unusefull data\n unset($data['id']);\n // If image exist\n if ($this->fileHasName()) {\n $this->updateImage($data, $id);\n } else {\n if ($this->barang_m->update($id, $data) == FALSE) {\n // echo \"Salah input2\";\n // show_404();\n echo json_encode(array('Terjadi kesalahan input'));\n } else {\n echo json_encode(array('sukses'));\n }\n }\n }", "public function update(Request $request, $id)\n {\n //\n // DB::table('users')\n // ->where('id', 1)\n // ->update(['votes' => 1]);\n // }\n $request->validate([\n 'name'=> \"required|unique:giay,name,$id,id_giay|max:50\",\n 'loaigiay'=>'required',\n 'cost'=> 'required|Numeric|max:50000000',\n 'mota_ngan'=>'required',\n 'mota_dai'=>'required',\n\n 'anh_1'=>'image|mimes:jpeg,jpg,png|max:2024',\n 'anh_2'=>'image|mimes:jpeg,jpg,png|max:2024',\n 'anh_3'=>'image|mimes:jpeg,jpg,png|max:2024',\n 'anh_4'=>'image|mimes:jpeg,jpg,png|max:2024'\n ]);\n $product = giay::findOrFail($id);\n\n $product->name = $request->name;\n $product->id_loaigiay = loaigiay::where('name', $request->loaigiay)->first()->id_loaigiay;\n $product->cost = $request->cost;\n $product->mota_ngan = $request->mota_ngan;\n $product->mota_dai = $request->mota_dai;\n $product->save();\n\n if($request->has('anh_1')){\n $path1 = $request->file('anh_1')->store('public/img');\n $anh = giay::findOrFail($id)->anh_giay[0];\n $old_anh = $anh->url; \n Storage::delete('public/img/'.$old_anh);\n $anh->url = preg_replace(\"/(public\\/img\\/)/\", '', $path1);\n $anh->save();\n }\n\n if($request->has('anh_2')){\n $path2 = $request->file('anh_2')->store('public/img');\n $anh = giay::findOrFail($id)->anh_giay[1];\n $old_anh2 = $anh->url; \n Storage::delete('public/img/'.$old_anh2);\n $anh->url = preg_replace(\"/(public\\/img\\/)/\", '', $path2);\n $anh->save();\n }\n\n if($request->has('anh_3')){\n $path3 = $request->file('anh_3')->store('public/img');\n $anh = giay::findOrFail($id)->anh_giay[2];\n $old_anh3 = $anh->url; \n Storage::delete('public/img/'.$old_anh3);\n $anh->url = preg_replace(\"/(public\\/img\\/)/\", '', $path3);\n $anh->save();\n }\n\n if($request->has('anh_4')){\n $path4 = $request->file('anh_4')->store('public/img');\n $anh = giay::findOrFail($id)->anh_giay[3];\n $old_anh4 = $anh->url; \n Storage::delete('public/img/'.$old_anh4);\n $anh->url = preg_replace(\"/(public\\/img\\/)/\", '', $path4);\n $anh->save();\n }\n \n return redirect()->route('admin.tables', 'product')->with(['message'=> 'Thay đổi thành công', 'class'=> 'alert alert-success']);\n }", "public function update(Request $request, $id)\n {\n $data = model_lapak::where('user_id',$id)->first();\n $data->nama_lapak = $request->nama;\n $data->alamat = $request->alamat;\n $data->user_id = $id;\n if($request->hasFile('gambarlapak')){\n $avatar = $request->file('gambarlapak');\n $filename = time().'.' .$avatar->getClientOriginalExtension();\n Image::make($avatar)->resize (300,300)->save(public_path('/upload/lapak/'.$filename));\n\n $data->file = $filename;\n }\n $data->save();\n return redirect()->route('home')->with('alert-success','Data berhasil diubah!');\n }", "public function update(Request $request)\n {\n $model = $request->all();\n\n\n $data=Blog::find($model['id']); \n\n $data->fill($request->except('img'));\n if($file = $request->hasFile('img')) {\n $fullPath = public_path(\"images/blog/{$data->img}\");\n if (File::exists($fullPath)) {\n File::delete($fullPath);\n }\n $file = $request->file('img');\n $fileName = $file->getClientOriginalName();\n $destinationPath = public_path().'/images/blog/' ;\n $file->move($destinationPath,$fileName);\n $data->img = $fileName ;\n }\n\n if($data->save()){ \n Alert::success('Successfully Updated', 'Success');\n }else{\n Alert::error('Something went wrong!', 'Oops...');\n }\n return Redirect::to('admin/'.$this->title);\n }", "public function update(Request $request, $id)\n {\n\n // dd($request->price);\n $rules = [\n 'category_id' => 'required',\n 'product' => 'required',\n 'description' => 'required',\n // 'price' => 'required',\n // 'main_image' => 'mimes:jpeg,png,jpg|max:4048',\n // 'gallery' => 'mimes:jpeg,png,jpg|max:4048',\n\n ];\n\n $error = Validator::make($request->all(), $rules);\n\n if ($error->fails()) {\n return response(['errors' => $error->errors()->all()], Response::HTTP_OK);\n }\n\n $imgdestination = '/Macrolan_Products';\n $gallerarray = [];\n\n if ($request->hasfile('main_image')) {\n $productimages = $request->file('main_image');\n $imgname = $this->generateUniqueFileName($productimages, $imgdestination);\n $main_image=ProductPhoto::where('product_id',$id)->pluck('main_image')->count();\n\n $product_image = new ProductPhoto();\n $product_image->product_id = $id;\n if ($main_image<=0) {\n $product_image->image_path = $imgname;\n $product_image->type = \"main_image\";\n $product_image->save();\n }else {\n ProductPhoto::where('product_id',$id)\n ->where('type','main_image')->update([\n 'type'=>'main_image',\n 'image_path'=>$imgname\n ]);\n }\n \n }\n\n if ($request->hasfile('gallery')) {\n\n foreach ($request->file('gallery') as $image) {\n $galleryname = $this->generateUniqueFileName($image, $imgdestination);\n $gallerarray[] = $galleryname;\n }\n\n foreach ($gallerarray as $img) {\n $product_image = new ProductPhoto();\n $product_image->product_id = $id;\n $product_image->image_path = $img;\n $product_image->type = \"gallery\";\n $product_image->save();\n // ProductPhoto::where('product_id', $id)\n // ->where('type', '=', 'gallery')\n // ->update([\n // 'image_path' => $img,\n // ]);\n }\n }\n $product= Product::find($id);\n $product->category_id = $request->category_id;\n $product->product = $request->product;\n // $product->price = $request->price;\n $product->description = $request->description;\n if ($product->update()) {\n return response(['success' => 'Product Updated Succesfully',\n ], Response::HTTP_OK);\n } else {\n return response(['warning' => 'Product not Updated!',\n ], Response::HTTP_OK);\n }\n\n\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(),[\n 'title'=>'min:1|max:255',\n 'price'=>'required',\n 'description'=>'required',\n 'itinerary'=>'required',\n 'geo_location'=>'required',\n 'duration'=>'required',\n ]);\n if($validator->fails()){\n return redirect()->back()->withInput()->withErrors($validator);\n }\n\n //check user choose image\n $images = null;\n if(isset(request()->images)){\n\n //if choose delete the images\n $package = packages::find($id);\n $image_arr = explode(',',$package->images);\n foreach ($image_arr as $i){\n File::delete('images/tour/'.$i);\n }\n\n $image_arr = array();\n $images = request()->file('images');\n foreach($images as $i){\n $image_name = md5($i->getClientOriginalName()).'.'.$i->getClientOriginalExtension();\n $image_destinationPath = public_path('images/tour/');\n $i->move($image_destinationPath,$image_name);\n array_push($image_arr,$image_name);\n }\n $images = implode(',',$image_arr);\n }else{\n $db_image = packages::find($id);\n $images = $db_image->images;\n }\n $package = packages::find($id);\n $package->title = request()->title;\n $package->city_id = request()->city_id;\n $package->price = request()->price;\n $package->type = request()->type;\n $package->description = request()->description;\n $package->itinerary = request()->itinerary;\n $package->geo_location = request()->geo_location;\n $package->duration = request()->duration;\n $package->images =$images;\n $package->save();\n return redirect()->back()->with('status','New Tour Package Creating Successfully!');\n }", "public function reassignFeaturedImage()\n {\n\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'name' => 'required | min:3',\n 'skill' => 'required | min:4',\n 'address' => 'required | min:5',\n 'start_date' => 'required | date',\n 'end_date' => 'required | date',\n 'description' => 'required | max:200',\n 'image' => 'nullable | image'\n ]);\n\n $gest = Gest::findOrFail($id);\n\n if ($request->hasFile('image')){\n if (Storage::delete('public/gests_photos/'.$gest->image)) {\n $gest->name = $request->name;\n $gest->skills = $request->skill;\n $gest->address = $request->address;\n $gest->start_date = $request->start_date;\n $gest->end_date = $request->end_date;\n $gest->description = $request->description;\n\n $file = $request->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = sha1(time()) . '.' . $extension;\n $file->move('storage/gests_photos/', $filename);\n $gest->image = $filename;\n $gest->update();\n return redirect()->route('backend_gest_manage')->with('status','Your gest update succesfully');\n }else{\n return \"your folder is no file here\";\n }\n }else{\n $gest->name = $request->name;\n $gest->skills = $request->skills;\n $gest->address = $request->address;\n $gest->start_date = $request->start_date;\n $gest->end_date = $request->end_date;\n $gest->description = $request->description;\n $gest->update();\n return redirect()->route('backend_gest_manage')->with('status','Your gest update succesfully');\n }\n }", "public function updateNews(NewsRequest $request)\n {\n \n try {\n $id=($request['id']);\n $news =News::find($id);\n $oldImage=$news->imageUrl;\n $imageHelper=new ImageHelper();\n //if the user insert an image we get it\n if (isset($_FILES['imageUrl'])) {\n $newsImageUrl = ($this->destinationPath.$imageHelper->makeName().'.'. pathinfo($_FILES['imageUrl']['name'], PATHINFO_EXTENSION));\n }else{\n //but, if the user not insert an image, we insert one by default\n $newsImageUrl=$oldImage;\n }\n \n \n $news->title=($request['title']); \n $news->description=($request['description']);\n $news->imageUrl=$newsImageUrl;\n $news->save();\n //Save an imgage if the uer selec one\n if (isset($_FILES['imageUrl'])) {\n move_uploaded_file($_FILES['imageUrl']['tmp_name'], $newsImageUrl);\n //We delete the last image if the old is diferent of default phath\n if ($oldImage!=$this->imgDefault) {\n File::delete($oldImage);\n }\n \n }\n return response()->json([\"message\" => \"ANUNCIO ACTUALIZADO CORRECTAMENTE\"]); \n\n }catch (Exception $e) {\n return response()->json([\"error\"=>\"Lo sentimos, no se a podido actualizar el anuncio\"]);\n }\n \n }", "public function update(Request $req){\n if($req->ajax()){\n $this->validate(\n $req,\n [\n 'txtTen' => 'required|min:3|max:150', /* không trùng tiêu đề khác */\n 'txtFee' => 'required|numeric',\n 'txtTime' => 'required',\n 'txtImg'=> 'required',\n ],\n [\n 'txtTen.required' => 'Vui lòng nhập tên dịch vụ',\n 'txtTen.min' => 'Họ tên tối thiểu 3 ký tự',\n 'txtTen.max' => 'Họ tên tối đa 150 ký tự',\n 'txtFee.required' => 'Vui lòng điền chi phí',\n 'txtFee.numeric' => 'chi phí phải là số',\n 'txtTime.required' => 'Thời gian cho mỗi đơn hàng',\n 'txtImg.required' => 'Logo nhà vận chuyển'\n \n ]\n );\n\n\n $data = Shipper::findOrFail($req->get('txtId'));\n $data->name = $req->get('txtTen');\n $data->fee = $req->get('txtFee');\n $data->Time = $req->get('txtTime');\n\n $Image = str_random(4);\n while (file_exists(\"images/shipper/\" . $Image)) {\n $Image = str_random(4);\n }\n Image::make($req->get('txtImg'))->resize(50, 50)->save(\"images/shipper/\" . $Image);\n\n $data->image = $Image;\n \n $data->save();\n Cache::pull('shippercache');\n return response()->json(['success'=>'Cập nhật thành công'],200);\n }\n }", "public function update(Request $request)\n {\n $this->validate($request,[\n 'name'=>'required|min:3',\n 'note'=>'required|min:5',\n 'secid'=>'required',\n 'image'=>'nullable|image|max:1999'\n ]);\n $id=$request->input('id');\n if($request->hasFile('image'))\n{\n$file=$request->file('image')->getClientOriginalName();\n$ext=$request->file('image')->getClientOriginalExtension();\n$filename=pathinfo($file, PATHINFO_FILENAME);\n$filenew='image'.time().'.'.$ext;\n$path=$request->file('image')->storeAs('public/uploads', $filenew);\n}\nelse\n{\n $forum2=Forum::find($id);\n\n $filenew=$forum2->photo;\n}\n\n$forum = Forum::find($id);\n $forum->name=$request->input('name');\n $forum->description=$request->input('note');\n $forum->photo=$filenew;\n $forum->secid=$request->input('secid');\n $forum->save();\n return redirect('/admin/forum')->with('success', 'Forum updated successfully!');\n\n}", "public function update(Request $request, int $id)\n {\n $request->validate([\n 'nom'=>'required ',\n 'details'=>'required ',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $service_info = InfographieService::find($id);\n $service_info->nom = $request->nom;\n $service_info->details = $request->details;\n\n if($request->hasFile('image') == null && $service_info->image != null){\n $service_info->image == $service_info->Image;\n }else{\n $file = $request->file('image');\n $file_name = time().'.'.$file->getClientOriginalExtension();\n $file->move(public_path('/uploads/photo'),$file_name);\n $service_info->image = '/uploads/photo/'.$file_name;\n }\n //Flash session\n $request->session()->flash('titreMdf',$request->nom);\n $service_info->save();\n return redirect('infographieDash');\n }", "public function update(Request $request, $id)\n {\n //\n $image = $request->file('image');\n\n if($image != NULL){\n\n\n $this->validate($request, [\n 'image' => 'required|mimes:jpg,jpeg,png,gif|max:8048',\n 'product_name' => 'required',\n 'product_code' => 'required',\n 'product_cat' => 'required',\n 'product_sum' => 'required',\n 'product_detail' => 'required',\n 'shop_name' => 'required',\n ]);\n\n $input['imagename'] = time().'.'.$image->getClientOriginalExtension();\n $img = Image::make($image->getRealPath());\n $img->resize(500, 500, function ($constraint) {\n $constraint->aspectRatio();\n })->save('admin/assets/product/'.$input['imagename']);\n\n\n\n $package = product::find($id);\n $package->user_id = Auth::user()->id;\n $package->cat_id = $request['product_cat'];\n $package->product_name = $request['product_name'];\n $package->product_detail = $request['product_detail'];\n $package->product_code = $request['product_code'];\n $package->product_sum = $request['product_sum'];\n $package->product_image = $input['imagename'];\n $package->shop_id = $request['shop_name'];\n $package->save();\n\n $the_id = $request['id'];\n\n\n }else{\n\n\n\n $this->validate($request, [\n 'product_name' => 'required',\n 'product_code' => 'required',\n 'product_cat' => 'required',\n 'product_sum' => 'required',\n 'product_detail' => 'required',\n 'shop_name' => 'required'\n ]);\n\n\n $package = product::find($id);\n $package->user_id = Auth::user()->id;\n $package->cat_id = $request['product_cat'];\n $package->product_name = $request['product_name'];\n $package->product_detail = $request['product_detail'];\n $package->product_code = $request['product_code'];\n $package->product_sum = $request['product_sum'];\n $package->shop_id = $request['shop_name'];\n $package->save();\n\n $the_id = $request['id'];\n\n }\n\n return redirect(url('admin/product/'.$id.'/edit'))->with('success_edit_product','เพิ่มร้านค้าสำเร็จแล้วค่ะ');\n }" ]
[ "0.715806", "0.68801874", "0.6874065", "0.6864225", "0.67679393", "0.6734986", "0.67082727", "0.66768134", "0.65998596", "0.6599303", "0.65971684", "0.6579637", "0.6562127", "0.6536013", "0.65355736", "0.6517273", "0.65164596", "0.65140855", "0.65091586", "0.6470015", "0.6451549", "0.642869", "0.64272183", "0.6423953", "0.6417683", "0.64095694", "0.6407481", "0.6396839", "0.63941485", "0.63922566", "0.6385628", "0.6385628", "0.6385628", "0.6385628", "0.6385628", "0.6385628", "0.6385628", "0.6385628", "0.6379525", "0.6368903", "0.63666546", "0.6349074", "0.63384324", "0.63272053", "0.6324827", "0.63192767", "0.6316616", "0.63072455", "0.6295519", "0.62950873", "0.6294957", "0.629039", "0.6284497", "0.62790954", "0.62769884", "0.627436", "0.6271699", "0.62712985", "0.6271009", "0.62670165", "0.62478006", "0.6246744", "0.62412256", "0.6234509", "0.62324995", "0.6231199", "0.6216904", "0.6199917", "0.6198406", "0.6195017", "0.6186978", "0.6182713", "0.617893", "0.61788696", "0.6175485", "0.6164665", "0.61633646", "0.6142308", "0.6136112", "0.6134161", "0.6132058", "0.61317766", "0.61270255", "0.6117965", "0.611668", "0.6112976", "0.61089236", "0.61077183", "0.6105668", "0.6103449", "0.6100756", "0.6095918", "0.6090274", "0.6089067", "0.6088644", "0.6088044", "0.6083466", "0.60797983", "0.6079736", "0.6076945", "0.6073342" ]
0.0
-1
The function that get the model and run after the model was created
public function afterCreate($request, $estate) { $estate->attachTags($request->get('tags')); $estate->features()->attach($request->get('features')); if ($request->get('specs', false) && count($request->get('specs', []))) $this->createSpecData($request, $estate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\n {\n //use model\n }", "public static function preModel(){\n\t\t\n\t}", "public function createModel()\n {\n }", "abstract protected function getModel();", "function post_model_init($from_cache = FALSE)\n {\n }", "abstract function getModel();", "protected abstract function model();", "public function getModel(){ }", "private function createModel()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "abstract protected function model();", "abstract protected function model();", "public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }", "abstract public function getModel();", "function post_model_init($from_cache = FALSE)\n\t{\n\t}", "function run() {\n $this->model->run();\n }", "public abstract function model();", "public function model();", "public function model();", "public function loadModel() : void\n {\n $model = $this->newModel();\n\n $model->loadModel($this->modelPath);\n $model->printModel();\n\n $this->fm = FunctionMap::loadFunctionMap();\n }", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "protected function setModel()\n {\n $class = 'Src\\Modules\\\\' . $this->module_name . '\\Models\\\\' . $this->class . 'Model';\n $this->model = new $class;\n $this->model->setModuleName( $this->module_name );\n $this->model->run();\n }", "public function callModel()\n {\n Artisan::call('lucy:model', $this->builder->getAttribute('model'));\n }", "abstract protected function modelFactory();", "public function createModel() {\n return null;\n }", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "public function run()\n {\n //\n\t\tfactory(App\\Models\\KModel::class,5)->create();\n }", "public static function boot()\n {\n parent::boot();\n self::creating(function($model) {\n $model->reference = $model->generateReference();\n });\n }", "protected function on_new_model_generated(Jelly_Model $model)\n\t{\n\t\t// Nothing here but subclasses can implement...\n\t}", "protected function createModel()\n {\n $model = $this->info['model'];\n\n $modelName = basename(str_replace('\\\\', '/', $model));\n\n // make it singular\n $modelName = Str::singular($modelName);\n\n $this->info['modelName'] = $modelName;\n\n $modelOptions = [\n 'model' => $this->info['model'],\n '--module' => $this->moduleName,\n ];\n $options = $this->setOptions([\n 'index',\n 'unique',\n 'data',\n 'uploads',\n 'float',\n 'bool',\n 'int',\n 'data',\n 'parent'\n ]);\n\n $this->call('engez:model', array_merge($modelOptions, $options));\n }", "public function setCurModelObject() {\n //'cause when the Controller is called by another Controller\n //and thus the Model in the local Controller is also called remotely\n //by that remote Controller\n //$curModel = CURMODEL;\n //$this->model = new $curModel();\n\n $model = $this->CMO->model_prefix.get_class($this);\n $this->model = new $model();\n //Models' pseudo constructor cannot pass Parameters\n if(method_exists($this->model,'_construct')) {\n call_user_func_array(array($this->model,'_construct'),array());//this invokes the pseudo constructor of Model class\n }\n if(method_exists($this->model,'_'.$model)) {\n call_user_func_array(array($this->model,'_'.$model),array());//this invokes the pseudo constructor of Model class\n }\n }", "function addModel(){\n\t\n\t}", "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "public function getModel()\n{\nreturn $this->model;\n}", "public function makeModel()\n {\n return $this->model;\n }", "public function buildModel() {}", "protected function cliModelInit()\n {\n }", "protected function makeModel()\n {\n new MakeModel($this, $this->files);\n }", "private function getModel(): void\n {\n $model = config(\"cart.{$this->driver}.model\");\n\n if (class_exists($model)) {\n $this->model = new $model;\n }\n }", "protected function GetModel() {\n\t\treturn parent::GetModel();\n\t}", "public function populateModels()\n {\n }", "public function createModel()\n\t{\n\t\treturn $this->getModelConfiguration()->createModel();\n\t}", "protected function _model() {\n\t\treturn $this->_container->model;\n\t}", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "public function getModel();", "public function getModel();", "public function getModel();", "public function run()\n {\n factory(Car::class, count(self::$models))->create()\n ->each(function ($c) {\n $c->models = self::$models[random_int(0, count(self::$models) - 1)];\n $c->save();\n });\n }", "public function generateModels () {\r\n $modelParam = \\app\\lib\\router::getModel();\r\n $ModelPath = \\app\\lib\\router::getPath();\r\n $ModelName = \"app\\model\\\\\" . end($ModelPath);\r\n $this->model =new $ModelName;\r\n }", "public function creating($model)\n\t{\n\t}", "abstract protected function getModelClass();", "public function getModel(): Model;", "public function getModel(): Model;", "public function run()\n {\n factory(App\\bread_model_class::class, 20)->create();\n }", "public function getModel()\n {\n return $this->model->newInstance();\n }", "protected function createModel()\n {\n $this->call('wizard:model', [\n 'name' => $this->argument('name'),\n ]);\n }", "protected function createModel()\n {\n $this->call('make:model', array_filter([\n 'name' => $this->getNameInput(),\n '--factory' => $this->option('factory'),\n '--migration' => $this->option('migration'),\n ]));\n }", "public function __construct(){\n $this->vehicle_model = VehicleModel::getVehicleModel();\n }", "public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }", "private static function model()\n {\n $files = ['ORM_', 'CRUD', 'ORM', 'Collection', 'ModelArray'];\n $folder = static::$root.'MVC/Model'.'/';\n\n self::call($files, $folder);\n\n $files = ['ForeingKeyMethodException', 'ColumnNotEmptyException', 'ManyPrimaryKeysException', 'TableNotFoundException', 'ModelNotFoundException', 'PrimaryKeyNotFoundException'];\n $folder = static::$root.'MVC/Model/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "protected function setup_models()\n\t{\n\t}", "public function createModelObject($modelName){\n //$this->modelObject = new SignupModel;\n\n }", "function create($model)\n {\n }", "private function __construct($model)\r\n {\r\n\r\n }", "protected function _afterLoadPostProcess(BTS_Model $obj) {}", "abstract protected function getDefaultModel();", "public function loadModel(){\n $this->load->model('Data_Model');\n return new Data_Model($this->used_table,$this->used_db);\n }", "function __construct() {\n $this->loteModel = new loteModel();\n }", "public function getModel(){\n\t\tif( isset($this->model) ){\n\t\t\treturn $this->model;\n\t\t}\n\t\t$nameModel = str_replace(' View' , 'Model' ,__CLASS__ );\n\t\t$this->model = new $nameModel();\n\t}", "private function loadModel()\n {\n require_once APP . '/model/User.php';\n // create new \"model\" (and pass the database connection)\n $this->model = new User($this->db);\n }", "private function model()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR;\n $class_name = '';\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n\n $tmp = explode(DIRECTORY_SEPARATOR, $this->args['subdirectories']);\n $tmp = join('_', $tmp);\n $class_name .= ApplicationHelpers::camelize($tmp);\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n $class_name .= ucfirst(strtolower($this->args['name']));\n\n $args = array(\n \"class_name\" => ucfirst(strtolower($this->args['name'])),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_model'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n );\n\n $template = new TemplateScanner(\"model\", $args);\n $model = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Model already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $model))\n {\n $message .= 'Created model: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create model: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the migration for the new model\n $this->migration();\n\n return;\n }", "public function run()\n {\n // model Factorier\n factory(Category::class, 5)->create();\n factory(producto::class, 50)->create();\n factory(ProductImage::class, 200)->create();\n\n }", "public function model()\n {\n $model = $this->_model;\n return new $model;\n\n }", "abstract public function instanceModel(): Model;", "public function run()\n {\n $vehicleMake = new VehicleMake();\n $vehicleMake->name = 'Dodge';\n $vehicleMake->save();\n $vehicleMake = new VehicleMake();\n $vehicleMake->name = 'Toyota';\n $vehicleMake->save();\n }", "public function storedModel(Model &$model)\n {\n }", "function getMake_model()\n {\n return $this->make_model;\n }", "public function __construct()\n {\n $this->model = app()->make($this->model());\n }", "function __construct($model)\n {\n $this->model = $model;\n }", "public function run()\n {\n factory(App\\CarModel::class, 15)->make()->each(function ($carModel) {\n $manufacturer = App\\Manufacturer::all()->random();\n $carModel->manufacturer()->associate($manufacturer);\n $carModel->save();\n });\n }", "public function createModel()\n {\n return $this->loader->getModels()->getCommTemplateModel();\n }", "protected function get_model_obj(){ return new Session_Model(); }", "abstract protected function newModel(): Model;", "public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }", "abstract protected function prepareModels();", "public function run()\n {\n // model factories: generación de datos de pruebas\n \t//factory(Product::class)->make(); // crea objetos\n\n \tfactory(Product::class, 100)->create();//crea objetos y los guarda en bbdd\n }", "public function __construct() {\n $this->docenteModel = $this->model('DocenteModel');\n }", "function getModelObject(){\n\t\t\n\t\tif ( !isset($this->modObj) ){\n\t\t\t$this->modObj = new DoctrineModel();\n\t\t}\t\n\t\treturn $this->modObj;\n\t}", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function run()\n {\n // model factories\n factory(Category::class, 4)->create();\n factory(Product::class, 100)->create();\n factory(ProductImage::class, 400)->create();\n }", "public function model($model) {\r\n require_once \"../app/models/$model.php\";\r\n return new $model; //return class\r\n }", "function loadModel($model){\n $url='models/'.$model.'model.php';//models/alumnomodel.php\n //validando que el modelo exista\n if(file_exists($url)){\n //si axiste lo llamamos\n require $url;\n $modelName=$model.'Model';\n //instancia de la clase del modelo recibido\n $this->model=new $modelName;\n }\n }", "function miguel_mMain()\r\n {\t\r\n\t\t$this->base_Model();\r\n }", "public function getModel(){\n\t\treturn $this->model;\n\t}", "public function loadModel(){\n\t\t$className = get_class($this);\n\t\tforeach(func_get_args() as $model){\n\t\t\t$entity = EntityManager::getEntityInstance($model);\n\t\t\tself::$_settingLock[$className] = true;\n\t\t\t$this->$model = $entity;\n\t\t\tself::$_settingLock[$className] = false;\n\t\t}\n\t}" ]
[ "0.7112107", "0.69234467", "0.69137055", "0.69005", "0.6886634", "0.68649954", "0.6848848", "0.6807504", "0.679455", "0.67724216", "0.67724216", "0.6745355", "0.67368007", "0.67277145", "0.6717073", "0.66709465", "0.665752", "0.665752", "0.66521144", "0.66397125", "0.66397125", "0.66397125", "0.66397125", "0.661317", "0.65935194", "0.65822726", "0.65643585", "0.6561982", "0.6561982", "0.6561982", "0.6561982", "0.65600026", "0.6559664", "0.655731", "0.6550565", "0.655014", "0.65247375", "0.64665633", "0.64612603", "0.6440311", "0.64314103", "0.6411954", "0.64091676", "0.6408783", "0.63847315", "0.6368966", "0.63458353", "0.6329369", "0.63122874", "0.63120866", "0.6304355", "0.6304355", "0.6304355", "0.6302538", "0.6291585", "0.6280459", "0.62542725", "0.62533396", "0.62533396", "0.6240984", "0.623055", "0.6224101", "0.62191373", "0.62177366", "0.6211538", "0.6201871", "0.62009627", "0.619627", "0.6182429", "0.6174666", "0.61696553", "0.6143462", "0.61226195", "0.61204207", "0.6120328", "0.6115331", "0.61107886", "0.6110689", "0.6109518", "0.6102726", "0.6095293", "0.6095163", "0.60748833", "0.60722303", "0.60585034", "0.6042603", "0.6040875", "0.6034674", "0.60168535", "0.60168034", "0.60149187", "0.6013963", "0.60113883", "0.6009718", "0.60006106", "0.5998413", "0.5994399", "0.5991836", "0.5986676", "0.59821415", "0.598079" ]
0.0
-1
The function that get the model and run after the model was updated
public function afterUpdate($request, $estate) { $estate->syncTags($request->get('tags')); $estate->features()->sync($request->get('features')); if ($this->old_spec !== $estate->spec_id) $estate->spec_data()->delete(); if ($request->get('specs', false) && count($request->get('specs', []))) $this->createSpecData($request, $estate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function updateModel();", "public static function preModel(){\n\t\t\n\t}", "public function updated($model)\n {\n }", "function update(){\n\t\t$this->model->update();\n\t}", "public function refresh(): ModelInterface;", "function run() {\n $this->model->run();\n }", "abstract protected function getModel();", "public function model()\n {\n //use model\n }", "public function updatedModel(Model &$model)\n {\n }", "function post_model_init($from_cache = FALSE)\n {\n }", "abstract function getModel();", "public function apply($model);", "protected abstract function model();", "protected function preUpdate( ModelInterface &$model ) {\n }", "function post_model_init($from_cache = FALSE)\n\t{\n\t}", "protected function GetModel() {\n\t\treturn parent::GetModel();\n\t}", "abstract public function getModel();", "public function getModel(){ }", "public function saved($model)\n\t{\n\t}", "public function callModel()\n {\n Artisan::call('lucy:model', $this->builder->getAttribute('model'));\n }", "abstract protected function model();", "abstract protected function model();", "public function updating($model)\n\t{\n\t}", "public function loadModel() : void\n {\n $model = $this->newModel();\n\n $model->loadModel($this->modelPath);\n $model->printModel();\n\n $this->fm = FunctionMap::loadFunctionMap();\n }", "public function saved($model)\n {\n }", "public function executeModelAction(): void\n {\n $this->action = $this->executeModelActionLoad($this->action);\n\n $this->vp->set(function () {\n $this->jsSetButtonsState($this->loader, $this->step);\n $this->jsSetListState($this->loader, $this->step);\n $this->runSteps();\n });\n }", "protected function afterUpdating()\n {\n }", "protected function _afterLoadPostProcess(BTS_Model $obj) {}", "public function postSave()\n {\n // check if the model already exists\n if ((!isset($this->revisionEnabled) || $this->revisionEnabled)) {\n // if it does, it means we're updating\n\n $changes_to_record = $this->changedRevisionableFields();\n\n $revisions = array();\n\n foreach ($changes_to_record as $key => $change) {\n\n $revisions[] = array(\n 'revisionable_type' => get_class($this),\n 'revisionable_id' => $this->getKey(),\n 'key' => $key,\n 'old_value' => array_get($this->originalData, $key),\n 'new_value' => $this->updatedData[$key],\n 'user_id' => $this->getSystemUserId(),\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n 'activity_id' => $this->getActivityId()\n );\n }\n\n if (count($revisions) > 0) {\n $revision = new Revision();\n \\DB::table($revision->getTable())->insert($revisions);\n }\n\n }\n\n }", "public function get()\n {\n\t\tif ($this->model->state())\n $this->model->get();\n }", "public function getModel()\n{\nreturn $this->model;\n}", "public function update( One_Model $model )\n\t{\n\t\treturn null;\n\t}", "public function after_update() {}", "public function storedModel(Model &$model)\n {\n }", "public function apply()\n {\n return tap($this->getVersionedModel())->saveOrFail();\n }", "public abstract function model();", "public static function updateBeforeLoad($model)\n {\n $model = Order::getShippingDetail($model);\n // Order type and dropdown values for setting customer and agent\n $model = \\common\\models\\User::RequestedUserDetail($model);\n // Product detail for price and quantity\n \n \n // check status of order\n $orderReturn = array_search('Return Request', \\common\\models\\Lookup::$status);\n $orderTransfer = array_search('Transfer Request', \\common\\models\\Lookup::$status);\n // order type for return and transfer\n if ($orderReturn == $model->status) {\n $model->order_type = 'Return';\n $currentStock = \\common\\models\\helpers\\Statistics::CurrentStock($model->child_user);\n } else {\n $currentStock = \\common\\models\\helpers\\Statistics::CurrentStock($model->request_agent_name);\n }\n if ($orderTransfer == $model->status) {\n $model->order_type = 'Transfer';\n }\n $model->total_stock = $currentStock;\n return $model;\n }", "public function getModel();", "public function getModel();", "public function getModel();", "public function testUpdateModelSet()\n {\n }", "protected function updateMoreData($model){\n return $model;\n }", "protected function _model() {\n\t\treturn $this->_container->model;\n\t}", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "function update($unique_id, $model)\n {\n }", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "public function afterSave(){\n\t}", "public function updateModel(Model &$model)\n {\n }", "public function model();", "public function model();", "protected function on_new_model_generated(Jelly_Model $model)\n\t{\n\t\t// Nothing here but subclasses can implement...\n\t}", "abstract protected function setModel(): String;", "function onSave()\n {\n $object = parent::onSave();\n }", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "protected function afterUpdate()\n {\n }", "protected function afterUpdate()\n {\n }", "public function populateModels()\n {\n }", "public function saving($model)\n\t{\n\t}", "public function after_update(\\Orm\\Model $model)\n {\n\n $info = new Information();\n\n // TODO DRY\n try {\n // Run query and hope for the best.\n $modelCoin = Coin::query()->where('id', $model->coin_id )->get_one();\n } catch (\\PhpErrorException $e) {\n // returns the individual ValidationError objects\n echo $e->getMessage();\n }\n\n $info = $info->get( $modelCoin );\n\n // Only record market information for coin if response is successful.\n if( $info['success'] ) {// Convert scientific notation to decimal notation\n $lastPrice = rtrim(sprintf('%.20F', $info['result']['Last']), '0');\n list(, $userId) = \\Auth::get_user_id();\n $trans_props = array(\n 'user_id' => $userId,\n 'option_id' => $model->id,\n 'action' => $model->status,\n 'purchase' => $model->price,\n 'market' => $lastPrice,\n );\n\n return \\Exchange\\Model\\Transaction::forge($trans_props)->save();\n }\n }", "public function afterSave()\n {\n\n }", "protected function afterUpdate() {\n\t}", "public function saving($model)\n {\n }", "function after_update() {}", "protected function afterSave() {\n\n }", "public function onRelationManageUpdate()\n {\n $this->forceManageMode = 'form';\n $this->beforeAjax();\n $saveData = $this->manageWidget->getSaveData();\n\n if ($this->viewMode == 'multi') {\n $model = $this->relationModel->find($this->manageId);\n $modelsToSave = $this->prepareModelsToSave($model, $saveData);\n foreach ($modelsToSave as $modelToSave) {\n $modelToSave->save(null, $this->manageWidget->getSessionKey());\n }\n }\n elseif ($this->viewMode == 'single') {\n $this->viewWidget->setFormValues($saveData);\n $this->viewModel->save(null, $this->manageWidget->getSessionKey());\n }\n\n return $this->relationRefresh();\n }", "protected function performUpdate() {}", "public function updating()\n {\n # code...\n }", "public function getVersionedModel()\n {\n return tap($this->versionable, function (Model $model) {\n //$model->exists = true;\n $model->fill($this->getAttribute('attributes'));\n });\n }", "public function getNewModel()\n {\n return parent::getNewModel();\n }", "public function getModel(): Model;", "public function getModel(): Model;", "function addModel(){\n\t\n\t}", "function after_save() {}", "public function getModel(){\n\t\treturn $this->model;\n\t}", "function after_validation_on_update() {}", "protected function setModel()\n {\n $class = 'Src\\Modules\\\\' . $this->module_name . '\\Models\\\\' . $this->class . 'Model';\n $this->model = new $class;\n $this->model->setModuleName( $this->module_name );\n $this->model->run();\n }", "public function loadModel(){\n\t\t$className = get_class($this);\n\t\tforeach(func_get_args() as $model){\n\t\t\t$entity = EntityManager::getEntityInstance($model);\n\t\t\tself::$_settingLock[$className] = true;\n\t\t\t$this->$model = $entity;\n\t\t\tself::$_settingLock[$className] = false;\n\t\t}\n\t}", "public function onAfterSave();", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "public function afterSave()\n\t{\n\t\t//annoying on every edit, move to a checkbox on form and handle in controller\n\t}", "public function save() {\r\n if ($this->model->getId()) {\r\n return $this->model->update();\r\n }\r\n return $this->create();\r\n }", "public function update($model) :bool;", "function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}", "protected function update() {}", "protected function processModel(\\MUtil_Model_ModelAbstract $model)\n { }", "public function crudUpdated()\n {\n }", "public function GetModel()\n {\n return $this->model;\n }", "public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }", "public function update()\r\n {\r\n //\r\n }", "protected function afterSave()\n {\n return;\n }", "public function getModelEvents();", "public function model()\n {\n return $this->model;\n }", "public function save($model);", "protected function getUpdateAfterFunction()\n {\n \n }" ]
[ "0.7135715", "0.66661245", "0.6645535", "0.66443616", "0.66334635", "0.66133064", "0.6562707", "0.6539995", "0.65006024", "0.64963645", "0.6471871", "0.64582235", "0.64415795", "0.643588", "0.64167464", "0.6397077", "0.6385117", "0.6382115", "0.6301422", "0.62974226", "0.62300336", "0.62300336", "0.62288046", "0.6221058", "0.6217931", "0.61851484", "0.6179078", "0.617177", "0.6166996", "0.61557454", "0.61534595", "0.6148247", "0.612649", "0.61123276", "0.6082469", "0.6076369", "0.60753256", "0.60720074", "0.60720074", "0.60720074", "0.6064992", "0.60623837", "0.6044436", "0.6031244", "0.6011333", "0.6011333", "0.6011333", "0.6011333", "0.60023713", "0.59916687", "0.5984402", "0.59805155", "0.59686595", "0.59686595", "0.59649664", "0.59631884", "0.5949709", "0.5943546", "0.5943546", "0.5943546", "0.5943546", "0.59429175", "0.59429175", "0.5935859", "0.59333295", "0.5926224", "0.5918062", "0.5912725", "0.58972174", "0.5886533", "0.5881165", "0.58714473", "0.5862159", "0.584863", "0.5825532", "0.580626", "0.5803073", "0.5803073", "0.58018464", "0.5791511", "0.57903785", "0.57831436", "0.5781468", "0.5771246", "0.57703775", "0.5769177", "0.57661325", "0.5762954", "0.57628316", "0.57586163", "0.57555836", "0.57351327", "0.57273686", "0.5717961", "0.5700934", "0.5696371", "0.56906915", "0.5688807", "0.56879425", "0.5687474", "0.5686456" ]
0.0
-1
Create records for specification data for specific product
public function createSpecData($request, $estate) { $spec = $estate->spec; if (!$spec) return; $spec->load([ 'headers:id,spec_id', 'headers.rows:id,spec_header_id', 'headers.rows.defaults:id,spec_row_id', 'headers.rows.data' => function ($query) use ($estate) { return $query->where('estate_id', $estate->id); } ]); $rows = $spec->headers->map(function ($item) { return $item->rows; })->flatten(1)->keyBy('id'); foreach ($request->get('specs') as $key => $item) { $row = $rows[$item['id']]; if ($row->defaults()->count() !== 0) { $values = $row->defaults; if ($item['values'] ?? false) $values = $values->whereIn('id', $item['values']); elseif ($item['value'] ?? false) $values = $values->where('id', $item['value']); else $values = collect([]); $this->createNewSpecData($row, $estate, null, $values->pluck('id')); } else $this->createNewSpecData($row, $estate, $item['data']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createProduct($data);", "public function create(Product $product)\n {\n \n }", "public function create(Productquestion $productquestion)\n {\n //\n }", "public function run()\n {\n // factory(ProductProperty::class, 200)->create();\n //1\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '2gb',\n 'product_id' => 1\n ]);\n ProductProperty::create([\n 'name' => 'sim-cards-number',\n 'title' => 'Number of SIM cards',\n 'value' => '2',\n 'product_id' => 1\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'ios',\n 'product_id' => 1\n ]);\n ProductProperty::create([\n 'name' => 'memory',\n 'title' => 'Memory',\n 'value' => '64',\n 'product_id' => 1\n ]);\n ProductProperty::create([\n 'name' => 'processor-manufacturer',\n 'title' => 'Processor manufacturer',\n 'value' => 'dragon',\n 'product_id' => 1\n ]);\n //2\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '3gb',\n 'product_id' => 2\n ]);\n ProductProperty::create([\n 'name' => 'sim-cards-number',\n 'title' => 'Number of SIM cards',\n 'value' => '1',\n 'product_id' => 2\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'android',\n 'product_id' => 2\n ]);\n ProductProperty::create([\n 'name' => 'memory',\n 'title' => 'Memory',\n 'value' => '8',\n 'product_id' => 2\n ]);\n ProductProperty::create([\n 'name' => 'processor-manufacturer',\n 'title' => 'Processor manufacturer',\n 'value' => 'dragon',\n 'product_id' => 2\n ]);\n //3\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '1gb',\n 'product_id' => 3\n ]);\n ProductProperty::create([\n 'name' => 'sim-cards-number',\n 'title' => 'Number of SIM cards',\n 'value' => '2',\n 'product_id' => 3\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'ios',\n 'product_id' => 3\n ]);\n ProductProperty::create([\n 'name' => 'memory',\n 'title' => 'Memory',\n 'value' => '16',\n 'product_id' => 3\n ]);\n ProductProperty::create([\n 'name' => 'processor-manufacturer',\n 'title' => 'Processor manufacturer',\n 'value' => 'dragon',\n 'product_id' => 3\n ]);\n //4\n ProductProperty::create([\n 'name' => 'screen',\n 'title' => 'Screen',\n 'value' => 'amoled',\n 'product_id' => 4\n ]);\n ProductProperty::create([\n 'name' => 'year',\n 'title' => 'Year',\n 'value' => '2018',\n 'product_id' => 4\n ]);\n ProductProperty::create([\n 'name' => 'size',\n 'title' => 'Size',\n 'value' => '1000x3000',\n 'product_id' => 4\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'black',\n 'product_id' => 4\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'andriod',\n 'product_id' => 4\n ]);\n //5\n ProductProperty::create([\n 'name' => 'screen',\n 'title' => 'Screen',\n 'value' => 'notamoled',\n 'product_id' => 5\n ]);\n ProductProperty::create([\n 'name' => 'year',\n 'title' => 'Year',\n 'value' => '2014',\n 'product_id' => 5\n ]);\n ProductProperty::create([\n 'name' => 'size',\n 'title' => 'Size',\n 'value' => '1200x3000',\n 'product_id' => 5\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'white',\n 'product_id' => 5\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'tvos',\n 'product_id' => 5\n ]);\n //6\n ProductProperty::create([\n 'name' => 'screen',\n 'title' => 'Screen',\n 'value' => 'notaled',\n 'product_id' => 6\n ]);\n ProductProperty::create([\n 'name' => 'year',\n 'title' => 'Year',\n 'value' => '2013',\n 'product_id' => 6\n ]);\n ProductProperty::create([\n 'name' => 'size',\n 'title' => 'Size',\n 'value' => '100x300',\n 'product_id' => 6\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'red',\n 'product_id' => 6\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'andriodTV',\n 'product_id' => 6\n ]);\n \n //7\n ProductProperty::create([\n 'name' => 'display-resolution',\n 'title' => 'Display resolution',\n 'value' => '1800x2400',\n 'product_id' => 7\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '30',\n 'product_id' => 7\n ]);\n ProductProperty::create([\n 'name' => 'processor',\n 'title' => 'Processor',\n 'value' => 'intel',\n 'product_id' => 7\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '8',\n 'product_id' => 7\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '128',\n 'product_id' => 7\n ]);\n ProductProperty::create([\n 'name' => 'video-card',\n 'title' => 'Video Card',\n 'value' => 'nvidia',\n 'product_id' => 7\n ]);\n //8\n ProductProperty::create([\n 'name' => 'display-resolution',\n 'title' => 'Display resolution',\n 'value' => '1260x2200',\n 'product_id' => 8\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '32',\n 'product_id' => 8\n ]);\n ProductProperty::create([\n 'name' => 'processor',\n 'title' => 'Processor',\n 'value' => 'intel',\n 'product_id' => 8\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '4',\n 'product_id' => 8\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '256',\n 'product_id' => 8\n ]);\n ProductProperty::create([\n 'name' => 'video-card',\n 'title' => 'Video Card',\n 'value' => 'nvidia',\n 'product_id' => 8\n ]);\n //9\n ProductProperty::create([\n 'name' => 'display-resolution',\n 'title' => 'Display resolution',\n 'value' => '1800x3600',\n 'product_id' => 9\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '24',\n 'product_id' => 9\n ]);\n ProductProperty::create([\n 'name' => 'processor',\n 'title' => 'Processor',\n 'value' => 'intel',\n 'product_id' => 9\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '16',\n 'product_id' => 9\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '16',\n 'product_id' => 9\n ]);\n ProductProperty::create([\n 'name' => 'video-card',\n 'title' => 'Video Card',\n 'value' => 'nvidia',\n 'product_id' => 9\n ]);\n //10\n ProductProperty::create([\n 'name' => 'matrix',\n 'title' => 'Matrix',\n 'value' => 'amoled',\n 'product_id' => 10\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'ios',\n 'product_id' => 10\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '10',\n 'product_id' => 10\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '2',\n 'product_id' => 10\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '16',\n 'product_id' => 10\n ]);\n //11\n ProductProperty::create([\n 'name' => 'matrix',\n 'title' => 'Matrix',\n 'value' => 'aawwmoled',\n 'product_id' => 11\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'andriod',\n 'product_id' => 11\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '6',\n 'product_id' => 11\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '4',\n 'product_id' => 11\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '32',\n 'product_id' => 11\n ]);\n //12\n ProductProperty::create([\n 'name' => 'matrix',\n 'title' => 'Matrix',\n 'value' => 'aawmoed',\n 'product_id' => 12\n ]);\n ProductProperty::create([\n 'name' => 'os',\n 'title' => 'OS',\n 'value' => 'ios',\n 'product_id' => 12\n ]);\n ProductProperty::create([\n 'name' => 'display-size',\n 'title' => 'Diagonal display',\n 'value' => '7',\n 'product_id' => 12\n ]);\n ProductProperty::create([\n 'name' => 'ram',\n 'title' => 'RAM',\n 'value' => '2',\n 'product_id' => 12\n ]);\n ProductProperty::create([\n 'name' => 'memory-size',\n 'title' => 'Memory Size',\n 'value' => '25',\n 'product_id' => 12\n ]);\n //13\n ProductProperty::create([\n 'name' => 'type',\n 'title' => 'Type',\n 'value' => 'best',\n 'product_id' => 13\n ]);\n ProductProperty::create([\n 'name' => 'connection-type',\n 'title' => 'Type of connection',\n 'value' => 'wireless',\n 'product_id' => 13\n ]);\n ProductProperty::create([\n 'name' => 'noise-reduction',\n 'title' => 'Noise Reduction',\n 'value' => '33',\n 'product_id' => 13\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'black',\n 'product_id' => 13\n ]);\n ProductProperty::create([\n 'name' => 'cable',\n 'title' => 'Cable',\n 'value' => 'metal',\n 'product_id' => 13\n ]);\n ProductProperty::create([\n 'name' => 'frequency-range',\n 'title' => 'Frequency Range',\n 'value' => '25cm',\n 'product_id' => 13\n ]);\n //14\n ProductProperty::create([\n 'name' => 'type',\n 'title' => 'Type',\n 'value' => 'loew',\n 'product_id' => 14\n ]);\n ProductProperty::create([\n 'name' => 'connection-type',\n 'title' => 'Type of connection',\n 'value' => 'wire',\n 'product_id' => 14\n ]);\n ProductProperty::create([\n 'name' => 'noise-reduction',\n 'title' => 'Noise Reduction',\n 'value' => '23',\n 'product_id' => 14\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'white',\n 'product_id' => 14\n ]);\n ProductProperty::create([\n 'name' => 'cable',\n 'title' => 'Cable',\n 'value' => 'metal',\n 'product_id' => 14\n ]);\n ProductProperty::create([\n 'name' => 'frequency-range',\n 'title' => 'Frequency Range',\n 'value' => '20cm',\n 'product_id' => 14\n ]);\n //15\n ProductProperty::create([\n 'name' => 'type',\n 'title' => 'Type',\n 'value' => 'aredil',\n 'product_id' => 15\n ]);\n ProductProperty::create([\n 'name' => 'connection-type',\n 'title' => 'Type of connection',\n 'value' => 'wireless',\n 'product_id' => 15\n ]);\n ProductProperty::create([\n 'name' => 'noise-reduction',\n 'title' => 'Noise Reduction',\n 'value' => '20',\n 'product_id' => 15\n ]);\n ProductProperty::create([\n 'name' => 'color',\n 'title' => 'Color',\n 'value' => 'red',\n 'product_id' => 15\n ]);\n ProductProperty::create([\n 'name' => 'cable',\n 'title' => 'Cable',\n 'value' => 'metal',\n 'product_id' => 15\n ]);\n ProductProperty::create([\n 'name' => 'frequency-range',\n 'title' => 'Frequency Range',\n 'value' => '25cm',\n 'product_id' => 15\n ]);\n }", "public function store()\n\t{\n\t\t//\n\t\t$productSpecs = Request::all();\n\n $validate = Validator::make($productSpecs,[\n \t 'specprod_product_id' => 'required',\n \t 'specprod_item_id' => 'required',\n \t 'specprod_usage' => 'required',\n \t 'specprod_language_code' => 'required',\n \t 'specprod_technical_info' => 'required',\n \t 'specprod_reference_id' => 'required',\n \t 'specprod_description' => 'required',\n \t\t\t\t\t\t 'specprod_url' => 'required|unique:cep_specification_products',\n \t]);\n\n if($validate->fails()){\n\t\t\treturn redirect()->back()->withErrors($validate->errors());\n }\n\n if(Input::hasFile('files')){\n $files=Input::file('files');\n $productSpecs['specprod_attachment_id'] = $this->attachment->createAttachment(array('att_type'=>'product-specifications'));\n foreach($files as $key=>$fl){\n //echo \"<pre>\"; print_r ($appointments['files'][$key]); //exit;\n $this->attachment->uploadAttachmentFiles($fl,$productSpecs['specprod_attachment_id']);\n }\n }\n\n\t\tif(isset($productSpecs['universal_id']))\n\t\t\t$productSpecs['specprod_url'] = preg_replace('/\\d+/','DD',$productSpecs['specprod_url']);\n\n $masterSpecs = array( 'spec_type' => 'product',\n \t\t\t\t\t 'spec_created_date' => Carbon::now(),\n \t\t\t\t\t 'spec_created_by' => Auth::id()\n \t\t\t\t\t);\n\n $master = CepSpecificationMasters::create($masterSpecs);\n\t\t$productSpecs['specprod_spec_id'] = $master->spec_id;\n CepSpecificationProducts::create($productSpecs);\n\n return redirect('product-specifications');\n\n\t}", "public function actionProductCreate()\n\t{\n\n\t\t$data = $_POST;\n\t\t$merchantId=$data['merchant_id'];\n\t\t$logFIle = 'product/create/'.$data['merchant_id'];\n\t\tData::createLog('Data : '.json_encode($data),$logFIle,'a');\n\t\n\t\t$connection = Yii::$app->getDb();\n\t\t$result = Jetproductinfo::saveNewRecords($data['data'],$data['merchant_id'],$connection);\n\t}", "public function create()\n\t{\n\t\t//\n\t\t$ps_products = CepProducts::where(\"prod_status\",1)->select('prod_id','prod_name')->get();\n\t\t$all_ps_products = array();\n\t\t$all_ps_products[\"\"] = \"Select\";\n\t\tforeach($ps_products as $prod)\n\t\t\t$all_ps_products[$prod->prod_id] = $prod->prod_name;\n\t\t$alphaRange=array_combine(range('1','26'),range('A','Z'));\n\n $languages = CepLanguages::where('lang_status',1)->get();\n\t\t$languages_array = array();\n\t\t$languages_array[\"\"] = \"Select\";\n\t\tforeach ($languages as $language){\n\t\t\t$languages_array[$language->lang_code]=$language->lang_name;\n\t\t}\n\n\t\treturn view(\"product_specifications.create\",compact('all_ps_products','alphaRange','languages_array'));\n\t}", "public function create()\n {\n $specheads = SpecificationHeader::all();\n $attributes = Attribute::all();\n // $selectedSpec = User::first()->role_id;\n return view('admin.product.create',compact('specheads', 'attributes'));\n }", "public function definition()\n {\n $code = 'PRD' . $this->faker->unique()->numberBetween($min = 001, $max = 999);\n return [\n 'code_product' => $code,\n 'name' => $this->faker->words(5, true),\n 'price' => $this->faker->numberBetween($min = 1000, $max = 200000),\n 'qty' => $this->faker->numberBetween($min = 0, $max = 200),\n 'categorie_id' => $this->faker->numberBetween($min = 1, $max = 4),\n ];\n }", "public function create($data)\n\t{\n\t\t$this->db->db_debug = false;\n\t\t$this->db->insert('specifications', $data);\n\t\t$this->db->db_debug = true;\n\t\t$error = $this->db->error();\n\t\tif ( $error['code'] == 0 ){\n\t\t\treturn ['error'=>false,'msg'=>'','id'=>$this->db->insert_id()];\n\t\t}\n\t\telse{\n\t\t\treturn ['error'=>true,'msg'=>$error['message']];\n\t\t}\n\t}", "public function createPurchaseOrder(Request $request)\n {\n $data = $request->input();\n\n $suppliers = array();\n\n foreach ($data as $key => $value) {\n $bestSupplier = ProductSuppliers::getBestSupplierForProduct($key);\n\n if(array_key_exists($bestSupplier['entity'], $suppliers))\n array_push($suppliers[$bestSupplier['entity']], $bestSupplier);\n else\n $suppliers[$bestSupplier['entity']] = [$bestSupplier];\n }\n\n foreach($suppliers as $supplier) {\n $documentLines = [];\n\n for($i = 0; $i < count($supplier); $i++) {\n $product = [\n 'description' => $supplier[$i]['description'],\n 'quantity' => $data[$supplier[$i]['product']],\n 'unitPrice' => number_format(floatval($supplier[$i]['price']), 2),\n 'deliveryDate' => date(\"Y-m-d\", mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"))),\n 'unit' => 'UN',\n 'itemTaxSchema' => 'ISENTO',\n 'purchasesItem' => $supplier[$i]['product'],\n 'documentLineStatus' => 'OPEN'\n ];\n\n array_push($documentLines, $product);\n }\n\n try {\n $result = JasminConnect::callJasmin('/purchases/orders', '', 'GET');\n } catch (Exception $e) {\n return $e->getMessage();\n }\n\n $seriesNumber = count(json_decode($result->getBody(), true)) + 1;\n\n try {\n $body = [\n 'documentType' => 'ECF',\n 'company' => 'TP-INDUSTRIES',\n 'serie' => '2019',\n 'seriesNumber' => $seriesNumber,\n 'documentDate' => date(\"Y-m-d\", mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"))),\n 'postingDate' => date(\"Y-m-d\", mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"))),\n 'SellerSupplierParty' => $supplier[0]['entity'],\n 'SellerSupplierPartyName' => $supplier[0]['name'],\n 'accountingParty' => $supplier[0]['entity'],\n 'exchangeRate' => 1,\n 'discount' => 0,\n 'loadingCountry' => $supplier[0]['country'],\n 'unloadingCountry' => 'PT',\n 'currency' => 'EUR',\n 'paymentMethod' => 'NUM',\n 'paymentTerm' => '01',\n 'documentLines' => $documentLines\n ];\n\n JasminConnect::callJasmin('/purchases/orders', '', 'POST', $body);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }\n\n return $data;\n }", "function _civicrm_api3_configexport_create_spec(array &$spec) {\n $spec['entity_type']['api.required'] = 1;\n $spec['entity_id']['api.required'] = 1;\n}", "public function create()\n\t{\n /*if(!in_array('viewProduct', $this->permission)) {\n redirect('dashboard', 'refresh');\n }*/\n\n $this->data['vendor'] = $this->model_products->getVendorData();\n $this->data['products'] = $this->model_products->getProductData();\n\n\t\t$this->render_template('invoice/create', $this->data);\t\n\t}", "private function getSpecification( $products )\n\t{\n\t\t$p_key = array();\n\t\t$i=0;\n\t\t//Seperate the HTML specification in a format that can be used to compare the same feature. \n\t\tforeach( $products as $product )\n\t\t{\n\t\t\t$html = $product->_source->description;\n\n\t\t\t$export = array();\n\n\t\t\t$dom = new \\DOMDocument();\n\t\t\tlibxml_use_internal_errors(true);\n\n\t\t\tif( !empty( $html ) )\n\t\t\t\t$dom->loadHTML($html);\n\t\t\t\n\t\t\tlibxml_clear_errors();\n\n\t\t\t$xpath = new \\DOMXPath($dom);\n\n\t\t\t$key = \"\";\n\n\t\t\tforeach( $xpath->evaluate('//tr') as $sel )\n\t\t\t{\n\n\t\t\t\t$index = 0;\n\n\t\t\t foreach( $sel->childNodes as $node )\n\t\t\t {\n\t\t\t if( strtolower( $node->tagName ) == 'th' )\n\t\t\t {\n\t\t\t \t\t$key = strip_tags( $node->ownerDocument->saveHTML($node) );\n\t\t\t \t\t// dd( $node );\n\t\t\t }\n\n\t\t\t if( strtolower( $node->tagName ) == 'td' )\n\t\t\t {\n\n\t\t\t $innerHTML = \"\";\n\n\t\t\t foreach ( $node->childNodes as $child )\n\t\t\t {\n\t\t\t if( $index == 0 )\n\t\t\t {\n\t\t\t \t$td_key = $node->ownerDocument->saveHTML( $child );\n\t\t\t \t$p_key[$key][$td_key] = \"\";\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t$innerHTML = $node->ownerDocument->saveHTML( $child );\n\t\t\t }\n\n\t\t\t $index++;\n\t\t\t }\n\n\t\t\t $export[$key][$td_key] = $innerHTML;\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\n\t\t\t$return['products'][$i]['features'] = $export;\n\t\t\t$return['products'][$i]['details'] = $product->_source;\n\t\t\t$i++;\n\t\t}\n\n\t\t$return['keys'] = $p_key;\n\n\t\treturn $return;\n\t}", "public function definition()\n {\n return [\n 'product_code' => Str::random(6),\n 'product_name' => $this->faker->name,\n 'producer' => $this->faker->company,\n 'product_type' => Str::random(6),\n 'size' => '30*30',\n 'material' => 'ceramic',\n 'color' => $this->faker->colorName,\n 'surface' => 'min',\n 'uses_for' => 'lat',\n 'quantity_in_one_box' => $this->faker->randomDigit,\n 'quantity' => $this->faker->numberBetween($min = 1, $max = 1000),\n // 'inventory' => $this->faker->numberBetween($min = 1, $max = 1000),\n 'import_price' => $this->faker->numberBetween($min = 50000, $max = 10000000),\n 'sale_price' => $this->faker->numberBetween($min = 50000, $max = 10000000),\n 'count_view' => $this->faker->numberBetween($min = 50, $max = 100),\n 'count_buy' => $this->faker->numberBetween($min = 10, $max = 250),\n 'number_error' => 1,\n 'status' => 'trading',\n ];\n }", "function createProduct($nome, $categoria, $descricao, $quantidade, $preco, $foto) {\n return [\n 'id' => hash('sha256', uniqid(\"\")), // gera um idenficador unico para o registro\n 'nome' => $nome,\n 'categoria' => $categoria, \n 'descricao' => $descricao,\n 'quantidade' => $quantidade,\n 'preco' => $preco, \n 'foto' => $foto\n ];\n}", "public function storeSpecification($storeData, $presetId)\n { \n if (!__isEmpty($storeData)) { \n $specificationPresetItem = [];\n foreach ($storeData as $key => $input) {\n \n $specification = new Specification;\n $specificationStoreData = [\n 'label',\n 'use_for_filter',\n 'status'\n ];\n\n if ($specification->assignInputsAndSave($input, $specificationStoreData)) {\n $specificationPresetItem[] = [\n 'specification_presets__id' => $presetId,\n 'specifications__id' => $specification->_id\n ];\n }\n }\n\n $newSpecificationPresetItem = new SpecificationPresetItem;\n if ($newSpecificationPresetItem->prepareAndInsert($specificationPresetItem, '_id')) {\n return true;\n }\n }\n \n return false; \n }", "public static function createWithLines($data = [])\n {\n $fields = [ 'created_via', 'status',\n 'product_id', 'planned_quantity', 'due_date', \n 'work_center_id', 'warehouse_id', 'production_sheet_id', 'notes'];\n\n $product = \\App\\Product::with('bomitems')->with('boms')->findOrFail( $data['product_id'] );\n $bomitem = $product->bomitem();\n $bom = $product->bom();\n\n // if (!$bom) return NULL;\n\n // Adjust Manufacturing batch size\n $nbt = ceil($data['planned_quantity'] / $product->manufacturing_batch_size);\n $order_quantity = $nbt * $product->manufacturing_batch_size;\n\n $order = \\App\\ProductionOrder::create([\n 'created_via' => $data['created_via'] ?? 'manual',\n 'status' => $data['status'] ?? 'released',\n\n 'product_id' => $product->id,\n 'product_reference' => $product->reference,\n 'product_name' => $product->name,\n\n 'planned_quantity' => $order_quantity,\n 'product_bom_id' => $bom->id ?? 0,\n\n 'due_date' => $data['due_date'],\n 'notes' => $data['notes'],\n\n 'work_center_id' => $data['work_center_id'] ?? $product->work_center_id,\n// 'warehouse_id' => '',\n 'production_sheet_id' => $data['production_sheet_id'],\n ]);\n\n\n // Order lines\n if ( !$bomitem ) return $order;\n\n // BOM quantities\n $line_qty = $order_quantity * $bomitem->quantity / $bom->quantity;\n\n foreach( $bom->BOMlines as $line ) {\n \n $line_product = \\App\\Product::with('measureunit')->findOrFail( $line->product_id );\n\n $order_line = \\App\\ProductionOrderLine::create([\n 'type' => 'product',\n 'product_id' => $line_product->id,\n 'reference' => $line_product->reference,\n 'name' => $line_product->name, \n\n// 'base_quantity', \n 'required_quantity' => $line_qty * $line->quantity * (1.0 + $line->scrap/100.0), \n // Assume 1 product == 1 measure unit O_O\n 'measure_unit_id' => $line_product->measure_unit_id,\n// 'warehouse_id'\n ]);\n\n $order->productionorderlines()->save($order_line);\n }\n\n return $order;\n }", "public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }", "public function run()\n {\n Product::create([\n 'ppid' => \"P2020100800281\",\n 'name' => '衣服一',\n 'unit' => '件',\n 'count' => '1',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '400',\n 'origin_price' => '350',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800282\",\n 'name' => '衣服二',\n 'unit' => '件',\n 'count' => '34',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '500',\n 'origin_price' => '300',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800283\",\n 'name' => '衣服三',\n 'unit' => '件',\n 'count' => '22',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '350',\n 'origin_price' => '300',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800284\",\n 'name' => '衣服四',\n 'unit' => '件',\n 'count' => '11',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '250',\n 'origin_price' => '200',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n }", "public function create(Product $product) {\n\n $sql = 'INSERT INTO products (name, description) VALUES (?,?)';\n\n $register = Connection::getConn() -> prepare($sql);\n $register -> bindValue(1, $product -> getName());//este valor é equivalente a primeira interrogação do VALUES da linha 9, assim por diante\n $register -> bindValue(2, $product -> getDescription());\n $register -> execute();\n\n }", "public function addSample($data_order,$data_order_prod)\n\t {\n\t $firmRow = $this->getFirmRow($data_order['invoice_firm'], 'sample_id');\n\t\t $data_order['order_number'] = $firmRow[0]['firm_code'].'/'.$firmRow[0]['current_year'].'/'.$firmRow[0]['sample_id'];\n\t\t $data_order['order_category'] = $firmRow[0]['firm_code'];\n\t\t $this->db->insert(\"client_orders\", $data_order); \n\t\t $orderId = $this->db->insert_id();\n\t\t // update the order id field in firm table\n\t\t $data_firm['sample_id'] = $firmRow[0]['sample_id'];\n\t\t $this->db->where(\"firm_id\", $data_order['invoice_firm']);\n\t\t $this->db->update(\"company_firms\", $data_firm); \n\t\t // insert the order products\n\t\t $totalRows = sizeof($data_order_prod['pid']);\n\t\t for($i=0; $i < $totalRows; $i++){\n\t\t \tif($data_order_prod['pid'][$i] != '' && $data_order_prod['order_qty'][$i] != ''){\n\t\t\t\t$order_prod = array();\n\t\t\t\t$order_prod['order_id'] = $orderId;\n\t\t\t\t$order_prod['order_pid'] = $data_order_prod['pid'][$i];\n\t\t\t\t$order_prod['prod_ref_name'] = $data_order_prod['prod_ref_name'][$i];\n\t\t\t\t$order_prod['order_rate'] = 0.00;\n\t\t\t\t$order_prod['order_qty'] = $data_order_prod['order_qty'][$i];\n\t\t\t\t$order_prod['order_packing'] = $data_order_prod['packing'][$i];\n\t\t\t\t$order_prod['notes'] = $data_order_prod['notes'][$i];\n\t\t\t\t$order_prod['updated_by'] = $data_order_prod['updated_by'];\n\t\t\t\t$order_prod['updated_date'] = $data_order_prod['updated_date'];\n\t\t\t\t\n\t\t\t\t$order_prod_id = $this->updateOrderProduct($order_prod);\n\t\t\t}\n\t\t }\n\t\t \n\t\t \n\t }", "private function createProducts()\n {\n $chicken = $this->newProduct(self::PRODUCT_CHICKEN_EAN, self::PRODUCT_CHICKEN_NAME);\n $turkey = $this->newProduct(self::PRODUCT_TURKEY_EAN, self::PRODUCT_TURKEY_NAME);\n \n try\n {\n $isChickenCreated = $this->productDao->create($chicken);\n $isTurkeyCreated = $this->productDao->create($turkey);\n\n echo self::PRODUCT_CHICKEN_NAME . ' created ' . \n (($isChickenCreated) ? '' : 'un') .\n 'successfuly!' . PHP_EOL;\n\n echo self::PRODUCT_TURKEY_NAME . ' created ' . \n (($isTurkeyCreated) ? '' : 'un') . \n 'successfuly!' . PHP_EOL; \n }\n catch (Exception $e)\n {\n echo $e->getMessage();\n }\n \n }", "private function _fillTmpTable()\n {\n $sql = new SqlStatement();\n $sql->select()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $sql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'p.product_id',\n 'p.price',\n 'discount' => 'MIN(pd2.price)',\n 'special' => 'MIN(ps.price)',\n 'total' => 'AVG(rating)',\n //@fixed_tax\n //@percent_tax\n ))\n ->from(array('p' => $sql))\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('p.product_id'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $tblAlias = strtolower(substr($type, 0, 1)) . $groupId;\n $sql2->innerJoin(array($tblAlias => self::FILTERS_TABLE), 'p.product_id = ' . $tblAlias . '.product_id');\n $sql2->where($tblAlias . '.type = ?', array($type));\n $sql2->where($tblAlias . '.group_id = ?', array($groupId));\n if ($type !== 'STOCK_STATUS') {\n foreach ($values as $k => $val) {\n $values[$k] = '\\'' . $this->db->escape($val) . '\\'';\n }\n $sql2->where($tblAlias . '.value IN (' . implode(', ', $values) . ')');\n } else {\n $terms = array();\n foreach ($values as $stockSt) {\n if ($stockSt == self::$IN_STOCK_STATUS) {\n $terms[] = '(p.quantity > 0 OR p.stock_status_id = ' . self::$IN_STOCK_STATUS . ')';\n } else {\n $terms[] = '(' . $tblAlias . '.value = \\'' . $this->db->escape($stockSt) . '\\' AND p.quantity = 0)';\n }\n }\n\n $sql2->where('(' . implode(' OR ', $terms) . ')');\n }\n }\n }\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $on = count($vals) \n ? \"p.product_id = pov.product_id AND pov.option_value_id IN (\" . implode(',', $vals) . \")\" \n : \"p.product_id = pov.product_id\";\n \n $sql2->leftJoin(array('pov' => 'product_option_value'), $on)\n ->where('( (pov.quantity IS NULL AND p.quantity > 0) OR pov.quantity > 0 )');\n }\n \n $sql2->leftJoin(array('pd2' => 'product_discount'), \"pd2.product_id = p.product_id \n AND pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('ps' => 'product_special'), \"ps.product_id = p.product_id \n AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('r1' => 'review'), 'r1.product_id = p.product_id AND r1.status = 1');\n\n if ($this->config->get('config_tax')) {\n $sql2->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $sql2->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n\n $this->db->query('CREATE TEMPORARY TABLE ' . DB_PREFIX . self::RESULTS_TABLE . ' (PRIMARY KEY (`product_id`)) ' . $sql2);\n }", "public function createUpdate($product, array $data = [])\n {\n $ret_val = ['errors' => []];\n\n // Validate\n $is_valid = true;\n if (!empty($product->getValidationRules()))\n {\n $validator = Validator::make($data, $product->getValidationRules(), $product->getValidationMessages());\n if ($validator->fails())\n {\n $is_valid = false;\n $error_keys = array_keys($validator->errors()->toArray());\n foreach ($error_keys as $error_key)\n {\n $ret_val['errors'][] = [$error_key => $validator->errors()->get($error_key)];\n }\n }\n }\n\n if ($is_valid)\n {\n $product_data = [\n 'name' => $data['name'],\n 'description' => $data['description'],\n 'tags' => $data['tags'],\n 'model_number' => $data['model_number'],\n 'is_inactive' => $data['is_inactive'],\n 'affiliate_allowed' => $data['affiliate_allowed'],\n 'slug' => $data['slug'],\n 'vendor_id' => $data['vendor_id'],\n 'specs' => $data['specs']\n ];\n\n // Set basic attributes\n if ($product->exists)\n {\n $product->update($product_data);\n }\n else\n {\n $product = Product::create($product_data);\n }\n\n $stock_status_override = null;\n if(!empty($data['stock_status_override']) && in_array($data['stock_status_override'], ['in_stock', 'out_of_stock']))\n {\n $stock_status_override = $data['stock_status_override'];\n }\n\n // Set item attributes\n $default_item_data = [\n 'sku' => $data['sku'],\n 'list_price' => $data['list_price'],\n 'store_price' => $data['store_price'],\n 'is_inactive' => $data['is_inactive'],\n 'product_id' => $product->id,\n 'weight' => $data['weight'],\n 'ships_alone' => $data['ships_alone'],\n 'upc' => $data['upc'],\n 'stock_status_override' => $stock_status_override,\n 'isbn' => $data['isbn'],\n 'ean' => $data['ean'],\n 'cost' => $data['cost'],\n 'is_default' => true\n ];\n\n\n if(empty($product->default_item))\n {\n $product->default_item()->associate(Item::create($default_item_data));\n }\n else\n {\n $product->default_item->update($default_item_data);\n }\n\n // Update stock location data for single sku product\n if ($product->non_default_items->isEmpty())\n {\n if(!empty($data['default_item_stock_data']) && is_array($data['default_item_stock_data']))\n {\n foreach($data['default_item_stock_data'] as $stock_location_data)\n {\n $rel_stock_location = RelStockLocationItem::where('stock_location_id', $stock_location_data['id'])\n ->where('item_id', $product->default_item_id)->first();\n\n if(empty($rel_stock_location))\n {\n RelStockLocationItem::create([\n 'stock_location_id' => $stock_location_data['id'],\n 'item_id' => $product->default_item_id,\n 'quantity_available' => $stock_location_data['qty'],\n 'is_inactive' => ($stock_location_data['active'] != 'true')\n ]);\n }\n else\n {\n $rel_stock_location->update([\n 'stock_location_id' => $stock_location_data['id'],\n 'item_id' => $product->default_item_id,\n 'quantity_available' => $stock_location_data['qty'],\n 'is_inactive' => ($stock_location_data['active'] != 'true')\n ]);\n }\n }\n }\n }\n\n // Create new category associations\n $category_ids = empty($data['categories']) ? [] : array_map(function ($cat)\n {\n return $cat['id'];\n }, $data['categories']);\n\n if (!empty($category_ids))\n {\n $product->rel_product_product_categories()->getQuery()->delete();\n foreach ($category_ids as $category_id)\n {\n RelProductProductCategory::create(['product_id' => $product->id, 'product_category_id' => $category_id]);\n }\n }\n\n $product->save();\n\n $ret_val = ['errors' => false, 'id' => $product->id];\n }\n\n return $ret_val;\n }", "public function run()\n {\n\n \n Product::create([\n 'cod_fs' => '001',\n 'item' => '10764',\n 'name' => 'DESSERT APPLE CROSTATA',\n 'pronunciation_in_english' => 'DESSERT APPLE CROSTATA',\n 'description' => 'DESSERT APPLE CROSTATA',\n 'packsize' => '1/24 CT',\n 'picture_url' => 'https:',\n 'category_id' => '1',\n 'unit_id' => '1',\n 'active' => '1',\n ]); \n\n Product::create([\n 'cod_fs' => '001',\n 'item' => '10803',\n 'name' => 'BASE MUSHROOM VEGAN',\n 'pronunciation_in_english' => 'BASE MUSHROOM VEGAN',\n 'description' => 'BASE MUSHROOM VEGAN',\n 'packsize' => '4/5 LB',\n 'picture_url' => 'https:',\n 'category_id' => '2',\n 'unit_id' => '4',\n 'active' => '1',\n ]); \n\n Product::create([\n 'cod_fs' => '001',\n 'item' => '11270',\n 'name' => 'OIL NUTRA CLEAR NT',\n 'pronunciation_in_english' => 'OIL NUTRA CLEAR NT',\n 'description' => 'OIL NUTRA CLEAR NT',\n 'packsize' => '1/35 LB',\n 'picture_url' => 'https:',\n 'category_id' => '3',\n 'unit_id' => '4',\n 'active' => '1',\n ]); \n }", "function add_new_product($product_info) {\r\n try {\r\n $params = array(\r\n array('name' => ':product_name', 'value' => $product_info['product_name']),\r\n array('name' => ':product_number', 'value' => &$product_info['product_number']),\r\n array('name' => ':product_type', 'value' => &$product_info['product_type']),\r\n array('name' => ':notes', 'value' => &$product_info['notes']),\r\n array('name' => ':category_id', 'value' => &$product_info['category_id']),\r\n array('name' => ':width', 'value' => &$product_info['width']),\r\n array('name' => ':height', 'value' => &$product_info['height']),\r\n array('name' => ':h_length', 'value' => &$product_info['h_length']),\r\n array('name' => ':re_demand_border', 'value' => &$product_info['re_demand_border']),\r\n array('name' => ':primary_unit_name', 'value' => &$product_info['primary_unit_name']),\r\n array('name' => ':secondary_unit_name', 'value' => &$product_info['secondary_unit_name']),\r\n array('name' => ':primary_unit_quantity', 'value' => &$product_info['primary_unit_quantity']),\r\n array('name' => ':secondary_unit_quantity', 'value' => &$product_info['secondary_unit_quantity']),\r\n array('name' => ':quantity_status', 'value' => &$product_info['quantity_status']),\r\n array('name' => ':res', 'value' => &$result)\r\n );\r\n\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"begin :res := product_actions.add_new_product(:product_name,:product_number,:product_type,:notes,:category_id,:width,:height,:h_length,:re_demand_border,:primary_unit_name,:secondary_unit_name,:primary_unit_quantity,:secondary_unit_quantity,:quantity_status); end;\");\r\n foreach ($params as $variable) {\r\n oci_bind_by_name($stmt, $variable[\"name\"], $variable[\"value\"]);\r\n }\r\n oci_execute($stmt);\r\n return $result;\r\n } catch (Exception $ex) {\r\n return $ex;\r\n }\r\n }", "public function run()\n {\n ProductsAndAttributes::create([\n 'prod_id' => '1',\n 'attr_id' => '1',\n 'attr_value' => 'red'\n ]);\n\n ProductsAndAttributes::create([\n 'prod_id' => '1',\n 'attr_id' => '2',\n 'attr_value' => 'Small'\n ]);\n\n ProductsAndAttributes::create([\n 'prod_id' => '2',\n 'attr_id' => '1',\n 'attr_value' => 'black'\n ]);\n\n ProductsAndAttributes::create([\n 'prod_id' => '2',\n 'attr_id' => '2',\n 'attr_value' => 'Large'\n ]);\n\n ProductsAndAttributes::create([\n 'prod_id' => '3',\n 'attr_id' => '1',\n 'attr_value' => 'white'\n ]);\n\n ProductsAndAttributes::create([\n 'prod_id' => '3',\n 'attr_id' => '2',\n 'attr_value' => 'XLarge'\n ]);\n }", "public function run()\n {\n FormDefination::create([\n \"name\"=>\"PRODUCT\",\n \"form_json\"=>'{\"PRODUCT NAME\":\"text\",\"PRODUCT CODE\":\"text\",\"PRODUCT COLOR\":\"text\",\"PRODUCT DESCRIPTION\":\"textarea\",\"PRODUCT PRICE\":\"number\",\"PRODUCT IMAGES\":\"file\",\"col\":\"2\",\"col_1\":\"2\",\"row\":\"3\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n FormDefination::create([\n \"name\"=>\"CATEGORY\",\n \"form_json\"=>'{\"CATEGORY NAME\":\"text\",\"CATELOGUE NAME\":\"text\",\"CATTEGORY DESCRIPTION\":\"textarea\",\"col\":\"1\",\"col_1\":\"2\",\"row\":\"3\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n FormDefination::create([\n \"name\"=>\"CATELOGUE\",\n \"form_json\"=>'{\"CATELOGUE NAME\":\"text\",\"CATELOGUE DESCRIPTION\":\"textarea\",\"col\":\"2\",\"col_1\":\"2\",\"row\":\"1\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n }", "public function run()\n {\n factory(App\\Product::class, 10)->create();\n\n // Queria algo assim pra alimentar as 3 tabelas de uma vez, mas não consegui\n\n // factory(App\\Product::class, 5)->create()->each(function (Product $product) {\n // factory(App\\Type::class, 3)->create()->each(function (Product $product, Type $type) {\n // factory(App\\ProductType::class, 10)->create([\n // 'product_id' => $product->id,\n // 'type_id' => $type->id,\n // ]);\n // });\n // });\n }", "public function run()\n {\n Product::create([\n 'name' => 'METRONIDAZOL x 500MG./100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLASIL (Metoclopramida) INYECTABLE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAZOLE (OMEPRAZOL) x 40MG. INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAZOLE AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INDIGEST x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRYTEROL (Ondansetron) 8 MG/4ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERENIA 10 MG/ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENGYSTOL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AUTONOSODE',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC PUPPY DP',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VANGUARD 5CVL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DURAMUNE MAX 5CVK4L',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC RABIA',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFENSOR',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC KC',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VACUNA PAPILOMA CANINO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC TRICAT',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELOCELL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEUKOCELL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIGEN PUPPY MHA2',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABISIN',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GIARDIA VAX',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC LEPTO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABVAC-3',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC DH2-PPIL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VACUNA ANTITETANICA',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELIGEN (triple felina)',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AUTOVACUNA PAPILOMA CANINO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RECOMBITEK C6',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRONCHICINE',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABIGEN',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIGEN QUINTUPLE MHA2PP1/L',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VANGUARD PLUS 5',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION MATERIAL EXTRANO ABDOMINAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION DE CALCULO RENAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHUNT PORTOSISTEMICO',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 500000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHUNT PORTOSISTEMICO',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA REPARACION DE DANOS NIVEL I',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA ABDOMINAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLOPEXIA',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'O.V.H. DURANTE LAPAROTOMIA EXPL.',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 0 -10 KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 240000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 11-20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 0-10KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 11-20KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 21-40KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO >41KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION GATO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VASECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 11 - 20 KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA BULLDOG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 355000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CISTOTOMIA EN CUALQUIER ESPECIE',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 0-10 K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 125000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION TESTICULO E IMPLANTE DE PROTESIS',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 0 - 10 KG,',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 21 - 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 345000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL +41K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 400000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 2 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 5 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 175000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA +41K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 0 - 10 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 11 - 20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 320000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 365000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 462000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA FELINOS',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 242000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 0 - 10 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 11 - 20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 374000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 418000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. > 41',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 517000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 297000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT TESTI RETENIDO CAV ABDO.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EPISIOTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABLASION DE ESCROTO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETEROCELE CORRECCION',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLAPSO URETRAL',\n 'category_id' => Category::where('name', 'CIRUGIA DE APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TECNICA DE ZEEP',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EVERSION DEL TERCER PARPADO BILATERAL CORRECION',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PTISIS BULBI',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAXILECTOMIA PARCIAL ROSTRAL.',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA ARTROTOMIA EXPLORATORIA',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA PROFUNDIZACION DE SURCO TROCLEAR',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA REEMPLAZO DE LIGAMENTO CRUZADO',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA ANTIRROTACIONAL',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA IMBRICACION DE CAPSULA',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERNIA DIAFRAGMATICA',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 440000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA y/o CX DE TORAX 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 375000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 400000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA +41K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 425000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MEGAESOFAGO',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LOBULECTOMIA PERSISTENTE',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DUCTO ARTERIOSO PERSISTENTE',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSISTENTE DEL 4 ANILLO AORTICO',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERICARDIECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA DEL APARATO DIGESTIVO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLOCACION SONDA ESOFAGOGASTRICA',\n 'category_id' => Category::where('name', 'CIRUGIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRAQUEOSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 5CM.',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 10CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 15CM.',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TUMOR OIDOS MEDIA E INTE',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 2 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 5 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 20 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VACIAMIENTO E IMPLANTE OCULAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OTOHEMATOMA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA OTITIS CRONICA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP CONJUNTIVA Y TARSORRAFIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA PARPADO 0,5 MM',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA PARPADO > 0,5 MM',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP TERCER PARP Y TARSORRAFIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA DE CORNEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESCIS PARCIAL MEMB. NICTITANTE',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESCIS GLAND HARDER TERCER PARP',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULA DE HARDER BIL.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION SHAR PEI UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION SHARPEI BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION UNIL +30K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL +30K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAVEDI')->first()->id);\n Product::create([\n 'name' => 'ENTROPION OTRAS RAZAS UNILAT',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECTROPION UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECTROPION BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTRO-ECTROPION UNILA.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTRO-ECTROPION BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REIN. Y FIJACION GLOBO OCULAR Y TARS.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA CONJUNTIVOBUCOSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROTESIS INTRAOCULAR ',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL PARPADO INF.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL PARPADO SUP.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL AMBOS PARPADOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULA DE HARDER UNI',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP DE TERCER PARPADO',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIBERACION COLGAJO OCULAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABLASION CONDUCTO AUDITIVO INTERNO',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOTOMIA BULLA TIMPANICA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TARSORRAFIA UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION FELINOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LUXACION TORACOLUMBAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 600000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDEC HASTA 60 DIAS ANEST INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA REEMPLAZO DE LIGAMENTO REDONDO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA EXCISION CABEZA FEMORAL HASTA 15 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. DEDOS SUPERN. MENOR 30 DIAS C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT DEDOS SUPERN +30 DIAS ART C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT DEDOS SUPERN +30 NO ART C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. HASTA 15 DIAS ANES INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. ROTW. HASTA 15 DIAS ANES INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDE. HASTA 30 DIAS ANES INC.',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. ROTW HASTA 30 DIAS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD.ROTW +60 DIAS ANEST INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDECTOMIA +60 DIAS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD +60 DIAS RAZAS GRANDES',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS SIMPLE',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON PLACA Y TORNILLOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON TORNILLO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC ARTRO. CAB FEM 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC ARTRO CAB FEM 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC. ARTRO. CAB FEM +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 360000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES +40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP. MIEMBRO ANT O POST 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT O POST 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT. O POST 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT O POST +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 440000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REMPLAZO LIG CON ALAMBRE',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REDUCCION Y FIJACION CERRADA CUBITO Y RADIO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA MUESTRA DE MED OSEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXCISION APOFISIS ANCONEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA DE HOMBRO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REPARACION LUXACION DE CODO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION MATERIAL QUIRURGICO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RINOTOMIA EXPLORATORIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 0-10KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 11-20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 270000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION GANGLIO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BIOPSIA DE GANGLIO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 2 CM.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO PERITONEAL 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA PROF.HASTA 20 CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA SUPER. HASTA 10CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA SUP. HASTA 20CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE QUISTE SEBACEO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 21-40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 290000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA PERROS MAYORES DE 40KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 320000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES +41K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPLECNOTOMIA 0-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPLECNOTOMIA +20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASTROTOMIA -ENTEROTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTEROANASTOMOSIS',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETROSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEFRECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLAPSO RECTAL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASTROPEXIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA UMB Y ABD HASTA 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA INGUINAL HASTA 3 CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA INGUINAL + 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA PERIANAL UNI HASTA 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA PERIANAL UNI +3 CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES +41K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS +30K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS PINCHER',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS PIT BULL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS SCHNAUZER',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT.GLANDULA MANDIBULAR',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'CALIER')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA PIEL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND. 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND. 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT.GLAND. SALIVAR MAND 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA QUIRURGICA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA PROF. HASTA 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FISTULA ORONASAL REPARACION',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PALADAR ELONGADO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENTANAS NASALES ESTENOTICAS',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE MEDULA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LOBULECTOMIA HEPATICA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGROMA DE CODO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIORRAFIA ABDOMINAL CON MALLA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLECISTECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BIOPSIA DE GLANDULA TIROIDES',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA URETER ECTOPICO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA REPARACION DANOS NIVEL II',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETROSTOMIA GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLGAJO CUTANEO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY SB x 15.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 161000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY S.B x 4.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 43500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE S.B.x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 149800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 15524\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D 1 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT SENSITIVE STOMACH x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D X 8 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 116700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D CHICKEN x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 94600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE I/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 13905\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D x 17.6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 209800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN DEVELOPMENT x 3.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE U/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 20 Lb. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 188000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ANUBIS CACHORRO POLLO Y PESCADO',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5490\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'ARENA SILICA GATOS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'LATA R/D',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE S/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 90500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 107400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE U/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 55500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE - FELINE A/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 13524\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CARE WEIGTH MANGEMENT ADULT CATS X 6LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D ULTRA ALLERGEN x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 283000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SENIOR 3 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 30100\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 161000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN LATA x 5.5 oz',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY CHICKEN LATA HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 12762\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 4.5 HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE K/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 162000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE CHICKEN LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 40 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 318500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE L/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 66500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN TURKEY & GIBLETS ENTREE 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5850\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 3.5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 48750\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE R/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE S/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 84500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE W/D X 4 LB (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 62762\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'N/D LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 15200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D X 1.5KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 66381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'C. GROWTH TREATS 1 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 26300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'C.HIPOALERG. TREAT',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 76000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT SB X 5LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52857\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX LIGHT FRANGO ARROZ x 15 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 125500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN X 4 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 30 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 278000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT X 5 LBS O.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ADULT SENSITIVE SKIN DRY x 4.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ x 5LBS (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT S.B. X 5 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 61905\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 8.5 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 109429\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/Dx 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 107400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE C/D MULTICARE x 4 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT TREATS X 1 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 24700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY SB x 4.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LATA ADULT TOURKEY',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LATA ADULT CHICKEN',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 1.5 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53143\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE C/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 74500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16095\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT X 20LBS SB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 146000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/D x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 59183\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 17.6 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE TOURKEY LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 6,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT O.B. x 5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT x 4.5 LB O.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN DEVELOPMENT X 7 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN LATA x 3 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN ENTREE X 5 ONZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN SALMON LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN TURKEY & GIBLETS LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 49500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 171000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT FISH & RICE x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT CHICKEN x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT SEA FOOD x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MAINT LIVER & HICKEN 5 OZ LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT TURKEY & GIBLETS LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT TURKEY GOURMET LATA x 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HAIRBALL CONTROL x 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HAIRBALL CONTROL x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 169500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HBC ADULT CHICKEN LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HBC ADULT SEAFOOD LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 8500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE SKIN ADULT FELINO X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 7 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADILT HBC LIGHT X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADILT LIGHT LATA X 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 95500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 188000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HIPOALLERGENIC TREAT x 71 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR SEAFOOD LATA x 3.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 48500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR CHICKEN LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR SEAFOOD LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE HBC x 3.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE HBC x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 171000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE SENIOR 7+ TURKEY LATA 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE SENIOR 7+ SAVORU CHIKEN X 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINEY/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT Y/D DRY x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 168500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELPMENT X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 147000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT X 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 282500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT X 40 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 323500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY L&R LARGE BREED x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB L&R x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB x 30 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 281000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 164000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 299000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 148500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 256000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY OB x 15.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY LB X 15.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY LB X 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 223500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT LATA X 13 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 144000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT BREED X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 144000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT X 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 262000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 5+LB X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 158000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE S.B. x 5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 141000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ X 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 271500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE AF PRO X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE D/D x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 196500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 17.6 LB (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 254000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D X 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 196400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => ' CANINE J/D X 27.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 323900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D X 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 184200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE N/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 27.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 260400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE T/D X 5 LB S.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 67000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 17.6 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 217429\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 1.5 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 61238\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D LOW ALLERGEN x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 115000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO X 17.5 LB S.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT O.B. x 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 226500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO PK X 40 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 261500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT L. BREED L&R x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 124000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT L&R l. BREED x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 232000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S.B. LAMB & RICE x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 45700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 152000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 33 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LARGE BREED x 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 114000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LARGE BREED x 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 226500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT ORAL CARE X 4 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S SKIN & STOMACH 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 169200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE SOMACH CANINO X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 137500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT & TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE & TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT CHICKEN LATA HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT TOURKEY LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUIL GATO ADULT SALMON x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 36500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUIL MAT ACTIVE R. PEQ x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 20300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET R PEQ SR x 1 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET R PEQ SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT BUFFET x 1 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT BUFFET x 3 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT FILHOTE x 1 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX FILHOTES SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 21500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX LIGHT FRANGO ARROZ x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX MATURE x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS BIFINHO FRANGO x 65 g (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS CALABREZA x 80 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK HALITO E TARTARO x 75 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => ' FEITICO ANTIODOR X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FEITICO CNTROL BOLAS DE PELO X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MEOW LUV BREATH AND TARTAR X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 14381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 120571\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 17.6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 27.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 442381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE I/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9143\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE K/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN x 3.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC FELINE x 4LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 67500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MOBILITY SUPPORT 2 KL (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 54495\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE S/D x 4 LIBRAS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 82500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BRREED X 40 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE D/D X 8 LBAS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 103500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT ORIGINAL X 10 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 112587\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE LATA 5 ONZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE C/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAM & RICE X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 56045\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT 5 LBS L&R S.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 56045\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D X 1 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 24113\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT X 40 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 284441\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY x 4.5 LB S.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'D/D X 17.6 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 199998\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGTH X 20 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 156238\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY L&R x 17.5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126174\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIO MAT ACTIVE x 15 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 5,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE SALMON x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMON PERROS PATE x 300G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SIMBA GATOS AMARILLO x 85 G.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMON PERROS PATE X 150G',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOPROTEICO ATUN x 300G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE POLLO Y VERDURAS x 100 G.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA GATOS 5.5 OZ (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA PERROS X 13.20Z {USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA GATOS X 3 OZ (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOMBONERA X 200 (USO VETERINARIO',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOMBONERA ACHIRAS X 1200GR (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE GROWTH & CONV X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 61905\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE GASTRO-INTESTINAL X 400G',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22857\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE GASTROINTESTINAL X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE RENAL X 2 K',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 79048\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE URINARY OSSALATI X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE URINARY STRUVITE X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S STOMACH 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 155620\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE GASTRO-INTESTINAL X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 79048\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE RENAL X 400 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22858\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE OBESITY & DIABETIC X 10 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 216191\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE SENSITIVE STOMACH X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE WEIGHT MANEGEMENT X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 70850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE RENAL DOG X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 70850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIAMOND NATURALS LATA PERRO TODOS LOS SABORES',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIAMOND NATURALS LATA GATO TODOS LOS SABORES ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONSULTA ESPECIALISTA EXTERNO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DIURNA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA NOCTURNA A PARTIR DE 09:00 PM',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMINICAL Y FESTIVO DIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMICILIARIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DR. AICARDO ARISTIZABAL',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DRA. MARTA NARANO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DE EMERGENCIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DE CONTROL',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CERTI. NAC. E INTER',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMINICAL Y FESTIVO NOCTURNA A PARTIR DE 6:00 PM',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERVICIO SIN COSTO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE SALA PROCEDIMIENTO MAYOR',\n 'category_id' => Category::where('name', 'DERECHOS DE SALA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE SALA PROCEDIMIENTO MENOR',\n 'category_id' => Category::where('name', 'DERECHOS DE SALA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIA CHIPAYA URB.PRADERAS VERDE HORIZONTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERV. AMBU. ZONA NOR Y ORI.',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERV. AMBU. ZONA SUR Y OES.',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BOCHALEMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AGUACATAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 12 DE OCTUBRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 3 DE JULIO ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 7 DE AGOSTO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AGUABLANCA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALIRIO MORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALAMEDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD CAPRI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALCAZERES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALFEREZ REAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALFONSO BONILLA ARAGON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALFONSO LOPEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALHAMBRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALIANZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE GUALAJARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE NORMANDIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE SANTA ISABEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALTOS DEL CANEY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ANTONIO NARINO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ARANJUEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ARBOLEDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ARROYOHONDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AVENIDA DE LOS CERROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELEN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BAJOS DE DAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BALCONES DE LA ROOSVELT',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELALCAZAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELISARIO CAICEDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELLA SUIZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELLAVISTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BENJAMIN HERRERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BOYACA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRETANA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DEL LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENO MADRID',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DE LOS ALAMOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DE MAYO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BRISAS DEL ROSARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENOS AIRES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BUITRERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALDAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALI BELLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALICANTO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALIMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALIPSO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALOTO-CAUCA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CAMBULOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANAVERALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CANAVERALEJO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CANAVERALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANEY 1',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANEY ESPECIAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CASCADA 1',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CARTAGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CATALLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CENTENARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CENTRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GARCES LLOREDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CAMPINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CERROS DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHAMPANAT',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHAPINERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHIMINANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD 2000',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD CORDOBA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD JARDIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD MODELO ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA COMFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA FARALLONES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CIUDADELA GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA PASOANCHO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO COLINA DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLINAS DE MONTERREY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLSEGUROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO COMPARTIR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CONDOMINIO CAMPESTRE LAS MERCEDES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CASCADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CRISTALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CUARTO DE LEGUA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DAGUA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DECEPAZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO DEPARATAMENTAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DIAMANTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL BOSQUE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL CEDRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL DORADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL GUABAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL INGENIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL JARDIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL JORDAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL LIDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL MAMEYAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL OBRERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL PENON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL POBLADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL PRADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL REFUGIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RETIRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RODEO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL TREBOL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL TRONCAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL VALLADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FARALLONES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FLORALIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO FLORIDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FONAVIEMCALI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FORTALEZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GAITAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRAN LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRATAMIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GUADUALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GUAYAQUIL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO HACIENDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INDUSTRIAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INGENIO II',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INGENIO III',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO A JAMUNDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA ESPERANZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO JOSE MARIA CABAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO JUANAMBU',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO JUNIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA ALBORADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA BASE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CAROLINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA CUMBRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FLORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FLORESTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FORTALEZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA HACIENDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA INDEPENDENCIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA PLAYA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA MERCED',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA NAVE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA NUEVA BASE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA PAVONA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA PRADERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA RIVERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA SELVA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA UNION',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS ACACIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS AMERICAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LAS CEIBAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIOS LAS DELICIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS GRANJAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIOS LAS LAJAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS ORQUIDEAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LAS QUINTAS DE DON SIMON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS VEGAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAUREANO GOMEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LIBERTADORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LLERAS CAMARGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALAMOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALMENDROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LOS AMANES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ANDES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS CHORROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LOS FUNDADORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS MANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS NARANJOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS PINOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MADRONAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MAMELLAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MANUELA BELTRAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MANZANARES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MARTINAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MAYAPAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MELENDEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO METROPOLITANO DEL NORTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MIRAFLORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MORASURCO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MORICHAL DE COMFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MULTICENTRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NAPOLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NORMANDIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA LIBERTAD',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NUEVA FLORESTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA SALOMIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS SAUCES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA TEQUENDAMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OASIS DE PASOANCHO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OBRERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OLIMPICO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PACARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PALERMO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PALMIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PAMPALINDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PANAMERICANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PARQUES DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PASEO DE LOS ALMENDROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PENON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PEPUBLICA DE ISRAEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PETECUY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PETECUY ETAPA III',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PLAZA DEL SAMAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO CAMPESTRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO I',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO II',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL PONDAJE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POPULAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORTAL DE LAS CASAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORTALES DE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORVENIR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DE ORIENTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL NORTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRIMERO DE MAYO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRIMITIVO CRESPO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PUENTE PALMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO QUINTAS DE DON SIMON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO QUINTAS DE PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RECUERDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO REMANZOS DE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RICARDO BALCAZAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON DE LAS CAMELIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON DE LAS QUINTAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON FLORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RIVERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ROBLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAAVEDRA GALINDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALADITO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALECIANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALOMIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAMANES DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN ANTONIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN BENITO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN BOSCO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN CARLOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN CAYETANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN FERNANDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN JUAQUIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN JUDAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN LUIS I ETAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN NICOLAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN ROQUE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN VICENTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ANITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA BARBARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA CLARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ELENA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA FE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ISABEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA MONICA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA MONICA POPULAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA RITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA TERESITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTANDER',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTO DOMINGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SEMINARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SILOE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SIMON BOLIVAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SOLARES DE PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SOTAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SUCRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEJARES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEMPLETE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEQUENDAMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TERRON COLARADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRES DE LA PLAZUELETA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRES DE MARACAIBO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRESDE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URB NUEVA GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URBANIZACION DE LOS CHORROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URBANIZACION EL DANUBIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URIBE URIBE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE DEL LILI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE FERREIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE GRANDE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VERSALLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIA DAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA CAROLINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA COLOMBIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL PRADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL SOL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLAS DE VERACRUZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIPASA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO YUMBO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'METILPREDNISOLONA X ML',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CATALLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CASCAJAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENOS AAIRES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO KM 18',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CHORRO DE PLATA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHORRO DE PLATA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA ELVIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SECTOR LOS MANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VILLA GORGONA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA REFORMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DYNAMIDE CAJA X 30 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'DONDIDENJARO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EDO 5 X 120ML',\n 'category_id' => Category::where('name', 'DROGUERIA GEREUALEO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORACOCENTESIS ECOGUIADA',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE DOPLEX',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERICARDIOCENTESIS',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOCENTECIS SIMPLE GATOS',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAPACITACION ECOGRAFIA (HORA)',\n 'category_id' => Category::where('name', 'ECOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOCARDIOGRAFIA',\n 'category_id' => Category::where('name', 'ECOGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROL ECOCARDIOGRAFICO',\n 'category_id' => Category::where('name', 'ECOGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROLES ECOGRAFICOS VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROLES ECOGRAFIAS',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA DOPLER ABDOMINAL',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA PERROS PEQUENOS',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 132000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA PERROS GRANDES',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROCARDIOGRAFIA',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ELECTROCARDIOGRAFIA VET',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MONITOREO CARDIACO',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENDOSCOPIA DIGESTIVA EXTRACCION DE CUERPO EXTRANO',\n 'category_id' => Category::where('name', 'ENDOSCOPIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENDOSCOPIA DIGESTIVA DIAGNOSTICA',\n 'category_id' => Category::where('name', 'ENDOSCOPIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOCARDIOGRAFIA VET.',\n 'category_id' => Category::where('name', 'EOCGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KERACLEEN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'ESEENtEKTO R tA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 0-10 K',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 11-20K',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 21-40KG',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA + DE 41 KG.',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA GATOS',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA TARIFA ESPECIAL',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOTA GRUESA',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RETICULOCITOS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPIRADO DE MEDULA OSEA ANALISIS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA URGENCIAS DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOTA GRUESA DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABORATORIO ANIMALES EXOTICOS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA ESPECIALIZADO',\n 'category_id' => Category::where('name', 'HEMOGRAMA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION > 41 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO > 41 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION GATOS',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS SALA HIDRATACION DIA CANINO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO GATOS',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 0-10 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 0 - 10 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 11-20 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 11 - 20 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 21-40 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 21 - 40 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS SALA HIDRATACION DIA FELINO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA PEQUENA',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA MEDIANA',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA GRANDE',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION PACIENTE INFECTOCONTAGIOSO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION PACIENTE INFECTOCONTAGIOSO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION PERIVERTEBRAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION DERMICA',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION COLUMNA',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION ARTICULAR',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION PERIVERT. ADICIONAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION CONJUNTIVAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA NEURAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPARADRAPO x METRO',\n 'category_id' => Category::where('name', 'INSUGIA x ORGANOS x LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MANGO BISTURI OFTALMOLOGIA',\n 'category_id' => Category::where('name', 'INSUMO QUIRURGICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA EPIDURAL TOUHY',\n 'category_id' => Category::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 4/0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CLAVOS 3.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI # 20',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROLENE # 3/0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10100\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROLENE #O CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL 0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 2/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL 3/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL #1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 5/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 3/0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 3/0 GASTROINTESTINAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 6-0 OFT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 6-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 3-0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 2-0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 4-0 VASCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 5-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 6-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 6-0 CARDIOVASCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO #0 CIEIRRE GENERAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 2-0 GASTRO INT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 3-0 GASTR.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI #11',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI #15',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 23',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 25',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 3-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4-0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POLIPROPILENO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 2/0 GASTROINTEST.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 2/0 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS #0 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 5-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS #1 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PINZA MOSQUITO RECTA 12.5 CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAVO STEINMAN 2.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 2.0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLENE # 1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PDS II # 0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS II # 3/0 GASTROINTESTINAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNTA ELECTROBISTURI',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO QUIRURGICO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 2/0 90-J345',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS 2/0 II GASTRO.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS 1 II CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUANTE CIRUJANO TODAS LAS TALLAS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ETHIBON 3-0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTESIS SILICONA OCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA DCP 8 AGUJEROS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 270000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO CORTICAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTERLIZACION EN SECO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMARRES',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAMPO ESTERIL ADHESIVO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA TRU-CUT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA RECOSNTRUCCION',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA DCP 9 A 12 AGUJEROS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MALLA DE POLIPROPILENO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 240000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER DE1.0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 1.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 0.8 x300',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALHAMBRE QUIRURGICO x CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA NYLON ESTERIL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA HI-FI',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 450000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALQUILER SIERRA OSCILANTE',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOCRYL 4-0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 1 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 DS24 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 0 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 5-0 DS12 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HISTOACRYL AZUL 0.5ML.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 2-0 DS24 x 75CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR22 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR26 x 90CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 DS19x 70CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 4-0 DS19x 45CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 0 HR37S x 75 CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 4-0 DS19x 75CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL2-0 HR375 X 90CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GORRO CIRUJANO CON TOALLA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 3-0 DS 24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 2-0 HR26 X 90 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 2-0 DS24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 3-0 DS24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 4-0 DS19 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 1 HR37S x 75 CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO SUCCION X 6 MM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAVO KIRSCHNER ROSCA TOTAL 1.6 MM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANULA DE SUCCION DE YANKAUER',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MANGUERA DE SUCCION',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA BLOQUEADA TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 700000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO BLOQUEADO TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO COMPRESION TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONECTOR LIBRE DE AGUJAS CON EXT',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 22 X 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 19',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 21',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #23',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10800\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TAPABOCAS DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'GORRO DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'EXTENSION MONITOREO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 3',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 900\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 4',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1900\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BURETROL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 14',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 24',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ENEMA TRAVAD x 133 ml.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENEMA X 1000 CM',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASA ESTERIL 3 NO TEJIDA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 23 X 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 21 X 1 1/2',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 20 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 60 ML. AGUJA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 10 ML',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 5 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 3 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 1 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 0.3 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA 60 ML PUNTA CATETER',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA GATO CON FIADOR',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA GATO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 21',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE # 20 X 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLES 16 X 1 1/2',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA SYRVET x METRO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA # 6 VESICAL-URETRAL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA # 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #10',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #12',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #14',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #24',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NELATON # 8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MACRO GOTEO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 3',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 4',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS TRANSFUSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MICRO GOTEO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXIGENO UTILIZADO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUANTES DESECHABLES TODAS LAS TALLAS',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOLSA TRANSFUSION SANGRE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS BOMBA INFUSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 25 X 5/8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 9.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 5.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 7.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 7',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALGODON ESTERIL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APLICADORES ESTERILES x 10 UN.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APLICADORES ESTERILES x 20 UN.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDAD DE SANGRE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA URINARIA NELATON # 8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA URINARIA NELATON #6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INSUMOS APROX. COTIZACION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LLAVE TRES VIAS',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MACRO SITIO Y',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAPABOCA RYMVO ELASTICO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 145\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 23 x 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 18 X 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 3.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 5.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 6.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAPON HEPARINA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALGODON TIPO HOSPITAL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPRESA x UNIDAD',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 8.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA FOLEY',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 3.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTENSION ANESTESIA EN Y',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESCECHABLE 25 x 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS DE EXTENSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SABANILLA TENA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MICROCHIP',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BATA DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATETER CENTRAL',\n 'category_id' => Category::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 11-57 KG. (USO PELUQUERIA)',\n 'category_id' => Category::where('name', 'KASRRKACTO PQRS')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEX 5% X 250ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 5% X 500ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TETRASPAN 6% (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SOL HARTMAN X 1000 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SOL HARTMAN x 500 ML. (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL x 500 ML.',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 250 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MANITOL',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'GELOFUSINE X ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 10% 250 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 1000 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 100 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 10% x 500 ML. (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISOLVE x 500 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDIAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROVET GOTAS OFTLMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PULMICORT AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUDEMAR (budesonida 0.5 mg)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUDEMAR 200MG. AER. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAR SPRAY NASAL (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATROPINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'KETAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TRANQUILAN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 1mg. x ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SETON x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL 1% x 20 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ULTIVA x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'FENTANYL x ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PANCURONIO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6400\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROSTIGMINE X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DIAZEPAM AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9600\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ROXICAINA 2% x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ROXICAINA 1% X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'FENTANYL AMPOLLA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BUPIROP X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 5MG/ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROCAINA 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL AL 1% x 50 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'XILASYN x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 15MG/ 3 ML AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NEOSTIGMINA x 1ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CLONAZEPAM 2 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'LIDOCAINA SIMPLE 2 % x 10 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEXMETOMIDINA x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATIPAMAZOL 5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFERVAC',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ACEDAN X ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXACILINA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALIBIOTICO x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZARET+AZITROMICINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTAMINA X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEPARINA x ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECHINACEA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALIZIN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLOMAX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALOTINA X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFAZOLINA SODICA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMICINA AMPOLLETA 600MG/4ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXITETRACICLINA 5 % x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VINCRISTINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMIZOL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BORGAL ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSBAC X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x ML. INYECTABLE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOSEGAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SALIX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LASIX X 40MG. CAJA X 20 TABLETAS (USO HUMANO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIKPIREM x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIPERACICLINA+TAZOBACTAM 4G/0.5G',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMPICILINA x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) x 500 MG. I.V. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMIKACINA 500 MG/2ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROSYFEN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUTHANEX X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x ML. INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETHISTAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOVALGINA Dipirona 500mg/ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KENACORT X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FINADYNE x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA+HIOSCINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA AMP 4 MG/2 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANKOFEN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFTRIAZONA SODICA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUSCAPINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANAFEN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLUMEDROL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOBIC x 15MG. en 1,5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLU MEDROL (Metilprednisolona)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE VECURONIO AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMADOL 50MG/1ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETALGINA ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA AMP/8MG/2ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEPO-MEDROL AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MORFINA AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PENTHAL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETAMID X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IVOMEC X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BERENIL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOFILINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOBUTAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADRENALINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANITOP AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOPAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCONATO DE CALCIO x ML (uso veterianrio)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPINEFRINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BICARBONATO DE SODIO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HESTAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'QUERCETOL X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RANITIDINA x 50MG./2ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEEL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECHINACEA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORURO POTASIO AMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIVIRAM x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROBAVIT X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAVITEX x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIOSOLAMINE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DROPYAL JERINGA PRELLENADA X 2.5ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 195000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14312\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXITOCINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIFLOXIN AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PENICILINA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEPO PROVERA amp',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HUMULIN N (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANTUS INSULINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANTUS SOLOSTAR 100 ui INSULINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOSIS INSULINA (hospitalizacion)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXORUBICINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 56000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COVINAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENROVET 5 % X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFLACOR X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOFOSFAMIDA INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOLLIGON',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHORULON',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAURABOLIN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARBOPLATINO INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEUPOGEN (Filgrastim) x 300 MCG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN (Ampicilina + Sulbactam) INYECTABLE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALIMICINA 200 C.L. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 10 ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MULTIFORCE x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUXMEN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NALOXONA CLORHIDRATO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXIUM AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 5 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAPRINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREGAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORDELIN V',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ERITROPOYETINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPARAGINASA 10000 MG AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B12 INY. x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAVITEX F1 x 20ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DUPLOCILINA L.A. x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBIPEN L.A. x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DECTOMAX X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC 0.5% x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONVENIA 8OO MG x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FAINEX x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLOXASYN 5% x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MILRINONA AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROFLOXACINO 200MG/100ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 500ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITOMICINA x 20 MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEROPENEM 1 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HUMULIN R (uso hu,mano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA B12 10MG/1OML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE ROCURONIO 50MG/5ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFRADINA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 40 MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NITROPRUSIATO DE SODIO 50 MG/10 ML INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERENIA x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 20 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMZAR (GEMCITABINA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FILGASTRIN FRASCO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 92000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FILGASTRIN x MCG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROSEMIDA 20 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPIRRUBICINA AMPOLLA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL AMPOLLAS X 100MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIRBAGEN OMEGA X ML. ',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 290000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTIVA (REMIFENTANILO) FRASCO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'OMEPRAZOL INYECTABLE HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NALAXONA CLORHIDRATO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMIPENEM CILASTATINA X 500MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLU MEDROL X ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ANKOFEN GOTERO X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFUSION LIPIDICA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN INYECTABLE X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CYDECTIN NF x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOLYTE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXORUBICINA X 10 MG AMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMIKACINA 100 MG/2 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VINBLASTINA X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMPICILINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAVET X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 80MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEPERIDINA AMP x 2Ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA 80 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA 20 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDULLA SPINALIS SUIS - INJEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INMUNOCEL X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TENAFLOX 500 MG X 10',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NANDROLONA x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN SOLUCION x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIURIVET x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROQUIN x 100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMADOL 100MG/2ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFOTAXIMA SODICA x I GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLASINA 40MG/0.4ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMITICIDE 50MG/2ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLASINA 60MG/0.6ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => '5-FLUORACILO AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim+ Sulfa) x 5 ML. INY (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTACILLIN UNGUENTO x 5G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TEARS GOTAS OFTALMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO CLEAN EYES** (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBRAMAX GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLIRAMA VIRAL (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA 2% x 5 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DORZOLAMIDA ANTIHIPERTENSIVO OCULAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 83500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FLURBIPROFENO GOTAS X 5ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x 300 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBRAMICINA GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ISOPTOCARPINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIDRIACYL 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFLOXACINA GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 69500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA OFT. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRED-F Acetato de prednisona (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CILOBACT GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLURBIPROFENO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPITELIZANTE OCULAR 3.5G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOSPORINA 2% GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MYDRIACYL 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRUSOPT OFT',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DORZOLAMIDA 2 % X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSMOTEARS GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREFOX-T X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHARDEX 0.3%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHARCIM GENTAMICINA 0.3%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONDROITIN SULFATO 20%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CILOBACT 0.3% X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23760\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BLEF-10',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAXITROL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULF 10 GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHTHA SONA GOTAS OFTLMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MODUSIK-A GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MANZANILLA SOPHIA SOLUCION OFTALMICA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPITELIZANTE OCULAR HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIPERSOL Cloruro de sodio al 5% (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUERO AUTOLOGO GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFLOX HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRIMOOFTAL GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSMOSOL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LACRIVET - A (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUFRESH (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OQ - BED (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALTRACINE',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRATEARS FSC x 15ml (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTAPROC M GOTAS OFTALMICAS X 10 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTAPROC GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUFLOX GOTAS OFTALMICAS X 5ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIALURINA GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TACROLIMUS GOTAS OFTALMICAS 0.03% X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIMOLOL GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOSPORINA AL 1% UNGUENTO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 116000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'COQUAN 2 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BENADRYL x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x 150 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CLAVAMOX x 250 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CLAVAMOX x 62.5 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DELMOX x 250MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DESCENSOR X 200 MG. TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TRIMETON (Trimetoprim + Sulfa) x 50ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CEFA-CURE x 200MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'RILEXINE 300 CAJA X 14 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENROFLOXACINA x 150MG. BROUWER (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'CONAVET')->first()->id);\n Product::create([\n 'name' => 'COCCIGAN x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX x 10 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX x 5 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TENIBLAN 30-200 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'RIXOVAL X 10ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TENIBLAN 100-600 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PARAQUISTEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PUPPY x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PS PERROS MEDIANOS TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 10 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 30 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IVERBLAN 120 x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PS. PERROS GRANDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 0 A 11 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IVERBLAN 60 x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'MILBEMAX 5 A 25 KG. (uso veterianario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROGRAM 8 - 20KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROGRAM 20 - 40KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 11 - 57 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TRIANTELM (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANICAT x 10ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SISTEMA ENDECTOCIDA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SINPULGAR x 205 MG. x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINPULGAR x 409.8 MG x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERNEX x 5 MG. Caja x 30 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOCHEM JARABE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFAMAX X 250 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BANACEP X 5 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDROL x 4MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERMIPLEX N.F. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F PERROS GRANDES X COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS FLEX LISTER X 7 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIFLUX X 500MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F SUSP. X 15ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM ARTRO x 60 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 73000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZOOFLOXIN x 100MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 500 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RILEXINE 600 CAJA X14 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAXTRAX x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAXTRAX x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTY FARM CREMA X 80G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x 180 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STOMORGYL 2 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STOMORGYL 10MG COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL X 5 MG. COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANATOX x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORDENT SPRAY x 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXAFORM x 70 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPETx 240 ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROBIOCAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENTEREX x 8 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLATIVET x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO DENTAL CARE** x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROBIODOG HOSPITALIZACION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 9 a 18 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 18 a 27 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 27 a 54 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEGESTROL GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCULOHEEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEPROFEN 28 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEPROFEN 5 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'XOLEC PET x 15 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 2 a 4 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO x 20MG. CAJA x 10 TABLETAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 100 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 25 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 75 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDOL x 100 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDOL X 50 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFASALAZINA 500 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL TABLETA 30 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 1400MG (40-56K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 115000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LINDOPEL** POLVO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APETIL x 10 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LOPERAMIDA GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PILERAN GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22100\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ORGANEW x 1 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 6,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GALGOCAL 200 X TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GALGOCAL 600 X TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 250 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL 20 MG. TABLETA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 71000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL 95 MG. TABLETA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 142000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORGANEW x 100 G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 17524\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL** x 180 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LINDOPEL** x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIPOFORM x180 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B12 x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMAVET B12 x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIVEX x 10ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RICO B12 x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POTENAY B-12 NF (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS FLEX X 70 COMP.(USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 364000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GERIODOX',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOSEGAN ORAL GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 30 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20500\n ])->providers()->attach(Provider::where('name', 'CONAVET')->first()->id);\n Product::create([\n 'name' => 'FLAGYL/NISTATINA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO X 0,5MG MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 101000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICOSTATIN SUS ORAL *60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN x 120ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC 2 MG. CAJA X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLAGYL x 250 MG. Suspension (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REASTEN VET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIMETROPRIN + SULFAMETOXAZOL 480 MG/5ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BENADRYL JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROBITUSIN JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIVOTRIL GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIHIDROCODEINA JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SALBUTAMOL JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDRINE JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL JARABE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM F (Trimetoprim + Sulfa) SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA TABLETAS *250',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRI ZOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONIDAZOL x 250MG. Suspension (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAL x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim + Sulfa) 80/400 (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim + Sulfa) SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAL x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONIDAZOL x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROFLOXACINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICICLINA TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METICORTEN x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMAL GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DELIFON TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DELIFON JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA x 5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BLADURIL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CELESTONE TABLETAS *5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFLAZACORT X 6 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONTELUKAST x 5 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXICAM x 7.5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VARTERAL 80/5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZATIOPRINA TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBENDAZOL CAJA X 2',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANNEX x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAZOL SUSPENCION *500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21670\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIXOVAL x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 650\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUOXETINA x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL x 150MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GABAPENTIN x 400MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL X 50 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NATRILIX COMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILATREND x 6.25MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERAPAMILO GRAGEAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STUGERON SUSPENCION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANITOP GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILTIAZEM 60 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROPRANOLOL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO 5 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BETOPROLOL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIMOBENDAN 5 mg (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN x 2.5 MG. CAPSULA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROSEMIDA x 40MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESPIRONOLACTONA 25 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LOMOTIL TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEGALON 140 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESOMEPRAZOL x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGIOLAX GRANULADO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLTRASURIL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGAROL x 240ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METARSAL x 250mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OMEPRAZOL x 20 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RANITIDINA x 150MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALSUCRAL x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIMEBUTINA x 200mg. TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAOPECTATE SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NISTATINA SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEPSAMAR SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESOMEPRAZOL x 40MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOXAR 5 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CYTIL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALSUCRAL x 1G POLVO. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIABENESE TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDOXAN X 50 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GINKGO BILOVA x 80 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA E x 400.000UI (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DICINONE TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCOSAMINE CAP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL 10% NEBULIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN x 1.25 MG. CAPSULA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN X 5 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METARSAL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERTRIX x 8 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANKREOFLAT',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STAMYL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MACRODANTINA 100 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINIDAZOL x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINIDAZOL SUSP',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM x 480MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'URSACOL x 300mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC GOTAS X 30 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL ELIXIR',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENALAPRIL TAB X 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLAGYL x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO FOLICO TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOTIROXINA SODICA 50 mcg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONMEL 500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METOCLOPRAMIDA TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENALAPRIL x 5 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOBIC x 7.5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIFEDIPINO x 30 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TERBINAFINA x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIDROXICINA 25 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROVERA TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL 20% ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIOASPIRINA x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METICON (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO 10 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METOPROLOL x 50 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) 250MG/5ML. SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 91000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOFLOXACINO x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELDENE FLASH x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL X 5MG. CAJA X 30 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 98500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIFAMPICINA *300',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEFLEX SUSPENSION 250MG/5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43520\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMINICINA CAPSULA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEN-VEE K',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BINOTAL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXACOL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMBRAMICINA x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIBIOGEL X ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASTONIN-H',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXIUM 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KALETRA 200/50mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOPEP 20',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA 200 mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID 125 mg/5 ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUOXETINA 20 mg TABLETA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRTAZAPINA 30 mg (uso humsno)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLEX x 500MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX x 60 ML. AZUL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYCOX x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX 2 x 15ML. VERDE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLTOBEN 20mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFLAZACORT x 30 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UROCUAD 300 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUSCASAN 10 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAKTARIN GEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERUM (Betahistina) x 8 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LACTULAX x 240 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA C GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTRUM x 10 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRUXA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFADROXILO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERACEF-250',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6424\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOXICILINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL SHAMPOO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEURONTIN',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 54200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMACET (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENGYSTOL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LYRICA x 75MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FISOPRED',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 35\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ERITROMICINA GENFAR X 500 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DURAPROX x 600 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOFLOXIN x 400 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VASTAREL x 35 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTERMAX (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROSOVASTATINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMAL LONG 50 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMATRA PLUS TEB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DICLOCIL CAP X 500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AVELOX x 400MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDROL x 16MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMBRAMICINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLORATIL x 200MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NATELE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUTHIROX X 100',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 250MG/5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZANTAC JARABE 150MG/10ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FASTFEN JARABE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LOPID 900 (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOTIROXINA x 100MCG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOXICILINA 250MG/5ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAZAMIR x 75MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'QUANOX 0,6%',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPET x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTRICUMEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISBACTER 262 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO ACETILSALICILICO x 100 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOMUCIL SOLUCION ORAL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOMIX (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'HEMOLITAN x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FLEXIGEL CAPSULA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS x 800 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 280400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CALCIO AED',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'HEMOLITAN x 60 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 79300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN GOTAS x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 125 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ESENCIAL POLVO (USO VETERINARIO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 41000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B 12 X LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CONDROTON 1000',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 92400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CONDROTON x 500MG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OMEGEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'POTEN-PET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PELO DERME 750 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 84500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ANAVIMIN COAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PELO DERME 1500 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 118500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS x 80g. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 1LT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 143500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ACEDAN GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KOLOB 80MG*30',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RONAXAN 100 x COMPRIMIDO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLEX ADULTOS X 500MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SYNTHROID X 100 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B 5 MG. CAJA X 20 COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 128000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPAX CAJA X 30 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CETIRIZINA 10 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEGESTROL COMP. UNI.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INMUNOPET X 60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEEL TABLETA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 1MG (VERDE) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 2MG (ROJO) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 4MG (AZUL) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 x 30 ML.ROJO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROXONA x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTRIM x 60 ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SILDENAFIL x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APRIX F (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMARIN x 0.625 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAMICIL x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'URFADYNE x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL FLC PERRO PEQUENO X COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STUGERON x 25MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINOGAN x 25 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MISCOTAIN SUS *60',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3125\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL x 200MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA 250mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDIAL TAB X 1 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLOPRA X 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTROPET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXAPET CAP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITRO-K CITRATO DE POTASIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AQUASOL-E X 400.000UI CAJA X 30 CAPSULAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLUCIL x 5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILATREND x 12.5MG . (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUROXAN 400 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOMAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXEL DETER COPROPHAGIA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SENNAX PLUS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI ZOO x 5 MG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DE-OMAX SOBRE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PET TABS PLUS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRACOR x ML. HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL GRANULADO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONID SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXICONTIN X 10 MG.X TABLETA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETAZOLAMIDA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BETASERC (Betahistina) x 16 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => ' RELAY C (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAPTIN x 600 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELI FORM x 60 TABLETAS. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACTIVITY-FORM x 50 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANILOK SOBRES',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO RETINOICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFASALAZINA 500MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 4 a 9 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DULCOLAX GRAGEAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DULCOLAX P GOTAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 1-11 KG. PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRODAR x 50 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA P. A. x 500 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 25MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 100 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINALGEN (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOMAX VIOLETA 1',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSTEOCART (Uso Veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELTRA x 15 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENZYMED FRASCO x 20 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENZYMED X GRAGEA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELTRA COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BI-OMEGA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOCHEM GRANULADO 600MG x 30 SOBRES (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 67000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZANTEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERVIDEN 10 mg CAJA x 10 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORMICIN 500 mg CAJA x 10 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRALMED x TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARPROMAX X 20 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IVERTREL GOTAS FRASCO x 5ml (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG ARTICULACIONES x 400 GRS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 94500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE PATO x 100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG MULTIVITAMINICO X 400 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG MULTIVITAMINICO x 200 GRS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLINEX 5mg CAJA x 30 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 57000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLPIRIN CAJA X 48 TABLETAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUSIPRIV ADULTO X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 4 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OQ - CAPS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL SHEIRA PREGABALINA 30 MG.+MELOXICAM 0,75 MG. ',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 108000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATININA DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREGABALINA X 75 MG. CAPSULA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOMAX VIOLETA 0',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TEOFILINA RETARD X 125 MG. TABLETA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL KENSO PREGABALINA 10 MG + MELOXICAM 0,25MG. X 60 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 246000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGAR 4 - 10 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGARD 10 - 25 KG. (US0 VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGARD 25 - 50 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG x TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO x 5 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 5 MG x 30 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG x 10 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERNEX x 5 MG. Caja x 10 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPET x 120ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 5.4 MG. CAJA X 20 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 137000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIMAX 1 BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 4 -10KG. x 1.0 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 25 - 40 KG x 4ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIMAX 3 BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLZUCOX X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLZUCOX JERINGA X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 3.6 MG. X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 113000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 16 MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 198000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GERIPET X 30 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANISAN TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC ORAL X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLOXASYN X 50 MG. CAJA X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 2.5 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL X 100 MG. CAJA X 30 TABLETAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN PRO CAJA X 18 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX SUSP. ORAL FRASCO X 200 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM AGES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 58000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM CALCIO x 60 TABLETAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM VITAMINAS Y MINERALES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROBIODOG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DESCENSOR X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'THYRO-TABS X 0.8MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 109000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICAN X 100MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICAN X 200MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN CAJA X 30 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OVERXICAM SUSPENSION X 10ML (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLARA FRASCO X 180 ML (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUSIMED JARABE ADULTOS X 120ML (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZINPAR (IVERMECTINA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENROFLOXACINA (BROWER) X150 MG. TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANDAMIN BLISTER X 10 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL X 75 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 104500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 1000 MG (20-40K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 94000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 500MG (10-20K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 250MG (4.5-10K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 76000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOX C TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ONE TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN X 50 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG CAJA X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 30',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN X 25 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG CAJA X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANICEL 10 JGA X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANICEL 10 JGA X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA FC X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUBIOL SOBRE X 5 GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMIN TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BARQUILLOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 2-4.5 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 61000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOPROTEICO PAVO X 150 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'CONCENTRADOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NERVOHEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEL TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'MEDICAMENTOS ORALES')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMIN BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VASTAREL X 35MG (TABLETA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN PRO TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTALIFE X 221 G. PERRO GRANDE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTALIFE X 198 PERRO PEQUENO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLUFIN PLUS X 240 ML. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARPRODIL X 100 MG. CAPSULA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOIBP X 30 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOIBP X 60 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS 2 - 4 KG (USO VETRINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS DE 4 - 9 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS DE 9 - 18 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS 18 - 27 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRILOSTANE X 5MG VIDEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE POTASIO TITA MARMOLEJO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 20 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 100 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 200 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ITRACONAZOL X 100MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 60 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 120 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 20 TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRILOSTANE X 4.5MG. X 60 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA X 20 MG. X 10 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL FLC GATOS X COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F PERRO MEDIANO X COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B X 2.5 MG CAJA X 20 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B X 10 MG. CAJA X 20 COMP.(USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 212400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EFFIPRO 0 - 10 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CIPERMETRINA AL 15% x 120ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CIPERMETRINA AL 15% x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IMAVEROL x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TINO x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROFENDER x 0.7 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SPLENDDOG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 4 - 10 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 10 - 25 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE MAS DE 25KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SOLFAC x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ACARIX',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 40-60 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 0 - 10 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 10 - 20 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 21 - 40 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE (Fipronil) SPRAY (uso vetertinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 25-40KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE (Fipronil) SPRAY (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 88000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FULMINADO x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUSANTROL X 220 G. (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINGAP x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAREDON x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEGUVON',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXABEST Gel (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 10 - 25 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 4-10 KG x 1 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINE PIPETA GATO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PEROXIDEX X 125ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIGOVIT x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 15-35 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 35-60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECTHOL 2000 0.5 FELINOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE HASTA 4 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FULMINADO X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR SCALIBOR x 65 CM. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOSKOFIN EC FCO 120ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIRICEL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAKTIC FRASCO X 33ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN x 250 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 3% PET X 50 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% FRASCO X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONEX x 275ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% BANO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 450\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANATOX x 30 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIFLEX C x 25 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNHIT LOCION DERMICA x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINO x 20 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO FAZOL x 450ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x 1 LT. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 73000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAL CARE CREMA DENTAL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOPET GEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALFA 3 CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIODERM CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATROPINA AL 1% GOTAS OFTALMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERULINE SOLUCION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO BRILLO x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KERACLEEN (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMACURE CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFICURE SHAMPOO x 250 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SPLENDERMICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON VF CREMA x 35 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISIN x 30G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX TOPICO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM CREMA X 40 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIN SPRAY 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOHOLLIDAY SHAMPOO x 250 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 51300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SANIDERM CREMA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIN SPRAY X LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 75900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON LOCION X 50 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON LOCION X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO CLORHEXIN x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOSYN X 100ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO ULTRADERM X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO SHAINEPET BRONZE X 260 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRECUENCE SHAMPOO X 250 M',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PIELOSAN x 150 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POSATEX x 8.8 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM SHAMPOO x 500 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30856\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMATOSYN CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BURBUJAS x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA x 100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA OXIGENADA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEGASUNT x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO SPA BURBUJAS x 400 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUERO EDTA GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO SHINEPET SILVER** x 260 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAWU 2 EN 1 X 250 ML ENRREDADO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAWU 2 EN 1 X 250 ML PELO LARGO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNHIT LOCION DERMICA x 30 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASICLEAN x LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBREX GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25650\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN GEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIOTON 1000 GEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 11 - 20 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANOLOG TUBO X 15 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX OTICO X 15grs (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX OFTALMICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTOCURE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTOFARM NF GOTAS OTICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIVET GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPTICORTI-V SOLUCION X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TICKIBANO x 120ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIFLEX LIMPIADOR x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXORIL x 20G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GOTAS OTICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OCUBIOTIC COLIRIO CON ESTEROIDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUBIOTIC COLIRIO SIN ESTEORIDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOMETAX x 15 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 2 - 10 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 10 - 20 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 20 - 40 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 40 - 60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 21 - 40 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 41 - 60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 0 - 10 KG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERBAL CARE SHAMPOO x 240 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACUADENT x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE GATOS 0,8ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE GATOS 0,4 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL UNGUENTO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'GABRICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAFLOX GOTAS OFTALMICAS X 5ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIDOCAINA JALEA 2 % (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPOSITORIO GLICERINA PEDIATRICO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTICOL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZADITEN GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALTRACINE A UNGUENTO OFTLMICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TERRAMICINA UNGUENTO OFTALMICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RESTASIS AL 0,05% (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SPLASH TEARS LUBRICANTE OCULAR (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINEx ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 5-15 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 15-35 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 35-60 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREMA 6A (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACTHOL 2000 0.5 FELINOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAKTIC x 33ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% x 100ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TICKIBANO x 20ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 3% PET x 50ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% FRASCO x 20 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONEX x 275ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% BANO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 450\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETATO DE ALUMINIO POLVO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JABON ICTIOL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA SPRAY (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO VETYDERMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMEBORO POLVO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GARAMICINA CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALMIPRO UNGUENTO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GARAMICINA CREMA 0.1% x 40G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 7800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZINC CREAM (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAMICINE CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ISODINE SHAMPOO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16390\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA OXIGINADA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x 220G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UBREVET x 220 GRS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 26500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEL UNGUENTO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL UNGUENTO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GOTAS OTICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EAR CLEANSING LIQUIDO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 5-15 KG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BURBUJAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETATO DE ALUMINIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GYNOTRAN OVULOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRIVET OVULOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACEITE MINERAL X 500ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICADERM NF (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29142\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFATO DE MAGNESIA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CORTAVANCE SPRAY X 76 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN CHAMPU X 100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLICERINA USP',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 62\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SINGAP X ML. PELUQUERIA ',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEEN x 500 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 61000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUMIDERM x 40 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT FSSC SHAMPOO x 240 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT x 240 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 2-4KG CAJA LILA (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT x ML SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOLVASAN OTIC (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SEBOCALM x ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PEROXIDEX X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'Clorhexidina x ML (uso Veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASICLEAN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFICURE SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRAGENTA UNGUENTO TUBO x 5g (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRAGENTA SOLUCION OFTALMICA x 10ML (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLARA X GEL TUBO X 30G (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN X 60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GEL x 50 G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTTAPLIK x 20 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (0-10KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERBAL CARE** x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCHE DE FENTANYLO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 95000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN GEL x 60 GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROUWER-P SHAMPOO ANTISEPTICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPIOTIC SPHERULITES x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPUPET LIFE DERMOHIDRATANTE X 250ML. (USO VETERINARIO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAREDON x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU PETLIFE PURIFICANTE X 250 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PETLIFE REVITALIZANTE X 250 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PEROXI-PROC (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 10 - 20 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 20 - 40 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PETLIFE X ML PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 120\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EASOTIC X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROUWER P SHAMPOO ANTISEPTICO PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 10 - 25 KG x 2,5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 0-10KG. GATOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 0-10 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BASIC PET X 500 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SEBOCALM SPHERULITES X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MSP GATOS 2-4 KG PIPETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MSP GATOS 4-8 KG PIPETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 11-20KG CAJA VERDE (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 21-40KG CAJA AZUL (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 41-60KG CAJA GRIS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 5-10KG CAJA ROJA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIOCICAR CREMA 60G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (10-20 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN TEST SISTEMA NO USAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (GATOS)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (20-40 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (40-60 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 0-4 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCLEAN X 250 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCLEAN X 500 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREMA DERMICA X 200G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN X 120ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISOLVE',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EFFIPRO GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA X 30. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA SOLUCION OTICA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM SHAMPO X 250ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO MICONAZOL 2%+ CLORHEXIDINA 2% MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCONAZOL+CLORHEXIDINA+AC.SALISILICO MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM CREMA X 10G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN CHAMPOO X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO MICLORPROC X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPRAY X 100ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPTER X 25 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOMAX X 15 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPOT ON HASTA 4 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPOT-ON HASTA 8 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASIC PET CHAMPU X ML. PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICLORPROC X 125ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTYFARM X 30 GRAMOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAGAN NL X 375ML SPRAY (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIROXICAM GEL (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAMISIL SPRAY',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROFENDER x 0.35 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TERBUROP',\n 'category_id' => Category::where('name', 'MEDICAMENTOS INHALADOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRYTEROL (Ondansetron) x 8MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL TRILOSTANO X 10 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS MAGISTRALES')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 293000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL METRONIDAZOL 25 + BUEDSONIDA 2.2 ',\n 'category_id' => Category::where('name', 'MEDICAMENTOS MAGISTRALES')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 157000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL x 300 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULTAMICILINA x 750MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DINITRATO DE ISOSORBIDE x 10 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 1 G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORALES')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) x 500 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORALES ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA FC X 120 ML',\n 'category_id' => Category::where('name', 'MEDIMIMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRIFLEX LIPID SPECIAL X ML',\n 'category_id' => Category::where('name', 'MEDINUMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO DE MATERIA FECAL',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 51700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO PARA HONGOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO Y ANTIBIOGRAMA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO Y ANTIBIO. SEC. OCULAR',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVOS GERM. AEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVOS GERM. ANAEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 96800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICROAGLUTINACION PARA LEPTOSPIRA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIELOCULTIVO GERM. AEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINCION PARA MALAZESSIA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVO',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO PARA HONGOS VET',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO ANTIBIOGRAMA EN ORINA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KOH',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION PLACA Y TORNILLOS',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RODILLA EXTRACCION DE MENISCO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIJADOR ESQUELETICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REEMPLAZO DE LIGAMENTO CUALQUIER ARTICULACION',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSA DE HUESO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS COMPLICADA CON CLAVO INTRAMEDULAR',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CERCLAJE CON ALHAMBRE QUIRURGICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON FIJADOR ESQUELETICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION CLAVO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION CLAVO Y CERCLAJE',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA L',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA M',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEPILLO METALICO XL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XXL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA S',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TETERO 2OZ x 2 UN',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'CEPILLO METALICO L',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'CITRONELA x 2 LITROS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CITRONELA x 1 LITRO',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'STICK DENTAL** 33344',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'STICK OMEGA 33341',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'FELINE PINE x 7 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 29500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE PINE x 20 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 79000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BIG BONE X 130 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BREATH AND DENTAL BONE X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DOG LICIOUS PICANHA X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DOG LICIOUS HIGIENE BUCAL X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS BIFINHO CARNE Y BACON x 65 g (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DIETA ESPECIAL POLLO O CARNE',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONCENTRADO ESPECIAL DE DIETA',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PAN',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CUELLO ORTOPEDICO MASCOTA < 10 KG.',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIETA ESPECIAL ANIMALES EXOTICOS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA VAGINAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLORACION DE GRAM',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA SIMPLE',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA DE LIQUIDO PLEURAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO PLEURAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANALISIS DE CALCULO VET',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA SENCILLA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO ASCITICO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO CEFALORAQUIDEO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO PERITONEAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO SINOVIAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE OTROS LIQUIDOS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANALISIS DE CALCULO URINARIO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPIRADO Y COLORACION WRIGHT',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA UTERO Y OVARIOS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAT. GLAND. MAM. POR MASCT.',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA DE HUESO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA ASPIRATIVA DE GANGLIO O MUESTRA ANALISIS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA ASPIRATIVA GANGLIO VET',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA GLANDULA MAMARIA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA ORGANO ADICIONAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE CACHORRO ENREDADO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA ENREDADO HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA ENREDADO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'XXXCCCVV',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHARPEI',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHARPEI CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POINTER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POINTER CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEIMARANER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEIMARANER CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOBERMAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOBERMAN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVEJERO PC',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PC CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 58000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 68000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5800\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 68000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER HASTA 5 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 62500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO LISO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WH TERRIER SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTIN SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTIN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO PEQ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO MED',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO GRAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE OIDOS',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CORTE Y PULIDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO CACHORRO HASTA 1 KG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'APLICACION FRONTLINE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. QUE REQUIERA CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO CEPILLADO SOLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO SIN PELO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO SIN PELO CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AKITA JAPONES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AKITA JAPONES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 41250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AZUL DE GASCUNA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEKINESSE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO CON PELO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO CON PELO CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. QUE REQUIERA CORTE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 40 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 40 KG. PELO LISO SIN CORTE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. QUE REQUIERA CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR CHELAND',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR CHELAND CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAGRADO DE BIRMANIA SIN TRAQ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGHLAND FOLD SIN TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGHLAND FOLD CON TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULLMASTIFF SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULLMASTIFF CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS GATOS',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 10 A 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND WHITE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER CACHORRO HASTA 1 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CACHORRO HASTA 2 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CACHORRO HASTA 2 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETIEVER CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOTON TERRIER CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA EXCISION CABEZA FEMORAL HASTA 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CACHORRO HASTA 10 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE CACHORRO HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA ENREDADO ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES HASTA 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES MAYOR A 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND WHITE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIHGLAND WHITE TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIHGLAND BANO MEDICADO PROBLEMA PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND CACHORRO HAST 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 10 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG. PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 20 KG. BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES HASTA 20 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES ADULTO BANO MEDICADO PROBLENA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO LISO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 20 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. CON CORTE BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. CON CORTE BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO CEPILLADO SOLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO BANO MEDICADO PROBLEMA D EPIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU CAHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO CACHORRO HASTA 2 KG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG. BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG. BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE QUISTE PROSTATICO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG,',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE BAO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO CACHORRO HASTA 1 KG. PELO LARGO. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CACHORRO HASTA 1 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO CACHORRO HASTA 1 KG. PELO CORTO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CACHORRO HASTA 2 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CACHORRO HASTA 2 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CACHORRO HASTA 2 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA VICKY PERRO PEQUENO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA. VICKY PERRO GRANDE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA. VICKY BERNES DE LA MONTANA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO LISO HASTA 20 KG. SIN CORTE CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCOTTISH FOLD BANO SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCOTTISH FOLD BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE B 30',\n 'category_id' => Category::where('name', 'PROCEDIMEINTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 85000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE 60',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE B 60',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE 30',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE P',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ANESTESIA LOCAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE (ANESTESIA ADICIONAL BRAQUICEFALICOS)',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL II',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL III',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TAPON HEMORRAGIA NASAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO Y CAUTERIZACION NASAL VIA OROFARINGEA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION UNA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ATENCION HORA PARTO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHO DE MONITORIAS BASICAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TEST SHIMER',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE GANGLIO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE MASA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONITOREO PRESION ARTERIAL EN 24 HORAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRATAMIENTO DE LA OBSTRUCCION FELINA POR SONDA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO A TORAX',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS ESPECIALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROL DE PRESION INTRAOCULAR',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FORMULA MEDICAMENTOS CONTROLADOS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEBULIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUTERIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE MIASIS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA FLUORESCEINA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CREMACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EUTHANASIA COMPASIVA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE FIBRA VIDRIO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA PRESION ARTERIAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE ABSCESO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE DE ABSCESO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA HERIDAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE GLANDULAS ADANALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RETROHIDROPROPULSION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA PRESION INTRAOCULAR',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA REHABILITACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRANSFUSION SANGRE',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SOLUCION PREPARADA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PREPUCIALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS VAGINALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE SEROMAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE ROBERT JONES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE ROBERT JONES ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE PEQ HERIDAS ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE PEQUENAS HERIDAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE TORAX Y ABDOMEN',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE FERULA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE TORAX ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 0-10KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 11-20KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 21-40KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS MAYORES DE 40 KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERVICIO INYECTOLOGIA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS BOMBA INFUSION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ELECTROCAUTERIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA ROSA DE BENGALA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABDOMINOCENTESIS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIELO CADA HORA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDA ALIMENTACION GASTRICA PERCUTANEA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENEMA RECTAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDAJE URINARIO HEMBRA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO ANORECTAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDA ALIMENTACION NASOESOFAGICA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA DE REHABILITACION AMBOS MIEMBROS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA COLMILLO DE LECHE RETENIDO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PULIDO DE COLMILLOS FELINOS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR FELINOS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. PREMORALES 11-20 GK',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR CANINO CACHORRO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR CANINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR CANINO CACHORRO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR CANINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CEPILLO PROFILAXIS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TALLADO SELECTIVO DE DIENTES',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA COLMILLO FELINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROFILAXIS',\n 'category_id' => Category::where('name', 'PROFILAXIS ')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RAPID TEST KIT E. CANIS',\n 'category_id' => Category::where('name', 'PRUEBA ESPECIAL DE DIAGNOSTICO')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA TOXOPLASMOSIS IGG',\n 'category_id' => Category::where('name', 'PRUEBA ESPECIAL DE DIAGNOSTICO')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COPROLOGICO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COPROLOGICO CON SANGRE OCULTA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COPROSCOPICO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCIAL DE ORINA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RASPADO DE PIEL',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SANGRE OCULTA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DENSIDAD URINARIA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCIAL DE ORINA - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA BRUCELOSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOXOPLASMA IGG',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DE MOQUILLO',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAMPO OSCURO PARA LEPTOSPIRA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOXOPLASMA IGM',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA BORRELIOSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DE BRUCELLA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP PARVOVIROSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA DIAGNOSTICA DE DISTEMPER',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP FELINE TRIPLE O COMBO',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP 4DX PLUS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP GIARDIA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP LIPASA PANCREATICA CANINA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP LIPASA PANCREATICA FELINA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA SDMA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTRADIOL EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'LABORATORIO NOHEMY CRUZ')->first()->id);\n Product::create([\n 'name' => 'ALT (GPT)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBUNINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AST (GOT)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMILASAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BILIRRUBINA DIRECTA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BILIRRUBINAS TOTALES Y DIFERENCIADAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUN (NITROGENO UREICO)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATININA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALCIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLESTEROL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GGT (GAMA GAMETIL TRANSFERASA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO FOLICO EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DEXAMETASONA DOSIS BAJA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COBRE EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIVELES DE VITAMINA B12 EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATIN FOSFOQUINASA (CK-MB)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROLITOS EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIBRINOGENO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 29700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSFATASA ALCALINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLICEMIAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLOBULINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCOSA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO LACTICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGLOBINA GLICOSILADA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICROALBUMINURIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIVELES DE FENOBARBITAL EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 LIBRE FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POTASIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RELACION PROTEINA CREATININA EN ORINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PT (tiempo de protombina)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PTT (tiempo de Tromboplastina)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SODIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T3 TOTAL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 LIBRE CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRUCTOSAMINA EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROFORESIS DE PROTEINAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TGP',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIRILLAS DE GLICEMIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIRILLAS REACTIVAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIGLICERIDOS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TSH CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 TOTAL FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROGESTERONA SERICA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS TOTALES Y DIFERENCIADAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERFIL LIPIDICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CORTISOL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATIN FOSFOQUINASA (CK, CPK TOTAL)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 TOTAL CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALDOSTERONA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DESHIDROGENASA LACTICA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS DIFERENCIADAS VET.',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7245\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSFORO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMONIACO EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAMMA GLUTAMIL TRANSFERASA (G.G.T)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIMERO D',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURVA DE GLICEMIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO URICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7253\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIPASA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINA C. REACTIVA CUALITATIVA|',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALT (GPT) DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AST (GOT) DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BUN - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOSFATASA ALCALINA - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS DIFERENCIALES Y TOTALES- DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BILIRUBINAS TOTALES Y DIFERENCIALES DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TSH FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8 X 10 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8 X 10 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10 X 12 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10 X 12 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11X14 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10X12 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8X10 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8X10 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA +41 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA +41 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10X12 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO DE CONTRASTE 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE MAYOR A 41KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 20-40 VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 0-10K VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'T.A.C. SIMPLE',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PORTOGRAFIA',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'TABLETADUINUTABLETAMLL RSUB')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL I',\n 'category_id' => Category::where('name', 'TERAPIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO ULTRADERM X ML.',\n 'category_id' => Category::where('name', 'ULTRADEHSOXULTRADEHSTO ARXM')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n }", "function createProduct ($prodName,$typeCode,$prodPic,$prodStock,$prodValue,\n $prodDescription){\n \n return insertProduct ($prodName,$typeCode,$prodPic,$prodStock,$prodValue,\n $prodDescription);\n }", "public function store(Request $request)\n {\n\n // $enrollment_ids=$request['enrollment_id'];\n\n\n // foreach ($enrollment_ids as $enrollment_id) {\n \n // Qualification::create([\n // 'trimester_id' => $request['trimester_id'],\n // 'course_id' => $request['course_id'],\n // 'nota1' => $request['nota1'],\n // 'nota2' => $request['nota2'],\n // 'nota3' => $request['nota3'],\n // 'nota4' => $request['nota4'],\n // 'promedio' => $request['promedio'],\n // 'enrollment_id' => $enrollment_id\n // ]);\n\n // }\n // $id = $request['enrollment_id'];\n // $cuota=$request['cuota'];\n // $inicio = $request['periodo_inicio'];\n\n // for ($i=0; $i < sizeof($cuota); $i++) {\n\n // Payment::create([\n // 'enrollment_id' => $request['enrollment_id'],\n // 'periodo_inicio' => $request['periodo_inicio'][$i],\n // 'cuota' => $request['cuota'][$i]\n // ]);\n\n\n\n // }\n // dd($request);\n for ($i=0; $i < count($request['cuota']); $i++) \n {\n $products= new Payment; \n $products->enrollment_id = $request['enrollment_id']; \n $products->periodo_inicio = $request['periodo_inicio'][$i];\n $products->periodo_fin = $request['periodo_fin'][$i];\n $products->monto = $request['monto'][$i];\n $products->adeuda = $request['adeuda'][$i];\n $products->estado = $request['estado'][$i];\n $products->trimester_id = $request['trimester_id'];\n $products->cuota= $request['cuota'][$i];\n $products->save();\n }\n\n\n\n\n // for ($i=0; $i < sizeof($request['cuota']); $i++) \n // {\n // $products= new Payment; \n // $products->trimester_id = $request['trimester_id']; \n // $products->cuota = $request['cuota'][$i];\n // $products->periodo_inicio= $request['periodo_inicio'][$i];\n // $products->periodo_fin= $request['periodo_fin'][$i];\n // $products->monto= $request['monto'][$i];\n // $products->adeuda= $request['adeuda'][$i];\n // $products->estado= $request['estado'][$i];\n // // $products->course_id = $request['course_id']; \n // $products->enrollment_id= $request['enrollment_id'];\n // // $products->teacher_id = $request['teacher_id']; \n // // $products->programming_id = $request['programming_id'];\n\n // $products->save(); \n // dd($request);\n \n}", "public function store(CreateProductRequest $request)\n {\n\n\n $request->request->add(['created_by'=> Auth::user()->id]);\n $request->request->add(['stock'=> $request->input('quantity')]);\n $request->request->add(['view_count'=> 0]);\n// dd($request);\n// $att=[];\n\n// dd($att);\n $product=Product::create($request->all());\n if ($product){\n $product->tags()->sync($request->input('tag_id'));\n for($i=0;$i<count($request->input('attribute_name'));$i++){\n $att= [\n 'product_id' => $product->id,\n 'name' => $request->input('attribute_name')[$i],\n 'value' =>$request->input('attribute_value')[$i],\n 'created_by' =>Auth::user()->id,\n ];\n ProductAttribute::create($att);\n }\n\n if ($request->has('file')){\n foreach ($request->file('file') as $file){\n $file_name=uniqid().'_'.$file->getClientOriginalName();\n $file->move('images/products',$file_name);\n $request->request->add(['image'=> $file_name]);\n $image=[\n 'name' => $file_name,\n 'product_id' => $product->id,\n 'created_by' =>Auth::user()->id,\n ];\n ProductImage::create($image);\n\n }\n }\n// $product->attributes()->createMany(['name' =>$request->input('attribute_name'),'value' =>$request->input('attribute_value'),'created_by' =>Auth::user()->id]);\n return redirect()->route('backend.product.index');\n }else{\n return back();\n }\n }", "public function run()\n {\n $arr = array(\n 'units',\n 'value',\n 'tolerance',\n 'method'\n );\n $type= array();\n\n foreach ($arr as $key) {\n $now = Carbon::now();\n $type[] = [\n 'name' => $key,\n 'updated_at' => $now,\n 'created_at' => $now,\n ];\n }\n SpecificationType::insert($type);\n }", "function _civicrm_api3_entity_batch_create_spec(&$params) {\n $params['entity_id']['api.required'] = 1;\n $params['batch_id']['api.required'] = 1;\n}", "public function getProductSaveInfo($product, $data) {\n $product->setColor ( $data [11] );\n $product->setCost ( $data [12] );\n $product->setCountry ( $data [13] );\n $product->setCountryOfManufacture ( $data [14] );\n $product->setCreatedAt ( $data [15] );\n $product->setDescription ( $data [20] );\n $product->setEnableGooglecheckout ( $data [21] );\n $product->setGallery ( $data [22] );\n $product->setGiftMessageAvailable ( $data [23] );\n $product->setHasOptions ( $data [24] );\n $product->setHostemail ( $data [25] );\n $product->setHouserule ( $data [26] );\n $product->setImage ( $data [27] );\n $product->setImageLabel ( $data [28] );\n $product->setMediaGallery ( $data [30] );\n $product->setMinimalPrice ( $data [34] );\n $product->setMsrp ( $data [35] );\n $product->setMsrpDisplayActualPriceType ( $data [36] );\n $product->setMsrpEnabled ( $data [37] );\n $product->setName ( $data [38] );\n $product->setNewsFromDate ( strtotime ( $data [39] ) );\n $product->setNewsToDate ( '' );\n if (isset ( $data [41] )) {\n $product->setOptionsContainer ( $data [41] );\n }\n if (isset ( $data [43] )) {\n $product->setPrice ( $data [43] );\n }\n if (isset ( $data [44] )) {\n $product->setPrivacy ( $data [44] );\n }\n if (isset ( $data [45] )) {\n $product->setPropertyadd ( $data [45] );\n }\n if (isset ( $data [46] )) {\n $product->setPropertytype ( $data [46] );\n }\n if (isset ( $data [47] )) {\n $product->setPropertyWebsite ( $data [47] );\n }\n if (isset ( $data [48] )) {\n $product->setRequiredOptions ( $data [48] );\n }\n if (isset ( $data [49] )) {\n $product->setShortDescription ( $data [49] );\n }\n if (isset ( $data [50] )) {\n $product->setSmallImage ( $data [50] );\n }\n if (isset ( $data [51] )) {\n $product->setSmallImageLabel ( $data [51] );\n }\n if (isset ( $data [52] )) {\n $product->setSpecialFromDate ( $data [52] );\n }\n if (isset ( $data [53] )) {\n $product->setSpecialPrice ( $data [53] );\n }\n if (isset ( $data [54] )) {\n $product->setSpecialToDate ( $data [54] );\n }\n if (isset ( $data [55] )) {\n $product->setStatus ( $data [55] );\n }\n if (isset ( $data [56] )) {\n $product->setTaxClassId ( $data [56] );\n }\n if (isset ( $data [57] )) {\n $product->setThumbnail ( $data [57] );\n } \n return $product;\n }", "public function definition()\n {\n $allPL = DB::table('productlines')->get()->toArray();\n $allPLTitle = array_column($allPL, 'product_line');\n\n return [\n 'product_code' => $this->faker->ean8 (),\n 'product_name' => $this->faker->name(),\n 'product_line' => $allPLTitle[array_rand($allPLTitle, 1)], // ko đc random -> phai lay tu bang productline\n 'product_scale' => Str::random(100),\n 'product_vendor' => $this->faker->company(),\n 'product_description' => $this->faker->text($maxNbChars = 200),\n 'quantity_inStock' => $this->faker->randomNumber(5),\n 'buy_price' => $this->faker->randomNumber(6, 2),\n 'MSRP' => $this->faker->realText(),\n\n\n ];\n }", "public function actionCreate($id = NULL) {\n\t\t$model = new Products();\n\t\tif (isset($id)) {\n\t\t\t$product = Products::findOne($id);\n\t\t\t$model->setAttributes($product->attributes);\n\t\t\t$model->product_name = '';\n\t\t\t$model->product_name_arabic = '';\n\t\t\t$model->canonical_name = '';\n\t\t\t$specifications = ProductSpecifications::find()->where(['product_id' => $id])->all();\n\t\t}\n\t\tif ($model->load(Yii::$app->request->post()) && Yii::$app->SetValues->Attributes($model)) {\n\t\t\tif ($model->validate()) {\n\t\t\t\t$tag = Yii::$app->request->post()['Products']['search_tags'];\n\t\t\t\tif ($tag) {\n\t\t\t\t\t$model->search_tags = implode(',', $tag);\n\t\t\t\t}\n\t\t\t\tif (!empty($model->related_products))\n\t\t\t\t\t$model->related_products = implode(',', $model->related_products);\n\t\t\t\t$specfctns = Yii::$app->request->post()['specifications'];\n\t\t\t\t$image_arr = [\n\t\t\t\t\t['width' => 440, 'height' => 440, 'name' => 'large'],\n\t\t\t\t\t['width' => 70, 'height' => 70, 'name' => 'thumb'],\n\t\t\t\t\t['width' => 175, 'height' => 175, 'name' => 'medium']\n\t\t\t\t];\n\t\t\t\t$transaction = \\Yii::$app->db->beginTransaction();\n\t\t\t\ttry {\n\t\t\t\t\tif ($model->save() && $this->Savespecifications($specfctns, $model) && $this->ProductImages($model, $id, $image_arr)) {\n\t\t\t\t\t\t$transaction->commit();\n\t\t\t\t\t\treturn $this->redirect(['index']);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $ex) {\n\t\t\t\t\t$transaction->rollBack();\n\t\t\t\t\tthrow $e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tvar_dump($model->getErrors());\n//\t\texit;\n\t\treturn $this->render('create', [\n\t\t\t 'model' => $model,\n\t\t\t 'id' => $id,\n\t\t]);\n\t}", "public function setProduct()\n {\n // get the existing products array\n $products = $this->getProducts();\n // push the new product to the array\n array_push($products, $this);\n $file = fopen($_SERVER['DOCUMENT_ROOT'] . \"/mpm_challenge/problem4/db/db.json\", \"w+\") or die(\"not opened\");\n fwrite($file, json_encode($products));\n fclose($file);\n }", "public function run()\n {\n\n Product::create([\n 'name' => 'Macbook Pro 15',\n 'category' => 'Laptop',\n 'brand' => 'Apple',\n 'description' => '13.3‑inch (diagonal) LED-backlit display with IPS technology; 2560‑by‑1600 native resolution at 227 pixels per inch with support for millions of colors',\n 'basic_price' => 1799,'price' => 1799,\n 'quantity' => 10,\n 'path' => '/macpro1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'Samsung galaxy S9 Plus',\n 'category' => 'Phone',\n 'brand' => 'Samsung',\n 'description' => 'Super Speed Dual Pixel Camera with Rear Dual Camera - Infinity Display: edge to edge immersive screen, enhancing your entertainment experience',\n 'basic_price' => 800,'price' => 800,\n 'quantity' => 30,\n 'path' => '/s9_2.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Ipad Air',\n 'category' => 'tablet',\n 'brand' => 'Apple',\n 'description' => '10.5-inch Retina Display with True Tone and wide Color - A12 Bionic chip - Touch ID Fingerprint Sensor and Apple Pay\n8MP back - camera, 7MP FaceTime HD Front camera - Stereo speakers - 802.11ac Wi-Fi - Up to 10 hours of battery life',\n 'basic_price' => 249,'price' => 249,\n 'quantity' => 5,\n 'path' => '/ipad1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'Canon EOS 2000D',\n 'category' => 'Camera',\n 'brand' => 'Canon',\n 'description' => 'Video Full HD 1080p - WiFi/NFC - Ecran 7,5 cm',\n 'basic_price' => 690,'price' => 690,\n 'quantity' => 10,\n 'path' => '/canon1.jpg',\n ]);\n Product::create([\n 'name' => 'IPhone 11 Pro',\n 'category' => 'Phone',\n 'brand' => 'Apple',\n 'description' => 'The iPhone 11 Pro is Apple\\'s most powerful phone that come in a one-hand-friendly size. It has a triple-lens camera to capture best-in-class photos and video from a variety of perspectives, a new night mode to enhance low-light photography and extra battery life prowess. Even if the design hasn\\'t changed, this is the camera and battery upgrade iPhone users have been after.',\n 'basic_price' => 999,'price' => 999,\n 'quantity' => 10,\n 'path' => '/pro11_1.jpg',\n ]);\n Product::create([\n 'name' => 'Huawei P20 Pro 128 Go Dual Sim ',\n 'category' => 'Phone',\n 'brand' => 'Huawei',\n 'description' => 'Paying this much for a Huawei phone may seem a tough sell. But great battery life, top specs and some of the most compelling use of computational photography seen in a phone make the Huawei P20 Pro one of the most interesting handsets available.',\n 'basic_price' => 445,'price' => 445,\n 'quantity' => 10,\n 'path' => '/hua1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'Acer Aspire',\n 'category' => 'Laptop',\n 'brand' => 'Other',\n 'description' => 'From everyday computing to a tough professional workload, experience a new level of design and performance options.',\n 'basic_price' => 499,'price' => 499,\n 'quantity' => 100,\n 'path' => '/acer1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 25,\n ]);\n Product::create([\n 'name' => 'HP Spectre',\n 'category' => 'Laptop',\n 'brand' => 'Other',\n 'description' => 'Special offers: Get 15% off Care pack with Consumer PC purchase (Exclusions apply) | Save 20% on McAfee with PC purchase | Save $30 on Microsoft Office with PC Purchase.',\n 'basic_price' => 1099,'price' => 1099,\n 'quantity' => 10,\n 'path' => '/hp1.jpg',\n ]);\n Product::create([\n 'name' => 'TV LED Samsung UE49RU7305',\n 'category' => 'TV',\n 'brand' => 'Samsung',\n 'description' => 'QLED 4K features stunning scenes with 8 million pixels – that’s four times the pixels of Full HD.',\n 'basic_price' => 549.00,'price' => 549.00,\n 'quantity' => 10,\n 'path' => '/samtv1.jpg',\n ]);\n Product::create([\n 'name' => 'TV LED Hisense H50B7500',\n 'category' => 'TV',\n 'brand' => 'Other',\n 'description' => 'With four times the resolution of an HD TV, you can enjoy your favorite content in a spectacular way.\nIt has a SMart TV VIDAA U operating system, developed specifically for Hisense televisions.',\n 'basic_price' => 300,'price' => 300,\n 'quantity' => 10,\n 'path' => '/hisense1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'Sony DSC-RX10M4 ',\n 'category' => 'Camera',\n 'brand' => 'Sony',\n 'description' => 'Next Gen speed: experience the world’s fastest 0. 02 sec AF with real time AF and object tracking\nEnhanced subject capture: wide 425 Phase/ 425 contrast detection points over 84 percent of the sensor',\n 'basic_price' => 1455,'price' => 1455,\n 'quantity' => 10,\n 'path' => '/sony1.jpg',\n ]);\n Product::create([\n 'name' => 'Nikon D850 FX-format Digital SLR Camera Body',\n 'category' => 'Camera',\n 'brand' => 'Other',\n 'description' => 'Nikon designed back side illuminated (BSI) full frame image sensor with no optical low pass filter\n45.7 megapixels of extraordinary resolution, outstanding dynamic range and virtually no risk of moiré',\n 'basic_price' => 2996.95,'price' => 2996.95,\n 'quantity' => 10,\n 'path' => '/nikon1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Alienware Aurora R4 Gaming PC',\n 'category' => 'Gaming',\n 'brand' => 'Other',\n 'description' => '9th Gen Intel Core i7 9700 (8-Core, 12MB Cache, up to 4.7GHz with Intel Turbo Boost Technology)\n NVIDIA GeForce RTX 2070 8GB GDDR6 (OC Ready)\n 16GB Dual Channel DDR4 at 2666MHz; up to 64GB (additional memory sold separately)\n 1TB M.2 PCIe NVMe SSD\n Windows 10 Home 64bit English',\n 'basic_price' => 1879,'price' => 1879,\n 'quantity' => 10,\n 'path' => '/alien1.jpg',\n ]);\n Product::create([\n 'name' => 'iBUYPOWER Gaming PC Computer Desktop Element 9260',\n 'category' => 'Gaming',\n 'brand' => 'Other',\n 'description' => 'System: Intel Core i7-9700F 8-Core 3. 0GHz (4. 70 GHz Max Turbo) | 16GB DDR4-2666 RAM | 1TB HDD | 240GB SSD | Genuine Windows 10 Home 64-bit\nGraphics: NVIDIA GeForce GTX 1660 Ti 6GB Dedicated Gaming Video Card | VR Ready | 1x DVI | 1x HDMI | 1x Display Port',\n 'basic_price' => 9999,'price' => 9999,\n 'quantity' => 10,\n 'path' => '/ibuy1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'DJ Sound Board',\n 'category' => 'Other',\n 'brand' => 'Other',\n 'description' => 'Let’s Get This Party Started Portable two channel DJ Controller for Serato DJ Lite (Included) compatible with Mac and PC\nComplete DJ System with DJ Lights Built in light show with three room filling LED light arrays that auto sync to your music and guarantee to make your party utterly unforgettable',\n 'basic_price' => 889,'price' => 889,\n 'quantity' => 10,\n 'path' => '/studio.jpg',\n ]);\n Product::create([\n 'name' => 'Galaxy Tab S6',\n 'category' => 'Tablet',\n 'brand' => 'Samsung',\n 'description' => 'The 2-in-1 that’s your all-in-one. Instantly transform your Android tablet into a PC desktop experience when you attach the keyboard with built-in trackpad.\nPower to multitask. Thanks to the speed of the fast mobile processor, rapidly switch between apps and tasks or immerse yourself in graphic-intensive games. Plus, get PC-caliber internal RAM.',\n 'basic_price' => 727.99,'price' => 727.99,\n 'quantity' => 10,\n 'path' => '/tab6_1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'TAB 7G Tablet 7 Inch, Android Tablet',\n 'category' => 'Tablet',\n 'brand' => 'Other',\n 'description' => 'TAB-7G Android Tablet - Features Android 8.1 Oreo GO and Google Mobile Service that quickly lauches apps, games and videos\n13 Inch HD Display - Bright, vivid 1024 x 600 Screen Resolution with Capacitive 5 Point Touch Screen perfect for streaming',\n 'basic_price' => 100,'price' => 100,\n 'quantity' => 10,\n 'path' => '/kids1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Playstation 4 Slim',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'Incredible games; Endless entertainment\nAll new lighter slimmer PS4\n1TB hard drive\nAll the greatest, games, TV, music and more',\n 'basic_price' => 429,'price' => 429,\n 'quantity' => 10,\n 'path' => '/play1.jpg',\n ]);\n Product::create([\n 'name' => 'DualShock 4 Wireless Controller for PlayStation 4',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'The feel, shape, and sensitivity of the dual analog sticks and trigger buttons have been improved to provide a greater sense of control, no matter what you play\nThe new multi touch and clickable touch pad on the face of the DualShock 4 Wireless Controller opens up worlds of new gameplay possibilities for both newcomers and veteran gamers\nThe DualShock 4 Wireless Controller features a built in speaker and stereo headset jack, putting several new audio options in the player\\'s hands',\n 'basic_price' => 74.99,'price' => 74.99,\n 'quantity' => 10,\n 'path' => '/cont1.jpg',\n ]);\n Product::create([\n 'name' => 'Xbox Wireless Controller',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'Experience the enhanced comfort and feel of the Xbox wireless controller\nFeatures a dark grey design with light grey and blue accents\nPlug in any compatible headset with the 3.5 millimeter stereo headset jack\nStay on target with textured grip\nIncludes Bluetooth technology for gaming on Windows 10 PCs and tablets',\n 'basic_price' => 72.99,'price' => 72.99,\n 'quantity' => 10,\n 'path' => '/xbox1.jpg',\n ]);\n // Product::create([\n // 'name' => 'Macbook Pro21',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro20',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro30',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro40',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro50',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro60',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro70',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro80',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro90',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1010',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1100',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro200',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro300',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro400',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro500',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro600',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro700',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro800',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro900',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro11010',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro112',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro223',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro3123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro412',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro5123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro6123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro7123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro8123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro9123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro101234',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro2123',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1233',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro4234',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro534',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro346',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro7534',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro8546',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro96453',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro10345',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n }", "public function __construct(Product $product = null)\n {\n $this->locale = Locale::workingLocale();\n $this->productEntity = $product;\n $this->specification_values = new ArrayCollection();\n $this->remove_specification_values = new ArrayCollection();\n $this->specials = new ArrayCollection();\n $this->remove_specials = new ArrayCollection();\n $this->dimensions = new ArrayCollection();\n $this->remove_dimensions = new ArrayCollection();\n $this->dimension_notifications = new ArrayCollection();\n $this->remove_dimension_notifications = new ArrayCollection();\n $this->related_products = new ArrayCollection();\n $this->up_sell_products = new ArrayCollection();\n $this->remove_up_sell_products = new ArrayCollection();\n $this->remove_related_products = new ArrayCollection();\n $this->images = MediaGroup::create(MediaGroupType::fromString(Type::IMAGE));\n $this->downloads = MediaGroup::create(MediaGroupType::fromString(Type::FILE));\n $this->weight = (float)0.00;\n $this->sequence = $this->getProductRepository()->getNextSequence($this->locale, $this->category);\n\n if (!$this->hasExistingProduct()) {\n return;\n }\n\n $this->id = $product->getId();\n $this->meta = $product->getMeta();\n $this->category = $product->getCategory();\n $this->brand = $product->getBrand();\n $this->vat = $product->getVat();\n $this->stock_status = $product->getStockStatus();\n $this->hidden = $product->isHidden();\n $this->type = $product->getType();\n $this->min_width = $product->getMinWidth();\n $this->min_height = $product->getMinHeight();\n $this->max_width = $product->getMaxWidth();\n $this->max_height = $product->getMaxHeight();\n $this->extra_production_width = $product->getExtraProductionWidth();\n $this->extra_production_height = $product->getExtraProductionHeight();\n $this->title = $product->getTitle();\n $this->summary = $product->getSummary();\n $this->text = $product->getText();\n $this->dimension_instructions = $product->getDimensionInstructions();\n $this->locale = $product->getLocale();\n $this->weight = $product->getWeight();\n $this->price = $product->getPrice();\n $this->stock = $product->getStock();\n $this->order_quantity = $product->getOrderQuantity();\n $this->from_stock = $product->isFromStock();\n $this->sku = $product->getSku();\n $this->ean13 = $product->getEan13();\n $this->isbn = $product->getIsbn();\n $this->sequence = $product->getSequence();\n $this->specification_values = $product->getSpecificationValues();\n $this->specials = $product->getSpecials();\n $this->dimensions = $product->getDimensions();\n $this->dimension_notifications = $product->getDimensionNotifications();\n $this->images = $product->getImages();\n $this->downloads = $product->getDownloads();\n $this->related_products = $product->getRelatedProducts();\n $this->up_sell_products = $product->getUpSellProducts();\n\n // just a fallback\n if (!$this->images instanceof MediaGroup) {\n $this->images = MediaGroup::create(MediaGroupType::fromString(Type::IMAGE));\n }\n\n // just a fallback\n if (!$this->downloads instanceof MediaGroup) {\n $this->downloads = MediaGroup::create(MediaGroupType::fromString(Type::FILE));\n }\n }", "public function run()\n {\n $product = Product::create([\n 'name' => 'Iphone 8',\n 'description' => 'iPhone 8 Cinza Espacial 64GB Tela 4.7',\n 'price' => 3.239,\n 'image' => 'iphone.jpg'\n ]);\n\n $product->categories()->attach([1, 2]);\n $product->features()->attach([1, 2]);\n\n $product = Product::create([\n 'name' => 'Smartphone Lg Nexus',\n 'description' => 'Smartphone Lg Nexus 5x Tela 5.2 32gb Branco',\n 'price' => 1.359,\n 'image' => 'nexus.png'\n ]);\n\n $product->categories()->attach([1, 2]);\n $product->features()->attach([1, 2]);\n\n $product = Product::create([\n 'name' => 'Violão Takamine',\n 'description' => 'Violão GD11MCE Mogno TAKAMINE',\n 'price' => 1.359,\n 'image' => 'violao.jpg'\n ]);\n\n $product->categories()->attach([3]);\n $product->features()->attach([3]);\n }", "public function run()\n {\n Product::create([\n 'product_name' => 'Cotton T-Shirt',\n 'product_code' => 'cts-rw-150',\n 'product_price' => 777,\n 'product_description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cusociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.',\n 'product_status' => 1,\n 'product_image' => '50713.png'\n \n ]);\n\n Product::create([\n 'product_name' => 'Cotton Blouse',\n 'product_code' => 'cb-pi-180',\n 'product_price' => 888,\n 'product_description' => 'Aenean massa. Cusociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',\n 'product_status' => 1,\n 'product_image' => '27945.png'\n \n ]);\n\n Product::create([\n 'product_name' => 'Washing Machine',\n 'product_code' => 'wm-12345',\n 'product_price' => 1212,\n 'product_description' => 'Nnatoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.',\n 'product_status' => 1,\n 'product_image' => '49899.jpg'\n \n ]);\n\n Product::create([\n 'product_name' => 'Computer Set',\n 'product_code' => 'comset-25000',\n 'product_price' => 25000,\n 'product_description' => 'Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.',\n 'product_status' => 1,\n 'product_image' => '87502.jpg'\n \n ]);\n\n Product::create([\n 'product_name' => 'TV',\n 'product_code' => 'htv-bla-45000',\n 'product_price' => 55000,\n 'product_description' => 'Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.',\n 'product_status' => 1,\n 'product_image' => '12923.jpg'\n \n ]);\n }", "public function createConfigProduct($type,$data=[],$attribute_set_id,$sku){\n\n $data['type_id'] = $type;\n $data['attribute_set_id'] = $attribute_set_id;\n $data['sku'] = $sku;\n\n /*foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }*/\n $data['custom_attributes'] = [];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n array_push( $data['custom_attributes'] , ['attribute_code' => 'url_key', 'value' => Inflector::slug($data['name'].' '.$sku)] );\n unset( $data['categories'], $data['website_ids'], $data['description'], $data['short_description'], $data['tax_class_id'], $data['associated_skus'], $data['price'], $data['price_changes'], $data['configurable_attributes'], $data['stock_data'] );\n\n $result = $this->curlRequest(\"/rest/V1/products/\", 1, json_encode([\"product\" => $data]));\n\n return $result;\n \n \n }", "function createProductType($productType_data)\n {\n \n $producttype_model = new ProductType();\n //var_dump($productType_data);die;\n $producttype_model->cat_id = $productType_data['cat_id'];\n $producttype_model->subcat_id = $productType_data['subcat_id'];\n $producttype_model->store_id = $productType_data['store_id'];\n $producttype_model->site_id = $productType_data['site_id'];\n $producttype_model->product_type = isset($productType_data['product_type']) ? $productType_data['product_type']: '';\n $producttype_model->special_upc = isset($productType_data['special_upc']) ? $productType_data['special_upc'] : '';\n $producttype_model->other_value = isset($productType_data['other_value']) ? $productType_data['other_value'] : '';\n $producttype_model->item_type = isset($productType_data['item_type']) ? $productType_data['item_type'] : '';\n $producttype_model->save();\n }", "public function store($productId, Request $request)\n {\n // —————————————————————————\n // Adding Objects - Inserting Data via API\n // —————————————————————————\n // return Description::create([\n // 'product_id'=>$productId,\n // 'body'=>$request->input('body')\n // ]);\n $product=Product::findOrFail($productId);\n $product->descriptions()->save(new Description([\n 'body'=>$request->input('body')\n ]));\n return $product->descriptions;\n }", "public function run()\n {\n Product::create([\n 'unit' => 1,\n 'description' => 'Vermifugo Ceva Petzi Gatos 600 mg - 4 Comprimidos',\n 'type' => 1,\n 'cfop' => 5102,\n 'price_sale' => 24.38,\n 'unity' => 'UN',\n 'quantity_stock' => 10,\n 'type_pack' => 1,\n 'width' => 9,\n 'heigth' => 2,\n 'length' => 14,\n 'description_comp' => 'Seus componentes são de ação eficaz na prevenção das larvas que atacam seu animal, através das glândulas mamárias, na pele ou ingeridas, ocasionando a morte em filhotes.',\n 'image' => 'https://api.kando-so.com.br/storage/images/products/vermifugo.jpg',\n 'brand' => 3,\n 'manufacturer' => 1,\n 'unit_per_box' => 12,\n 'price_cost' => 14.38,\n 'line_product' => 1,\n 'guarantee' => 60,\n 'situation' => 1,\n 'category' => 1,\n 'provider' => 1\n ]);\n Product::create([\n 'unit' => 1,\n 'description' => 'Ração Premier Pet Ambientes Internos Cães Filhotes Frango e Salmão',\n 'type' => 1,\n 'cfop' => 5102,\n 'price_sale' => 175.90,\n 'unity' => 'UN',\n 'quantity_stock' => 40,\n 'type_pack' => 1,\n 'width' => 90,\n 'heigth' => 22,\n 'length' => 140,\n 'description_comp' => 'Mantem a pelagem bonita e saudável, por ser rico em ácidos graxos essenciais Omega 3 e Omega 6.',\n 'image' => 'https://api.kando-so.com.br/storage/images/products/racao.jpg',\n 'brand' => 2,\n 'manufacturer' => 4,\n 'unit_per_box' => 1,\n 'price_cost' => 125.38,\n 'line_product' => 1,\n 'guarantee' => 60,\n 'situation' => 1,\n 'category' => 1,\n 'provider' => 1\n ]);\n }", "public function run()\n {\n $product1['name'] = [\n 'ar' => 'product1 ar',\n 'en' => 'product1 en'\n ];\n $product1['description'] = [\n 'ar' => 'desc product1 ar',\n 'en' => 'desc product1 en'\n ];\n $product1['purchase_price'] = 100.89;\n $product1['sale_price'] = 150.58;\n $product1['stock'] = 10;\n $product1['category_id'] = 1;\n\n $product2['name'] = [\n 'ar' => 'product2 ar',\n 'en' => 'product2 en'\n ];\n $product2['description'] = [\n 'ar' => 'desc product2 ar',\n 'en' => 'desc product2 en'\n ];\n $product2['purchase_price'] = 50.57;\n $product2['sale_price'] = 60.78;\n $product2['stock'] = 2;\n $product2['category_id'] = 1;\n\n $product3['name'] = [\n 'ar' => 'product3 ar',\n 'en' => 'product3 en'\n ];\n $product3['description'] = [\n 'ar' => 'desc product3 ar',\n 'en' => 'desc product3 en'\n ];\n $product3['purchase_price'] = 80.95;\n $product3['sale_price'] = 90.78;\n $product3['stock'] = 100;\n $product3['category_id'] = 2;\n\n Product::create($product1);\n Product::create($product2);\n Product::create($product3);\n }", "public function definition()\n {\n return [\n 'code' => '',\n 'title' => $this->faker->name(),\n 'brand' => $this->faker->name(),\n 'productCode' => 'Item-' . rand(0, 100),\n 'quantity' => rand(100, 1000),\n 'specifications' => $this->faker->text(),\n 'description' => $this->faker->text(),\n 'instructions' => $this->faker->text(),\n 'isAvailable' => '1',\n 'isElectrical' => '1',\n 'powerRating' => rand(100, 1000),\n 'price' => rand(100, 1000),\n 'size' => $this->faker->randomElement(['very small', 'small', 'medium','regular', 'large', 'very large']),\n 'thumb' => NULL,\n 'component_type_id' => $this->faker->randomElement(['11','12'])\n\n ];\n }", "public function run()\n {\n Product::create([\n 'name' => 'RECEPTOR GPS GEO XT SERIES 2008',\n 'description' => '',\n 'price' => '120,80',\n 'money' => 'USD',\n 'brand_id' => '1',\n 'exemplar_id' => '2',\n 'part_number' => '70950-20',\n 'color' => 'AMARILLO',\n 'category_id' => '1',\n 'subcategory_id' => '1',\n 'image' => '1.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'PROTECTOR DE PANTALLA DE CELULAR',\n 'description' => '',\n 'price' => '200,00',\n 'money' => 'PEN',\n 'brand_id' => '1',\n 'exemplar_id' => '1',\n 'part_number' => 'S/N',\n 'color' => 'BLANCO',\n 'category_id' => '1',\n 'subcategory_id' => '2',\n 'image' => '2.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CORREA DE RECEPTOR Y DOS PERNOS',\n 'description' => '',\n 'price' => '240,00',\n 'money' => 'PEN',\n 'brand_id' => '2',\n 'exemplar_id' => '6',\n 'part_number' => 'S/N',\n 'color' => 'NEGRO',\n 'category_id' => '7',\n 'subcategory_id' => '19',\n 'image' => '3.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CARGADOR-TRANSFORMADOR',\n 'description' => '',\n 'price' => '200,00',\n 'money' => 'PEN',\n 'brand_id' => '3',\n 'exemplar_id' => '8',\n 'part_number' => 'S/N',\n 'color' => 'NARANJA',\n 'category_id' => '3',\n 'subcategory_id' => '8',\n 'image' => '4.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CABLE INTERFACE (USB)',\n 'description' => '',\n 'price' => '600,00',\n 'money' => 'USD',\n 'brand_id' => '2',\n 'exemplar_id' => '6',\n 'part_number' => 'S/N',\n 'color' => 'ROJO',\n 'category_id' => '4',\n 'subcategory_id' => '10',\n 'image' => '5.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'ADAPTADOR MIRCRO SD',\n 'description' => 'Descripción de cable conector',\n 'price' => '450,00',\n 'money' => 'PEN',\n 'brand_id' => '2',\n 'exemplar_id' => '7',\n 'part_number' => 'S/N',\n 'color' => 'VERDE',\n 'category_id' => '3',\n 'subcategory_id' => '9',\n 'image' => '6.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'BATERÍA EXTERNA DE CELULAR',\n 'description' => '',\n 'price' => '420,00',\n 'money' => 'USD',\n 'brand_id' => '1',\n 'exemplar_id' => '5',\n 'part_number' => 'S/N',\n 'color' => 'AZUL',\n 'category_id' => '6',\n 'subcategory_id' => '17',\n 'image' => '7.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n }", "public function create(array $data) : OrderProductAttribute;", "public function create($data)\n {\n $productId = $data['product_id'];\n $data['title'] = str_replace('\"', '\\\"', $data['title']);\n $dataJson = str_replace(\"'\", \"\\'\", json_encode($data));\n \n $entry = $this->load($productId);\n $query = '';\n\n if (!empty($entry)) {\n $query = \"UPDATE products SET original_data = '{$dataJson}', last_status_change = NOW() WHERE id = {$productId}\";\n } else {\n $query = \"INSERT INTO products(id, original_data) VALUES ({$productId}, '{$dataJson}')\";\n }\n \n $this->query($query);\n $errors = $this->getLastError(); \n if ($errors) {\n http_response_code(400);\n die($errors);\n }\n \n return $this;\n }", "public function insertStockrecord($department, $products, $employee) {\n\n\n\t\tif ((intval($department) <= 0 )||(intval($employee) <= 0)) {\n\t\t\t//throw new Exception($errorMsg);\n\t\t\treturn array(412, 'insertStockrecord(): Invalid department or employee id ');\n\t\t}\n\n\t\tif (count($products) <= 0) {\n\t\t\treturn array(412, 'Refusing to save an empty list');\n\t\t}\n\n\t\t$doc\t= $this->getDoctrine();\n\t\t$em\t\t= $doc->getEntityManager();\n\n\t\t$r_emp\t= $doc->getRepository('DatabaseBundle:User');\n\t\t$r_dep\t= $doc->getRepository('DatabaseBundle:Departments');\n\t\t$r_prod = $doc->getRepository('DatabaseBundle:Products');\n\t\t$r_stockrecord\t\n\t\t\t\t= $doc->getRepository('DatabaseBundle:Stockrecord');\n\t\t$r_stockrecordData\n\t\t\t\t= $doc->getRepository('DatabaseBundle:StockrecordData');\n\n\t\t//$query= $em->createQuery( \n\t\t//\t\"SELECT * FROM DatabaseBundle:View\".ucfirst($view));\n\t\t//$result = $query->getResult($query::HYDRATE_ARRAY);\n\n\t\t$last = 0;\n\n\t\ttry {\n\t\t\t$responsiblePerson \t= $r_emp->find($employee);\n\t\t\t$fromDepartment \t= $r_dep->find($department);\n\t\t\t// makes a \n\t\t\t$newStockrecord \t= new Stockrecord();\n\t\t\t$newStockrecord->setDate( new \\Datetime() );\n\t\t\t$newStockrecord->setEmployee($responsiblePerson);\n\t\t\t$newStockrecord->setDepartment($fromDepartment);\n\n\t\t\t//$stmt = $this->dbh->prepare( \n\t\t\t//\"INSERT INTO stockrecord (date, employee_id, department_id) VALUES (NOW(), ?, ?)\");\n\t\t\t//$stmt->execute(array( $employee, $department));\n\t\t\t//$last = $this->dbh->lastInsertId();\n\t\t\t\n\n\t\t\t$logger = $this->get('logger');\n\t\t\t$logger->info(\"BEFORE INSERT nsr id:\");\n\t\t\t$logger->info($newStockrecord->getId());\n\t\t\t$em->persist($newStockrecord);\n\t\t\t$em->flush();\n\n\t\t\t$last = $em->getConnection()->lastInsertId();\n\t\t\t$last = intval($last, 10);\n\n\t\t\t$logger->info(\"AFTER INSERT nsr id:\");\n\t\t\t$logger->info($newStockrecord->getId());\n\n\t\t\t$logger->info(\"LAST\");\n\t\t\t$logger->info($last);\n\n\t\t} catch (\\Exception $e) {\n\t\t\terror_log( \"e\" );\n\t\t\terror_log( \"e\" );\n\t\t\terror_log( \"e\" );\n\t\t\terror_log( \"e\" );\n\t\t\terror_log( \"e\" );\n\t\t\terror_log( $e->getMessage() );\n\n\t\t\tif (strpos($e->getMessage(), 'access violation')) {\n\t\t\t\treturn array( 401, $e->getMessage() );\n\t\t\t}\n\t\t\treturn array(500, $e->getMessage());\n\n\t\t}\n\n\n\t\ttry {\n\n\n\t\t\t//$record\t= $r_stockrecord->find($newStockrecord->getId());\n\t\t\t$record\t= $em->find('DatabaseBundle:Stockrecord', $newStockrecord->getId());\n\n\t\t\tforeach($products as $prod) {\n\t\t\t\tif (\t(intval($prod['id']) > 0 ) && \n\t\t\t\t\t\t(intval($prod['quantity']) > 0 )) { // maybe they want to save qty= 0? \n\n\t\t\t\t\t$product \t\t= $r_prod->find($prod['id']);\n\t\t\t\t\t$record_data \t= new StockrecordData();\n\n\t\t\t\t\t$msg = \"\\nFOUND PRODUCT(\".$product->getId().\"): \" . $product->getName();\n\t\t\t\t\t$msg .= \"\\nFOUND RECORD(\".$record->getId().\") \" ;\n\t\t\t\t\t$logger->info($msg);\n\n\t\t\t\t\t$record_data->setStockrecord($record);\n\t\t\t\t\t$record_data->setProduct($product);\n\t\t\t\t\t$record_data->setQuantity($prod['quantity']);\n\n\t\t\t\t\t//$record->addStockrecord($record_data);\n\n\t\t\t\t\t//$em->persist($record);\n\t\t\t\t\t$em->persist($record_data);\n\n\n\t\t\t\t\t//$stmt = $this->dbh->prepare( \n\t\t\t\t\t//'INSERT INTO stockrecord_data (stockrecord_id, product_id, quantity)'.\n\t\t\t\t\t//' VALUES (?, ?, ?)');\n\t\t\t\t\t//$stmt->execute(array( $last, $prod['id'], $prod['quantity']));\n\n\n\t\t\t\t} else {\n\t\t\t\t\t//throw new Exception($errorMsg);\n\t\t\t\t\t//$dbh->rollBack();\n\t\t\t\t\treturn array( 417, \"insertStockrecord(): prod.id OR prod.qty < 0\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$em->flush();\n\t\t\t//$this->dbh->commit();\n\n\t\t} catch (PDOException $pdoe) {\n\t\t\t$dbh->rollBack();\n\t\t\terror_log( \"insertStockrecord(): \" + $pdoe->getMessage() );\n\t\t\treturn array( 500, $e->getMessage()) ;\n\t\t}\n\t\treturn array(200, 'saved');\n\t}", "public function prepareData($collection, $productIds)\n {\n $productCollection = clone $collection;\n $productCollection->addAttributeToFilter('entity_id', ['in' => $productIds]);\n while ($product = $productCollection->fetchItem()) {\n $variations = [];\n $collectionAttr = $this->getWeeAttributeCollection();\n if ($collectionAttr->getSize() > 0) {\n foreach ($collectionAttr as $item) {\n $item->setScopeGlobal(1);\n $tax = $this->getDataTax($product, $item);\n if (!empty($tax)) {\n foreach ($tax as $element) {\n $str = 'name=' . $item->getAttributeCode()\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'country=' . $element['country']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'state=' . $element['state']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'value=' . $element['value'];\n if (isset($element['website_id'])) {\n $str .= Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'website_id=' . $element['website_id'];\n }\n $variations[] = $str;\n }\n }\n }\n }\n $result = '';\n if (!empty($variations)) {\n $result = [\n self::WEE_TAX_VARIATIONS_COLUMN => implode(\n ImportProduct::PSEUDO_MULTI_LINE_SEPARATOR,\n $variations\n )\n ];\n }\n $this->weeTaxData[$product->getId()] = $result;\n }\n }", "public function saveProduct(Request $r){\n \t$name = $r->input('name');\n \t$shortDes = $r->input('short_des');\n \t$longDes = $r->input('long_des');\n \t$price = $r->input('price');\n \t$platform = $r->input('platform');\n \t$charas = $r->input('charas');\n \t$frontImage = $r->input('front_image');\n \t$p_url = $r->input('product_url');\n \t$p_owner = $r->input('product_owner');\n \t$p_creator = $r->input('product_creator');\n $type = $r->input('type');\n $youtube = $r->input('youtube_url');\n $image02 = $r->input('image_02');\n $image03 = $r->input('image_03');\n \t\n \t//Create the Associative array\n \t$product = new Product([\n \t\t'name'=> $name,\n \t\t'short_des' => $shortDes,\n \t\t'long_des' => $longDes,\n \t\t'price' => $price,\n \t\t'platform' => $platform,\n \t\t'characteristics' => $charas,\n \t\t'front_image' => $frontImage,\n \t\t'product_url' => $p_url,\n \t\t'product_owner' => $p_owner,\n \t\t'product_creator' => $p_creator,\n 'type' => $type,\n 'youtube_url' => $youtube\n \t]);\n\n \t//Add prodcut to DataBase\n \t$product->save();\n\n //If optional images are not null or not empty, then added to the 'images' table related each one with the product just created\n if($image02 != null || $image02 != ''){\n $img1 = new Images([\n 'url' => $image02,\n 'alt' => $name,\n 'description' => $shortDes\n ]);\n $product->images()->save($img1);\n }\n if($image03 != null || $image03 != ''){\n $img2 = new Images([\n 'url' => $image03,\n 'alt' => $name,\n 'description' => $shortDes\n ]);\n $product->images()->save($img2);\n }\n\n //Retreive all products\n $p = Product::orderBy('created_at', 'desc')->get();\n\n \treturn redirect()->route('portafolio', ['products' => $p]);\n\n }", "public function run()\n { \n //Return all category\n $categories = App\\Models\\Grouping\\Category::all();\n \n //Return all currency\n $currencies = App\\Models\\Currency\\Currency::all();\n\n //create null property\n $specs = null;\n $spec_headers = null;\n $spec_rows = null;\n $spec_datas = null;\n\n //For using all memory limit\n ini_set('memory_limit', '-1'); \n\n // Create spec & relation category \n $specs = factory(\\App\\Models\\Spec\\Spec::class)->create([\n 'category_id' => $categories->random()->id\n ]);\n\n //Showing all important Data in table\n $this->command->table(['id', 'category_id', 'created_at'], $specs->all()->map( function($spec)\n {\n return [\n $spec->id,\n $spec->category_id,\n $spec->created_at\n ];\n }));\n\n $this->command->info(\"Creating Specs.\");\n \n // How many genres you need, defaulting 1 to 10\n $specheadercount = $this->getCount('specHeader');\n\n // How many genres you need, defaulting 1 to 10\n $specrowcount = $this->getCount('specRow');\n\n // Create spec header & spec row & relation spec \n $specs->each( function ($spec) use (&$spec_rows, $specrowcount, $specheadercount, &$spec_headers )\n {\n $spec_headers = factory(\\App\\Models\\Spec\\SpecHeader::class, $specheadercount)->create([\n 'spec_id' => $spec->id\n ])->each( function ( $spec_header ) use (&$spec_rows, $specrowcount) {\n\n $spec_rows = factory(\\App\\Models\\Spec\\SpecRow::class, $specrowcount)->create([\n 'spec_header_id' => $spec_header->id\n ]);\n });\n });\n\n //Showing all important Data in table\n $this->command->table(['id', 'spec_id', 'created_at'], SpecHeader::all()->map( function($spec_header)\n {\n return [\n $spec_header->id,\n $spec_header->spec_id,\n $spec_header->created_at\n ];\n }));\n\n \n $this->command->info(\"Creating {$specheadercount} Spec Headers.\");\n\n //Showing all important Data in table\n $this->command->table(['id', 'spec_header_id', 'created_at'], SpecRow::all()->map( function($spec_row)\n {\n return [\n $spec_row->id,\n $spec_row->spec_header_id,\n $spec_row->created_at\n ];\n }));\n\n $this->command->info(\"Creating {$specrowcount} Spec Rows.\");\n\n // Create spec data & relation spec row & currency & data \n $spec_rows->each( function ($spec_row) use ($currencies, &$spec_datas) {\n\n $spec_datas = factory(\\App\\Models\\Spec\\SpecData::class)->create([\n 'spec_row_id' => $spec_row->id,\n 'currency_id' => $currencies->random()->id,\n 'data' => ($spec_row->values)\n ? rand(0, count($spec_row->values, true) - 1)\n : Faker::fullName()\n ]);\n });\n\n //Showing all important Data in table\n $this->command->table(['id', 'spec_row_id', 'currency_id', 'created_at'], $spec_datas::all()->map( function($spec_data)\n {\n return [\n $spec_data->id,\n $spec_data->spec_row_id,\n $spec_data->currency_id,\n $spec_data->created_at\n ];\n }));\n\n $this->command->info(\"Creating Specs Data.\");\n\n $this->command->info(\"Specification , Specificatoin Header , Specification Row & Specification Data Created! '-'\");\n }", "public function createFoodPermitDetails($foodPermitNum, $data) {\r\n\t\t\t$quantity \t = $data['quantity[]'];\r\n\t\t\t$unit \t \t = $data['unit[]'];\r\n\t\t\t$description = $data['description[]'];\r\n\t\t\t$cost \t\t = $data['cost[]'];\r\n\r\n\t\t\tfor ($i = 0; $i < sizeof($quantity); $i++){\r\n\t\t\t\t$this->db->insert('fp_details',\tarray(\t\"foodpermitID\" \t=> $foodPermitNum, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"quantity\" \t\t=> $quantity[$i], \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"unit\" \t\t\t=> $unit[$i], \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" \t=> $description[$i], \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"cost\" \t\t\t=> $cost[$i]));\r\n\t\t\t}\r\n\t\t}", "public function definition()\n {\n return [\n 'name' => 'product'.$this->faker->name(),\n 'alias'\t=> 'product',\n 'full_path'\t=> $this->faker->filePath(),\n 'category_id' => $this->faker->numberBetween(1,20),\n 'product_code' => $this->faker->randomNumber(9),\n 'id_1c' => $this->faker->randomNumber(9),\n 'description' => $this->faker->text(50),\n 'weight' => $this->faker->numberBetween(100,300),\n 'length' => $this->faker->numberBetween(100,300),\n 'width' => $this->faker->numberBetween(100,300),\n 'height' => $this->faker->numberBetween(100,300),\n 'volume' => $this->faker->randomNumber(2),\n 'order' => 99,\n 'price' => $this->faker->numberBetween(400,3000),\n 'old_price' => 3000 + $this->faker->randomNumber(3),\n 'discount_percent' => NULL,\n 'image_id' => $this->faker->numberBetween(1,100),\n 'sale' => $this->faker->numberBetween(0,1),\n 'recommended' => $this->faker->numberBetween(0,1),\n 'active' => $this->faker->numberBetween(0,1),\n 'seo_text' => $this->faker->text(10),\n 'seo_description' => $this->faker->text(10),\n 'seo_keywords' => $this->faker->text(10),\n 'seo_title' => $this->faker->text(10),\n 'seo_h1' => $this->faker->text(10),\n ];\n }", "public function run()\n {\n \\Schema::disableForeignKeyConstraints();\n Product::truncate();\n\n Product::factory(15)->create()->each(function (Product $product) {\n $product->addMediaFromUrl('https://picsum.photos/id/'.mt_rand(1, 50).'/1024/1024')\n ->usingName($product->title)\n ->preservingOriginal()\n ->toMediaCollection('image');\n $product->addMediaFromUrl('https://picsum.photos/id/'.mt_rand(1, 50).'/1024/1024')\n ->usingName($product->title)\n ->preservingOriginal()\n ->toMediaCollection('file_asset');\n\n $product->reviews()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'review']));\n $product->faq()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'faq']));\n $product->reviews()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'review']));\n for ($i = 1; $i <= 20; $i++) {\n $product->like(mt_rand(1, 10));\n }\n\n $product->addMeta('features', [\n '25 Illustrations',\n 'Bright & Modern Style',\n 'Fully Vector',\n 'AI, SVG, PNG Sources ',\n ]);\n\n $product->variants()->save(ProductVariant::factory()->make(['type' => 'regular', 'is_default' => true]));\n $product->variants()->save(ProductVariant::factory()->make(['type' => 'extended', 'is_default' => false]));\n $product->ratings()->saveMany(ProductRate::factory(3)->make());\n $product->like(mt_rand(1, 10));\n $product->dislike(mt_rand(1, 10));\n $product->attachTags(['best product', 'best seller', 'cheap', 'the best of the year'], 'product');\n $product->attachTags(['photoshop', 'illustrator', 'corel', 'acrobat', 'excel', 'word'], 'file_type');\n });\n }", "public function run()\n {\n DB::table('product_details')->insert([\n \t['properties'=>[{\"key\":\"Ram\",\"value\":\"1G\"},{\"key\":\"display\",\"value\":\"7in\"},{\"key\":\"CPU\",\"value\":\"intel\"}], 'product_id'=>1],\n \t['properties'=>[{\"key\":\"Ram\",\"value\":\"1G\"},{\"key\":\"display\",\"value\":\"7in\"},{\"key\":\"CPU\",\"value\":\"intel\"}], 'product_id'=>2],\n \t['properties'=>[{\"key\":\"Ram\",\"value\":\"1G\"},{\"key\":\"display\",\"value\":\"7in\"},{\"key\":\"CPU\",\"value\":\"intel\"}], 'product_id'=>3],\n \t['properties'=>[{\"key\":\"Ram\",\"value\":\"1G\"},{\"key\":\"display\",\"value\":\"7in\"},{\"key\":\"CPU\",\"value\":\"intel\"}], 'product_id'=>4],\n \t['properties'=>[{\"key\":\"Ram\",\"value\":\"1G\"},{\"key\":\"display\",\"value\":\"7in\"},{\"key\":\"CPU\",\"value\":\"intel\"}], 'product_id'=>5]\n ]);\n }", "function create() {\r\n\t\tglobal $ufoSession;\r\n\t\tglobal $ufoDb;\r\n\t\t$link = $ufoDb->getLink();\r\n\t\t$this->uid = $ufoSession->userId();\r\n\r\n\t\t// insert\r\n\t\t$query = \"INSERT INTO ufo_product (uid, name, description) VALUES ($this->uid, '$this->name', '$this->description')\";\r\n\t\t$result = pg_query($query) or die(\"Query failed : \" . pg_last_error());\r\n\t\t/* Get the auto increment Id of the last insert. */\r\n\t\t$this->oid = $ufoDb->insert_id(\"ufo_product_seq\");\r\n\t\t$this->initialized = True;\r\n\t}", "public function run()\n {\n Product::create([\n \"name\" => \"عسل آویشن 1کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 200500,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل آویشن 2کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 230000,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل آویشن 3کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 450000,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل گون 1کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 20005,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل گون 5کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 5123025,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'max:189|required',\n 'project_type'=>'max:189|required',\n 'existing_desc'=>'max:189|required',\n 'requirement_spec'=>'max:189|required',\n 'hardware_env'=>'max:189|required',\n 'software_env'=>'max:189|required',\n 'provisional_planning'=>'max:500|required'\n ]);\n\n $specification=new Specification();\n $specification->title=$request->input('title');\n $specification->project_type=$request->input('project_type');\n $specification->existing_desc=$request->input('existing_desc');\n $specification->requirement_spec=$request->input('requirement_spec');\n $specification->hardware_env=$request->input('hardware_env');\n $specification->software_env=$request->input('software_env');\n $specification->provisional_planning=$request->input('provisional_planning');\n $specification->created_by=auth()->user()->id;\n if($specification->save())\n return redirect('/specifications')->with('success','specification created');\n }", "function create($products = array())\n {\n if (is_array($products) && !empty($products)) {\n $i = 1;\n $e = 1;\n foreach($products as $item) {\n foreach($item as $key => $value) {\n if (is_array($value)) {\n foreach($value as $key2 => $vv) {\n if (in_array($key2, $this->__init['format'])) $this->__items[$i][] = $this->__serialiseItem($key2, $vv, $i);\n }\n ++$i;\n } else {\n if (in_array($key, $this->__init['format'])) $this->__items[$e][] = $this->__serialiseItem($key, $value, $e);\n }\n }\n $e++;\n }\n }\n }", "public function insert(Datastore $db, $productId)\n {\n $stmt = $db->prepare('INSERT INTO\n tbl_schema (col_product_id, col_name, col_type)\n VALUES (:productId, :name, :type)\n ');\n $stmt->bindValue(':productId', $productId, PDO::PARAM_INT);\n $stmt->bindValue(':name', $this->name, PDO::PARAM_STR);\n $stmt->bindValue(':type', $this->type, PDO::PARAM_STR);\n $db->execute($stmt);\n $this->entryId = $db->pdoHandle()->lastInsertId();\n\n // add secondary data tables for non-scalars\n switch ($this->type) {\n case self::LIST_TYPE:\n $this->createListDataTable($db);\n break;\n case self::MAP_TYPE:\n $this->createMapDataTable($db);\n break;\n }\n\n // add elements (which will create data table columns, so this needs to be last)\n foreach ($this->elements as $elem)\n $elem->insert($db, $this->entryId);\n }", "function createProduct($params = array()){\n\t\t\n\t\t//echo json_encode($params['data']); die();\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::POST , '/multivendor/product/create/product.json' , false, $params['data'] ),true);\n\t}", "private function createNewProduct($data, $taxClassIds, $logFile)\n\t{\t\n\t\t$sku = $data[1];\n\t\t$inventory = $data[4];\n\t\t$answer_code = $data[3];\n\n\t\t$websiteIds[0] = Mage::getModel('core/website')->load('Main Website', 'name')->getId();\n\t\t$storeIds[0] = Mage::getModel('core/store')->load('Default Store View', 'name')->getId();\n \t\n\t\t$product = new Mage_Catalog_Model_Product();\n\t\t$product->setWebsiteIDs($websiteIds);\n\t\t$product->setStoreIDs($storeIds);\n\t\t\t\n\t\tif($data[13] == \"V\") //Virtual Product\n\t\t{\n\t\t\t$product->setTypeId('virtual');\n\t\t}\n\t\telse if ($data[13] == \"D\") //Downloadable\n\t\t{\n\t\t\t$product->setTypeId('downloadable');\t\n\t\t}\n\t\telse if ($data[13] == \"G\") //Gift Card\n\t\t{\n\t\t\t$product->setTypeId('giftcard');\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$product->setTypeId('simple');\t\n\t\t}\n\n\t\t//Attribute Set Id\n\t\t$attrSetName = \"Default\";\n\t\t$entityTypeId = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId();\n\t\t$attributeSetName = $attrSetName;\n\t\t$attributeSetId = Mage::getModel('eav/entity_attribute_set')\n\t\t\t->getCollection()\n\t\t\t->setEntityTypeFilter($entityTypeId)\n\t\t\t->addFieldToFilter('attribute_set_name', $attributeSetName)\n\t\t\t->getFirstItem()->getAttributeSetId();\n\t\t\t\t\t\n\t\t$product->setAttributeSetId($attributeSetId);\n\t\t$product->setSku($sku);\t\t \t \t\t\n\t\t$product->setName($data[12]);\n \t\t$product->setVisibility(1);\n\t\t$product->setStatus(1);\n\n\t\t$urlKey = $product->getName();\n\t\t$urlKey = Mage::helper('catalog/product_url')->format($urlKey);\n\t\t$urlKey = preg_replace('#[^0-9a-z]+#i', '-',$urlKey);\n\t\t$urlKey = $urlKey . '-' . $sku;\n\t\t$urlKey = strtolower($urlKey);\n\t\ttrim($urlKey, '-');\n\t\t$product->setUrlKey($urlKey);\n\n\t $product->setTaxClassId($taxClassIds[\"Taxable Goods\"]);\n\t\t$product->setData('taxware_taxcode',$data[19]);\n\t\t\t\n\t\t$product->save();\n\t\tMage::log(\"Created Product: \".$product->getSku().\"\\r\\n\",null, $logFile);\n \t\t\t\t\t\n \t$this->createStockItem($product, $logFile);\n\n\t\treturn $product;\n\t}", "public function execute()\n {\n \n $session = $this->_objectManager->get('Magento\\Customer\\Model\\Session');\n $storeId=$session->getTestKey();\n $jsHelper = $this->_objectManager->get('Magento\\Backend\\Helper\\Js');\n $data=$this->getRequest()->getPost()->toarray();\n $entityIds=$jsHelper->decodeGridSerializedInput($data['links']['newproduct']);\n if (!is_array($entityIds) || empty($entityIds)) {\n $this->messageManager->addError(__('Please select product(s).'));\n $this->_redirect('*/*/new');\n } else {\n /**display the selected product and save it in database in custom_product_collection table **/\n $records=$this->_collection->getData();\n $entityId_str= implode(\",\", $entityIds);\n $all_store=$this->_objectManager->create('\\Magento\\Store\\Api\\StoreRepositoryInterface')->getList();\n \n $customcollection= $this->_objectManager->get('Magebees\\Newproduct\\Model\\Customcollection')->getCollection()->getData();\n foreach ($all_store as $store) {\n $store_id=$store->getId();\n $store_ids[]=$store_id;\n }\n \n if ($customcollection) {\n foreach ($customcollection as $custom) {\n $custom_storeids[]=$custom['store_id'];\n }\n if (in_array($storeId, $custom_storeids)) {\n if ($storeId==0) {\n foreach ($all_store as $store) {\n $store_id=$store->getId();\n foreach ($customcollection as $custom) {\n if ($custom['store_id']==$store_id) {\n $id=$custom['id'];\n $entity= explode(\",\", $entityId_str);\n $custom_entity= explode(\",\", $custom['entity_id']);\n $result = array_unique(array_merge($entity, $custom_entity));\n $new_entityId= implode(\",\", $result);\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $new_entityId);\n $data->setData('store_id', $store_id);\n $data->setData('id', $id);\n $data->save();\n }\n }\n if (!in_array($store_id, $custom_storeids)) {\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $entityId_str);\n $data->setData('store_id', $store_id);\n $data->save();\n }\n }\n } else {\n $store_arr=[0,$storeId];\n foreach ($store_arr as $store) {\n foreach ($customcollection as $custom) {\n if ($custom['store_id']==$store) {\n $id=$custom['id'];\n if ($store==0) {\n $entity= explode(\",\", $entityId_str);\n $custom_entity= explode(\",\", $custom['entity_id']);\n $result = array_unique(array_merge($entity, $custom_entity));\n $new_entityId= implode(\",\", $result);\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $new_entityId);\n $data->setData('store_id', $store);\n $data->setData('id', $id);\n $data->save();\n } else {\n $new_entityId=$entityId_str.\",\".$custom['entity_id'];\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $new_entityId);\n $data->setData('store_id', $store);\n $data->setData('id', $id);\n $data->save();\n }\n }\n }\n }\n }\n } else {\n if ($storeId==0) {\n foreach ($all_store as $store) {\n $store_id=$store->getId();\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $entityId_str);\n $data->setData('store_id', $store_id);\n $data->save();\n }\n } else {\n $store_arr=[0,$storeId];\n foreach ($store_arr as $store) {\n foreach ($customcollection as $custom) {\n if ($custom['store_id']==$store) {\n $id=$custom['id'];\n if ($store==0) {\n $entity= explode(\",\", $entityId_str);\n $custom_entity= explode(\",\", $custom['entity_id']);\n $result = array_unique(array_merge($entity, $custom_entity));\n $new_entityId= implode(\",\", $result);\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $new_entityId);\n $data->setData('store_id', $store);\n $data->setData('id', $id);\n $data->save();\n }\n }\n }\n if (!in_array($store, $custom_storeids)) {\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $entityId_str);\n $data->setData('store_id', $store);\n $data->save();\n }\n }\n }\n }\n } else {\n if ($storeId==0) {\n foreach ($all_store as $store) {\n $store_id=$store->getId();\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $entityId_str);\n $data->setData('store_id', $store_id);\n $data->save();\n }\n } else {\n $store_arr=[0,$storeId];\n foreach ($store_arr as $store) {\n $data=$this->_objectManager->create('Magebees\\Newproduct\\Model\\Customcollection');\n $data->setData('entity_id', $entityId_str);\n $data->setData('store_id', $store);\n $data->save();\n }\n }\n }\n \n $this->_redirect('*/*/');\n }\n }", "public function run()\n {\n \n\n \\DB::table('product_specifications')->delete();\n \n \\DB::table('product_specifications')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'name' => 'ĐỘNG CƠ & KHUNG XE',\n 'content' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; width: 100%; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\" width=\"601\">\n<tbody>\n<tr style=\"height:14px;\">\n<td colspan=\"3\" style=\"width:235px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Dòng xe</strong></p>\n</td>\n<td style=\"width:100px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n<td style=\"width:133px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n<td style=\"width:133px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Kích thước</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">D x R x C</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">mm x mm x mm</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">4735 x 1830 x 1795</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">4735 x 1830 x 1795</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">4735 x 1830 x 1795</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Chiều dài cơ sở</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">mm</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2750</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2750</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2750</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Chiều rộng cơ sở (Trước/ sau)</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">mm</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1540 x 1540</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1540 x 1540</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1540 x 1540</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Khoảng sáng gầm xe</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">mm</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">178</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">178</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">178</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Góc thoát (Trước/ sau)</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Độ</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">21/25</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">21/25</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">21/ 25</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Bán kính vòng quay tối thiểu</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">m</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">5,4</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">5,4</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">5,4</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Trọng lượng không tải</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">kg</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1695-1700</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1720-1725</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1755</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Trọng lượng toàn tải</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">kg</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2330</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2370</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">2330</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Động cơ</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Loại động cơ</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Động cơ xăng, VVT-i kép, 4 xy lanh thẳng hàng, 16 van DOHC</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Động cơ xăng, VVT-i kép, 4 xy lanh thẳng hàng, 16 van DOHC</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Động cơ xăng, VVT-i kép, 4 xy lanh thẳng hàng, 16 van DOHC</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Dung tích công tác</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">cc</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1998</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1998</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">1998</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Công suất tối đa</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">kW (Mã lực) @ vòng/phút</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">102 / 5600</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">102 / 5600</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">102 / 5600</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Mô men xoắn tối đa</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Nm @ vòng/phút</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">183 / 4000</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">183 / 4000</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">183 / 4000</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Dung tích bình nhiên liệu</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">L</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">55</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">55</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">55</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Hộp số</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Số tay 5 cấp</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tự động 6 cấp</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tự động 6 cấp</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Hệ thống treo</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Trước</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tay đòn kép, lò xo cuộn và thanh cân bằng</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tay đòn kép, lò xo cuộn và thanh cân bằng</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tay đòn kép, lò xo cuộn và thanh cân bằng</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Sau</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Liên kết 4 điểm, lò xo cuộn và tay đòn bên</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Liên kết 4 điểm, lò xo cuộn và tay đòn bên</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Liên kết 4 điểm, lò xo cuộn và tay đòn bên</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Vành &amp; Lốp xe</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Loại vành</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Mâm đúc</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Mâm đúc</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Mâm đúc</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Kích thước lốp</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">205/65R16</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">205/65R16</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">215/55R17</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Phanh</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Trước</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Đĩa thông gió</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Đĩa thông gió</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Đĩa thông gió</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Sau</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tang trống</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tang trống</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tang trống</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Tiêu chuẩn khí thải</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Euro 4</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Euro 4</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Euro 4</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Mức tiêu thụ nhiên liệu</p>\n</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Trong đô thị</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">lít / 100km</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">11.4</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Ngoài đô thị</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">lít / 100km</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">7.8</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:14px;\">\n<td style=\"width:56px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">&nbsp;</td>\n<td style=\"width:103px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">Kết hợp</p>\n</td>\n<td style=\"width:75px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">lít / 100km</p>\n</td>\n<td colspan=\"3\" style=\"width:367px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"398\">\n<tbody>\n<tr style=\"height:14px;\">\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">-</p>\n</td>\n<td style=\"width:133px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:14px;\">\n<p align=\"center\" style=\"text-align:center;\">9.1</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n</tbody>\n</table>',\n 'product' => 'alphard',\n ),\n 1 => \n array (\n 'id' => 2,\n 'name' => 'NGOẠI THẤT',\n 'content' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; width: 100%; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\" width=\"679\">\n<tbody>\n<tr style=\"height:18px;\">\n<td colspan=\"2\" style=\"width:217px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Dòng xe</strong></p>\n</td>\n<td style=\"width:154px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n<td style=\"width:154px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n<td style=\"width:154px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;vertical-align:top;\">\n<p align=\"center\" style=\"text-align:center;\"><strong>Innova 2.0E</strong></p>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cụm đèn trước</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Đèn chiếu gần</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Halogen phản xạ đa chiều</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Halogen phản xạ đa chiều</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">LED, dạng thấu kính</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Đèn chiếu xa</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Halogen phản xạ đa chiều</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Halogen phản xạ đa chiều</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Halogen, phản xạ đa chiều</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Đèn chiếu sáng ban ngày</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Hệ thống rửa đèn</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Hệ thống điều khiển đèn tự động</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Hệ thống mở rộng góc chiếu tự động</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Hệ thống điều chỉnh góc chiếu</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chỉnh tay</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chỉnh tay</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Tự động</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chế độ đèn chờ dẫn đường</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cụm đèn sau</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Bóng đèn thường</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Bóng đèn thường</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Bóng đèn thường</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Đèn báo phanh trên cao</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">LED</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">LED</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">LED</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Đèn sương mù</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Trước</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Sau</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Gương chiếu hậu ngoài</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng điều chỉnh điện</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng gập điện</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Tích hợp đèn báo rẽ</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Mạ Crôm</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng tự điều chỉnh khi lùi</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Bộ nhớ vị trí</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng sấy gương</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng chống bám nước</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng chống chói tự động</p>\n</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cánh hướng gió cản sau</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cánh hướng gió cản trước</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cánh hướng gió khoang hành lý</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cánh hướng gió bên hông</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Gạt mưa gián đoạn</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Gián đoạn</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Gián đoạn, điều chỉnh thời gian</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Gián đoạn, điều chỉnh thời gian</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chức năng sấy kính sau</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Có</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Ăng ten</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Dạng vây cá</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Dạng vây cá</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Dạng vây cá</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Tay nắm cửa ngoài</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cùng màu thân xe</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Cùng màu thân xe</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Mạ crôm</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Chắn bùn trước &amp; sau</p>\n</td>\n<td style=\"width:118px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border:none;border-top:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n<tr style=\"height:18px;\">\n<td style=\"width:99px;border:dotted #CDC5C5 1.0pt;border-left:none;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Ống xả kép</p>\n</td>\n<td style=\"width:118px;border:dotted #CDC5C5 1.0pt;border-left:none;padding:0cm 0cm 0cm 0cm;height:18px;\">&nbsp;</td>\n<td colspan=\"3\" style=\"width:461px;border-top:dotted #CDC5C5 1.0pt;border-left:none;border-bottom:dotted #CDC5C5 1.0pt;border-right:none;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"468\">\n<tbody>\n<tr style=\"height:18px;\">\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n<td style=\"width:156px;border:none;border-right:dotted #CDC5C5 1.0pt;padding:0cm 0cm 0cm 0cm;height:18px;\">\n<p align=\"center\" style=\"text-align:center;\">Không</p>\n</td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"clear:both;\">&nbsp;</div>\n</td>\n</tr>\n</tbody>\n</table>',\n 'product' => 'alphard',\n ),\n ));\n \n \n }", "public function run()\n {\n $array_Bshirt = ['เสื้อเชิ้ต','เสื้อแจ๊คเก็ต','เสื้อกล้าม'];\n $array_Gshirt = ['เสื้อยืด','เดรส'];\n $array_Bshoes = ['รองเท้าผ้าใบ','รองเท้าแตะ'];\n $array_Gshoes = ['รองเท้าส้นสูง', 'รองเท้ารัดส้น'];\n $array_Bag = ['กระเป๋าสะพายหลัง','กระเป๋าสะพายข้าง'];\n $array_primary = [\n 'เสื้อผ้าผู้ชาย' => $array_Bshirt,\n 'เสื้อผ้าผู้หญิง' => $array_Gshirt,\n 'รองเท้าผู้ชาย' => $array_Bshoes,\n 'รองเท้าผู้หญิง' => $array_Gshoes,\n 'กระเป๋า' => $array_Bag,\n ];\n\n $product = new ProductType;\n foreach ($array_primary as $key=>$primary){\n foreach ($primary as $type){\n $product->product_primary_type = $key;\n $product->product_secondary_type = $type;\n $product->save();\n $product = new ProductType;\n }\n }\n }", "public function run()\n {\n factory(Product::class, 15)->create();\n Manufacturer::get()->each(function ($manufacturer) {\n factory(Product::class, 10)->create([\n 'category_id' => 11,\n 'manufacturer_id' => $manufacturer->id\n ]);\n });\n }", "public function run()\n {\n Product::create(['name'=>'Product_A']);\n Product::create(['name'=>'Product_B']);\n Product::create(['name'=>'Product_C']);\n\n }", "public function run()\n {\n factory(App\\Entities\\Product::class,10000)->create()->each(function($p){\n // $p->categories()->attach(mt_rand(1,7),['school_id'=>$p->school_id]);\n $q=factory(App\\Entities\\ProductQuestion::class,2)->make();\n $p->questions()->saveMany($q);\n });\n\n //\n }", "public function store() { \n\t\t$name = $this->post('name');\n\t\t$price = $this->post('price'); \n\t\t$description = $this->post('description'); \n\n\t\tif ($name && $description && $price) {\n\t\t\t$this->product->name = $name;\n\t\t\t$this->product->price = $price;\n\t\t\t$this->product->is_deleted = false;\n\t\t\t$this->product->description = $description;\n\t\t\t$this->product->created_at = date(\"Y-m-d h:i:s\");\n\t\t\t$this->product->updated_at = date(\"Y-m-d h:i:s\");\n\n\t\t\t$create = $this->product->addProduct($this->product);\n\t\t\tif ($create) { \n\t\t\t\t$data = [ \"message\" => \"product has been created!\"];\n\t\t\t\t$statusCode = 201; \n\t\t\t}\n\t\t\telse {\n\t\t\t\t$data = [ \"message\" => \"product cannot create\"];\n\t\t\t\t$statusCode = 500; \n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$data = [ \"message\" => \"required missinng fields\"];\n\t\t\t$statusCode = 400; \n\t\t}\n\t\treturn $this->response($data, $statusCode);\n\t}", "public function testProductCreation()\n {\n $response = $this->json('POST', '/api/v1/products', ['name' => 'Sally','sku'=>'Test']);\n\n $response->assertStatus(201)->assertJson(['code' => 201]);\n }", "public function run()\n {\n $productsAttrRecords=[\n ['id'=>1,'product_id'=>1,'size'=>'Small','price'=>500,'stock'=>50,'sku'=>'Bl-02-S','status'=>1],\n ['id'=>2,'product_id'=>1,'size'=>'Medium','price'=>700,'stock'=>40,'sku'=>'Bl-02-M','status'=>1],\n ['id'=>3,'product_id'=>1,'size'=>'Large','price'=>1000,'stock'=>30,'sku'=>'Bl-02-L','status'=>1]\n \n ];\n \n ProductsAttribute::insert($productsAttrRecords);\n }", "public function store(Request $request)\n {\n // return $request;\n try{\n DB::beginTransaction();\n\n $type_code = TypeCode::where('id', $request['product_type_code_id'])->first()->type_code;\n\n $series = '';\n $series_number = 1;\n if(Products::first()) $series_number = (int)Products::select(DB::raw('SUBSTR(`product_code`, 7, 12) as product_code_substr'))->orderBy('product_code_substr', 'desc')->first()->product_code_substr + 1;\n $series_length = 7;\n $series = substr('0000000'.$series_number, - $series_length);\n\n $product_code = 'AD'.$request['product_category_id'].'-'.$type_code.''.$series;\n\n $product_id = Products::insertGetId([\n 'ss_reference_no' => $request['ss_reference_no'], \n 'order_item_code' => $request['order_item_code'], \n 'product_code' => $product_code, \n 'product_part_number' => $request['product_part_number'], \n 'product_name' => $request['product_name'], \n 'product_category_id' => $request['product_category_id'],\n 'product_classification_id' => $request['product_classification_id'],\n 'product_type_code_id' => $request['product_type_code_id'],\n 'product_stock_quantity' => $request['product_stock_quantity'],\n 'product_stock_quantity_unit' => $request['product_stock_quantity_unit'],\n 'product_location' => $request['product_location'],\n 'product_customer' => $request['product_customer'],\n 'product_last_in' => Carbon::now(),\n 'employee_id' => auth('api')->user()->id,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n // ProductsTracking::create([\n // 'product_id' => $product_id, \n // 'product_flow' => 1, \n // 'product_quantity' => $request['product_stock_quantity'],\n // 'employee_id' => auth('api')->user()->id,\n // ]);\n\n DB::commit();\n return ['message' => 'Product successfully registered.'];\n }\n catch(\\Exception $e){\n DB::rollback();\n throw $e;\n }\n }", "public function createRecord();", "public function run()\n {\n $users = User::select('id')->whereHas('role', function (Builder $query) {\n $query->where('level', '>=', 2);\n })->get();\n\n $sections = Section::select('id')->where('status', 1)->get();\n\n //$propertyValues = PropertyValue::select(['id', 'property_id'])->get();\n $properties = Property::with('values:id,property_id')->select(['id'])->get();\n\n factory(Product::class, 1000)->create([\n 'user_id' => $users->random()->id,\n 'section_id' => $sections->random()->id,\n ])->each(function ($product) use ($properties) {\n\n /*$randomValues = $propertyValues->random(rand(1, 8))\n ->pluck('property_id', 'id')\n ->map(function ($propertyId) {\n return ['property_id' => $propertyId];\n });*/\n\n $randomProperties = $properties->random(rand(1, 8));\n $randomValues = [];\n\n foreach ($randomProperties as $property) {\n $randomValues[$property->values->random()->id] = ['property_id' => $property->id];\n }\n\n $product->values()->attach($randomValues);\n });\n\n /*Product::create([\n 'name' => 'Acer Nitro 5 AN517-51-55RE',\n 'description' => 'Ноутбук Acer Nitro 5 AN517-51-55RE с диагональю 17.3\" – это игровое устройство.',\n 'price' => 35000,\n 'section_id' => 1,\n 'user_id' => 1\n ]);*/\n }", "public function advnceProduct(Request $request){\n $productId = $request->productId;\n if (isset($productId)) {\n $product = Product::find($productId);\n if ($request->section) {\n $section = implode(',', $request->section);\n $product->update( [\n 'productSection' => @$section, \n ]);\n }\n\n if ($request->related_product) {\n $allproduct = implode(',', $request->related_product);\n } \n\n if ($request->customerGroupId != '') {\n $customerGroupId = implode(',', @$request->customerGroupId); \n }\n \n $productSection = ProductSections::create( [\n 'productId' => $productId,\n 'hotDiscount' => $request->hotDiscount,\n 'hotDate' => $request->hotDate,\n 'specialDiscount' => $request->specialDiscount,\n 'specialDate' => $request->specialDate,\n 'free_shipping' => $request->free_shipping,\n 'pre_order' => $request->pre_order,\n 'pre_orderDuration' => $request->pre_orderDuration,\n 'related_product' => @$allproduct,\n \n ]);\n\n $countGroup = count($request->customerGroupPrice);\n if($request->customerGroupPrice){\n $postData = [];\n for ($i=0; $i <$countGroup ; $i++) { \n $postData[] = [\n 'productId' => $productId,\n 'customerGroupId' => $request->customerGroupId[$i], \n 'customerGroupPrice' => $request->customerGroupPrice[$i]\n ];\n }\n \n CustomerGroupSections::insert($postData);\n }\n \n return redirect(route('productadd.page',['productId'=>$productId]))->with('msg','Advance Information Save Successfully')->withInput();\n }else{\n return redirect(route('productadd.page'))->with('error_msg','Please Complete Basic Information ')->withInput(); \n } \n }", "public function run()\n {\n $productData = [\n ['id'=>1,'product_id'=>2,'size'=>'medium','price'=>120,'stock'=>200,'sku'=>'abc123','status'=>1],\n ['id'=>2,'product_id'=>3,'size'=>'small','price'=>110,'stock'=>190,'sku'=>'abc122','status'=>1],\n ['id'=>3,'product_id'=>4,'size'=>'large','price'=>90,'stock'=>150,'sku'=>'abc123','status'=>1]\n ];\n\n\n ProductAttribute::insert($productData);\n\n\n\n }", "public function run()\n {\n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'Laptop' . $i,\n 'slug' => 'Laptop' . $i,\n 'details' => 'MacBook Air with Touch ID MVFH2 Mid 2019 Model - Intel Core i5-8th Gen, ' . rand(13, 19) . '-Inch Retina With TrueTone, 128 GB SSD, 8 GB RAM, Eng-KB, MacOS, Space Gray, International Version',\n 'price' => rand(1300, 3000),\n 'description' => 'Keyboard Languages : English\n Touch screen : No\n Usage : Multi\n Memory Technology : LPDDR3\n Screen Size Range : 13 - 13.9 Inch\n Display Size (Inch) : 13.3 Inch\n External Product ID Type : UPC-A\n Optical Drive Type : Without Optical Drive\n Number of Processor Core : Dual Core\n RAM Type : ddr_sdram\n RAM Size : 8 GB\n Operating System Type : Mac\n Processor Family : Intel 8th Generation Core i5'\n ])->categories()->attach(1);\n\n }\n\n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'TV' . $i,\n 'slug' => 'TV' . $i,\n 'details' => 'Samsung '. rand(32, 70) .' Inch 4K Ultra HD Smart LED TV with Built-in Receiver, UA58RU7100 - Black',\n 'price' => rand(500, 1000),\n 'description' => 'Picture Engine: UHD Engine\n Motion Rate: 100\n PQI (Picture Quality Index): 1400\n HDR (High Dynamic Range): HDR\n HDR 10+: Yes\n HLG (Hybrid Log Gamma): Yes\n Contrast: Mega Contrast\n Color: PurColor\n Micro Dimming: UHD Dimming\n Contrast Enhancer: Yes\n Auto Motion Plus: Yes\n Film Mode: Yes\n Natural Mode Support: Yes'\n ])->categories()->attach(2);\n }\n\n for ($i=1; $i < 21; $i++) {\n\n Product::create([\n 'name' => 'Shoes' . $i,\n 'slug' => 'Shoes' . $i,\n 'details' => 'SPORT Fashion Sneakers For Men - Gray',\n 'price' => rand(50,100),\n 'description' => 'Color : White & Red\n Material : Mixed\n Size : 45 EU\n Targeted Group : Men\n Style : Fashion Sneakers\n Occasion : Casual Shoe'\n ])->categories()->attach(4);\n }\n \n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'Watch' . $i,\n 'slug' => 'Watch' . $i,\n 'details' => 'Casio Vibration Alarm For Men Digital Resin Band Watch W 735H 2Av, Quartz',\n 'price' => 99,\n 'description' => 'Brand: Casio\n Model Number: W-735H-2AV\n Watch Type: Sport Watch\n Watch Shape: Round\n Movement: Quartz\n Display Type: Digital\n Dial Color: Black\n Dial Window Material: Resin\n Case Material: Resin\n Case Diameter: 51.4 mm\n Case Thickness: 16.1 mm\n Band Material: Resin'\n ])->categories()->attach(3);\n }\n\n $products = Product::find([1,2,10,15,25,30,35]);\n\n foreach ($products as $pro) {\n $pro->categories()->attach(5);\n }\n \n\n /*Product::create([\n \t'name' => 'Book',\n \t'slug' => 'Book',\n \t'details' => 'sunt in culpa qui officia',\n \t'price'\t=> 199,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'T-shirt',\n \t'slug' => 'T-shirt',\n \t'details' => 'Excepteur sint unt in culpa qui officia',\n \t'price'\t=> 59,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'Smartphone',\n \t'slug' => 'Smartphone',\n \t'details' => 'Excepteur sint occaecat qui officia',\n \t'price'\t=> 6999,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'Ipad',\n \t'slug' => 'Ipad',\n \t'details' => 'Excepteur sint occaecat cupidatat non proident',\n \t'price'\t=> 10999,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n 'name' => 'PC',\n 'slug' => 'PC',\n 'details' => 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia',\n 'price' => 9999,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);*/\n }", "public function run()\n {\n $product = [\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Polenta',\n 'description' => 'aaa',\n 'bar_code' => '123',\n 'image' => 'imagen1',\n //'price' => 25,\n ],\n [\n 'category_id' => 2,\n 'status_product_id' => 1,\n 'name' => 'LEGO',\n 'description' => 'rrr',\n 'bar_code' => '432',\n 'image' => 'imagen2',\n //'price' => 800,\n ],\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Fideos',\n 'description' => 'bbb',\n 'bar_code' => '678',\n 'image' => 'imagen3',\n //'price' => 30,\n ],\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Arroz',\n 'description' => 'ccc',\n 'bar_code' => '888',\n 'image' => 'imagen4',\n //'price' => 45,\n ]\n ];\n\n foreach ($product as $key => $value) {\n Product::create($value);\n }\n }", "function makeProduct($productcode) {\n\t$product = new Product();\n \t$product->category = substr($productcode, 0, 1);\n \t$i = strpos($productcode, '-', 1) + 1;\n \t$product->style = substr($productcode, 1, $i - 2);\n \t$j = strpos($productcode, '-', $i) + 1;\n \t$product->type = substr($productcode, $i, $j - 1 - $i);\n \t$product->material = substr($productcode, $j);\n\treturn $product;\n}", "public function run()\n {\n Product::create([\n 'nombre' => 'APPLICA Lenguaje 6 (TEXTO Y DIGITAL)',\n 'cod_sap' => '160840',\n 'linea' => 'TEXTO',\n 'formato' => 'TEXTO Y DIGITAL',\n 'pvp' => '95100',\n 'grado' => '6',\n 'area' => 'INGLES'\n ]);\n Product::create([\n 'nombre' => 'GA MI ÚLTIMO VERANO (2014)',\n 'cod_sap' => '159357',\n 'linea' => 'LITERATURA ',\n 'formato' => 'TEXTO PAPEL',\n 'pvp' => '13500',\n 'grado' => 'GRAN ANGULAR',\n 'area' => 'LITERATURA '\n ]);\n Product::create([\n 'nombre' => 'CONECTA 3.0 Naturales 7 (TEXTO Y DIGITAL)',\n 'cod_sap' => '174429',\n 'linea' => 'TEXTO',\n 'formato' => 'TEXTO Y DIGITAL',\n 'pvp' => '95500',\n 'grado' => '7',\n 'area' => 'CIENCIA'\n ]);\n Product::create([\n 'nombre' => 'PREP FOR LIFE 3 DGB STUDENT S BOOK TEXTO PAPEL',\n 'cod_sap' => '163261',\n 'linea' => 'UDP',\n 'formato' => 'TEXTO PAPEL',\n 'pvp' => '88200',\n 'grado' => '8',\n 'area' => 'INGLES'\n ]);\n Product::create([\n 'nombre' => 'SAVIA MATEMATICAS 5 (DIGITAL PURO)',\n 'cod_sap' => '191284',\n 'linea' => 'TEXTO',\n 'formato' => 'DIGITAL PURO',\n 'pvp' => '76400',\n 'grado' => '5',\n 'area' => 'MATEMATICAS'\n ]);\n }", "public function testInsertProduct_ValidData()\n\t{\n\t\t// Create new Product object\n\t\t$args = new SimpleProduct();\n\t\t$args->module_srl = 201;\n\t\t$args->member_srl = 4;\n\t\t$args->product_type = \"simple\";\n\t\t$args->title = \"Product 1\";\n\t\t$args->description = \"Lorem ipsum dolor sit amet, te amet scaevola volutpat eum, ius an decore recteque patrioque, mel sint epicurei ut. Ea lorem noluisse est, ea sed nisl libris electram. Cu vivendum facilisis scribentur mel, bonorum elaboraret no per. Nec eu vidit omittantur, ei putant timeam detraxit quo, urbanitas efficiendi sit id. Mei putent eirmod voluptua ut, at dictas invenire delicata duo.\n\nPatrioque conceptam in mea. Est ad ullum ceteros, pro quem accumsan appareat id, pro nominati electram no. Duo lorem maiorum urbanitas te, cu eum dicunt laoreet, etiam sententiae scriptorem at mel. Vix tamquam epicurei et, quo tota iudicabit an. Duo ea agam antiopam. Et per diam percipitur.\";\n\t\t$args->short_description = \"short_description\";\n\t\t$args->sku = \"SKU1\";\n\t\t$args->status = '1';\n\t\t$args->friendly_url = \"product1\";\n\t\t$args->price = 10.5;\n\t\t$args->qty = 0;\n\t\t$args->in_stock = \"Y\";\n\n\t\t$shopModel = getModel('shop');\n\t\t$repository = $shopModel->getProductRepository();\n\t\ttry\n\t\t{\n\t\t\t// Try to insert the new Product\n\n\t\t\t$product_srl = $repository->insertProduct($args);\n\n\t\t\t// Check that a srl was returned\n\t\t\t$this->assertNotNull($product_srl);\n\n\t\t\t// Read the newly created object from the database, to compare it with the source object\n\t\t\t$output = Database::executeQuery(\"SELECT * FROM xe_shop_products WHERE product_srl = $product_srl\");\n\t\t\t$this->assertEquals(1, count($output));\n\n\t\t\t$product = $output[0];\n\t\t\t$this->assertEquals($args->module_srl, $product->module_srl);\n\t\t\t$this->assertEquals($args->member_srl, $product->member_srl);\n\t\t\t$this->assertEquals($args->product_type, $product->product_type);\n\t\t\t$this->assertEquals($args->title, $product->title);\n\t\t\t$this->assertEquals($args->description, $product->description);\n\t\t\t$this->assertEquals($args->short_description, $product->short_description);\n\t\t\t$this->assertEquals($args->sku, $product->sku);\n\t\t\t$this->assertEquals($args->status, $product->status);\n\t\t\t$this->assertEquals($args->friendly_url, $product->friendly_url);\n\t\t\t$this->assertEquals($args->price, $product->price);\n\t\t\t$this->assertEquals($args->qty, $product->qty);\n\t\t\t$this->assertEquals($args->in_stock, $product->in_stock);\n\t\t\t$this->assertNotNull($product->regdate);\n\t\t\t$this->assertNotNull($product->last_update);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$this->fail($e->getMessage());\n\t\t}\n\t}", "abstract protected function prepareVendorProductData(int $vendorProductId);", "abstract protected function prepareVendorProductData(int $vendorProductId);", "public function testCreateProductStore()\n {\n\n }", "public function run()\n {\n $product = new Product([\n 'title' => 'Praesent dictum orci',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vitae turpis et purus consequat dictum nec eu ante. Praesent eget eros enim. Praesent eu nunc metus. Vestibulum ac maximus ligula. Praesent a lacinia nisi, non rhoncus odio. In quis odio imperdiet, pellentesque orci sit amet, pellentesque nisl. Sed vitae dignissim magna. Suspendisse vel mi gravida, volutpat augue a, feugiat turpis. Nulla eu sollicitudin tortor. Nam bibendum elit nec turpis lacinia efficitur. In neque ante, pellentesque sed mauris id, condimentum suscipit massa. Fusce quis ligula at erat luctus maximus egestas non dolor. Aenean aliquam est nisi, quis volutpat mi sagittis sed. Praesent sit amet lobortis lectus. Duis tellus est, ullamcorper sed metus in, viverra pretium libero. Curabitur porttitor orci ac justo venenatis, et dapibus justo vulputate.',\n 'image_path' => 'goods_001.jpg',\n 'price' => 41\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Etiam semper ornare',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at maximus dolor, dignissim euismod ex. Nullam sit amet convallis dolor. Suspendisse erat diam, rhoncus at pharetra et, blandit in ligula. Etiam at auctor sem. Mauris vehicula sodales metus vel fermentum. Proin lacinia sem risus, vitae porta metus tempus in. Vestibulum convallis, odio non placerat accumsan, nunc leo aliquam orci, non lacinia ante nisi non nisi. In cursus sapien eu orci lacinia gravida. Sed eu nunc vitae magna semper tristique vitae a dui. Vestibulum eu finibus nisl. Sed rutrum egestas nisl, sed iaculis ipsum placerat vel. Praesent pulvinar imperdiet est quis pharetra. Suspendisse aliquet nulla vitae feugiat feugiat. Quisque sit amet dui lectus. Aenean commodo tellus massa, quis iaculis nisl aliquam a. Maecenas ullamcorper ultricies sollicitudin.',\n 'image_path' => 'goods_002.jpg',\n 'price' => 25\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Sed sed risus',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut quis quam orci. Proin non metus bibendum, eleifend nibh eget, hendrerit mi. Aliquam sollicitudin finibus mollis. Phasellus erat tellus, placerat vitae imperdiet at, sagittis ac felis. Suspendisse faucibus placerat nisi, vel mollis orci cursus at. Sed ac pulvinar risus, id pharetra elit. Etiam bibendum, nulla ac porta suscipit, est tortor dapibus augue, venenatis ultrices diam est elementum sem. Morbi malesuada varius nulla, ut elementum est semper sit amet. Suspendisse scelerisque metus vitae sagittis bibendum. Phasellus ullamcorper tellus id leo dignissim venenatis nec ac ante. Pellentesque nisl nibh, sollicitudin vitae aliquam a, molestie vel sapien. Donec non libero blandit, maximus sapien ut, dictum tellus. Sed tincidunt, elit imperdiet tempor placerat, ligula sapien aliquam turpis, non fringilla ex diam vel ante.',\n 'image_path' => 'goods_003.jpg',\n 'price' => 29\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Vivamus non sodales',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mattis, massa non posuere aliquet, mauris eros tincidunt nibh, sit amet bibendum quam neque et sapien. Morbi porttitor malesuada fermentum. Sed vestibulum, nunc ac porttitor efficitur, justo neque mollis massa, vel porttitor lectus massa vel sem. Integer suscipit nisl metus, sed luctus sem tincidunt et. Sed aliquam nunc non euismod laoreet. Sed id dolor auctor, volutpat dui in, dignissim metus. Vestibulum sit amet semper tortor. Duis eget erat et est volutpat malesuada. Aenean efficitur orci lacus, efficitur semper felis tincidunt a. Aenean fringilla ligula et sapien aliquet, vitae rhoncus sapien mattis.',\n 'image_path' => 'goods_004.jpg',\n 'price' => 27\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Sed magna diam',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vel mollis mauris. Suspendisse pharetra egestas semper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus velit dolor, sodales et vestibulum sit amet, scelerisque at tellus. Fusce eu cursus neque. Pellentesque quis tincidunt nibh. Vestibulum fermentum eu est eu blandit. Integer sem nunc, maximus quis facilisis in, convallis vel nisi. Sed ac pellentesque lacus. Curabitur euismod ultricies egestas. Mauris ipsum lectus, pretium sit amet metus in, pellentesque aliquam magna. Praesent finibus a nunc ultrices pulvinar.',\n 'image_path' => 'goods_005.jpg',\n 'price' => 44\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Nam eu arcu',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porta auctor nisl, id porttitor mauris gravida quis. Ut non elit venenatis, gravida elit sit amet, pharetra arcu. Mauris id tempus sem, nec dapibus orci. Aliquam ac nibh egestas, fringilla nibh non, tincidunt leo. Pellentesque nec lacinia tortor, sed laoreet enim. Duis et urna sed ante consectetur iaculis dapibus sit amet purus. Aliquam et gravida odio, sit amet luctus augue. Mauris ultrices sagittis enim non mollis. Phasellus tempus elit non quam semper, id varius ex dignissim. Proin sed pellentesque eros, vehicula efficitur nunc. Aliquam ultrices dolor sit amet neque semper, sed efficitur tellus blandit. Morbi non rhoncus nibh. Etiam blandit ante quis sapien lobortis laoreet. Vestibulum maximus commodo justo nec efficitur.',\n 'image_path' => 'goods_006.jpg',\n 'price' => 26\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Vestibulum at ultricies',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam nisl tortor, fermentum quis sem ut, accumsan aliquet est. In interdum porta lacus ut posuere. Curabitur egestas erat rutrum sem vehicula condimentum. Sed sit amet consectetur velit, vitae elementum neque. Maecenas sodales arcu sed lorem euismod, id dignissim elit dictum. Duis lacus ipsum, fermentum in finibus vel, tristique vitae orci. Nam ullamcorper a ipsum in pulvinar.',\n 'image_path' => 'goods_007.jpg',\n 'price' => 29\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Praesent pretium, diam',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi massa libero, molestie vitae urna a, sagittis vestibulum elit. Cras et nibh odio. Sed ut augue blandit, lacinia est eget, laoreet velit. Praesent ante mauris, imperdiet id facilisis eget, cursus eu nunc. Integer sit amet enim eget magna vulputate aliquet. Sed augue mauris, finibus at urna sit amet, malesuada bibendum quam. Sed ornare egestas ante ac auctor. Nam pharetra consectetur magna vel iaculis. Vestibulum at finibus dui. Maecenas mollis efficitur dui ut tempus. Aenean laoreet urna vitae accumsan suscipit. Nulla in arcu a odio ultrices vestibulum at at mi. Nullam congue lacinia lacinia. Phasellus eu placerat libero.',\n 'image_path' => 'goods_008.jpg',\n 'price' => 22\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Phasellus varius massa',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In nec mauris commodo, ultricies mauris vel, iaculis elit. Fusce varius ipsum at nisl convallis, sed sodales turpis fringilla. Quisque lacinia ac nisl id blandit. Sed ac turpis tortor. Fusce gravida sed arcu sit amet pharetra. Vivamus pellentesque, ante sed hendrerit semper, diam ligula consectetur felis, quis luctus lectus ipsum in urna. In dictum volutpat velit sit amet elementum. Sed nisl augue, feugiat ac elit in, gravida facilisis mauris. Vestibulum porta nisi vitae leo lacinia, nec mollis ante pellentesque. Praesent efficitur pharetra auctor. Proin rutrum elementum erat et commodo.',\n 'image_path' => 'goods_009.jpg',\n 'price' => 22\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Quisque in orci',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ultrices urna quis risus ultricies porttitor. Curabitur ornare est lacus, eget posuere ex condimentum a. Donec imperdiet nibh neque, ut consequat leo fermentum et. Sed ut metus semper, feugiat leo non, imperdiet ligula. Curabitur vestibulum, sapien ut eleifend tempus, tortor arcu condimentum lorem, efficitur lobortis felis nunc nec arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla ligula urna, rhoncus eget facilisis eu, dictum et erat. Vivamus cursus, ante ut interdum maximus, ex justo ultrices lacus, vitae interdum lectus justo in est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur fringilla iaculis turpis. Donec nec ligula sapien. Nunc tincidunt dui nec lacus rhoncus sagittis. Proin nec neque et mi sagittis dignissim.',\n 'image_path' => 'goods_010.jpg',\n 'price' => 22\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Vestibulum feugiat leo',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod aliquam est at viverra. Pellentesque non venenatis ligula. Vivamus rutrum id sapien nec aliquam. Nullam fermentum, turpis in congue efficitur, nunc eros consectetur mi, non suscipit odio tellus mollis risus. Proin nec velit tincidunt, lacinia nulla vitae, posuere purus. Quisque venenatis urna ut consectetur faucibus. Aliquam scelerisque mi non efficitur faucibus. Sed aliquet ac eros nec pellentesque. Praesent dignissim mauris id libero finibus semper. Sed ornare velit faucibus enim facilisis imperdiet.',\n 'image_path' => 'goods_011.jpg',\n 'price' => 22\n ]);\n $product->save();\n\n $product = new Product([\n 'title' => 'Suspendisse in magna',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet scelerisque lacus. Interdum et malesuada fames ac ante ipsum primis in faucibus. In mauris nulla, lobortis at arcu quis, pharetra pharetra justo. Integer diam odio, consequat eget consequat non, fringilla eget ligula. Integer nec elementum metus. Maecenas neque justo, ullamcorper vitae sapien nec, congue lobortis ligula. Quisque fermentum magna eget vulputate imperdiet. Suspendisse varius molestie elit, quis congue metus hendrerit at. Aenean eu vulputate sem.',\n 'image_path' => 'goods_012.jpg',\n 'price' => 22\n ]);\n $product->save();\n }", "private function prepareProductDetailsArray($product)\n {\n $productDetailsArray = [];\n\n // $productDetailsArray['id'] = $product->id;\n // $productDetailsArray['code'] = $product->product_code;\n // $productDetailsArray['name'] = $product->product_name;\n // $productDetailsArray['manufacturer'] = $this->getManufacturer($product);\n // $productDetailsArray['salt'] = $this->getSalt($product);\n // $productDetailsArray['unit'] = $this->getUnit($product);\n // $productDetailsArray['packing'] = $this->getPacking($product);\n // $productDetailsArray['product_type'] = $this->getType($product);\n // $productDetailsArray['mrp'] = $product->product_mrp;\n // $productDetailsArray['less_mrp'] = $product->product_rate_a;\n \n $productDetailsArray['id'] = $product->id;\n $productDetailsArray['product_name'] = $product->product_name;\n $productDetailsArray['salts'] = $this->salt->getSalts($product);\n $productDetailsArray['categories'] = $this->category->getCategories($product);\n $productDetailsArray['packing'] = $this->packing->getPacking($product);\n $productDetailsArray['unit'] = $this->unit->getUnit($product);\n $productDetailsArray['company'] = $this->company->getCompany($product);\n // $productDetailsArray['manufacturer'] = $this->manufacturer->getManufacturer($product);\n $productDetailsArray['ailments'] = $this->ailment->getAilments($product);\n $productDetailsArray['classes'] = $this->classes->getClasses($product);\n // $productDetailsArray['product_type'] = $this->productType->getProductType($product);\n $productDetailsArray['product_code'] = $product->product_code;\n $productDetailsArray['product_mrp'] = $product->product_mrp;\n $productDetailsArray['is_prescription_drug'] = $product->is_prescription_drug;\n $productDetailsArray['product_tax'] = $product->product_tax;\n\n return $productDetailsArray;\n }", "public function definition()\n {\n $allPL = DB::table('productlines')->get()->toArray();\n $allPLTitle = array_column($allPL, 'product_line');\n // $price = $this->faker->randomNumber(6, 2);\n // return [\n // 'product_code' => rand(123, 456),\n // 'product_name' => $this->faker->name(),\n // 'product_line' => $allPLTitle[array_rand($allPLTitle, 1)], // ko đc random -> phai lay tu bang productline\n // 'product_scale' => Str::random(100),\n // 'product_vendor' => $this->faker->company(),\n // 'product_description' => $this->faker->text($maxNbChars = 200),\n // 'quantity_inStock' => $this->faker->randomNumber(5),\n // 'price' => $price,\n // 'MSRP' => $this->faker->realText(),\n // 'image' => 'https://picsum.photos/200/300',\n // 'hot' => rand(0, 1),\n // 'cost_price' => $price + 100000,\n // ];\n\n $price = rand(100000, 10000000);\n return [\n 'product_code' => rand(123, 456),\n 'product_name' => Stringfake::generateRandomString(20),\n 'product_line' => $allPLTitle[array_rand($allPLTitle, 1)], // ko đc random -> phai lay tu bang productline\n 'product_scale' => Stringfake::generateRandomString(100),\n 'product_vendor' => Stringfake::generateRandomString(40),\n 'product_description' => Stringfake::generateRandomString(200),\n 'quantity_inStock' => rand(234, 567),\n 'price' => $price,\n 'MSRP' => Stringfake::generateRandomString(10),\n 'image' => 'https://picsum.photos/200/300',\n 'hot' => rand(0, 1),\n 'cost_price' => $price + 100000,\n ];\n }", "public function run()\n {\n product::create([\n 'barcode' => 1111,\n 'name' => 'APPLE'\n ]);\n product::create([\n 'barcode' => 1122,\n 'name' => 'PINAPPLE'\n ]);\n }", "public function store($Product)\n {\n $newProduct = new SimpleProduct();\n $newProduct->ProductName= $Product->ProductName;\n $newProduct->ProductPrice = $Product->ProductPrice;\n $newProduct->ProductCategory = $Product->ProductCategory;\n $newProduct->ProductTaxClass = $Product->ProductTaxClass;\n $newProduct->ProductPriceList = $Product->ProductPriceList;\n $newProduct->ProductMeasureUnit = $Product->ProductMeasureUnit;\n $newProduct->ProductDescription = $Product->ProductDescription;\n //$newProduct->ProductProductionDate = date(\"Y-m-d\",$Product->ProductProductionDate);\n //$newProduct->ProductExpireyDate = date(\"Y-m-d\",strtotime($Product->ProductExpireyDate));\n $newProduct->ProductSKU = $Product->ProductSKU;\n $newProduct->ProductBrand = $Product->ProductBrand;\n $newProduct->ProductManufacturer = $Product->ProductManufacturer;\n $newProduct->save();\n }", "public function run()\n {\n $attributes = ['color','size',];\n foreach($attributes as $attribute) {\n ProductAttribute::create([\n 'name' => $attribute,\n ]);\n }\n\n }", "public function create() {\n $product = DB::table( 'product' )\n ->join( 'type', 'type.id', '=', 'product.type' )\n ->join( 'producer', 'producer.id', '=', 'product.producer' )\n ->select( DB::raw( 'product.id, product.name, type.name as type, producer.name as producer, product.amount, product.image, product.price_input' ) )\n ->orderby( 'product.id', 'desc' )\n ->get();\n $type = Type::all();\n $producer = Producer::all();\n return view( 'product.create', compact( 'type', 'producer' ) );\n }", "public function run()\n {\n Product::create([\n 'brand_id' => 1,\n 'time_period_id' => 3,\n 'name' => 'Kopje',\n 'slug' => 'ittala-teema-kopje',\n 'price' => 23,\n 'stock' => 3,\n 'design_year' => 1970,\n 'production_year' => 1972\n ]);\n\n Product::create([\n 'brand_id' => 1,\n 'time_period_id' => 3,\n 'name' => 'Klein bord',\n 'slug' => 'ittala-teema-klein-bord',\n 'price' => 15,\n 'stock' => 2,\n 'design_year' => 1970,\n 'production_year' => 1972\n ]);\n\n Product::create([\n 'brand_id' => 1,\n 'time_period_id' => 3,\n 'name' => 'Koffiekan',\n 'slug' => 'ittala-teema-koffiekan',\n 'price' => 60,\n 'stock' => 1,\n 'design_year' => 1970,\n 'production_year' => 1972\n ]);\n\n Product::create([\n 'brand_id' => 2,\n 'time_period_id' => 4,\n 'name' => 'Kopje',\n 'slug' => 'ittala-ultima-thule-kopje',\n 'price' => 20,\n 'stock' => 3,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 2,\n 'time_period_id' => 4,\n 'name' => 'Klein bord',\n 'slug' => 'ittala-ultima-thule-klein-bord',\n 'price' => 18,\n 'stock' => 3,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 2,\n 'time_period_id' => 4,\n 'name' => 'Drinkglas',\n 'slug' => 'ittala-ultima-thule-drinkglas',\n 'price' => 20,\n 'stock' => 3,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 3,\n 'time_period_id' => 4,\n 'name' => 'Klein bord',\n 'slug' => 'arabia-artica-klein-bord',\n 'price' => 30,\n 'stock' => 2,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 3,\n 'time_period_id' => 4,\n 'name' => 'Ovenschaal',\n 'slug' => 'arabia-artica-ovenschaal',\n 'price' => 100,\n 'stock' => 2,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 3,\n 'time_period_id' => 4,\n 'name' => 'Siervogel',\n 'slug' => 'arabia-artica-siervogel',\n 'price' => 150,\n 'stock' => 1,\n 'design_year' => 1980,\n 'production_year' => 1982\n ]);\n\n Product::create([\n 'brand_id' => 4,\n 'time_period_id' => 1,\n 'name' => 'Bord',\n 'slug' => 'arabia-lumi-bord',\n 'price' => 70,\n 'stock' => 4,\n 'design_year' => 1950,\n 'production_year' => 1952\n ]);\n\n Product::create([\n 'brand_id' => 4,\n 'time_period_id' => 1,\n 'name' => 'Schaal',\n 'slug' => 'arabia-lumi-schaal',\n 'price' => 70,\n 'stock' => 4,\n 'design_year' => 1950,\n 'production_year' => 1952\n ]);\n\n Product::create([\n 'brand_id' => 4,\n 'time_period_id' => 1,\n 'name' => 'Bakje',\n 'slug' => 'arabia-lumi-bakje',\n 'price' => 30,\n 'stock' => 4,\n 'design_year' => 1950,\n 'production_year' => 1952\n ]);\n\n Product::create([\n 'brand_id' => 5,\n 'time_period_id' => 2,\n 'name' => 'Schaal',\n 'slug' => 'marimekko-schaal',\n 'price' => 70,\n 'stock' => 2,\n 'design_year' => 1960,\n 'production_year' => 1962\n ]);\n\n Product::create([\n 'brand_id' => 5,\n 'time_period_id' => 2,\n 'name' => 'Koffiekan',\n 'slug' => 'marimekko-koffiekan',\n 'price' => 70,\n 'stock' => 2,\n 'design_year' => 1960,\n 'production_year' => 1962\n ]);\n\n Product::create([\n 'brand_id' => 5,\n 'time_period_id' => 2,\n 'name' => 'Groot bord',\n 'slug' => 'marimekko-groot-bord',\n 'price' => 70,\n 'stock' => 2,\n 'design_year' => 1960,\n 'production_year' => 1962\n ]);\n }", "public function create()\n {\n $zone = Zone::all();\n $manufacturer = Manufacturer::all();\n $calculation_unit = CalculationUnit::all();\n $item_group = ItemGroup::all();\n $quality = Quality::all();\n return view('content.product.product_create',compact('zone','manufacturer','calculation_unit','item_group','quality'));\n }", "public function store()\n {\n $input = Request::onlyLegacy('category_id', 'name', 'unit', 'unit_cost', 'code', 'description', 'selling_price', 'supplier_id', 'abc_additional_data', 'styles', 'sizes', 'colors', 'sub_id', 'qbd_id', 'sync_on_qbd', 'trade_id');\n $validator = Validator::make($input, FinancialProduct::getRules());\n\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $companyId = $this->scope->has() ? $this->scope->id() : 0;\n\t\t$category = FinancialCategory::where('company_id', $companyId)\n\t\t\t->findOrFail($input['category_id']);\n\n $validator = Validator::make($input, FinancialProduct::getRulesByCategory($category));\n\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n if (ine($input, 'supplier_id')) {\n if (!$this->supplierRepo->isSupplierExist($input['supplier_id'])) {\n return ApiResponse::errorNotFound(trans('response.error.not_found', ['attribute' => 'Supplier']));\n }\n\n if ($this->supplierRepo->isSystemSupplier($input['supplier_id'])) {\n return ApiResponse::errorGeneral(\"You can't add supplier product from here.\");\n }\n }\n\n $message = trans('response.success.saved', ['attribute' => 'Product']);\n\n if (ine($input, 'sub_id')) {\n $subContractor = User::whereCompanyId($this->scope->id())\n ->whereGroupId(User::GROUP_SUB_CONTRACTOR)\n ->findOrFail($input['sub_id']);\n\n $category = FinancialCategory::whereName(FinancialCategory::LABOR)\n ->whereCompanyId($this->scope->id())\n ->firstOrFail();\n\n $input['category_id'] = $category->id;\n $message = trans('response.success.saved', ['attribute' => 'Rate sheet']);\n }\n\n $name = isSetNotEmpty($input, 'name') ?: null;\n\n try {\n $product = $this->repo->saveProduct(\n $input['category_id'],\n $name,\n $input['unit'],\n $input['unit_cost'],\n $input\n );\n\n return ApiResponse::success([\n 'message' => $message,\n 'data' => $this->response->item($product, new FinancialProductsTransformer)\n ]);\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n }" ]
[ "0.62205714", "0.5939539", "0.5931326", "0.58905196", "0.5879479", "0.5859678", "0.5828559", "0.58109576", "0.580117", "0.57555693", "0.57109565", "0.56502247", "0.56499225", "0.5635855", "0.5633569", "0.5626478", "0.5619594", "0.56094193", "0.5607058", "0.56069875", "0.55991584", "0.55523914", "0.5536571", "0.55296195", "0.55245584", "0.55222076", "0.5522049", "0.5517903", "0.5512487", "0.55085284", "0.55047125", "0.55010617", "0.5499701", "0.5492165", "0.5488511", "0.54820484", "0.5478062", "0.5475664", "0.54711825", "0.5469284", "0.54679483", "0.54665864", "0.54657745", "0.5461496", "0.54547054", "0.5454356", "0.54498583", "0.5445832", "0.54455435", "0.54307014", "0.54229426", "0.54175645", "0.54164505", "0.5413519", "0.54120964", "0.5411963", "0.5410786", "0.5410072", "0.5406802", "0.5398956", "0.53967184", "0.53961486", "0.53790754", "0.53770334", "0.5367185", "0.5357105", "0.5356405", "0.5351515", "0.5344555", "0.5342492", "0.5339005", "0.5337378", "0.53373605", "0.53345263", "0.53234535", "0.5315157", "0.5311562", "0.5308737", "0.5307147", "0.53030515", "0.5302962", "0.530063", "0.52950245", "0.52925265", "0.52841955", "0.52829736", "0.52818537", "0.52804834", "0.52804834", "0.5276867", "0.5274596", "0.5273999", "0.52725023", "0.52719027", "0.52622837", "0.52614546", "0.52611303", "0.5260807", "0.5257936", "0.5256811" ]
0.5609031
18
Display a listing of the resource.
public function index() { return ReplyResource::collection(Reply::latest()->paginate(200)); }
{ "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->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "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 ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function listAction() {}", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446524", "0.73606837", "0.72986734", "0.72471476", "0.7162155", "0.7148338", "0.71326286", "0.71040463", "0.71014625", "0.7099794", "0.705008", "0.6992253", "0.6988787", "0.69345415", "0.690014", "0.6898432", "0.6890998", "0.68884057", "0.68659663", "0.6849296", "0.6829797", "0.6801322", "0.6797618", "0.6795635", "0.67849535", "0.67592627", "0.674149", "0.67309594", "0.67251754", "0.6723507", "0.6723507", "0.6723507", "0.6718214", "0.6707538", "0.67058325", "0.67048824", "0.6665217", "0.66635793", "0.6660825", "0.6660659", "0.6657826", "0.6654284", "0.66487294", "0.66206425", "0.6619581", "0.6615064", "0.660576", "0.66012174", "0.66000843", "0.6594909", "0.6587545", "0.65845066", "0.65826195", "0.6581026", "0.6575906", "0.6573519", "0.657322", "0.6570324", "0.6569608", "0.6564927", "0.65621465", "0.6553052", "0.6550947", "0.65454125", "0.65373635", "0.65338445", "0.65335166", "0.6527752", "0.65250987", "0.6524361", "0.65207255", "0.65178186", "0.65174717", "0.65155977", "0.6515444", "0.65075177", "0.65038854", "0.6502002", "0.64949256", "0.6491797", "0.64876413", "0.64858246", "0.64848757", "0.64848495", "0.6478021", "0.64772964", "0.6471079", "0.6469467", "0.6469057", "0.646638", "0.64615834", "0.6460598", "0.6458667", "0.64583755", "0.64547765", "0.64538586", "0.64524144", "0.64494956", "0.6449159", "0.6449043", "0.6446361" ]
0.0
-1
Store a newly created resource in storage.
public function store(ReplyRequest $request) { $input= $request->all(); $reply=Reply::create($input); $blog=$reply->comment->blog() ->with('comments.user.profile')->with('comments.replies.replyUser.profile')->with('comments.replies.replyReplies.replyReplyUser.profile')->with('categories')->with('author.profile')->firstOrFail(); return $blog; }
{ "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());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "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.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $reply=Reply::findOrFail($id); return new ReplyResource($reply); }
{ "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);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "public function display() {\n echo $this->render();\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Update the specified resource in storage.
public function update(ReplyRequest $request, $id) { /* dd($request->all()); */ $reply=Reply::findOrFail($id); $input= $request->all(); $reply->update($input); return new ReplyResource($reply); }
{ "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 ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\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.5893703", "0.5862337", "0.58523124", "0.58523124", "0.5851579", "0.5815571", "0.58067423", "0.5750728", "0.5750728", "0.5736541", "0.5723664", "0.5715135", "0.56949675", "0.5691129", "0.56882757", "0.5669375", "0.5655524", "0.56517446", "0.5647158", "0.5636521", "0.563466", "0.5632965", "0.56322825", "0.56291395", "0.56202215", "0.56087196", "0.56020856", "0.5591966", "0.5581127", "0.5581055", "0.558085", "0.5575458", "0.55706805", "0.55670804", "0.55629116", "0.5562565", "0.5558853", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.555572", "0.5555007", "0.5553948", "0.5553837", "0.5553147", "0.55429846", "0.5541925", "0.5540208", "0.5539145", "0.5536157", "0.55350804", "0.5534241", "0.5523782", "0.5518406", "0.55147856", "0.5513397", "0.550961", "0.55072165", "0.55067354", "0.5503418", "0.5501671", "0.55010796", "0.54998124", "0.5497327", "0.54942787", "0.54942036", "0.54942036", "0.54935455", "0.549267", "0.5491964", "0.5489983", "0.54833627", "0.54794145", "0.5478835", "0.5478348", "0.5465178", "0.54648995", "0.54607797", "0.54571307" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Reply $reply) { $delete=$reply->delete(); if($delete){ return response(['message'=>'Deleted successfully!']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\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.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
$uri = " $this>token."";
public function recentlyLiked() { $instagram_data = $this->curl_request($uri); return $instagram_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function token_url();", "public function uri()\n {\n return static::BASE_URI.'/oauth/v3/token';\n }", "abstract protected function getTokenUrl();", "abstract protected function getTokenUrl(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getTokenUrl();", "public function joinTokenUrl()\n {\n return sprintf('%s?applicationId=%s', $this->site, $this->token);\n }", "public function url()\r\t{\r\t\treturn 'http://morningpages.net/mail/show/'.$this->token;\r\t\t//return url::site('mail/show/' . $this->token, 'http');\r\t}", "public static function commandURI($mnt,$command)\n{\nreturn self::uri($mnt,'?'.$command);\n}", "public function getToken()\n\t{\n\n\t}", "protected function getTokenUrl()\n {\n return 'https://api.weixin.qq.com/sns/oauth2/access_token';\n }", "public function __construct(public string $token)\n {\n }", "protected function endpoint()\n {\n return 'system/members/'.$this->member_id.'/tokens';\n }", "protected function getTokenUrl()\n {\n return 'https://login.eveonline.com/oauth/token';\n }", "public function token()\n {\n if( !isset( $this->config['oauth_id'] ) || !isset( $this->config['oauth_secret'] ) )\n $this->redirect( 'oauth' );\n\n // Skip if we're already set up\n if( isset( $this->config['oauth_id'] ) && isset( $this->config['oauth_secret'] ) && isset( $this->config['oauth_token'] ) )\n $this->redirect( '' );\n \n \n $this->url = $_SERVER['HTTP_HOST'].$this->baseURL;\n }", "protected function token() {\n\t\treturn $this->name().'_login';\n\t}", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "protected function getTokenUrl()\n {\n return $this->baseUrl.'/oauth2.0/token';\n }", "function request_url($method){\r\n global $TOKEN;\r\n \r\n\treturn \"https://api.telegram.org/bot\" . $TOKEN . \"/\". $method;\r\n}", "abstract public function url_access_token();", "function url_with_auth_token($url) {\n // use global $query_params that was initialized during auth check on page load\n global $query_params;\n\n // no auth info, return original url\n if ($query_params['token'] == \"\" || $query_params['uuid'] == \"\") {\n echo $url;\n return;\n }\n\n $uri_parts = explode('?', $url, 2);\n if (isset($uri_parts[1]) && ($uri_parts[1] == \"\")) {\n $url .= \"?\";\n } else {\n $url .= \"&\";\n }\n\n $url .= \"token=\".$query_params['token'].\"&uuid=\".$query_params['uuid'];\n echo $url;\n}", "public function setToken() {\n $base_uri = $this->remoteSite->get('protocol') . '://' . $this->remoteSite->get('host');\n $options = array(\n 'base_uri' => $base_uri,\n 'allow_redirects' => TRUE,\n 'timeout' => 5,\n 'connect_timeout' => 5,\n );\n\n $token = $this->httpClient->request('get', 'rest/session/token', $options)->getBody();\n return $token->__toString();\n }", "private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}", "public function getTokenUrl()\n {\n return $this->withStoreName('oauth/v2/token');\n }", "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "protected function getApiTokenUrl()\n {\n return \"api/Token\";\n }", "public function uri(){\n return $this->uri;\n }", "public function uri() : string;", "protected function getTokenUrl()\n {\n return 'https://auth.kodular.io/oska/access_token';\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function urlAccessToken() {\n return $this->host . '/oauth/token';\n }", "public function getRequestTokenURL() {\n\t\treturn $this->selectedEndpoint['request_token_url'];\n\t}", "function to_string() {\n return \"oauth_token=\" .\n OAuthUtil::urlencode_rfc3986($this->key) .\n \"&oauth_token_secret=\" .\n OAuthUtil::urlencode_rfc3986($this->secret);\n }", "function release_token(){\n if(!isset($_GET[$this->name])) {\n header(\"Status: 302 Moved Temporarily\");\n $this->get_id($sid);\n header(\"Location: http://\".$_SERVER['HTTP_HOST'].$this->self_url());\n exit;\n } \n }", "function uri(): string;", "public function token(): string\n {\n return $this->token;\n }", "protected function buildToken() {\n }", "function token(): string\n\t\t{\n\t\t\treturn session()->getToken();\n\t\t}", "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('wr.palomino@ddns.com.au','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getUri()\n {\n return 'https://'.$this->getAuth().'@'.self::BASE_URI.'/v1/';\n }", "public function index()\n {\n $token=Request::input()[''];\n }", "public function generateNewToken() : string\n {\n $token = \"\";\n try {\n $fullUrl = $this->_getFullUrl(Config::AUTH_URL);\n $result = $this->client->post($fullUrl, [\n \"client_id\" => Config::CLIENT_ID,\n \"email\" => Config::EMAIL,\n \"name\" => Config::NAME\n ]);\n $data = json_decode($result->getBody()->getContents());\n $token = $data->data->sl_token;\n\n } catch (Exception $e) {\n echo $this->responseService\n ->withStatus($e->getCode())\n ->single([], \"data\", null, $e->getMessage());\n }\n return $token;\n }", "public function getToken() : string {\n return $this->token;\n }", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public function getUri():string{\n\t\treturn $this->full_uri;\t\t\n\t}", "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}", "function getAuthorizeURL($token,$callback='') {\n\t\tif (is_array($token)) {\n\t\t\t$token = $token['oauth_token'];\n\t\t}\n\t\treturn $this->authorizeURL() . \"?oauth_token={$token}&oauth_callback=\".urlencode($callback);\n\t}", "protected function getAuthParam(){\n\t\treturn '?key=' . $this->key . '&token=' . $this->token;\n\t}", "abstract public function getAuthUri(): string;", "function accessTokenURL() { return 'https://api.twitter.com/oauth/access_token'; }", "public function getToken ()\n {\n return $this->token;\n }", "public function urlTokenCredentials()\n {\n return 'https://api.twitter.com/oauth/access_token';\n }", "public function getUri(){\n return $this->uri;\n }", "public function tokenizeURI($uri, $param=self::TOKEN_FIELD){\n $uri = new Uri($uri); return $uri->withQuery( http_build_query( [ $param => $this->token->getValue() ] ) )->__toString();\n }", "function token(){\n return Request::session('internal_token');\n}", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function __toString(): string\n {\n return $this->token;\n }", "public function uri()\n {\n return '/foo/bar';\n }", "protected function getTokenUrl()\n\t{\n\t\t$this->initConfig();\n\t\treturn $this->config['access_token_url'];\n\t}", "public function requestUri() {}", "public function getRequestUri() {}", "function login() { \r\n $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);\r\n $request_token = $connection->oauth('oauth/request_token', array('oauth_callback' => OAUTH_CALLBACK));\r\n $_SESSION['oauth_token'] = $request_token['oauth_token'];\r\n $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];\r\n $url = $connection->url('oauth/authorize', array('oauth_token' => $request_token['oauth_token']));\r\n echo $url;\r\n }", "function getToken() {\n\t\n\t$u_token = (isset($_SESSION['cms']['u_token']) && $_SESSION['cms']['u_token'] > '' ) ? $_SESSION['cms']['u_token'] : '';\n\treturn $u_token;\n}", "public function __construct($token = null)\n {\n $this->token = $token;\n $this->apiBaseUri = \"https://v1.utalk.chat/send/{$token}/\";\n }", "public function getURI() : string {\n return $this->URI;\n }", "abstract public function token();", "public function getToken(): string\n {\n return $this->attributes->get('token', '');\n }", "private function get_token() {\n $uri = $this->settings->hostname.\"oauth/token\";\n //echo \"POST $uri\\n\";\n\n $data = array(\n \"grant_type\" => \"password\",\n \"client_id\" => $this->settings->client_id,\n \"client_secret\" => $this->settings->client_secret,\n \"username\" => $this->settings->username,\n \"password\" => $this->settings->password\n );\n $postdata = http_build_query($data);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/x-www-form-urlencoded'));\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n //echo $http_code.\"\\n\"; // output http status code\n\n curl_close($ch);\n $token = NULL;\n if ($http_code == 200) {\n $token = json_decode($curl_response);\n //var_dump($token); // print entire token object\n }\n return $token;\n }", "private function getUri(){\n return $this->uri = parse_url($_SERVER['REQUEST_URI']);\n }", "abstract public function uri(): string;", "public function sendToken() {\n\n\t\t$TokenObject = $this->getTokenObject()->getToken();\n\t\t$this->setToken($TokenObject->__toString());\n\n\t\treturn $this->Token;\n\t}", "static function addTokenToURL($url) {\n $token = Security::generateToken();\n new Cache(\"token\", $token);\n if (strpos($url, '?') !== false) {\n $url .= \"&token=$token\";\n } else {\n $url .= \"?token=$token\";\n }\n return $url;\n }", "public function __construct($token) {\n parent::__construct();\n $this->token = $token;\n }", "public function __construct($token)\n {\n $this->token = $token;\n }", "public function __construct($token)\n {\n $this->token = $token;\n }", "public function __construct($token)\n {\n $this->token = $token;\n }", "public function __construct($token)\n {\n $this->token = $token;\n }", "protected function createToken()\n {\n $currentServerIp = $this->request->server('SERVER_ADDR');\n\n $secretKey = $this->config['doublespark_contaobridge_secret_key'];\n\n return md5('phpbbbridge'.date('d/m/Y').$currentServerIp.$secretKey);\n }", "function url($clientid, $redirect, $scope)\n{\n\treturn 'https://discordapp.com/oauth2/authorize?response_type=code&client_id=' . $clientid . '&redirect_uri=' . $redirect . '&scope=' . $scope;\n}", "function oauth_urlencode($uri) {}", "public function get_uri()\n {\n }", "function gen_token(){\n\t\t$secretKey = \"BismILLAHirrohmaanirrohiim\";\n\n\t\t// Generates a random string of ten digits\n\t\t$salt = mt_rand();\n\n\t\t// Computes the signature by hashing the salt with the secret key as the key\n\t\t$signature = hash_hmac('sha256', $salt, $secretKey, true);\n\n\t\t// base64 encode...\n\t\t$encodedSignature = base64_encode($signature);\n\n\t\t// urlencode...\n\t\t$encodedSignature = urlencode($encodedSignature);\n\n\t\treturn $encodedSignature;\n\t}", "static function BearerToken()\n {\n return trim(str_replace('Bearer', '', self::GetHeader()));\n }", "public function uri() {\n return $this->uri;\n }", "protected function getTokenUrl()\n {\n return 'https://bitbucket.org/site/oauth2/access_token';\n }", "protected function get_uri()\n {\n }", "public function getAuthorizationToken(): string\n {\n return (string) $this->token;\n }", "private function getToken()\n {\n return uniqid();\n }", "public function __construct($token) {\n $this->token = $token;\n }", "public function uri();", "public function uri();", "public function uri();" ]
[ "0.6981948", "0.6568168", "0.64531696", "0.63616276", "0.62413824", "0.62413824", "0.62413824", "0.62413824", "0.6236546", "0.60847116", "0.6003555", "0.59981316", "0.5970991", "0.58984005", "0.5848817", "0.5841916", "0.58295804", "0.5827244", "0.58151615", "0.5771052", "0.5771052", "0.5771052", "0.5771052", "0.57626367", "0.5760071", "0.5732258", "0.5714819", "0.57119185", "0.57051486", "0.5684214", "0.56761223", "0.5674144", "0.5667385", "0.56495124", "0.56489664", "0.5641845", "0.5641845", "0.5641845", "0.5608684", "0.5604835", "0.5603919", "0.5592485", "0.55888844", "0.55847967", "0.5578071", "0.5560976", "0.5556049", "0.55374235", "0.5523825", "0.5519748", "0.549941", "0.54907817", "0.5484136", "0.54757416", "0.5468822", "0.54595333", "0.54543406", "0.54531574", "0.5452981", "0.5447293", "0.5443063", "0.5430731", "0.54280376", "0.53992116", "0.5387427", "0.53871965", "0.5386669", "0.5382167", "0.5377084", "0.53743875", "0.5362281", "0.5360813", "0.53585035", "0.5356416", "0.53503764", "0.534831", "0.5344276", "0.53352207", "0.5329997", "0.532812", "0.53220224", "0.5317943", "0.5308106", "0.5308106", "0.5308106", "0.5308106", "0.5304499", "0.5304097", "0.5301839", "0.5295419", "0.5290616", "0.52902335", "0.52873546", "0.5282038", "0.52810967", "0.5278115", "0.52666783", "0.52655756", "0.526324", "0.526324", "0.526324" ]
0.0
-1
Getting New AccountNumber for creating new account
function GettingNewAccountNumber(){ $db = new dbconnect; $db->connect(); $sql= "SELECT AccountNumber FROM bank_accounts Order by AccountNumber ASC "; $result =$db->executesql($sql); while($row = mysqli_fetch_array($result)){ $AccountNumb=$row["AccountNumber"]; } $AccountNumb+=1; return $AccountNumb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newAccount(){\n\t\t\t\tglobal $driver;\n\t\t\t\t$sql = \"SELECT acnumber FROM clients ORDER BY id DESC LIMIT 1\"; //Retrieve the latest account number from clients table\n\t\t\t\tif($results\t= $driver->perform_request($sql)):\n\t\t\t\t\t$row\t\t=\t$driver->load_data($results,MYSQL_ASSOC);\n\t\t\t\t\t$account\t=\t$row['acnumber'];\n\t\t\t\t\t$newac\t\t=\t$account+1;\n\t\t\t\t\t\tswitch($newac):\n\t\t\t\t\t\t\tCASE $newac < 10:\n\t\t\t\t\t\t\t$newac\t=\t'000'.$newac;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tCASE $newac>=10 && $newac<100:\n\t\t\t\t\t\t\t$newac\t=\t'00'.$newac;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tCASE $newac>=100 && $newac<1000:\n\t\t\t\t\t\t\t$newac\t=\t'0'.$newac;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$newac\t=\t$newac+1;\n\t\t\t\t\t\tendswitch;\n\t\t\t\t\telse: \n\t\t\t\t\t\tdie('<p class=\"error\">Failed to generate New ACC/No: <br/>'.mysql_error().'</p>');\n\t\t\t\t\tendif;\n\t\t\treturn $newac; //The generated account number\n}", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n return $this->helper->accountNumber();\n }", "private function getResourceAccount()\n\t{\n\t\tif (!$this->account) {\n\t\t\t$payload = [\n\t\t\t\t'onlyReturnExisting' => true,\n\t\t\t];\n\n\t\t\t$this->requestResource('POST', ResourcesDirectory::NEW_ACCOUNT, $payload);\n\t\t\t$this->account = $this->getHttpClient()->getLastLocation();\n\t\t}\n\n\t\treturn $this->account;\n\t}", "public function getBankAccountNumber()\n {\n // generate a random number, this will be the account number\n $accountNumber = $this->prependNumber(rand(1, 100000000) . '0');\n\n // because it is a random number, it may be a valid account number\n $remains = $this->checkDigit($accountNumber);\n if ($remains === 0) {\n return $accountNumber;\n }\n\n // number is invalid, increase so it is valid.\n return $this->recalculateToValidOutcome($accountNumber, $remains);\n }", "public function getAccountID();", "public function getAccountNo()\n {\n return $this->accountNo;\n }", "public function getAccountNo()\n {\n return $this->account_no;\n }", "public function GetAccountID () \r\n\t{\r\n\t\treturn ($AccountID);\r\n\t}", "private function _createAccount(string $nickname)\n\t{\n\t\t$accountModel = new AccountModel();\n\t\t$accountModel->nickname = $nickname;\n\t\t$accountModel->save();\n\t\treturn $accountModel->id;\n\t}", "private function GenerateBankAccount()\r\n\t{\r\n\t\t/* Existing bank account */\r\n\t\t$bank_account = \"\";\r\n\t\t\r\n\t\t// Generate bank account \r\n\t\t// while he will be unique in DB\r\n\t\tdo\r\n\t\t{\r\n\t\t\t$bank_account = $this->BankAccountGenerator();\r\n\t\t}\r\n\t\twhile ($this->CheckBankAccountInDB($bank_account) == 0);\r\n\t\t\r\n\t\treturn $bank_account;\r\n\t}", "public function getnewaddress($account)\n\t{\n\t\treturn $this->connect('getnewaddress', array((string) (int) $account));\n\t}", "public function getNewAddress($account = null);", "public function getAccountID()\n {\n return $this->getKey('AccountID');\n }", "public function getAccountNumber()\n {\n return $this->hasOne(AccountNumber::className(), ['id' => 'account_number_id']);\n }", "public function getAccountID()\n {\n return $this->accountID;\n }", "public function getAccountID()\n {\n return $this->accountID;\n }", "public function getnewaddress($account = '') {\n return $this->bitcoin->getnewaddress($account);\n }", "public function getAccountCode();", "public function getAccountCode();", "public function Create_Account($p_CompanyName, $p_UserName, $p_Password, $p_Email){\n $acc_info=new Account_Info();\n $acc_info->AccountId = $this->GetGUID();//GUID Creation\n $acc_info->CompanyName = $p_CompanyName;\n $acc_info->Status = AccountStatus::Trail;//Enum Data Type Creation\n print_r($acc_info->Status);\n $acc_info->AccountType = AccountType::Starter;//Enum Data Type Creation\n $acc_info->ExpiryDate = date('Y-m-d', strtotime('+15 days'));\n \t $acc_info->CreatedDate = date('Y-m-d');\n \t $acc_info->Email = $p_Email;\n $acc_info->Insert();\n \t $usr_info = new User_Info();\n $usr_info->UserId = $this->GetGUID();\n \t $usr_info->AccountId =\"$acc_info->AccountId\";\n $usr_info->Email = $p_Email;\n \t $usr_info->UserName =$p_UserName;\n \t $usr_info->Password = $p_Password; \n \t $usr_info->Role = UserRole::Admin;//Enum Data Type Creation\n $usr_info->Insert();\n }", "public function resolveaccount()\n {\n //\n $thePaystack = new Paystack();\n return $thePaystack->resolveAccountNumber();\n }", "function add_create_account()\n {\n\t\t\n\t\tglobal $imported_ids;\n global $current_user;\n\n\t\t$acc_name = trim($this->column_fields['accountid']);\n\n\t\tif ((! isset($acc_name) || $acc_name == '') )\n\t\t{\n\t\t\treturn; \n\t\t}\n\n $arr = array();\n\n\t\t// check if it already exists\n $focus = new Accounts();\n\n\t\t$query = '';\n\n\t\t// if user is defining the ec_account id to be associated with this contact..\n\n\t\t//Modified to remove the spaces at first and last in ec_account name -- after 4.2 patch 2\n\t\t$acc_name = trim(addslashes($acc_name));\n\n\t\t//Modified the query to get the available account only ie., which is not deleted\n\t\t$query = \"select ec_account.* from ec_account WHERE accountname like '{$acc_name}%' \n\t\t\t\t\tand ec_account.deleted=0 ORDER BY accountname \";\n\t\t$result = $this->db->query($query);\n\t\t$row = $this->db->fetchByAssoc($result, -1, false);\n\t\t// we found a row with that id\n\t\tif (isset($row['accountid']) && $row['accountid'] != -1)\n\t\t{\n\t\t\t$focus->id = $row['accountid'];\n\t\t}\n\n\t\t// if we didnt find the ec_account, so create it\n\t\tif (! isset($focus->id) || $focus->id == '')\n\t\t{\n\t\t\t$focus->column_fields['accountname'] = $acc_name;\n\t\t\t$focus->column_fields['assigned_user_id'] = $current_user->id;\n\t\t\t$focus->column_fields['modified_user_id'] = $current_user->id;\n\n\t\t\t$focus->save(\"Accounts\");\n\t\t\t$acc_id = $focus->id;\n\t\t\t// avoid duplicate mappings:\n\t\t\tif (!isset( $imported_ids[$acc_id]) )\n\t\t\t{\n\t\t\t\t$imported_ids[$acc_id] = 1;\n\t\t\t}\n\t\t}\n\t\t// now just link the ec_account\n $this->column_fields[\"account_id\"] = $focus->id;\n\n }", "public function getAccountNumberType()\n {\n return $this->account_number_type;\n }", "public static function generateAccountN0(){\n $year = '20'.date('y');\n $accounts = User::count();\n return $year.($accounts + 1 ) ;\n }", "private function BankAccountGenerator()\r\n\t{\r\n\t\t$num = 0;\r\n\t\t\r\n\t\tfor ($i = 0; $i < 16; $i++)\r\n\t\t{\r\n\t\t\t$num .= rand(0,9);\r\n\t\t}\r\n\t\t\r\n\t\treturn (integer)$num;\r\n\t}", "public function getAccNumber() \n {\n return $this->acc_number;\n }", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "public function create_account(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'account_number' => 'required',\n 'currency' => 'required|string'\n ]);\n\n try \n {\n $account = new Accounts;\n \n \n $account->account_number = $request->input('account_number');\n $account->currency = $request->input('currency');\n \n $account->save();\n\n return response()->json( [\n 'entity' => 'account', \n 'action' => 'create', \n 'result' => 'success'\n ], 201);\n\n } \n catch (\\Exception $e) \n {\n return response()->json( [\n 'entity' => 'account', \n 'action' => 'create', \n 'result' => 'failed'\n ], 409);\n }\n }", "public function setupAccountIfNeeded($accountId)\r\n\t\t{\r\n\t\t\tif(isset($accountId))\r\n\t\t\t{\r\n\t\t\t\tif($accountId <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Generate a new account\r\n\t\t\t\t\t$this->Create();\r\n\t\t\t\t\t$data = array(\r\n\t\t\t\t\t\t'Account' => array(\r\n\t\t\t\t\t\t\t'payment_ref' => $this->generateUniquePaymentRef(),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif( $this->save($data, array('fieldList' => array('account_id', 'payment_ref'))) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// New account is ok\r\n\t\t\t\t\t\t$accountId = $this->getID();\r\n\t\t\t\t\t\treturn $accountId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// New account creation failed\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Attempt to find an account with this id\r\n\t\t\t\t\tif( $this->find('first', array('conditions' => array('account_id' => $accountId))) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// All good\r\n\t\t\t\t\t\treturn $accountId;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t}", "public function getNewCustomerInvoice(){\n\t\t// $invoice_counter = \\DB::table('appsetting')->where('name','invoice_counter')->first()->value;\n\t\t// $invoice_number = 'INV/' . date('Y') . '/000' . $invoice_counter++;\n\t\t// // update invoice counter\n\t\t// \\DB::table('appsetting')->where('name','invoice_counter')->update(['value'=>$invoice_counter]);\n\n\t\treturn Helper::GenerateCustomerInvoiceNumber();\n\t}", "function new_wallet() {\n\t\t$url = 'https://www.instawallet.org/api/v1/new_wallet';\n\t\t$json = file_get_contents($url);\n\t\t$data = json_decode($json);\n\t\tif(!$data->successful) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn $data->wallet_id;\n\t\t}\n\t}", "protected function generateAccount(): Account\n\t{\n\t\t// Generate a random UID\n\t\t$uid = $this->generateUid();\n\n\t\t// Start the entity\n\t\t$account = new Account(get_class(self::$faker), $uid);\n\t\t\n\t\t// Populate the fields\n\t\t$account->id = $uid;\n\t\t$account->name = self::$faker->name;\n\t\t$account->username = self::$faker->userName;\n\t\t$account->email = self::$faker->email;\n\t\t$account->phone = self::$faker->e164PhoneNumber;\n\t\t\n\t\treturn $account;\n\t}", "function getNewID()\n {\n $db = eZDB::instance();\n if( $db->supportsDefaultValuesInsertion() )\n {\n $db->query( 'INSERT INTO ezorder_nr_incr DEFAULT VALUES' );\n }\n else\n {\n $db->query( 'INSERT INTO ezorder_nr_incr(id) VALUES(DEFAULT)' );\n }\n\n return $db->lastSerialID( 'ezorder_nr_incr', 'id' );\n }", "public function getPrimaryAccountNumber() {\n\t\treturn $this->primaryAccountNumber;\n\t}", "public function generateAndSetInvoiceNumber();", "function generateNubanAccountNumber()\n {\n $grammar = new Hoa\\File\\Read('hoa://Library/Regex/Grammar.pp');\n\n $ast = Hoa\\Compiler\\Llk\\Llk::load($grammar)->parse('[0-9]{10}');\n\n $generator = new Hoa\\Regex\\Visitor\\Isotropic(new Hoa\\Math\\Sampler\\Random());\n\n try {\n do {\n $number = $generator->visit($ast);\n } while (Account::where('number', $number)->exists());\n\n return $number;\n } catch (Throwable $exception) {\n Log::error($exception);\n }\n }", "public function getCreateAccountToken() {\n $queryData = array();\n $queryData['action'] = 'query';\n $queryData['meta'] = 'tokens';\n $queryData['type'] = 'createaccount';\n $queryData['format'] = 'json';\n\n $url = $this->apiUrl . \"?\" . http_build_query($queryData);\n\n try {\n $this->fetch($url, null, OAUTH_HTTP_METHOD_POST);\n } catch (Exception $e) {\n $msg = 'MediaWikiApiClient error getting createaccount token: ' . $e->getMessage();\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'Query data was ' . print_r($queryData, true));\n CakeLog::write('error', 'URL was ' . print_r($url, true));\n }\n throw new MediaWikiApiClientException($msg, 1, $e);\n }\n\n $responseInfo = $this->getLastResponseInfo();\n\n if ($responseInfo['http_code'] != 200 || !preg_match('/^application\\/json/', $responseInfo['content_type'])) {\n $msg = \"MediaWikiApiClient error getting createaccount token\";\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'MediaWikiApiClient response code was ' . $responseInfo['http_code']);\n CakeLog::write('error', 'MediaWikiApiClient content type was ' . $responseInfo['content_type']);\n }\n throw new MediaWikiApiClientException($msg, 1);\n }\n\n $response = json_decode($this->getLastResponse(), true);\n\n if (!isset($response['query']['tokens']['createaccounttoken'])) {\n $msg = \"MediaWikiApiClient error getting createaccount token\";\n if(Configure::read('debug')) {\n CakeLog::write('error', $msg);\n CakeLog::write('error', 'MediaWikiApiClient response was ' . $print_r($response, true));\n }\n throw new MediaWikiApiClientException($msg, 1);\n }\n\n $createAccountToken = $response['query']['tokens']['createaccounttoken'];\n\n return $createAccountToken;\n }", "public function getAccNumber()\n {\n return $this->accNumber;\n }", "public function createAccount($type,$refID)\n\t{\n\t\tdb::insert(\"account\",Array(\n\t\t\t\t\t\t\"accountType\"=>$type,\n\t\t\t\t\t\t\"accountRefID\"=>$refID,\n\t\t\t\t\t\t\"accountBalance\"=>0,\n\t\t\t\t\t\t\"accountCreatedDate\"=>now(),\n\t\t\t\t\t\t\"accountCreatedUser\"=>session::get(\"userID\")\n\t\t\t\t\t\t));\n\n\t\t## return row (not last id)\n\t\treturn db::getLastID(\"account\",\"accountID\",true);\n\t}", "public function getAccount_id()\n {\n return $this->fv_account_id;\n }", "private function newAccount($n=64){\r\n\t\t$data=$this->struct;\r\n\t\t$data['last']=time();\r\n\t\t$data['sign']=$this->db->char(28,'SFXX');\r\n\r\n\t\treturn array(\r\n\t\t\t'public_key'\t=>\t$this->randAccount($n),\r\n\t\t\t'data'\t\t\t=>\t$data,\r\n\t\t);\r\n\t}", "public function getAccountUid()\n {\n return $this->getProperty('paymentAccountUid');\n }", "public function generateAccountActivationToken()\n {\n $this->account_activation_token = Yii::$app->security->generateRandomString();\n }", "public function getAccountNumber(): ?string\n {\n return $this->accountNumber;\n }", "function create_account() {\n\n\tglobal $AccountDomain, $AccountName, $DB;\n\n\t// verify account name and domain are set\n\tif(!isset($AccountDomain) || empty($AccountDomain) || !isset($AccountName) || empty($AccountName)) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"empty domain or name... name [{$AccountName}] - domain [{$AccountDomain}]\\n\";\n\t\t}\n\t\treturn 0;\n\t}\n\n\tif(domain_exists($AccountDomain)) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Domain Already Exists {$AccountDomain}\\n\";\n\t\t}\n\t\treturn 0;\n\t}\n\n\t$license_attempts = 0;\n\t$license_generation_failure = false;\n\t$license = generate_license();\n\twhile(license_exists($license)) {\n\t\t$license_attempts++;\n\t\t$license = generate_license();\n\t\tif($license_attempts >= MAX_LIC_GENERATIONS) {\n\t\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\t\techo \"Maximum license generation attempts reached\\n\";\n\t\t\t}\n\t\t\t$license_generation_failure = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif($license_generation_failure) {\n\t\treturn 0;\n\t}\n\n\n\t$sql = \"INSERT INTO Account (Id, License, Domain, Name, Active, Del, Added) VALUES (NULL, '{$license}', '{$AccountDomain}', '{$AccountName}', 1, 0, CURRENT_TIMESTAMP)\";\n\tif(!$DB->Query($sql)) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Insert error: {$DB->GetLastErrorMsg()}\\n\";\n\t\t}\n\t\treturn 0;\n\t}\n\n\treturn $DB->GetLastInsertedId();\n\n}", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "public function getTransactionNumber();", "protected function createUserAccount() {\n\t\treturn new UserAccount();\n\t}", "public function getNewAuthCode()\n {\n // TODO: Implement getNewAuthCode() method.\n }", "public function create()\n {\n return 'accounts.create';\n }", "public function register_new() {\n\t\t$fields = array(\n\t\t\t'address1', 'address2', 'city', 'comment', 'country', 'email', 'fax_src', 'first_name',\n\t\t\t'gender', 'insertion', 'company_name', 'lang', 'last_name', 'middle_name', 'mobile_src',\n\t\t\t'phone_src', 'prefix', 'state', 'suffix', 'zip', 'tax_ex_number', 'timezone'/* , 'house_num', 'house_suff' */\n\t\t);\n\t\t$clean_data = $this->_fill_account_data($fields);\n\n\t\t$clean_data['password'] = $_POST['password'];\t## password may contain escapeable symbols\n\t\t$clean_data['fraud_check'] = 1;\n\t\t$clean_data['ip_address'] = $this->translator->getClientIp();\n\n\t\tinstall_error_handler(array('UserPerson', 'NewAccountsDenied', 'UserExtData', 'InvalidAccountStatus'), 'handle_register_new_account_error');\n\t\t$account_id = call('create_customer', $clean_data, 'HSPC/API/Account');\n\t\tif($account_id) {\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_REGISTERED');\n\t\t\treturn $this->sign_in();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function GetAccountID() : int\n\t{\n\t\treturn gmp_intval( $this->Get( 0, '4294967295' ) ); // 4294967295 = 0xFFFFFFFF\n\t}", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "private function createTrackingNumber()\n {\n $tracking = 5000000000;\n $current = WaybillNumber::orderBy('id', 'DESC')->first();\n\n if (! $current) {\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }\n\n $tracking = (int) $current['current'] + 1;\n\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }", "public function GetAccountInstance() : int\n\t{\n\t\treturn gmp_intval( $this->Get( 32, '1048575' ) ); // 1048575 = 0xFFFFF\n\t}", "private function createFollowUpNumber($initial){\n $number = strtoupper($initial.uniqid (\"\" ,true ));\n $number = substr($number,0,10);\n $number_in_recharges = Recharge::where('follow_up_number',$number)->count();\n if($number_in_recharges){\n $this->createFollowUpNumber($initial);\n } else {\n return $number;\n }\n }", "public function accountId(): string\n {\n return $this->accountId;\n }", "public function accountId(): string\n {\n return $this->accountId;\n }", "private static function getNewId()\n {\n return DB::table('cashouts')->get()->count() + 1;\n }", "public function getAccountNumber()\r\n\t{\r\n\t\tif ($this->accountNumber)\r\n\t\t\treturn $this->accountNumber;\r\n\t\t\r\n\t\t$aid = UserFilesGetCatAccount($this->dbh, $this->folderId);\r\n\r\n\t\tif (!$aid)\r\n\t\t{\r\n\t\t\t$asys = new AntSystem();\r\n\t\t\t$ainfo = $asys->getAccountInfoByDb($this->dbh->dbname);\r\n\t\t\t$aid = $ainfo['id'];\r\n\t\t}\r\n\r\n\t\tif ($aid)\r\n\t\t\t$this->accountNumber = $aid;\r\n\t\t\r\n\t\treturn $aid;\r\n\t}", "function user_make_account($first_name, $last_name, $email){\n\t\t$queryText = 'INSERT INTO user_accounts (first_name, last_name, email) VALUES (:first_name, :last_name, :email)';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':first_name'=>$first_name, ':last_name'=>$last_name, ':email'=>$email));\n\t\t\n\t\treturn array(\"uid\"=>strval($this->connection->lastInsertId()));\n\t}", "public function create(AccountInfo $account) {\n\t\tif (!$account->validate()) {\n\t\t\tthrow new iGivefirst_AccountInformationIncomplete();\n\t\t}\n\t\t\n\t\t$req = $this->api->client->post('/account');\n\t\t$req->setBody(json_encode($account), 'application/json');\n\t\t\n\t\ttry {\n\t\t\treturn $this->api->execute($req)->json();\n\t\t}\n\t\tcatch(iGivefirst_HttpError $e) {\n\t\t\tthrow new iGivefirst_AccountNotCreated($e);\n\t\t}\n\t}", "public function newAccount($aFields)\n\t{\n\t\t// Verification de l'existence du login\n\t\tif ($this->checkLogin($aFields['login']))\n\t\t{\n\t\t\t$this->_error(LOC_MSG_LOGIN_EXIST);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Enregistrement de la demande dans la base\n\t\t$q = new Bn_query('creations', '_asso');\n\t\tforeach( $aFields as $key => $value)\n\t\t{\n\t\t\t$q->addValue('crea_'.$key, $value);\n\t\t}\n\t\t$id = $q->addRow();\n\t\tif ( $q->isError() )\n\t\t{\n\t\t\t$this->_error($q->getMsg());\n\t\t}\n\t\treturn $id;\n\t}", "public function generateInvoiceNumber()\n {\n $orderRepo = EntityUtils::getRepository('Order');\n $orderCount = $orderRepo->getOrderCountBeforeDate($this->program->id, $this->order_date);\n $year = chr(date('Y') - 1913);\n $month = date('m');\n $day = date('d') + $orderCount;\n if ($day < 10) {\n $day = \"0\" . $day;\n }\n $monthDay = $month . $day;\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n\n //Make sure the generated invoice number does not already exist, if it does, increment and try again\n while ($orderRepo->findOneBy(array(\"invoice_number\" => $invoiceNumber))) {\n $monthDay++;\n\n //Tack on a leading zero if we don't have 4 digits\n if ($monthDay < 1000) {\n $monthDay = \"0\" . $monthDay;\n }\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n }\n\n $this->invoice_number = $invoiceNumber;\n return $this->invoice_number;\n }", "public function processNewAccount() {\n\n\t\t// List of accounts\n\t\t$accounts = ['admin','bennabbott','oriongregg'];\n\n\t\t// Validate the form\n\t\t// Check that the user has privided a username\n\t\tif( $this->username == '' ) {\n\t\t\t$this->usernameErrorMsg = 'Invalid Username';\n\t\t} elseif(in_array($this->username, $accounts)) {\n\t\t\t$this->usernameErrorMsg = 'Username already exists';\t\t\t\n\t\t} else {\n\t\t\t$this->usernameErrorMsg = '';\n\t\t}\n\t\t\n\t\t// Check and make sure the paswords match\n\t\tif ($_POST['password'] == '' || $_POST ['password2'] == '') {\n\t\t\t$this->passwordErrorMsg = '* required';\t\t\t\n\t\t} elseif( $_POST['password'] != $_POST['password2']) {\n\t\t\t$this->passwordErrorMsg = 'Passwords do not match';\n\t\t} else {\n\t\t\t$this->passwordErrorMsg = '';\n\t\t}\n\t}", "public function createAccount(Request $request)\n {\n $this->_initAddAccountPageDynamicData();\n $postParams = $request->all();\n unset($postParams['_token']);\n\n $saveParams = $postParams['saveParams'];\n\n $createdAccountId = $this->_createAccountRecord($request, $saveParams);\n\n //return success response\n return response()->json(['error' => false, 'message' => 'Function completed Successfully!', 'createdAccountId' => $createdAccountId]);\n }", "public function newCompanyAccount(Request $request)\n {\n $this->validateNewAdminstrator($request);\n\n $account = $this->adminRepository->getByEmail($request['txtNewAccount']);\n if (!$account) {\n $account = new Administrator();\n $account['account_type'] = 2;\n $account['company_id'] = $request['companyId'];\n $account['office_id'] = 0;\n $account['department_id'] = 0;\n $account['email'] = $request['txtNewAccount'];\n $password = $request['txtNewPassword'];\n $account['password'] = bcrypt($password);\n } else {\n if ($account['is_active'] == 1) {\n return response()->json([\n 'result' => false,\n 'message' => '電子メールアドレスはすでに使用中です。'\n ]);\n }\n $account['account_type'] = 2;\n $account['company_id'] = $request['companyId'];\n $account['office_id'] = 0;\n $account['department_id'] = 0;\n $account['email'] = $request['txtNewAccount'];\n $password = $request['txtNewPassword'];\n $account['password'] = bcrypt($password);\n $account['is_active'] = 1;\n }\n\n $this->adminRepository->save($account);\n return response()->json([\n 'result' => true,\n 'message' => '登録が完了しました。'\n ]);\n\n }", "public function purchaseAccountLedgerEntry()\n {\n $items = $this->getItems();\n \n $financeLedger = new Core_Model_Finance_Ledger;\n $salesLedgerRecord = $financeLedger->fetchByName('Purchase Account');\n \n $totalPrice = 0;\n for($i = 0; $i <= sizeof($items)-1; $i += 1) {\n $price = $items[$i]['unit_price'] * $items[$i]['quantity'];\n $totalPrice = $totalPrice + $price;\n }\n $notes = 'Purchase with Purchase Id = '.$this->_purchaseId;\n \n $dataToInsert = array(\n 'debit' => $totalPrice,\n 'credit' => \"0\",\n 'notes' => $notes,\n 'transaction_timestamp' => $this->_transactionTime,\n 'fa_ledger_id' => $salesLedgerRecord['fa_ledger_id']\n );\n $ledgerEntryModel = new Core_Model_Finance_Ledger_Entry;\n $ledgerEntryId = $ledgerEntryModel->create($dataToInsert);\n return $ledgerEntryId;\n }", "public function getcreatePersonId()\n {\n return $this->createperson_id;\n }", "function createInvoiceNumber($orderDetails, &$invoiceNumber)\n {\n $invM = VmModel::getModel('invoice');\n return $invM->getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, $invoiceNumber);\n }", "public function store(Request $request)\n {\n $user=Auth::user()->id; \n $requestData = $request->all();\n $requestData =array_merge($requestData, array(\"users_id\"=>$user));\n Account::create($requestData);\n $id=DB::getPdo()->lastInsertId();\n return $id;\n //return $requestData;\n // $ko=Input::get('account_number');\n // Account::create($requestData);\n // $acco = Account::findOrFail(DB::getPdo()->lastInsertId());\n \n//viewDetail();\n //Account::create($requestData);\n\n // Session::flash('flash_message', 'Account added!');\n \n // return view('admin.accounts.createDetail',compact('account'));\n }", "public function getAccountId(){\n $value = \\Auth::user()->account_id;\n return $value;\n }", "public function accountNumber(string $accountNumber)\n {\n $this->accountNumber = $accountNumber;\n\n return $this;\n }", "public function getAccountId()\n {\n return $this->account_id;\n }", "public function getAccountId()\n {\n return $this->account_id;\n }", "function getGatewayAccountID() {\n\t\treturn commsGatewayAccount::GW_ACC_APP_LOOP_BACK;\n\t}", "public function getAccount();", "public static function save ($newAccount) {\n // Retrieve account resources.\n $accounts = Json::get('account', null);\n\n // If account resource is not avaiable, internal server error.\n if ($accounts == 1)\n return 1;\n\n // Iterate through accounts to check if it already exists\n foreach ($accounts as $account) {\n // It account already exists, return error 1.\n if ($account['email'] == $newAccount['email'])\n return 2;\n }\n\n // If unique, save it.\n $save = Json::save('account', $newAccount);\n\n // If id already exists, internal error.\n if ($save == 2)\n return 3;\n\n return 0;\n }", "public function addAccount()\n {\n return new AccountDefinition($this,$this->now);\n }", "public function generateNewToken()\n {\n $this->token = uniqid(null, true);\n return ($this->token);\n }", "public function getOnboardedAccount()\n {\n return new PsAccount(\n $this->getIdToken(),\n $this->getRefreshToken(),\n $this->getEmail(),\n $this->getLocalId()\n// $this->getPsxForm()\n );\n }", "public function getAccountKey()\n {\n return $this->accountKey;\n }", "function recordNumberToHashID($newRecordNum) {\n\t// http://www.hashids.org/ \n\t$hashids = new Hashids\\Hashids(theSalt());\n\treturn $hashids->encrypt($newRecordNum);\n}", "public function getNewAuthCode()\n {\n return new AuthCodeEntity();\n }", "public function getUserAccountPublicId();", "function getNewId();", "public function createClientAccount($account_info)\n {\n $api_debug = Core::isAPIDebugEnabled();\n\n $error_codes = array();\n\n // check all the valid fields\n if (!isset($account_info[\"first_name\"]) || empty($account_info[\"first_name\"])) {\n $error_codes[] = 700;\n }\n if (!isset($account_info[\"last_name\"]) || empty($account_info[\"last_name\"])) {\n $error_codes[] = 701;\n }\n if (!isset($account_info[\"email\"]) || empty($account_info[\"email\"])) {\n $error_codes[] = 702;\n }\n if (!General::isValidEmail($account_info[\"email\"])) {\n $error_codes[] = 703;\n }\n\n if (!isset($account_info[\"username\"]) || empty($account_info[\"username\"])) {\n $error_codes[] = 704;\n } else {\n if (preg_match('/[^A-Za-z0-9]/', $account_info[\"username\"])) {\n $error_codes[] = 705;\n }\n if (!Accounts::isValidUsername($account_info[\"username\"])) {\n $error_codes[] = 706;\n }\n }\n\n if (!isset($account_info[\"password\"]) || empty($account_info[\"password\"])) {\n $error_codes[] = 707;\n } else {\n if (preg_match('/[^A-Za-z0-9]/', $account_info[\"password\"])) {\n $error_codes[] = 708;\n }\n }\n\n if (!empty($error_codes)) {\n if ($api_debug) {\n $page_vars = array(\"message_type\" => \"error\", \"error_codes\" => $error_codes);\n Themes::displayPage(\"error.tpl\", $page_vars);\n exit;\n } else {\n return array(false, $error_codes);\n }\n }\n\n // to pass validation\n $account_info[\"password_2\"] = $account_info[\"password\"];\n\n list ($success, $message, $new_user_id) = Administrator::addClient($account_info);\n\n if (!$success) {\n return self::processError(709, array(\n \"debugging\" => \"Failed query in <b>\" . __FUNCTION__ . \"</b>: \" . $message\n ));\n }\n\n return array(true, $new_user_id);\n }", "public function get_new_user_id() {\r\n $this->db->select_max('user_id');\r\n $u_id = $this->db->get('users');\r\n return $u_id->result();\r\n }", "public function gen_account($prefix) {\n do {\n $seed = '10990000000000001';\n $account = $prefix . random_string('numeric', strlen($seed) - strlen($prefix));\n if (((double) $seed > (double) $account))\n continue;\n $res = $this->db->select('1', false)\n ->from($this->table)\n ->where('accountNumber', $account)\n ->get();\n }while ($res->num_rows() > 0);\n return $account;\n }", "public function intGetNewId() {\n $this->XaoThrow(\n \"_EntBase::Build(): This entity does not implement retrieval of a \".\n \"new numeric identifier as a descrite function. It may not be \" .\n \"applicable.\"\n , debug_backtrace()\n );\n }", "public function create(){\r\n\t\t\t$data['title'] = \"Accounts | Create Account\";\r\n\t\t\t$data['userData'] = $this->session->userdata();\r\n\r\n\t\t\tif (!empty($this->input->post())){\r\n\t\t\t\t$accountCreateValidation = $this->form_validation->run();\r\n\r\n\t\t\t\tif($accountCreateValidation){\r\n\t\t\t\t\t$_POST['userID'] = $data['userData']['userID'];\r\n\t\t\t\t\t$createCheck = $this->account_model->createAccount($_POST);\r\n\t\t\t\t\tif ($createCheck){\r\n\t\t\t\t\t\t$this->session->set_flashdata('success', 'You have successfully created an account.');\r\n\t\t\t\t\t\tredirect('accounts');\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$this->session->set_flashdata('danger', 'Something internally happened. Please try again.');\r\n\t\t\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->load->template('accounts/create', $data);\r\n\t\t\t}\r\n\t\t}", "protected function getOrCreateUserAccount($accountName) {\n\t\t$rep = $this->entityManager->getRepository('GravityApiBundle:UserAccount');\n\t\t$account = $rep->findOneBy(array('accountName'=>$accountName));\n\t\tif ($account) {\n\t\t\treturn $account;\n\t\t}\n\t\t$newAccount = $this->createUserAccount();\n\t\t$newAccount->setAccountName($accountName);\n\t\t$this->entityManager->persist($newAccount);\n\t\t$this->entityManager->flush();\n\t\treturn $newAccount;\n\t}", "public function getLoyaltyAccountId(): string\n {\n return $this->loyaltyAccountId;\n }", "public static function createPaymentAddress() {\n $url = self::$username.':'.self::$password.'@'.self::$address.':'.self::$port.'/';\n self::$rpcClient = new jsonRPCClient($url, self::$debug);\n \n self::$emercoin_info = self::$rpcClient->getinfo();\n \n if(!is_callable(self::$get_order_id)) {\n throw new Exception('Property self::$get_order_id must be callable');\n }\n $account = self::$account_prefix.'_'.call_user_func(self::$get_order_id);\n return self::$rpcClient->getaccountaddress($account);\n }", "public function GetAccountType() {\n return $this->accountType;\n }", "public function createVerificationCode()\n {\n return $code = random_int(config('twilio-verify.random_int.initial_value'), config('twilio-verify.random_int.final_value'));\n }", "public function setAccountNumber($var)\n {\n GPBUtil::checkUint32($var);\n $this->account_number = $var;\n\n return $this;\n }", "function add_account($name) {\n $this_account = new Account;\n $this->list[$name] = $this_account;\n return $this_account;\n }" ]
[ "0.73480046", "0.68945485", "0.68945485", "0.6883723", "0.65639037", "0.6528522", "0.6475424", "0.6473097", "0.6437799", "0.62912935", "0.62308806", "0.6091065", "0.60504144", "0.604607", "0.6041044", "0.6022807", "0.6021714", "0.6021714", "0.5998426", "0.5981877", "0.5981877", "0.59686995", "0.5936019", "0.5901128", "0.587958", "0.58744717", "0.58524126", "0.58292526", "0.58196187", "0.58181494", "0.58175313", "0.58093745", "0.5802037", "0.579265", "0.5781911", "0.57638794", "0.57599336", "0.57590413", "0.57584465", "0.57379526", "0.569975", "0.56866777", "0.5680814", "0.5669124", "0.56666994", "0.5662543", "0.5659357", "0.565676", "0.5643661", "0.561267", "0.5599651", "0.5578765", "0.55616474", "0.55199695", "0.5519273", "0.5507545", "0.55040663", "0.5473683", "0.54654646", "0.54654646", "0.54582703", "0.5452047", "0.54346573", "0.54314476", "0.54312676", "0.54120994", "0.54102737", "0.5399267", "0.5399028", "0.5396512", "0.539235", "0.5386137", "0.53764254", "0.53646713", "0.5354656", "0.5352965", "0.5352965", "0.5341083", "0.5336295", "0.53341794", "0.53300136", "0.532726", "0.53249055", "0.53221995", "0.5305072", "0.52919734", "0.52907014", "0.529029", "0.5272032", "0.5269456", "0.526906", "0.5266908", "0.52638024", "0.52632475", "0.52611196", "0.5257751", "0.5253525", "0.5250306", "0.52479213", "0.524407" ]
0.5799349
33
View Loans in Admin
function GetAllLoans() { $db = new dbconnect; $db->connect(); $sql = "SELECT AccountNo,Amount,UseOfLoan,DateOfSubmission,Acceptance FROM LOANS"; $result = $db->executesql($sql); $i =-1; while ($row = mysqli_fetch_array($result)) { $i++; $this->accountNo[$i]=$row["AccountNo"]; $this->Amount[$i]=$row["Amount"]; $this->useOfLoan[$i] = $row["UseOfLoan"]; $this->dateOfSubmission[$i] =$row["DateOfSubmission"]; $this->acceptance[$i]=$row["Acceptance"]; } return $i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $loans = Loan::all();\n return view('loans.index', compact('loans'));\n }", "public function actionIndex()\n {\n $searchModel = new LoanSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination = array(\n 'pageSize' => 10,\n );\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $arrDepartments = Department::all();\n $arrLoans = HrLoan::all();\n $strTitle = \"Show Loans\" ;\n return view('admin.hr_loans.index',compact('arrLoans','strTitle','arrDepartments')); \n }", "public function index()\n\t{\n\t\tpermittedArea();\n\t\t$data['assets'] = $this->ledger_model->totalAssets();\n\t//\t$data['debits'] = $this->ledger_model->totalDebits();\n\t//\t$data['credits'] = $this->ledger_model->totalCredits();\n\t\t\n\t\t$data['debits'] = $this->ledger_model->ledgerDebit();\n\t\t$data['credits'] = $this->ledger_model->ledgerCredit();\n\t\t\n\t\t\n\t\t$data['wallet'] = $this->ledger_model->totalWallet();\n\t\t$data['usedwallet'] = $this->ledger_model->usedWallet();\n\t\t\n\t\ttheme('ledger_index', $data);\n\t\t\n\t}", "public function index()\n {\n return view('properties::admin.landunits.index');\n }", "public function index()\n {\n //\n $loans = Loans::latest()->get();\n\n return view('falcon', compact('loans'));\n }", "public function index()\n {\n\n $today = date('Y-m-d');\n\n $defaulters = DB::table($this->tbl)\n ->where('is_paid', false)\n ->where('due_date', '<', $today)\n ->whereNotNull('taken_on')\n ->get();\n\n $number_of_defaulters = DB::table($this->tbl)\n ->where('is_paid', false)\n ->where('due_date', '<', $today)\n ->whereNotNull('taken_on')\n ->count();\n\n $totalLoans = DB::table($this->tbl)\n ->where('is_paid', false)\n ->where('due_date', '<', $today)\n ->whereNotNull('taken_on')\n ->sum('loan_amount');\n\n return view('pages.loans.defaulters')\n ->with(compact('defaulters', 'totalLoans','number_of_defaulters'));\n }", "public function themLoaiMon(){\n \treturn view(\"admin.loaimon.them\");\t\n }", "public function index() {\n return view('bills', [\n 'bills' => Bill::with('who','whoId','bsn')\n ->where('BillStatus', '!=', '0')\n ->get()\n ]\n );\n }", "public function index()\n {\n return view('backoffice.loan.index', [\n 'loans' => Loan::latest()->paginate(8)\n ]);\n }", "public function index()\n {\n if (! Gate::allows('bill_access')) {\n return abort(401);\n }\n\n $user = Auth::user();\n if ($user->isAdmin()){\n $bills = Bill::all();\n }\n\n if ($user->isLandlord()){\n $house = House::where('landlord_id', $user->id)->pluck('id');\n $bills = Bill::whereIn('house_id', $house)->get();\n }\n\n if ($user->isTenant()){\n $house = House::where('tenant_id', $user->id)->pluck('id');\n\n $bills = Bill::where('house_id', $house)->get();\n }\n\n\n return view('admin.bills.index', compact('bills'));\n }", "public function index(){\n $data['title'] = \"Taxes\";\n $data['records']= $this->TaxModel->get_list('tbltaxes');\n\n $this->admin_load('taxes/tax_list',$data); \n }", "public function index()\n {\n \t\n \n\t\t$amount = Amount::all()->toArray();\t\n\t\t\n\t\t$floor=Floors::select(array('id', 'name'))->get();\n\t\t \n return view('admin.report_all', compact('floor','amount'))\n ->with('title','View All Reports');\n }", "public function index()\n {\n //\n $loans=Loan::all();\n return view('loan.all')->with(['loans'=>$loans]);\n\n }", "public function index()\n {\n $loans = Loan::All();\n\n\treturn view('backend.setup.loan.index', compact('loans'));\n }", "public function loan() {\n $self = 'loan';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $loan = Loan::all();\n $employee = Employee::where('user_name', '!=', 'admin')->get();\n\n return view('admin.loan', compact('loan', 'employee'));\n }", "public function show(Loan $loan)\n {\n\n }", "public function index()\n {\n $lances = Lance::all();\n\n return view('Lance.showAllLance', ['lances'=>$lances]);\n }", "public function getList(){\n $bills = DB::table('bills')->select('*')->orderBy('id', 'DESC')->get();\n return view('admin.bill.list', compact('bills'));\n }", "public function loket()\n\t{\n\n\t\t$data['data_loket'] = $this->model_admin->get_loket();\n\t\t$data['halaman'] = 'view_loket';\n\t\t$this->load->view('admin/page', $data);\n\t}", "public function actionLoans()\n {\n $infoLoad = [];\n\n $wherePins = [\n 'loan' => true,\n 'isDelete' => false\n ];\n\n if (!$this->user->isMain()) {\n $wherePins['userId'] = new ObjectID($this->user->id);\n }\n\n $modelPins = Pins::find()\n ->select(['_id','productData','userData'])\n ->where($wherePins)\n ->orderBy(['dateCreate' => SORT_DESC])\n ->all();\n\n if ($modelPins) {\n foreach ($modelPins as $item) {\n if(!empty($item->userData['username'])){\n if(empty($infoLoad[$item->userData['username']])) {\n $infoLoad[$item->userData['username']] = [\n 'infoUser' => $item->userData['username'],\n 'amountLoan' => 0,\n 'amountRepayment' => 0\n ];\n }\n\n $infoLoad[$item->userData['username']]['amountLoan'] += ($item->productData['price'] * $item->productData['count']);\n\n }\n }\n }\n\n $modelLoanRepayment = LoanRepayment::find()\n ->select(['user_id','amount']);\n\n if ($this->user->isMain() == false) {\n $modelLoanRepayment = $modelLoanRepayment->where(['user_id' => new ObjectID($this->user->id)]);\n }\n\n $modelLoanRepayment = $modelLoanRepayment->all();\n\n if ($modelLoanRepayment) {\n\n $arrayUserId = ArrayHelper::getColumn($modelLoanRepayment,'user_id');\n $arrayUserId = array_values(array_unique($arrayUserId));\n\n $infoUser = Users::find()\n ->select(['_id','username'])\n ->where([\n '_id' => [\n '$in' => $arrayUserId\n ]\n ])\n ->all();\n $infoUser = ArrayHelper::index($infoUser, function ($item) { return strval($item['_id']);});\n\n foreach ($modelLoanRepayment as $item){\n\n $username = $infoUser[strval($item->user_id)]->username;\n\n if(empty($infoLoad[$username])){\n $infoLoad[$username] = [\n 'infoUser' => $username,\n 'amountLoan' => 0,\n 'amountRepayment' => 0\n ];\n }\n\n $infoLoad[$username]['amountRepayment'] += $item->amount;\n }\n\n }\n\n $f = Yii::$app->request->get('f');\n if($f == 1){\n foreach ($infoLoad as $k=>$item) {\n if(($item['amountLoan']-$item['amountRepayment']) == 0){\n unset($infoLoad[$k]);\n }\n }\n }\n\n return $this->render('loans',[\n 'infoLoad' => $infoLoad,\n 'alert' => Yii::$app->session->getFlash('alert', '', true),\n 'f' => $f,\n ]);\n }", "public function index()\n {\n $bills = $this->billService->getAll();\n return view('admin.bill.index', compact('bills'));\n }", "public function index()\n {\n $units=Unit::paginate(env('PAGINATION_COUNT'));\n return view('admin.units.units',['units'=>$units,'showLinks'=>true]);\n }", "public function index()\n {\n //Price Model Listing load\n $prices = PriceModel::all() ;\n $admin = AdminProfile::all()->last();\n return view('admin.price.index' , ['price' => $prices , 'admin' =>$admin]);\n\n }", "public function index()\n {\n return view('admin.stat');\n\n /*\n return view('admin.main')->with(['balance' => $user,\n 'status' => $user->active_vpn,\n 'tarif' => $tarif]); */\n }", "public function index()\n {\n $banks=$this->bank->orderBy('created_at','desc')->where('our_bank',1)->with('received','payments','purchasePayments')->get();\n $payment_gateways=$this->gateway->orderBy('created_at','desc')->with('receiveds','payments','purchasePayments')->get();\n $office_balance=$this->office_balance->orderBy('created_at','desc')->get();\n\n $officeBalance=\\DB::table('office_balances')\n ->groupBy('type')\n ->select('type', \\DB::raw(\"SUM(amount) as totalamount\")) \n \n ->orderBy('type', 'desc')\n ->get();\n\n \n\n \n return view('admin.balance.list',compact('banks','payment_gateways','officeBalance'));\n }", "public function index()\n {\n if ($this->fungsi->user_login()->level == 1)\n $data['data'] = $this->leads_model->get(\"users.id_user = \" . $this->fungsi->user_login()->id_user . \" AND (status = 'draft' OR status = 'lengkap')\");\n //Jika Sharia/Manager login maka memunculkan data berdasarkan data di cabangnya dan memunculkan data cross-branch.\n if ($this->fungsi->user_login()->level == 2 || $this->fungsi->user_login()->level == 3)\n $data['data'] = $this->leads_model->get(\"branches.id_branch = \" . $this->fungsi->user_login()->id_branch . \" OR cabang_cross = \" . $this->fungsi->user_login()->id_branch . \" AND (status = 'draft' OR status = 'lengkap')\");\n if ($this->fungsi->user_login()->level >= 4)\n $data['data'] = $this->leads_model->get(\"status = 'lengkap'\");\n\n $this->template->load('template/index', 'leads', $data);\n }", "public function list_data_mantan_rt()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $data_rt['data_rt'] = $this->m_admin->get_data_mantan_rt()->result();\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin', $data);\n $this->load->view('topbar', $data);\n $this->load->view('admin/list_data_mantan_rt', $data_rt);\n $this->load->view('footer');\n }", "function index()\n {\n $login_user = sess('user_id'); \n //$this->model->readAll(\"where completed_id = 2 AND maintenance.technician_id = $login_user order by maintenance_date DESC Limit 40\");\n $this->model->readAll(\"where maintenance.technician_id = $login_user order by yearmonth DESC ,maintenance_date DESC Limit 100\"); \n $this->view->render('maintenanceTable');\n }", "public function index()\n {\n return view('admin.crud.rates.index');\n }", "public function index()\n {\n return view('admin.salonrates.index', [\n 'salonrates' => Salonrate::all(),\n 'bonuses' => $this->bonuses\n ]);\n }", "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->optional_warranty);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->optional_warranty,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/optional_warranty/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "public function index()\n\t{\n\t\n\t\treturn View::make('admin.expense.list')->with( 'expenses', Expense::all());\n\t}", "public function index()\n {\n return view(\"report.billing_range\")->with(['title'=>'Generating Billing report']);\n }", "public function index()\n {\n //\n ;//for specific price list\n }", "public function index()\n {\n $amount = DB::table('treasury')->sum('amount');\n $salaries = $amount-2000000;\n $members = DB::table('members')->count();\n $agents= DB::table('agents')->count();\n $district = DB::table('districts')->count();\n\n\n\n return view('dashboard.index',compact('amount','salaries','members','agents','district'));\n }", "function overview() {\n $level = $this->session->userdata('level');\n /////////////////////////////////////////////////\n $load['Title'] = \"Overview Plant TLCC\";\n $load['li_active'] = $this->plant_link->plant_overview('tlcc', 'overview');\n $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/overview_plant', $load);\n// if ($level == 1) {\n// $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/overview_plant', $load);\n// } elseif ($level == 2) {\n// $this->template->load('plant_information/operator_index', 'plant_information/tlcc/overview_plant', $load);\n// // $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/emission', $load);\n// } elseif ($level == 3) {\n// $this->template->load('plant_information/home_index', 'plant_information/tlcc/overview_plant', $load);\n// // $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/emission', $load);\n// }\n }", "public function index()\n {\n Carbon::setLocale('id');\n $berthing = BerthingPlan::all();\n return view('admin.berthing.index')->with('berthing', $berthing);\n }", "function bill()\n {\n \n $this->load->view('admin/bill');\n }", "public function view_list(){\n\t\treturn view(mProvider::$view_prefix.mProvider::$view_prefix_priv.'stock');\n\t}", "public function index()\n {\n //\n // get all the nerds\n $mun = Mun::where('type','international')->orderBy('id','desc')->get();\n\n // load the view and pass the nerds\n return View::make('admin.view_int_mun')\n ->with('mun', $mun);\n }", "public function dashboard()\n\t{\n $data_admin = $this->m_data->tampil_data('admin')->result();\n\n // di parsing ke view\n $data = array(\n 'admin' => $data_admin, \n );\n\n // menampilkan view index\n\t\t$this->load->view('dashboard',$data);\n }", "public function index()\n {\n $expenses = Expense::paginate(15);\n return view('admin.tables.expense')->with('expenses', $expenses);\n }", "public function index()\n {\n if(!$GLOBALS['discountlevel_permission']['view']){\n access_denied('discountlevel');\n }\n\n $data['title'] = lang('page_discountlevel');\n $this->load->view('admin/discountlevels/manage', $data);\n }", "public function index()\n {\n $price = BitcoinLite::all();\n return view('UserPanel.litepricing',compact('price'));\n }", "public function index()\n {\n return view('backend.accounting.expense.list');\n }", "public function index() {\n $month = Input::get('month', \\Carbon\\Carbon::now()->format('m/Y'));\n $start = \\Carbon\\Carbon::createFromFormat('m/Y', $month)->startOfMonth();\n $end = \\Carbon\\Carbon::createFromFormat('m/Y', $month)->endOfMonth();\n $bills = \\Bill::with('creator', 'buyer')\n ->whereBetween('created_at', array($start, $end))\n //->condition(\\Input::all())\n ->orderBy('created_at', 'desc')\n ->paginate(25);\n $months = \\Member::getMonthsLog();\n $this->layout->content = View::make('admin.bills.index', array(\n 'bills' => $bills,\n 'months' => $months,\n 'month' => $month,\n ));\n }", "function index()\n { \n $table = 'monitoring';\n $this->load->model('model_laporan','monitoring');\n\n $data['kodeKompos'] = $this->model_laporan->getKodekompos();\n \n $data['_view'] = 'pemilik/laporan/index';\n $this->load->view('layout',$data);\n \n }", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function index()\n {\n $borrowsRes = Borrow::orderBy(\"tanggal_peminjaman\", \"desc\")->paginate(10);\n\n return view('admin.borrow.table', compact('borrowsRes'));\n }", "public function loansData()\n {\n if( Auth::user()->isAdmin() ) {\n $lender = \"CONCAT('<a href=\\\"loans/',loans.id,'/edit\\\">',lenders.first_name, ' ' , lenders.last_name, '(', IF(LENGTH(lenders.codename)> 0, lenders.codename, 'anonymous'), ')','</a>') as lender\";\n }else {\n $lender = \"IF(LENGTH(lenders.codename)> 0, lenders.codename, 'anonymous') as lender\";\n }\n $loans = Loan::leftJoin('lenders', 'lenders.id', '=', 'loans.lender_id')\n ->leftJoin('members', 'members.id', '=', 'loans.member_id')\n ->leftJoin('payments', function($join){\n $join->on('loans.id', '=', 'payments.paymentable_id');\n $join->on('payments.paymentable_type', 'like', DB::raw(\"'%Loan'\"));\n })\n ->leftJoin('payment_dates', 'payment_dates.id', '=', 'payments.payment_date_id')\n ->selectRaw(\"\n CONCAT('row_', loans.id) as DT_RowId,\n \" . $lender . \",\n lenders.codename,\n CONCAT(members.first_name, ' ' , members.last_name) AS member,\n FORMAT(total_amount,2, 'de_DE') as total_amount, \n months_to_pay, \n loans.created_at, \n loans.updated_at, \n amount_per_term,\n SUM(IF(payments.month_day > 0, payments.amount, 0)) AS paid,\n total_amount - SUM(IF(payments.month_day > 0, payments.amount, 0)) AS balance, \n '' as end_date\")\n // ->where(\"is_approved\", 1)\n ->groupBy(\"loans.id\")\n ->get()->toArray();\n $raw_columns = [];\n if( !empty($loans) ) {\n $raw_columns = array_keys(current($loans));\n }\n \n\n return Datatables::of($loans)->rawColumns($raw_columns)->make(true);\n }", "public function index()\n {\n $clientsCount = Client::count();\n $loansCount = Loan::count();\n $loansValue = Loan::sum('amount');\n\n return view('dashboard.index', compact('clientsCount', 'loansCount', 'loansValue'));\n }", "public function index()\n {\n //return view('admin.user.editUser');\n //return 11111;\n \n $list = DB::table('zd')->orderBy('ctime','desc')->paginate(5);\n \n \n \n return view('admin.money.zd',['list'=>$list]);\n }", "public function loan_details()\n\t{\n\t\t\n\t$this->load->database();\n\t$searchquery=\"SELECT * FROM bank_loan WHERE status=1 \";\n\tif(isset($_GET['min_int_rate']) ){\n\t\t$max_int_rate=$_GET['max_int_rate'];\n\t\t$min_int_rate=$_GET['min_int_rate'];\n\t\tif($min_int_rate=='' OR $max_int_rate==''){}\n\t\telse{\n\t\t$searchquery=$searchquery.' AND min_int_rate >='.$min_int_rate.' AND max_int_rate <='.$max_int_rate;\n\t\t}\n\t}\n // filter by processing fee\n if(isset($_GET['max_processing_fee']) ){\n\t\t$max_processing_fee=$_GET['max_processing_fee'];\n\t\t$min_processing_fee=$_GET['min_processing_fee'];\n\t\tif($min_processing_fee=='' OR $max_processing_fee==''){}\n\t\telse{\n\t\t$searchquery=$searchquery.' AND min_processing_fee >='.$min_processing_fee.' AND max_processing_fee <='.$max_processing_fee;\n\t\t}\n\t}\n\n\t// Filter By Tenure\n\t if(isset($_GET['min_tenure']) ){\n\t\t$max_tenure=$_GET['max_tenure'];\n\t\t$min_tenure=$_GET['min_tenure'];\n\t\tif($min_tenure=='' OR $max_tenure==''){}\n\t\telse{\n\t\t$searchquery=$searchquery.' AND tenure_month_start >='.$min_tenure.' AND tenure_month_end <='.$max_tenure;\n\t\t}\n\t}\n// Filter By MIN Loan Amount\n\t if(isset($_GET['max_loan_amount']) ){\n\t\t$max_loan_amount=$_GET['max_loan_amount'];\n\t\tif($max_loan_amount==''){}\n\t\telse{\n\t\t$searchquery=$searchquery.' AND min_loan_amount <='.$max_loan_amount;\n\t\t}\n\t}\n\t// Filter By User applied Amount\n\t if(isset($_GET['loanamount']) ){\n\t\t$min_loan_amount=$_GET['loanamount'];\n\t\tif($min_loan_amount==''){}\n\t\telse{\n\t\t$searchquery=$searchquery.' AND min_loan_amount <='.$min_loan_amount;\n\t\t}\n\t}\n\n\n\t $searchquery=$searchquery.' ORDER BY min_int_rate';\n\t\n\t$q=$this->db->query($searchquery);\n\treturn($q->result());\n\t\t\n\t}", "public function index(Request $request)\n {\n //\n $loans = Auth::User()->loans()->get();\n return view('loan.index', ['loans' => $loans]);\n }", "public function index()\n {\n $bills = Bill::paginate(10);\n return view('dashboard/bills/index',compact('bills'));\n }", "function tahun_lapkeu(){\n\t\tcek_session_admin();\n\t\t$data['tahun'] = $this->model_lapkeu->tahun_lapkeu();\n\t\t$this->load->view('administrator/mod_thnlapkeu/view_thn',$data);\n\t}", "public function index()\n {\n $DanhSach_Lop = Lop::all();\n\n // $DanhSach_BoMon = BoMon::all();\n $DanhSach_KhoaHoc = KhoaHoc::all();\n $DanhSach_Nganh = Nganh::orderBy('tennganh', 'asc')->get();\n\n return view('admin.lop',['DanhSach_Lop' => $DanhSach_Lop, 'DanhSach_KhoaHoc' => $DanhSach_KhoaHoc, 'DanhSach_Nganh' => $DanhSach_Nganh]);\n }", "public function index() {\n $this->is_loggedIn();\n $this->is_admin();\n $data['laporan'] = $this->LKDTModel->getDatalaporanWithName()->result();\n $this->load->view('template_administrator/header');\n $this->load->view('template_administrator/sidebar');\n $this->load->view('administrator/lk_dt',$data);\n $this->load->view('template_administrator/footer');\n }", "public function index()\n\t{\n\t\t$module = Module::get('Penjualans');\n\n\t\tif(Module::hasAccess($module->id)) {\n\t\t\treturn View('la.penjualans.index', [\n\t\t\t\t'show_actions' => $this->show_action,\n\t\t\t\t'listing_cols' => $this->listing_cols,\n\t\t\t\t'module' => $module\n\t\t\t]);\n\t\t} else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n\t}", "public function index()\n {\n // get all the nerds\n $rates = Rates::all();\n\n // load the view and pass the nerds\n return view('admin.rates.index')\n ->with('rates', $rates);\n }", "public function manage()\n {\n return view(\"rv.linhas.manage\", [\"active\"=>\"lin_gerenciar\",\n \"panel_title\"=>\"Gerenciar Linhas\"]);\n }", "public function index()\n\t{\n\t\t$add_url = array('url' => 'percentile/add', 'title' => lang('add_percentile'));\n\n\t\tcreate_percentile_table();\n\t\t$data['ajax_source'] = 'percentile/table/';\n\n\t\t$data['page_title'] = lang('percentiles');\n\t\t$data['action_urls'] = array($add_url);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->authenticate->authenticate_redirect('templates/list_view', $data, UserRole::ADMIN);\n\t\t$this->load->view('templates/footer');\n\t}", "public function index()\n {\n $module = Module::get('Ledgerreports');\n \n $acc_items = Acc_account::where('acc_or_group','account')->get();\n return View('la.ledgerreports.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => $this->listing_cols,\n 'acc_items' => $acc_items, \n 'module' => $module\n ]);\n }", "public function trendAction()\n\t{\t$result = $this->db->getTrend();\n\t\t$trend = array();\n\t\tforeach( $result as $row )\n\t\t{\t$trend = array_merge( $trend, array_values($row) );\n\t\t}\n\t\t\n\t\t$this->view->trend = $trend;\n\t}", "public function index(){\n $plans = Rate::get()->take(3);\n return view('planning', compact('plans'));\n }", "public function index()\n {\n $categories = ProductCategory::get();\n $lounges = Lounge::paginate(10);\n return view('admin.lounges.index',compact('categories','lounges'));\n }", "public function index()\n {\n $renting_places = RentingPlace::all();\n return view('admin.rents',['renting_places' => $renting_places]);\n }", "public function commission_index()\n\t{\n\t\tpermittedArea();\n\t\t$data['assets'] = $this->ledger_model->totalAssets();\n\t\t$data['debits'] = $this->ledger_model->totalDebits();\n\t\t$data['credits'] = $this->ledger_model->totalCredits();\n\t\t$data['wallet'] = $this->ledger_model->totalWallet();\n\t\t$data['usedwallet'] = $this->ledger_model->usedWallet();\n\t\t\n\t\t\n\t\ttheme('commission_index', $data);\n\t}", "public function index()\n {\n //\n $lunbos = Lunbo::all();\n return view('admin.lunbotu.index', ['lunbos'=>$lunbos]);\n }", "public function index(){\n\t#\t{\n $data['data_obat']=$this->db->query('select * from data_obat where stok between 1 and 10');\n $data['data_obat']=$data['data_obat']->num_rows();\n $data['rawat_jalan'] = $this->m_crud->tampil_data('data_rawat_jalan')->result();\n\t\t$this->load->view('admin/jalan/v_data_rawat_jalan',$data);\n # }\n #else {\n # \t\tdie(\"<script>alert('Silahkan Login Admin');window.location='../dashboard'</script>\");\n # \t}\t\n \n }", "public function index() {\n\n\t\t# Id Pengguna aktif\n\t\t$user = Petugas::where('id', '=', Auth::user()->id)->first()->id_kelurahan;\n\t\t\n\t\t# Simpan semua isi tps kedalam variabel $tps\n\t\t$tps = Tps::where('id_kelurahan', '=', $user)->get();\n\n\t\t# Tampilkan view yang dituju beserta variabel tps\n\t\treturn View::make('admin.tps.index', compact('tps'));\n\t}", "public function index()\n {\n $data['billType'] = BillType::get()->keyBy('id');\n $data['billTypeList'] = collect($data['billType'])->pluck('name', 'id');\n $data['unit'] = unit_by_id();\n $data['unitList'] = collect($data['unit'])->pluck('hr_unit_name', 'hr_unit_id');\n $data['billList'] = BillSettings::with('available_special')->whereIn('unit_id', auth()->user()->unit_permissions())->whereNull('end_date')->get();\n return view('hr.setup.bill.index', $data);\n }", "public function index() {\n\t\t//\n\t\treturn view('admin.pages.statistic.index');\n\t}", "public function index()\n {\n\n $property = Property::findorFail($this->property);\n $leases = LeasingAgreement::where('property_id', $property->id)->get();\n // $lease_detail = LeasingAgreementDetail::findorFail($id);\n $property_access = PropertyAccess::all();\n\n $now = Carbon::now();\n\n $start = (new DateTime(date('d-M-Y', strtotime('-1 year', strtotime($now)))))->modify('first day of this month');\n $end = (new DateTime(date('d-M-Y', strtotime('+1 year', strtotime($now)))))->modify('first day of this month');\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($start, $interval, $end);\n\n $utility_bills = UtilityBill::where('property_id', $property->id)->get();\n return view('pages.utility.utility-bills.index', compact('property', 'property_access', 'leases', 'utility_bills', 'period'));\n }", "function lists()\n {\n $data[\"data\"] = $this->RapatModel->get();\n $this->load->view('rapat/lists', $data);\n }", "public function top_100_list()\n {\n $data['user_data'] = $this->session->userdata('user_data');\n $data['list_100'] = $this->M_fan->list_100();\n $this->load->view('includes/header', $data);\n $this->load->view('includes/navbar', $data);\n $this->load->view('fan/top_100_list', $data);\n $this->load->view('includes/footer', $data);\n }", "public function index()\n {\n \n $data = [\n 'title' => 'Daftar Lowongan',\n 'items' => Lowongan::all(),\n 'no' => 1\n ];\n return view('admin.lowongan.index', $data);\n }", "function index()\n {\n $params['limit'] = RECORDS_PER_PAGE; \n $params['offset'] = ($this->input->get('per_page')) ? $this->input->get('per_page') : 0;\n \n $config = $this->config->item('pagination');\n $config['base_url'] = site_url('ordonance/index?');\n $config['total_rows'] = $this->Ordonance_model->get_all_ordonances_count();\n $this->pagination->initialize($config);\n\n $data['ordonances'] = $this->Ordonance_model->get_all_ordonances($params);\n \n $data['_view'] = 'ordonance/index';\n $this->load->view('layouts/main',$data);\n }", "public function index()\n {\n $StudentOffenses = StudentOffense::with('offense')->with('student')->with('teacher')->orderBy('created_at','desc')->paginate(5);\n\n return view('guru.disiplin.senarai_kesalahan_pelajar',compact('StudentOffenses'));\n }", "public function index()\n {\n return view('reports.data_plans');\n }", "function income()\n {\n \n $this->load->view('admin/income');\n }", "public function index()\n {\n $bills = Bill::orderBy('id','DESC')->get();\n return view('bill.list_bill',compact('bills'));\n }", "public function index()\n {\n $data = Pelatihan::latest()->get();\n $anggaran = Anggaran::all();\n $anggaran->map(function ($item) {\n $item['total'] = $item->jumlah_anggaran * $item->pelatihan->kuota * $item->volume;\n\n return $item;\n });\n\n return view('admin.anggaran.index', compact('data','anggaran'));\n }", "public function index()\n {\n $loans = Loan::all();\n\n return response()->json([\n 'data'=>$this->transformCollection($loans)\n ], 200);\n }", "public function lembur(){\r\n $data['lembur'] = $this->Md_lembur->tampil();\r\n $data['judul'] = \"Permohonan Lembur\";\r\n\r\n $this->load->view('staff/data_lembur', $data);\r\n }", "public function adminIndexListPlat()\n {\n $plat = Plat::paginate(10);\n return view('admin.list.plat', compact('plat'));\n }", "public function showPenaltyCalculator()\n {\n return view('developers.installment_account_ledgers.penalty_calculator', compact('ledger_properties','buyer'));\n }", "public function index()\n {\n //\n return view('app', [\n 'module' => 'electricity_meter',\n 'data' => ElectricityMeter::select('*')\n ->join('mst_unit_apart','mst_unit_apart.id_unit_apart','=','listrik_meter.id_unit_apart')\n ->join('mst_tower','mst_tower.id_tower','=','mst_unit_apart.id_tower')\n ->join('mst_floor','mst_floor.id_floor','=','mst_unit_apart.id_floor')\n ->where('mst_unit_apart.status', '=', 1)\n ->get()\n ]);\n }", "public function index()\n\t{\n\t\t$data['record'] = $this->m_operator->tampil_data();\n\t\t$this->template->load('template','operator/v_operator',$data);\n\t}", "public function index()\n {\n\n\n $gelenteklif=Teklifler::where(['silindi'=>0,'OnayDurumu'=>0])\n ->whereYear('TeklifVerilenTarih','>','2017-12-31')\n ->orderBy('TeklifVerilenTarih','DESC')->get();\n \n return view('dashboard',['teklif'=>$gelenteklif]);\n }", "public function index()\n {\n $alarms = Alarm::with('sensor', 'sensor.place')->get();\n return view('admin.alarms.index',compact('alarms'))\n ->with('i', 0);\n }", "public function index()\n {\n $units=Unit::select()->orderBy('id')->paginate();\n return view('pages.admin.unit.index',compact('units'));\n }", "public function index()\n\t{\n\t\t$loantransactions = Loantransaction::all();\n\n\t\treturn View::make('loantransactions.index', compact('loantransactions'));\n\t}", "public function index()\n {\n $data['allData'] = SaleMilk::leftJoin('users', 'users.id', 'sale_milk.added_by')\n\t\t\t\t\t\t\t->leftJoin('users_type', 'users_type.id','users.user_type')\n\t\t\t\t\t\t\t->where('sale_milk.branch_id', Session::get('branch_id'))\n\t\t\t\t\t\t\t->select('sale_milk.*', 'users.name as sold_by','users_type.user_type')\n ->orderBy('sale_milk.id', 'desc')->paginate(40);\n\t\t\t\t\t\t\t\n $data['milkData'] = CollectMilk::where('branch_id', Session::get('branch_id'))\n ->orderBy('date', 'desc')->get();\n\t\t\t\t\t\t \n $data['supplierArr'] = Supplier::where('branch_id', Session::get('branch_id'))\n ->orderBy('name', 'asc')->get();\n\t\t\t\t\t\t\t \n return view('sale-milk.list', $data);\n }", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "public function index()\n {\n $result = Trend::where('is_deleted', 0)->with(['trend_category' => function ($query) {\n $query->where(['is_deleted' => 0]);\n }])->paginate(10);\n return view('admin.trend.index', ['result' => $result]);\n }", "public function index( Request $request )\n {\n\n $loans = Loan::select('*');\n if ( Auth::user()->hasRole( 'loan_officer' ) ) {\n $loans->whereHas( 'client', function( $c_query ){\n $c_query->where( 'user_id', '=', Auth::user()->id );\n } );\n }\n\n $fields = ['client', 'loan_type', 'group', 'gender', 'business_type', 'status' ];\n if ( $request->has( 'status' ) ) {\n $loans->where( 'status', $request->input( 'status' ) );\n }\n\n // Search for a user based on their company.\n if ( $request->has( 'loan_type' ) ) {\n $loans->whereHas( 'loan_type', function( $c_query ) use( $request ) {\n $c_query->where( 'name', '=', $request->loan_type );\n } );\n }\n\n // // Search for a user based on their city.\n // if ( $request->has( 'city' ) ) {\n // $user->where( 'city', $request->input('city') );\n // }\n\n $heading = \"Active Loans\";\n\n // if ( isset( $request->client ) ) {\n // $client = Client::where( 'fullName', 'like', '%'. $request->client . '%' )->get();\n // }\n return view('site/loans/index')->with([ 'loans' => $loans->get(), 'heading' => $heading ]);\n }", "public function getLoans() { // This function returns the array \n return $this->loans;\n }", "public function index(){\n return view('admin.salaryreport.index');\n }", "public function index()\n {\n return view('reports.revenue.date_wise_denomination.index');\n }" ]
[ "0.67065275", "0.66339576", "0.66173834", "0.6524679", "0.6439979", "0.64295495", "0.6402107", "0.6391348", "0.63889354", "0.6368723", "0.6368585", "0.6346368", "0.63396585", "0.6337719", "0.6333049", "0.6327106", "0.62474", "0.6224601", "0.62084746", "0.6193511", "0.6165808", "0.6129742", "0.6127795", "0.6121211", "0.61212087", "0.6114627", "0.6110442", "0.6102502", "0.6101637", "0.6083584", "0.6071839", "0.6063152", "0.604773", "0.60362136", "0.60357386", "0.6032881", "0.6021045", "0.60208917", "0.60205406", "0.60166264", "0.6016443", "0.6016056", "0.6015863", "0.6010882", "0.60064214", "0.59988654", "0.59983444", "0.59972584", "0.59971", "0.5991531", "0.5984028", "0.5981936", "0.5976658", "0.5974594", "0.5970375", "0.5948429", "0.59463114", "0.59462947", "0.5942932", "0.5936798", "0.59363824", "0.5931308", "0.592956", "0.59161246", "0.59160274", "0.5912739", "0.5911851", "0.59110516", "0.59107643", "0.5909037", "0.5905329", "0.5903309", "0.5894832", "0.58907336", "0.58897865", "0.58861256", "0.5885455", "0.5885393", "0.58833945", "0.58825046", "0.5881542", "0.5877074", "0.58766085", "0.58693284", "0.5868573", "0.5863438", "0.58620936", "0.58597815", "0.5858109", "0.58569205", "0.5856149", "0.5854405", "0.5854369", "0.5854172", "0.5853155", "0.5852895", "0.58521396", "0.58493346", "0.58470565", "0.5845551", "0.5845267" ]
0.0
-1
Register Custom Post Type
function howTo_post_type() { $labels = array( 'name' => _x( 'Como Funciona', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Como Funciona', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Como Funciona', 'text_domain' ), 'name_admin_bar' => __( 'Post Type', 'text_domain' ), 'archives' => __( 'Item Archives', 'text_domain' ), 'attributes' => __( 'Item Attributes', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'todos os cards', 'text_domain' ), 'add_new_item' => __( 'Add novo card', 'text_domain' ), 'add_new' => __( 'novo card', 'text_domain' ), 'new_item' => __( 'novo card', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'view_items' => __( 'View Items', 'text_domain' ), 'search_items' => __( 'Search Item', 'text_domain' ), 'not_found' => __( 'não encontrato', 'text_domain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), 'featured_image' => __( 'Featured Image', 'text_domain' ), 'set_featured_image' => __( 'Set featured image', 'text_domain' ), 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ), 'use_featured_image' => __( 'Use as featured image', 'text_domain' ), 'insert_into_item' => __( 'Insert into item', 'text_domain' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), 'filter_items_list' => __( 'Filter items list', 'text_domain' ), ); $args = array( 'label' => __( 'Como Funciona', 'text_domain' ), 'description' => __( 'Como Funciona', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'howTo_post_type', $args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }", "public function registerCustomPostTypes() {\n\n\n }", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "function register_post_types(){\n }", "function register_post_types(){\n }", "public function register_post(): void\n {\n $args = $this->register_post_type_args();\n register_post_type($this->post_type, $args);\n }", "public static function register_post_types() {}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}", "public function register_post_types() {\n\n\t}", "public function register_post_type() {\n\t $args = array(\n\t\t\t'public' => true,\n\t\t\t'label' => 'Questions'\n\t\t);\n\t register_post_type( 'questions', $args );\n\t}", "function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}", "function register_post_types()\n {\n }", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public function register_post_type()\n {\n $labels = [\n 'name' => _x('Chiro Quizzes', 'post type general name', $this->token),\n 'singular_name' => _x('Chiro Quiz', 'post type singular name', $this->token),\n 'add_new' => _x('Add New', $this->token, $this->token),\n 'add_new_item' => sprintf(__('Add New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'edit_item' => sprintf(__('Edit %s', $this->token), __('Chiro Quiz', $this->token)),\n 'new_item' => sprintf(__('New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'all_items' => sprintf(__('All %s', $this->token), __('Chiro Quizzes', $this->token)),\n 'view_item' => sprintf(__('View %s', $this->token), __('Chiro Quiz', $this->token)),\n 'search_items' => sprintf(__('Search %a', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found' => sprintf(__('No %s Found', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found_in_trash' => sprintf(__('No %s Found In Trash', $this->token), __('Chiro Quizzes', $this->token)),\n 'parent_item_colon' => '',\n 'menu_name' => __('Chiro Quizzes', $this->token)\n ];\n\n $slug = __('chiro-quiz', 'pf_chiro_quiz');\n $custom_slug = get_option('pf_chiro_quiz_slug');\n if ($custom_slug && strlen($custom_slug) > 0 && $custom_slug != '') {\n $slug = $custom_slug;\n }\n\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $slug],\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'supports' => ['title'],\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-admin-quiz'\n ];\n\n register_post_type($this->token, $args);\n }", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }", "function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }", "function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "function register_post_types() {\n\t}", "function register_post_types() {\n\t}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "public function add_custom_post_types() {\n //\n }", "public static function register_post_type()\n {\n\n \t register_post_type( 'books',\n\t\t array(\n\t\t 'labels' => array(\n\t\t 'name' => __( 'Books' ),\n\t\t 'singular_name' => __( 'Books' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => false,\n\t\t )\n\t\t );\n\n }", "protected function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'geopin', 'geopin-post-type' ),\n\t\t\t'singular_name' => __( 'geopin Member', 'geopin-post-type' ),\n\t\t\t'add_new' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'add_new_item' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'edit_item' => __( 'Edit geopin', 'geopin-post-type' ),\n\t\t\t'new_item' => __( 'New geopin', 'geopin-post-type' ),\n\t\t\t'view_item' => __( 'View geopin', 'geopin-post-type' ),\n\t\t\t'search_items' => __( 'Search geopin', 'geopin-post-type' ),\n\t\t\t'not_found' => __( 'No geopins found', 'geopin-post-type' ),\n\t\t\t'not_found_in_trash' => __( 'No geopins in the trash', 'geopin-post-type' ),\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t// 'editor',\n\t\t\t'thumbnail',\n\t\t\t// 'custom-fields',\n\t\t\t// 'revisions',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => $supports,\n\t\t\t'public' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array( 'slug' => 'geopin', ), \n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-admin-site',\n\t\t);\n\n\t\t$args = apply_filters( 'geoPin_post_type_args', $args );\n\n\t\tregister_post_type( $this->post_type, $args );\n\t}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "public function create_post_types() {\n }", "function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}", "public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}", "static function register_post_type ()\n {\n register_post_type(\n 'person',\n array(\n 'labels' => array(\n 'name' => __x( 'People', 'post type general name' ),\n 'singular_name' => __x( 'Person', 'post type singular name' ),\n 'menu_name' => __x( 'People', 'admin menu' ),\n 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ),\n 'add_new' => __x( 'Add New', 'book' ),\n 'add_new_item' => ___( 'Add New Person' ),\n 'new_item' => ___( 'New Person' ),\n 'edit_item' => ___( 'Edit Person' ),\n 'view_item' => ___( 'View Person' ),\n 'all_items' => ___( 'All People' ),\n 'search_items' => ___( 'Search People' ),\n 'parent_item_colon' => ___( 'Parent People:' ),\n 'not_found' => ___( 'No persons found.' ),\n 'not_found_in_trash' => ___( 'No persons found in Trash.' )\n ),\n 'description' => ___( 'Noteworthy people' ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'people' ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ));\n }", "public function create_post_type() {\n\t\t\n \t\tregister_post_type(self::POST_TYPE,\n \t\t\tarray(\n \t\t\t\t'labels' => array(\n \t\t\t\t\t'name' => \"Custom\",\n \t\t\t\t\t'singular_name' => __(ucwords(str_replace(\"_\", \" \", self::POST_TYPE)))\n \t\t\t\t),\n \t\t\t\t'public' => true,\n \t\t\t\t'has_archive' => true,\n \t\t\t\t'description' => __(\"This is WP Custom Post Type\"),\n \t\t\t\t'supports' => array('title', 'editor', 'excerpt','thumbnail','custom-fields'),\n \t\t\t)\n \t\t);\n\n\t\t\tregister_taxonomy(\n\t\t\t\t'custom-category',\n\t\t\t\tself::POST_TYPE,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Category' ),\n\t\t\t\t\t'rewrite' => array( 'slug' => 'custom-category' ),\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function compendium_register_type($slug, $name, $pname, $dicon) {\n $pt_slug = $slug;\n $tax_slug = $slug . '-category';\n\n register_post_type($pt_slug, array(\n 'labels' => array(\n 'name' => $pname,\n 'singular_name' => $name,\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New '.$name,\n 'edit_item' => 'Edit '.$name,\n 'new_item' => 'New '.$name,\n 'view_item' => 'View '.$name,\n 'search_items' => 'Search '.$pname,\n 'not_found' => 'No '.$pname.' found',\n 'not_found_in_trash' => 'No '.$pname.' found in trash',\n ),\n 'public' => true,\n 'menu_position' => 35,\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => $dicon,\n 'rewrite' => array(\n 'slug' => 'resource-center/' . $pt_slug,\n 'with_front' => true\n ),\n ));\n\n register_taxonomy($tax_slug, $pt_slug, array(\n 'labels' => array(\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'hierarchical' => true,\n ));\n}", "public static function register_post_type() {\n\t\tregister_post_type( 'drsa_ad', self::arguments() );\n\t}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }", "function theme_custom_post_type() {\n\tregister_post_type( 'custom_type',\n\n\t\t// Array with all the options for the custom post type\n\t\tarray( 'labels' => array(\n\t\t\t'name'\t\t\t\t\t=> __( 'Custom Types' ), // Name of the custom post type group\n\t\t\t'singular_name'\t\t\t=> __( 'Custom Post' ), // Name of the custom post type singular\n\t\t\t'all_items'\t\t\t\t=> __( 'All Custom Posts' ),\n\t\t\t'add_new' \t\t\t\t=> __( 'Add New' ),\n\t\t\t'add_new_item' \t\t\t=> __( 'Add New Custom Type' ),\n\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ),\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Post Types' ),\n\t\t\t'new_item'\t\t\t\t=> __( 'New Post Type' ),\n\t\t\t'view_item'\t\t\t\t=> __( 'View Post Type' ),\n\t\t\t'search_items'\t\t\t=> __( 'Search Post Type' ),\n\t\t\t'not_found'\t\t\t\t=> __( 'Nothing found in the Database.' ),\n\t\t\t'not_found_in_trash'\t=> __( 'Nothing found in Trash' ),\n\t\t\t'parent_item_colon' \t=> ''\n\t\t\t),\n\n\t\t\t'description' \t\t\t=> __( 'This is the example custom post type' ), // Custom post type description\n\t\t\t'public' \t\t\t\t=> true,\n\t\t\t'publicly_queryable' \t=> true,\n\t\t\t'exclude_from_search' \t=> false,\n\t\t\t'show_ui' \t\t\t\t=> true,\n\t\t\t'query_var' \t\t\t=> true,\n\t\t\t'menu_position' \t\t=> 5, // The order the custom post type appears on the admin menu\n\t\t\t// 'menu_icon' \t\t\t=> get_stylesheet_directory_uri() . '/assets/images/custom-post-icon.png',\n\t\t\t'rewrite'\t\t\t\t=> array( 'slug' => 'custom_type', 'with_front' => false ), // You may specify its url slug\n\t\t\t'has_archive' \t\t\t=> 'custom_type', // You mary rename the slug here\n\t\t\t'capability_type' \t\t=> 'post',\n\t\t\t'hierarchical' \t\t\t=> false,\n\n\t\t\t// Enable post editor support\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'trackbacks',\n\t\t\t\t'custom-fields',\n\t\t\t\t'comments',\n\t\t\t\t'revisions',\n\t\t\t\t'sticky'\n\t\t\t)\n\t\t)\n\t);\n\n\t// This adds your post categories to your custom post type\n\tregister_taxonomy_for_object_type( 'category', 'custom_type' );\n\n\t// This adds your post tags to your custom post type\n\tregister_taxonomy_for_object_type( 'post_tag', 'custom_type' );\n\n}", "function add_custom_post_type() \n {\n // add custom type evenementen\n $labels = array(\n 'name' => _x('Quotes', 'post type general name', $this->localization_domain),\n 'singular_name' => _x('Quote', 'post type singular name', $this->localization_domain),\n 'add_new' => _x('Add Quote', 'event', $this->localization_domain),\n 'add_new_item' => __('Add New Quote', $this->localization_domain),\n 'edit_item' => __('Edit Quote', $this->localization_domain),\n 'new_item' => __('New Quote', $this->localization_domain),\n 'view_item' => __('View Quote', $this->localization_domain),\n 'search_items' => __('Search Quotes', $this->localization_domain),\n 'not_found' => __('No Quotes found', $this->localization_domain),\n 'not_found_in_trash' => __('No Quotes found in Trash', $this->localization_domain), \n 'parent_item_colon' => ''\n );\n $type_args = array(\n 'labels' => $labels,\n 'description' => __('bbQuotations offers a simple quotes custom post type. Useful for pull quotes or just random quotes on your site.',\n $this->localization_domain),\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => $this->options['bbquotations-slug']),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 5,\n 'supports' => array('title','editor','author')\n ); \n register_post_type( $this->custom_post_type_name, $type_args);\n }", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "function food_specials_custompost() {\r\n\t$args = array(\r\n\t\t'label' => 'Daily Food Specials',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'capability_type' => 'post',\r\n\t\t'rewrite' => array('slug' => 'food_specials'),\r\n\t\t'query_var' => true,\r\n\t\t'supports' => array(\r\n\t\t\t'title', 'editor', 'excerpt', 'comments', 'thumbnail', 'author',)\r\n\t\t);\r\n\tregister_post_type('food_specials', $args);\r\n}", "public function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Movies', 'Post type general name', 'plugintest' ),\n\t\t\t'singular_name' => _x( 'Movie', 'Post type singular name', 'plugintest' ),\n\t\t\t'menu_name' => _x( 'Movies', 'Admin Menu text', 'plugintest' ),\n\t\t\t'name_admin_bar' => _x( 'Movie', 'Admin Menu Toolbar text', 'plugintest' ),\n\t\t\t'add_new' => __( 'Add New', 'plugintest' ),\n\t\t\t'add_new_item' => __( 'Add New Movie', 'plugintest' ),\n\t\t\t'new_item' => __( 'Aaaaaa', 'plugintest' ),\n\t\t\t'view_item' => __( 'View Movie', 'plugintest' ),\n\t\t\t'edit_item' => __( 'Edit Movie', 'plugintest' ),\n\t\t\t'all_items' => __( 'All Movies', 'plugintest' ),\n\t\t\t'search_items' => __( 'Search Movies', 'plugintest' ),\n\t\t\t'parent_item_colon' => __( 'Parent Movies', 'plugintest' ),\n\t\t\t'not_found' => __( 'No Movies found.', 'plugintest' ),\n\t\t\t'not_found_in_trash' => __( 'No Movies found in Trash.', 'plugintest' ),\n\t\t\t'featured_image' => _x( 'Movie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'item_published' => __( 'New Movie Published.', 'plugintest' ),\n\t\t\t'item_updated' => __( 'Movie post updated.', 'plugintest' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'movie' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => false,\n\t\t\t'has_archive' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t\t'taxonomies' => array( 'category', 'post_tag' ), // Using wordpess category and tags.\n\t\t);\n\n\t\tregister_post_type( 'movie', $args );\n\t\tflush_rewrite_rules();\n\n\t\t$category_labels = array(\n\t\t\t'name' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'singular_name' => esc_html__( 'Movie Category', 'plugintest' ),\n\t\t\t'all_items' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => esc_html__( 'Edit Category', 'plugintest' ),\n\t\t\t'update_item' => esc_html__( 'Update Category', 'plugintest' ),\n\t\t\t'add_new_item' => esc_html__( 'Add New Movie Category', 'plugintest' ),\n\t\t\t'new_item_name' => esc_html__( 'New Movie Name', 'plugintest' ),\n\t\t\t'menu_name' => esc_html__( 'Genre', 'plugintest' ),\n\t\t\t'search_items' => esc_html__( 'Search Categories', 'plugintest' ),\n\t\t);\n\n\t\t$category_args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'labels' => $category_labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t\t);\n\n\t\tregister_taxonomy( 'genre', array( self::$post_type ), $category_args );\n\t}", "public function register_post_type()\n\t{\n\n\t\tregister_post_type( 'partner', array(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x( 'Partners', 'post type general name', 'custom-post-type-partners' ),\n\t\t\t\t'singular_name' => _x( 'Partner', 'post type singular name', 'custom-post-type-partners' ),\n\t\t\t\t'add_new' => _x( 'Add New', 'Partner', 'custom-post-type-partners' ),\n\t\t\t\t'add_new_item' => __( 'Add New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'edit_item' => __( 'Edit Partner', 'custom-post-type-partners' ),\n\t\t\t\t'new_item' => __( 'New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'all_items' => __( 'All Partners', 'custom-post-type-partners' ),\n\t\t\t\t'view_item' => __( 'View Partner', 'custom-post-type-partners' ),\n\t\t\t\t'search_items' => __( 'Search Partners', 'custom-post-type-partners' ),\n\t\t\t\t'not_found' => __( 'No Partners found', 'custom-post-type-partners' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Partners found in Trash', 'custom-post-type-partners' ),\n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => __( 'Partners', 'custom-post-type-partners' )\n\t\t\t),\n\t\t\t'public' => TRUE,\n\t\t\t'publicly_queryable' => TRUE,\n\t\t\t'show_ui' => TRUE,\n\t\t\t'show_in_menu' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => TRUE,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => FALSE,\n\t\t\t'hierarchical' => FALSE,\n\t\t\t'menu_position' => NULL,\n\t\t\t'menu_icon' => 'dashicons-admin-links',\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' )\n\t\t) );\n\n\t}", "public function customPostType()\n {\n\n if (empty($this->custom_post_types)) {\n return;\n }\n\n foreach ($this->custom_post_types as $post_type) {\n register_post_type(\n $post_type['post_type'],\n [\n 'labels' => [\n 'name' => __($post_type['name'], 'vrcoder'),\n 'singular_name' => __($post_type['singular_name'], 'vrcoder'),\n 'menu_name' => __($post_type['name'], 'vrcoder'),\n 'name_admin_bar' => __($post_type['singular_name'], 'vrcoder'),\n 'archives' => __($post_type['singular_name'] . ' Archives', 'vrcoder'),\n 'attributes' => __($post_type['singular_name'] . ' Attributes', 'vrcoder'), \n 'parent_item_colon' => __('Parent ' . $post_type['singular_name'], 'vrcoder'),\n 'all_items' => __('All ' . $post_type['name'], 'vrcoder'),\n 'add_new_item' => __('Add new ' . $post_type['singular_name'], 'vrcoder'),\n 'add_new' => __('Add new', 'vrcoder'),\n 'new_item' => __('New ' . $post_type['singular_name'], 'vrcoder'),\n 'edit_item' => __('Edit ' . $post_type['singular_name'], 'vrcoder'),\n 'update_item' => __('Update' . $post_type['singular_name'], 'vrcoder'),\n 'view_item' => __('View' . $post_type['singular_name'], 'vrcoder'),\n 'view_items' => __('View' . $post_type['name'], 'vrcoder'),\n 'search_items' => __('Search' . $post_type['name'], 'vrcoder'),\n 'not_found' => __('No' . $post_type['singular_name'] . ' Found', 'vrcoder'),\n 'not_found_in_trash' => __('No' . $post_type['singular_name'] . ' Found in Trash', 'vrcoder'),\n 'featured_image' => __('Featured Image', 'vrcoder'),\n 'set_featured_image' => __('Set Featured Image', 'vrcoder'),\n 'remove_featured_image' => __('Remove Featured Image', 'vrcoder'),\n 'use_featured_image' => __('Use Featured Image', 'vrcoder'),\n 'insert_into_item' => __('Insert into' . $post_type['singular_name'], 'vrcoder'),\n 'uploaded_to_this_item' => __('Upload to this' . $post_type['singular_name'], 'vrcoder'),\n 'items_list' => __($post_type['name'] . ' List', 'vrcoder'),\n 'items_list_navigation' => __($post_type['name'] . ' List Navigation', 'vrcoder'),\n 'filter_items_list' => __('Filter' . $post_type['name'] . ' List', 'vrcoder'),\n ],\n 'label' => __($post_type['singular_name'], 'vrcoder'),\n 'description' => __($post_type['name'] . ' Custom Post Type', 'vrcoder'),\n 'supports' => $post_type['supports'],\n 'show_in_rest' => $post_type['show_in_rest'],\n 'taxonomies' => $post_type['taxonomies'],\n 'hierarchical' => $post_type['hierarchical'],\n 'public' => $post_type['public'],\n 'show_ui' => $post_type['show_ui'],\n 'show_in_menu' => $post_type['show_in_menu'],\n 'menu_position' => $post_type['menu_position'],\n 'show_in_admin_bar' => $post_type['show_in_admin_bar'],\n 'show_in_nav_menus' => $post_type['show_in_nav_menus'],\n 'can_export' => $post_type['can_export'],\n 'has_archive' => $post_type['has_archive'],\n 'exclude_from_search' => $post_type['exclude_from_search'],\n 'publicly_queryable' => $post_type['publicly_queryable'],\n 'capability_type' => $post_type['capability_type'],\n 'menu_icon' => $post_type['menu_icon']\n ]\n );\n }\n\n }", "public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }", "function pluginprefix_setup_post_type()\n{\n register_post_type('post-nasa-gallery', [\n 'label' => 'Nasa Images Posts',\n 'public' => true\n ]);\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public function register_post_types() {\n require_once('includes/post-types.php');\n }", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}", "public static function register_type() {\n\t\tregister_graphql_object_type(\n\t\t\t'PostTypeLabelDetails',\n\t\t\t[\n\t\t\t\t'description' => __( 'Details for labels of the PostType', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'name' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'General name for the post type, usually plural.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'singularName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Name for one object of this post type.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->singular_name ) ? $labels->singular_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNew' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Default is ‘Add New’ for both hierarchical and non-hierarchical types.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new ) ? $labels->add_new : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for adding a new singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new_item ) ? $labels->add_new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'editItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for editing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->edit_item ) ? $labels->edit_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'newItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the new item page title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->new_item ) ? $labels->new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_item ) ? $labels->view_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing post type archives.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_items ) ? $labels->view_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'searchItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for searching plural items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->search_items ) ? $labels->search_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFound' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are found.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found ) ? $labels->not_found : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFoundInTrash' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are in the trash.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found_in_trash ) ? $labels->not_found_in_trash : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'parentItemColon' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used to prefix parents of hierarchical items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->parent_item_colon ) ? $labels->parent_item_colon : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'allItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label to signify all items in a submenu link.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->all_items ) ? $labels->all_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'archives' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for archives in nav menus', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the attributes meta box.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'insertIntoItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame button.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->insert_into_item ) ? $labels->insert_into_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'uploadedToThisItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame filter.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->uploaded_to_this_item ) ? $labels->uploaded_to_this_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'featuredImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the Featured Image meta box title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->featured_image ) ? $labels->featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'setFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for setting the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->set_featured_image ) ? $labels->set_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'removeFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for removing the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->remove_featured_image ) ? $labels->remove_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'useFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label in the media frame for using a featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->use_featured_item ) ? $labels->use_featured_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'menuName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the menu name.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->menu_name ) ? $labels->menu_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'filterItemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table views hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->filter_items_list ) ? $labels->filter_items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsListNavigation' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table pagination hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list_navigation ) ? $labels->items_list_navigation : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list ) ? $labels->items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function cptui_register_my_cpts_how_it_works() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"How it Work\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"how_it_works\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"how_it_works\", $args );\n}", "function add_my_custom_posttype_waarden(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe waarde toe',\n 'add_new_item' => 'Voeg nieuwe waarde toe',\n 'name' => 'waarden',\n 'singular_name' => 'waarden',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'waarden van Ben & Jerry',\n 'public' => true,\n 'menu_position' => 6,\n 'menu_icon' => 'dashicons-layout', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n \n );\n register_post_type( 'waarden', $args ); \n }", "function custom_post_type() {\n $labels = array(\n 'name' => _x( 'Ort', 'Post Type General Name', 'twentythirteen' ),\n 'singular_name' => _x( 'Ort', 'Post Type Singular Name', 'twentythirteen' ),\n 'menu_name' => __( 'Orter', 'twentythirteen' ),\n 'all_items' => __( 'Alla Orter', 'twentythirteen' ),\n 'view_item' => __( 'View Ort', 'twentythirteen' ),\n 'add_new_item' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'add_new' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'edit_item' => __( 'Redigera Ort', 'twentythirteen' ),\n 'update_item' => __( 'Upddatera Ort', 'twentythirteen' ),\n 'search_items' => __( 'Sök Ort', 'twentythirteen' ),\n 'not_found' => __( 'Not Found', 'twentythirteen' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n );\n \n $args = array(\n 'label' => __( 'cities', 'twentythirteen' ),\n 'description' => __( 'City Post Page', 'twentythirteen' ),\n 'labels' => $labels,\n 'supports' => array('title','thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n register_post_type( 'cities', $args );\n\n }", "function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}", "function add_custom_post_type() {\n\tregister_post_type( 'learning_resource',\n array(\n 'labels' => array(\n 'name' => __( 'Learning Resources' ),\n 'singular_name' => __( 'Learning Resource' )\n ),\n 'public' => true,\n 'has_archive' => true,\n )\n );\n}", "static function register() {\n // register the post type\n register_post_type('sale-flat', array(\n\t\t\n\t\t\t'labels'=> array(\n\t\t\t\t'name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'singular_name' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'menu_name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'name_admin_bar' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new' => _x( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new_item' => __( 'Új eladó ingatlan hozzáadása', 'theme-phrases' ),\n\t\t\t\t'new_item' => __( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'edit_item' => __( 'Eladó ingatlan szerkesztése', 'theme-phrases' ),\n\t\t\t\t'view_item' => __( 'Eladó ingatlan megtekintése', 'theme-phrases' ),\n\t\t\t\t'all_items' => __( 'Összes eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'search_items' => __( 'Eladó ingatlan keresése', 'theme-phrases' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent eladó ingatlan:', 'theme-phrases' ),\n\t\t\t\t'not_found' => __( 'Nincsenek eladó ingatlanok.', 'theme-phrases' ),\n\t\t\t\t'not_found_in_trash' => __( 'Nincsenek eladó ingatlanok a kukában.', 'theme-phrases' )\n\t\t\t),\n 'description' => __('Eladó ingatlanok', 'theme-phrases'),\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'public' => true,\n 'show_ui' => true,\n 'auto-draft' => false,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'menu_position' => 4,\n 'menu_icon'\t=> 'dashicons-tag',\n 'revisions' => false,\n 'hierarchical' => true,\n 'has_archive' => true,\n\t\t\t'supports' => array('title','editor','thumbnail'),\n 'rewrite' => false,\n 'can_export' => false,\n 'capabilities' => array (\n 'create_posts' => 'edit_posts',\n 'edit_post' => 'edit_posts',\n 'read_post' => 'edit_posts',\n 'delete_posts' => 'edit_posts',\n 'delete_post' => 'edit_posts',\n 'edit_posts' => 'edit_posts',\n 'edit_others_posts' => 'edit_posts',\n 'publish_posts' => 'edit_posts',\n 'read_private_posts' => 'edit_posts',\n ),\n 'register_meta_box_cb' => array('SaleFlatPostType', 'add_metabox') \n ));\n }", "public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }", "public function register_content_type() {\n\t\t$labels = array(\n\t\t\t'name' => 'Honor Rolls',\n\t\t\t'singular_name' => 'Honor Roll',\n\t\t\t'add_new' => 'Add New',\n\t\t\t'add_new_item' => 'Add New Honor Roll',\n\t\t\t'edit_item' => 'Edit Honor Roll',\n\t\t\t'new_item' => 'New Honor Roll',\n\t\t\t'all_items' => 'All Honor Rolls',\n\t\t\t'view_item' => 'View Honor Rolls',\n\t\t\t'search_items' => 'Search Honor Rolls',\n\t\t\t'not_found' => 'No Honor Rolls found',\n\t\t\t'not_found_in_trash' => 'No Honor Rolls found in Trash',\n\t\t\t'menu_name' => 'Honor Rolls',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'supports' => array( 'title' ),\n\t\t);\n\t\tregister_post_type( $this::$content_type_slug, $args );\n\t}", "function wpcp_custom_post_type()\n{\n register_post_type('wpcp_server',\n array(\n 'labels' => array(\n 'name' => __('Servers', 'textdomain'),\n 'singular_name' => __('Server', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => false,\n 'delete_with_user' => false,\n \"supports\" => array(\"customer\", \"author\"),\n 'menu_icon' => 'dashicons-cloud'\n )\n );\n}", "function create_post_type(){\n register_post_type('recipes', [ \n 'labels' => [\n 'name' => 'Recipes', //Etikett i plural Etikett i singular\n 'singular_name' => 'Recipe', //Vad som ska stå i ”Lägg till...” knappen\n 'add_new' => 'New Recipe', //Vad som ska stå i ”Lägg till ny...” knappen\n 'add_new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'edit_item' => 'Edit Recipe', //Vad som ska stå i ”Redigera...” länken\n 'new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'search_items' => 'Search for Recipe', //Vad som ska stå i sökrutan i listningen\n 'not_found' => 'No Recipe Found', \n 'all_items' => 'All Recipes', //Vad som ska stå i ”Alla...” länken\n ],\n 'supports' => array( 'thumbnail' ),\n 'description' => 'The Big Tasty!', //En kort beskrivning av posttypen\n 'public' => true, //Om och hur posttypen ska visas för olika användare\n 'exclude_from_search' => false, //Om posttypens poster ska exkluderas vid sökning\n 'show_ui' => true, //Om posttypen ska kunna hanteras från admin\n 'show_in_nav_menus' => true, //Om poster av posttypen ska kunna läggas till i menyer\n 'show_in_menu' => true, //Vart posttypen ska listas i admin (vänster eller topp)\n 'show_in_admin_bar' => true, //Om posttypen ska visas i toppbar’en\n 'menu_position' => 10, //Vart i vänstermenyn posttypen ska visas\n 'hierarchical' => false, //Om poster i posttypen ska kunna ha föräldrar, likt Sidor\n 'menu_icon' => 'dashicons-food', //Ikon för posttypen\n 'supports' => array('title' , 'editor'), //Vad som ska synas när man skapar/redigerar en post \n 'taxonomies' => array('category'), //Vilka taxonomier som ska tillhöra posttypen\n 'has_archive' => true, //Om posttypen ska ha arkivsida\n 'rewrite' => [ //Hur posttypens rewrites ska hanteras...\n 'slug' => 'recipe', //Permalänkstrukturen för posttypen\n 'with_front' => true //Om permalänkarna ska låta föregås av sluggen\n ] \n ]);\n\n}", "function create_post_type() {\n\n // register external_post as a Custom Post Type\n register_post_type( 'external_post', \n array( \n 'labels' => array( \n 'name' => __('External Posts'), \n 'singular_name' => __('External Post') \n ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array('title', 'excerpt'),\n 'rewrite' => array('slug' => 'external','with_front' => false) \n ) \n ); \n\n // connect external_post to category taxonomy\n register_taxonomy_for_object_type('category', 'external_post');\n register_taxonomy_for_object_type('post_tag', 'external_post');\n\n\n // register wp_tool as a Custom Post Type\n register_post_type('wp_tool',\n array( \n 'labels' => array( \n 'name' => __('WordPress Tools'), \n 'singular_name' => __('WordPress Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'tool','with_front' => false) \n ) \n );\n\n // connect wp_tool to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'wp_tool');\n register_taxonomy_for_object_type('category', 'wp_tool');\n\n\n // reregister default post so we can set a custom slug\n register_post_type('post', array(\n 'labels' => array(\n 'name_admin_bar' => _x('Post', 'add new on admin bar' ),\n ),\n 'public' => true,\n '_builtin' => false, \n '_edit_link' => 'post.php?post=%d', \n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'show_in_menu' => false,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'article'),\n 'query_var' => false,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats', 'column_info'),\n )); \n\n // register external_tool as a Custom Post Type\n register_post_type('external_tool',\n array(\n 'labels' => array( \n 'name' => __('External Tools'), \n 'singular_name' => __('External Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'special','with_front' => false) \n ) \n ); \n\n // connect external_tool to category taxonomy\n register_taxonomy_for_object_type('category', 'external_tool');\n register_taxonomy_for_object_type('meta_info', 'external_tool');\n\n\n // register city_journal as a Custom Post Type\n register_post_type('city_journal',\n array(\n 'labels' => array( \n 'name' => __('CityJournal Entry'),\n 'singular_name' => __('CityJournal Entry')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'cityjournal','with_front' => false) \n ) \n ); \n\n // connect city_journal to category taxonomy\n register_taxonomy_for_object_type('category', 'city_journal');\n register_taxonomy_for_object_type('meta_info', 'city_journal'); \n\n\n // register people_project as a Custom Post Type\n register_post_type('people_project',\n array(\n 'labels' => array( \n 'name' => __('People & Projects'),\n 'singular_name' => __('People & Project')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'excerpt', 'thumbnail', 'meta_info'),\n ) \n ); \n\n // connect people_project to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'people_project'); \n\n\n register_post_type('discussion',\n array( \n 'labels' => array( \n 'name' => __('Discussions'), \n 'singular_name' => __('Discussion') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'discussion','with_front' => false) \n ) \n );\n\n // connect discussion to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'discussion');\n register_taxonomy_for_object_type('category', 'discussion');\n\n}", "function bs_configure_custom_post_types($args)\n{\n function bs_custom_post_types()\n {\n global $bs_config;\n\n foreach ($bs_config[\"custom-post-types\"] as $key => $type) {\n $type = bs_defaults($type, [\n \"public\" => true,\n ]);\n\n if (isset($type[\"name\"])) {\n $type[\"labels\"][\"name\"] = $type[\"name\"];\n }\n\n if (isset($type[\"slug\"])) {\n $type[\"rewrite\"][\"slug\"] = $type[\"slug\"];\n }\n\n if (isset($type[\"admin_only\"]) && $type[\"admin_only\"]) {\n $type[\"public\"] = false;\n $type[\"show_ui\"] = true;\n }\n\n register_post_type($key, bs_array_omit($type, [\"slug\", \"name\", \"admin_only\"]));\n }\n }\n add_action(\"init\", \"bs_custom_post_types\");\n}", "function add_my_custom_posttype_recepten(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuw recept toe',\n 'add_new_item' => 'Voeg nieuw recept toe',\n 'name' => 'Recepten',\n 'singular_name' => 'recept',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije recepten van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-book-alt', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'comments'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-recepten.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n\n );\n\n register_post_type( 'recepten', $args ); \n \n }", "function create_post_type() {\r\n register_post_type( 'nyheter',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Nyheter' ),\r\n 'singular_name' => __( 'Nyheter' )\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail')\r\n )\r\n );\r\n}", "function zmpm_register_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => 'Permissions',\n\t\t'singular_name' => 'Permission',\n\t\t'menu_name' => 'Permissions',\n\t\t'name_admin_bar' => 'Permission',\n\t\t'archives' => 'Permission Archives',\n\t\t'attributes' => 'Permission Attributes',\n\t\t'parent_item_colon' => 'Parent Permission:',\n\t\t'all_items' => 'Permissions',\n\t\t'add_new_item' => 'Add New Permission',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Permission',\n\t\t'edit_item' => 'Edit Permission',\n\t\t'update_item' => 'Update Permission',\n\t\t'view_item' => 'View Permission',\n\t\t'view_items' => 'View Permissions',\n\t\t'search_items' => 'Search Permission',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not Found in Trash',\n\t\t'featured_image' => 'Featured Image',\n\t\t'set_featured_image' => 'Set featured image',\n\t\t'remove_featured_image' => 'Remove featured image',\n\t\t'use_featured_image' => 'Use as featured image',\n\t\t'insert_into_item' => 'Insert into permission',\n\t\t'uploaded_to_this_item' => 'Uploaded to this permission',\n\t\t'items_list' => 'Permissions list',\n\t\t'items_list_navigation' => 'Permissions list navigation',\n\t\t'filter_items_list' => 'Filter permissions list',\n\t);\n\t$args = array(\n\t\t'label' => 'Permission',\n\t\t'description' => 'ZingMap permissions',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'users.php',\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-lock',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'zmpm_permission', $args );\n\t\n}", "public function register_estate_post_type() {\r\n $options = get_option( 'myhome_redux' );\r\n // define post type slug\r\n if ( ! empty( $options['mh-estate-slug'] ) ) {\r\n $slug = $options['mh-estate-slug'];\r\n } else {\r\n $slug = 'properties';\r\n }\r\n\r\n register_post_type( 'estate', array(\r\n 'labels' => array(\r\n 'name'\t\t\t => esc_html__( 'Properties', 'myhome-core' ),\r\n 'singular_name'\t => esc_html__( 'Property', 'myhome-core' ),\r\n 'menu_name' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'name_admin_bar' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new_item' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'new_item' => esc_html__( 'New Property', 'myhome-core' ),\r\n 'edit_item' => esc_html__( 'Edit Property', 'myhome-core' ),\r\n 'view_item' => esc_html__( 'View Property', 'myhome-core' ),\r\n 'all_items' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'search_items' => esc_html__( 'Search property', 'myhome-core' ),\r\n 'not_found' => esc_html__( 'No Property Found found.', 'myhome-core' ),\r\n 'not_found_in_trash' => esc_html__( 'No Property found in Trash.', 'myhome-core' )\r\n ),\r\n 'show_in_rest' => true,\r\n 'query_var' => true,\r\n 'public'\t\t => true,\r\n 'has_archive'\t => true,\r\n 'menu_position' => 21,\r\n 'menu_icon' => 'dashicons-admin-home',\r\n 'capability_type' => array( 'estate', 'estates' ),\r\n 'map_meta_cap' => true,\r\n 'rewrite'\t\t => array( 'slug' => $slug ),\r\n 'supports'\t\t => array(\r\n 'title',\r\n 'author',\r\n 'editor',\r\n 'thumbnail',\r\n )\r\n ) );\r\n }", "function create_volunteer_custom_post() {\n register_post_type( 'volunteers',\n array(\n 'labels' => array(\n 'name' => __( 'Board Members' ),\n 'singular_name' => __( 'Board Member' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields'\n )\n ));\n}", "public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }", "public function register_post_type()\n\t{\n\n\t\tregister_taxonomy( $this->post_type_name . '_words', $this->post_type_name, array(\n\t\t\t'label' => 'Words',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Word',\n\t\t\t\t'menu_name' => 'Words',\n\t\t\t\t'all_items' => 'All words',\n\t\t\t\t'edit_item' => 'Edit word',\n\t\t\t\t'view_item' => 'View word',\n\t\t\t\t'update_item' => 'View word',\n\t\t\t\t'add_new_item' => 'Add word',\n\t\t\t\t'new_item_name' => 'New word',\n\t\t\t\t'search_items' => 'Search words',\n\t\t\t\t'popular_items' => 'Popular words',\n\t\t\t\t'separate_items_with_commas' => 'Separate words with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove words',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used words',\n\t\t\t\t'not_found' => 'No words found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => FALSE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'word',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\tregister_taxonomy( $this->post_type_name . '_partsofspeech', $this->post_type_name, array(\n\t\t\t'label' => 'Parts of Speech',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Part of Speech',\n\t\t\t\t'menu_name' => 'Parts of Speech',\n\t\t\t\t'all_items' => 'All parts of speech',\n\t\t\t\t'edit_item' => 'Edit part of speech',\n\t\t\t\t'view_item' => 'View part of speech',\n\t\t\t\t'update_item' => 'View part of speech',\n\t\t\t\t'add_new_item' => 'Add part of speech',\n\t\t\t\t'new_item_name' => 'New part of speech',\n\t\t\t\t'search_items' => 'Search parts of speech',\n\t\t\t\t'popular_items' => 'Popular parts of speech',\n\t\t\t\t'separate_items_with_commas' => 'Separate parts of speech with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove parts of speech',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used parts of speech',\n\t\t\t\t'not_found' => 'No parts of speech found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'partofspeech',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\t// register the damn post type already\n\t\tregister_post_type( \n\t\t\t$this->post_type_name,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Definitions',\n\t\t\t\t\t'singular_name' => 'Definition',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Definition',\n\t\t\t\t\t'edit_item' => 'Edit Definition',\n\t\t\t\t\t'new_item' => 'New Definition',\n\t\t\t\t\t'all_items' => 'All Definitions',\n\t\t\t\t\t'view_item' => 'View Definitions',\n\t\t\t\t\t'search_items' => 'Search Definitions',\n\t\t\t\t\t'not_found' => 'No definitions found',\n\t\t\t\t\t'not_found_in_trash' => 'No definitions found in Trash',\n\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t'menu_name' => 'Definitions',\n\t\t\t\t),\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'trackbacks',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'has_archive' => 'definitions',\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'define',\n\t\t\t\t\t'with_front' => FALSE,\n\t\t\t\t),\n\t\t\t\t'register_meta_box_cb' => array( $this, 'metaboxes' ),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'taxonomies' => array(\n\t\t\t\t\t$this->post_type_name . '_partsofspeech',\n\t\t\t\t\t$this->post_type_name . '_words',\n\t\t\t\t),\n\t\t\t\t'menu_position' => 5,\n\t\t\t)\n\t\t);\n\t}", "function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}", "public function createPostTypes()\n {\n }", "function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}", "protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }", "function register_type( $post_type_singular, $post_type_plural, $options = array() ) {\n\n\t$text_domain = 'sgdf';\n\n\t$labels = array(\n\t\t'name' => _x( ucwords( $post_type_plural ), 'post type general name', $text_domain ),\n\t\t'singular_name' => _x( ucwords( $post_type_singular ), 'post type singular name', $text_domain ),\n\t\t'menu_name' => _x( ucwords( $post_type_plural ), 'admin menu', $text_domain ),\n\t\t'name_admin_bar' => _x( ucwords( $post_type_singular ), 'add new on admin bar', $text_domain ),\n\t\t'add_new' => _x( 'Add New', 'book', $text_domain ),\n\t\t'add_new_item' => __( 'Add New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'new_item' => __( 'New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'edit_item' => __( 'Edit ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'view_item' => __( 'View ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'all_items' => __( 'All ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'search_items' => __( 'Search ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'parent_item_colon' => __( 'Parent ' . ucwords( $post_type_plural ) . ':', $text_domain ),\n\t\t'not_found' => __( 'No ' . $post_type_plural . ' found.', $text_domain ),\n\t\t'not_found_in_trash' => __( 'No ' . $post_type_plural . ' found in Trash.', $text_domain )\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => $post_type_singular ),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'menu_icon' \t => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t);\n\n\tforeach ($options as $key => $option) {\n\t\t$args[$key] = $option;\n\t}\n\n\treturn register_post_type( $post_type_singular, $args );\n}", "public function register() {\r\n add_action('post_updated', array($this, 'save_meta'), null, 2 );\r\n\r\n $original_config = $this->get_config();\r\n // push it through a filter so a theme can change the terminology\r\n $filtered_config = apply_filters('ah-wp-dl-res-config',$original_config);\r\n register_post_type(self::POST_TYPE, $filtered_config);\r\n\r\n register_taxonomy(self::POST_TYPE . '_cat',\r\n array(self::POST_TYPE),\r\n array('hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => __( 'Categories' ),\r\n 'singular_name' => __( 'Category' ),\r\n 'search_items' => __( 'Search Categories' ),\r\n 'all_items' => __( 'All Categories' ),\r\n 'parent_item' => __( 'Parent Category' ),\r\n 'parent_item_colon' => __( 'Parent Category:' ),\r\n 'edit_item' => __( 'Edit Category' ),\r\n 'update_item' => __( 'Update Category' ),\r\n 'add_new_item' => __( 'Add New Category' ),\r\n 'new_item_name' => __( 'New Category Name')\r\n ),\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'documents/categories' ),\r\n )\r\n );\r\n }", "function stock_toolkit_custom_post()\n\t{\n\tregister_post_type('slide', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Slides') ,\n\t\t\t'singular_name' => __('Slide')\n\t\t) ,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'custom-fields',\n\t\t\t'thumbnail',\n\t\t\t'page-attributes'\n\t\t) ,\n\t\t'public' => false,\n\t\t'show_ui' => true\n\t));\n\t}", "function testimonials_register_post_type() {\n\n $labels = [\n 'name' => __('Testimonials'),\n 'singular_name' => __('Testimonial'),\n 'add_new' => __('Add new', 'Testimonials'),\n 'add_new_item' => __('Add new Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_item' => __('Search Testimonials'),\n 'not_found' => __('No Testimonial found'),\n 'not_found_in_trash' => __('No Testimonial found in trash'),\n 'parent_item_colon' => ''\n ];\n\n register_post_type(TESTIMONIAL_TYPE, [\n 'labels' => $labels,\n 'public' => true,\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'hierarchical' => false,\n 'supports' => ['title', 'editor', 'custom-fields']\n ]);\n\n register_taxonomy_for_object_type(CRAFT_TAX_NAME, TESTIMONIAL_TYPE);\n}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function register_location_content_type(){\n\t\t //Labels for post type\n\t\t $labels = array(\n 'name' => 'Add Portfolio',\n 'singular_name' => 'Portfolio',\n 'menu_name' => 'Add Portfolio',\n 'name_admin_bar' => 'Add Portfolio',\n 'add_new' => 'Add New', \n 'add_new_item' => 'Add New Portfolio Item',\n 'new_item' => 'New Portfolio Item', \n 'edit_item' => 'Edit Portfolio Item',\n 'view_item' => 'View Portfolio Item',\n 'all_items' => 'All Portfolio Items',\n 'search_items' => 'Search Portfolio Items',\n 'parent_item_colon' => 'Parent Portfolio Item: ', \n 'not_found' => 'No Portfolio Items found.', \n 'not_found_in_trash' => 'No Portfolio Items found in Trash.',\n );\n //arguments for post type\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable'=> true,\n 'show_ui' => true,\n 'show_in_nav' => true,\n 'query_var' => true,\n 'hierarchical' => false,\n 'supports' => array('title','thumbnail','editor'),\n 'has_archive' => true,\n 'menu_position' => 20,\n 'show_in_admin_bar' => true,\n 'menu_icon' => 'dashicons-location-alt',\n 'rewrite'\t\t\t=> array('slug' => 'locations', 'with_front' => 'true')\n );\n //register post type\n register_post_type('wp_locations', $args);\n\t}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}", "function humcore_register_post_type() {\n\n\t// Define the labels to be used by the post type humcore_deposits.\n\t$labels = array(\n\t\t// 'name' => _x( 'HumCORE Deposits', 'post type general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Deposit', 'post type singular name', 'humcore_domain' ),\n\t\t'menu_name' => _x( 'HumCORE Deposits', 'admin menu', 'humcore_domain' ),\n\t\t'name_admin_bar' => _x( 'Deposit', 'add new on admin bar', 'humcore_domain' ),\n\t\t'add_new' => _x( 'Add New', 'add new', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Deposits', 'humcore_domain' ),\n\t\t'new_item' => __( 'New Deposit', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Deposit', 'humcore_domain' ),\n\t\t'view_item' => __( 'View Deposit', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Deposits', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Deposits', 'humcore_domain' ),\n\t\t'not_found' => __( 'No Deposits found', 'humcore_domain' ),\n\t\t'not_found_in_trash' => __( 'No Deposits found in Trash', 'humcore_domain' ),\n\t\t'parent_item_colon' => '',\n\t);\n\n\t$post_type_args = array(\n\t\t'label' => __( 'HumCORE Deposits', 'humcore_domain' ),\n\t\t'labels' => $labels,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'humcore_deposit',\n\t\t\t'with_front' => true,\n\t\t),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => false,\n\t\t'hierarchical' => true,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'author', 'excerpt' ),\n\t\t// 'supports' => array( 'title', 'author', 'excerpt', 'custom-fields', revisions', 'page-attributes' ),\n\t\t'register_meta_box_cb' => 'humcore_add_post_type_metabox',\n\t);\n\n\tregister_post_type( 'humcore_deposit', $post_type_args );\n}", "public static function register_type() {\n\n\t\tregister_graphql_enum_type(\n\t\t\t'ContentNodeIdTypeEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t'values' => self::get_values(),\n\t\t\t]\n\t\t);\n\n\t\t$allowed_post_types = \\WPGraphQL::get_allowed_post_types();\n\t\tif ( ! empty( $allowed_post_types ) && is_array( $allowed_post_types ) ) {\n\t\t\tforeach ( $allowed_post_types as $post_type ) {\n\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\tif ( empty( $post_type_object ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$values = self::get_values();\n\t\t\t\tif ( ! $post_type_object->hierarchical ) {\n\t\t\t\t\t$values['slug'] = [\n\t\t\t\t\t\t'name' => 'SLUG',\n\t\t\t\t\t\t'value' => 'slug',\n\t\t\t\t\t\t'description' => __( 'Identify a resource by the slug. Available to non-hierarchcial Types where the slug is a unique identifier.', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tif ( 'attachment' === $post_type_object->name ) {\n\t\t\t\t\t$values['source_url'] = [\n\t\t\t\t\t\t'name' => 'SOURCE_URL',\n\t\t\t\t\t\t'value' => 'source_url',\n\t\t\t\t\t\t'description' => __( 'Identify a media item by its source url', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Register a unique Enum per Post Type. This allows for granular control\n\t\t\t\t * over filtering and customizing the values available per Post Type.\n\t\t\t\t */\n\t\t\t\tregister_graphql_enum_type(\n\t\t\t\t\t$post_type_object->graphql_single_name . 'IdType',\n\t\t\t\t\t[\n\t\t\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t\t\t'values' => $values,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t}", "public function registerPostTypes()\n {\n // Get the post types from the config.\n $postTypes = config('post-types');\n\n $translater = new Translater($postTypes, 'post-types');\n $postTypes = $translater->translate([\n '*.label',\n '*.labels.*',\n '*.names.singular',\n '*.names.plural',\n ]);\n\n // Iterate over each post type.\n collect($postTypes)->each(function ($item, $key) {\n\n // Check if names are set, if not keep it as an empty array\n $names = $item['names'] ?? [];\n\n // Unset names from item\n unset($item['names']);\n\n // Register the extended post type.\n register_extended_post_type($key, $item, $names);\n });\n }", "function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}", "function rng_create_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Post Types Plural', 'Post Type General Name', 'translate_name' ),\n\t\t'singular_name' => _x( 'Post Type Singular', 'Post Type Singular Name', 'translate_name' ),\n\t\t'menu_name' => __( 'Post Types', 'translate_name' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'translate_name' ),\n\t\t'archives' => __( 'Item Archives', 'translate_name' ),\n\t\t'attributes' => __( 'Item Attributes', 'translate_name' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'translate_name' ),\n\t\t'all_items' => __( 'All Items', 'translate_name' ),\n\t\t'add_new_item' => __( 'Add New Item', 'translate_name' ),\n\t\t'add_new' => __( 'Add New', 'translate_name' ),\n\t\t'new_item' => __( 'New Item', 'translate_name' ),\n\t\t'edit_item' => __( 'Edit Item', 'translate_name' ),\n\t\t'update_item' => __( 'Update Item', 'translate_name' ),\n\t\t'view_item' => __( 'View Item', 'translate_name' ),\n\t\t'view_items' => __( 'View Items', 'translate_name' ),\n\t\t'search_items' => __( 'Search Item', 'translate_name' ),\n\t\t'not_found' => __( 'Not found', 'translate_name' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'translate_name' ),\n\t\t'featured_image' => __( 'Featured Image', 'translate_name' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'translate_name' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'translate_name' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'translate_name' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'translate_name' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'translate_name' ),\n\t\t'items_list' => __( 'Items list', 'translate_name' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'translate_name' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'translate_name' ),\n\t);\n\t$args = array(\n 'public' => true,\n\t\t'label' => __( 'Post Type Singular', 'translate_name' ),\n\t\t'description' => __( 'Post Type Description', 'translate_name' ),\n 'labels' => $labels,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu'\t\t\t=> true,\n\t\t'show_in_admin_bar'\t\t=> true,\n\t\t'menu_position'\t\t\t=> 5,\n\t\t// 'menu_icon' \t\t\t=> get_bloginfo('template_directory') . '/images/portfolio-icon.png',\n\t\t'menu_icon'\t\t\t\t=> 'dashicon-groups',\n\t\t'has_archive'\t\t\t=> true,\n\t\t'capability_type'\t\t=> array('book','books'),\n\t\t'capabilities' \t\t\t=> array(\n\t\t\t'edit_post' => 'edit_book', \n\t\t\t'read_post' => 'read_book', \n\t\t\t'delete_post' => 'delete_book', \n\t\t\t'edit_posts' => 'edit_books', \n\t\t\t'edit_others_posts' => 'edit_others_books', \n\t\t\t'publish_posts' => 'publish_books', \n\t\t\t'read_private_posts' => 'read_private_books', \n\t\t\t'create_posts' => 'edit_books', \n\t\t),\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\n\t);\n\tregister_post_type( 'book', $args );\n\n}", "function create_custom_post_types(){\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_company = array(\n\t\t'name' => __('Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Company', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Company', 'threedee-expo'),\n\t\t'new_item' => __('New Company', 'threedee-expo'),\n\t\t'view_item' => __('View Company', 'threedee-expo'),\n\t\t'search_items' => __('Search Companies', 'threedee-expo'),\n\t\t'not_found' => __('No companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Companies', 'threedee-expo'),\n\t\t'archives' => __('Company Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_company = array(\n\t\t'publish_posts' => 'publish_companies',\n\t\t'edit_posts' => 'edit_companies',\n\t\t'edit_others_posts' => 'edit_others_companies',\n\t\t'delete_posts' => 'delete_companies',\n\t\t'delete_others_posts' => 'delete_others_companies',\n\t\t'read_private_posts' => 'read_private_companies',\n\t\t'edit_post' => 'edit_company',\n\t\t'delete_post' => 'delete_company',\n\t\t'read_post' => 'read_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_company = array(\n\t\t'labels' => $args_labels_company,\n\t\t'description' => 'Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'company'),\n\t\t'menu_icon' => 'dashicons-businessman',\n\t\t'capability_type' => 'companies',\n\t\t'capabilities' => $args_capabilities_company,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_group_of_companies = array(\n\t\t'name' => __('Group of Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Group of Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Group of Companies', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Group of Companies', 'threedee-expo'),\n\t\t'new_item' => __('New Group of Companies', 'threedee-expo'),\n\t\t'view_item' => __('View Group of Companies', 'threedee-expo'),\n\t\t'search_items' => __('Search Group of Companies', 'threedee-expo'),\n\t\t'not_found' => __('No Group of Companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No Group of Companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Group of Companies', 'threedee-expo'),\n\t\t'archives' => __('Group of Companies Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_group_of_companies = array(\n\t\t'publish_posts' => 'publish_group_of_companies',\n\t\t'edit_posts' => 'edit_group_of_companies',\n\t\t'edit_others_posts' => 'edit_others_group_of_companies',\n\t\t'delete_posts' => 'delete_group_of_companies',\n\t\t'delete_others_posts' => 'delete_others_group_of_companies',\n\t\t'read_private_posts' => 'read_private_group_of_companies',\n\t\t'edit_post' => 'edit_group_of_company',\n\t\t'delete_post' => 'delete_group_of_company',\n\t\t'read_post' => 'read_group_of_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_group_of_companies = array(\n\t\t'labels' => $args_labels_group_of_companies,\n\t\t'description' => 'Group of Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'group_of_companies'),\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'capability_type' => 'group_of_companies',\n\t\t'capabilities' => $args_capabilities_group_of_companies,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\tregister_post_type( 'companies', $args_company);\n\tregister_post_type( 'group_of_companies',$args_group_of_companies);\n}", "function news_custom_post() {\n $args = array(\n 'public' => true,\n 'label' => 'News',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n 'show_ui' => true,\n 'publicly_queryable' => true,\n 'taxonomies' => array('category', 'post_tag'),\n 'rewrite' => array( 'slug' => 'news' )\n\t\n );\n register_post_type('news', $args);\n}", "function cadastrando_post_type_clientes() {\n\n $nomeSingular = 'Cliente';\n $nomePlural = 'Clientes';\n $descricao = 'Clientes da minha empresa';\n\n $labels = array(\n 'name' => $nomePlural,\n 'name_singular' => $nomeSingular,\n 'add_new_item' => 'Adicionar novo ' . $nomeSingular,\n 'edit_item' => 'Editar ' . $nomeSingular\n );\n\n $supports = array(\n 'title',\n 'editor',\n 'thumbnail'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => $descricao,\n 'public' => true,\n 'menu_icon' => 'dashicons-id-alt',\n 'supports' => $supports\n );\n\n register_post_type( 'cliente', $args);\n}", "function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "function create_posttype() \n {\n register_post_type( 'mist_employee',\n array(\n 'labels' => array(\n 'name' => __( 'Employees' ),\n 'singular_name' => __( 'Employee' )\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'employees'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-businessman'\n )\n );\n register_post_type( 'mist_message',\n array(\n 'labels' => array(\n 'name' => __( 'Person Messages' ),\n 'singular_name' => __( 'Message' ),\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'message'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-testimonial'\n )\n );\n add_post_type_support('mist_message', 'excerpt');\n \n }", "function planoType() {\r\n\t$labels = array(\r\n\t\t'name' => _x('Planos', 'post type general name'),\r\n\t 'singular_name' => _x('Plano', 'post type singular name'),\r\n\t 'add_new' => _x('Adicionar Novo', 'slideshow item'),\r\n\t 'add_new_item' => __('Adicionar Novo Plano'),\r\n\t 'edit_item' => __('Editar Plano'),\r\n\t 'new_item' => __('Novo Plano'),\r\n\t 'view_item' => __('Ver Plano'),\r\n\t 'search_items' => __('Procurar Plano'),\r\n\t 'not_found' => __('Nenhum Plano Encontrado'),\r\n\t 'not_found_in_trash' => __('Nenhum Plano na Lixeira'),\r\n\t 'parent_item_colon' => ''\r\n\t);\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 4,\r\n 'supports' => array('title','editor'),\r\n 'rewrite' => array('slug' => 'plano')\r\n );\r\n\r\n register_post_type( 'plano' , $args ); # registering the new post type\r\n}", "function products_type() {\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n\n $args = array(\n 'label' => 'Productos',\n 'description' => 'Productos de Platzi',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n\n register_post_type('producto', $args);\n}", "function add_my_custom_posttype_smaken(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe smaak toe',\n 'add_new_item' => 'Voeg nieuwe smaak toe',\n 'name' => 'Smaken',\n 'singular_name' => 'Smaak',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije smaken van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-carrot', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n );\n register_post_type( 'smaken', $args ); \n }", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}" ]
[ "0.8571383", "0.85078615", "0.8348141", "0.83126336", "0.8261721", "0.8250944", "0.82143503", "0.8199345", "0.8183212", "0.817984", "0.81763935", "0.81177896", "0.8097629", "0.8097295", "0.8090537", "0.8090162", "0.8071848", "0.80638534", "0.8056724", "0.804086", "0.8028292", "0.8008064", "0.80044365", "0.800261", "0.7977761", "0.7977761", "0.79761904", "0.7947007", "0.79016465", "0.7811631", "0.7798134", "0.77760386", "0.7775807", "0.7771997", "0.7765346", "0.77542216", "0.7716084", "0.7694887", "0.7686659", "0.76847297", "0.7679622", "0.765722", "0.7633882", "0.7629266", "0.76248705", "0.7621098", "0.7616182", "0.7599778", "0.7597865", "0.7553156", "0.7547977", "0.753425", "0.7530483", "0.7515727", "0.75136155", "0.7506956", "0.750039", "0.74990356", "0.7484578", "0.7472054", "0.74673927", "0.7457607", "0.7454584", "0.7454285", "0.7451338", "0.74492556", "0.74449193", "0.7440665", "0.743822", "0.7434157", "0.7432757", "0.7432056", "0.74236274", "0.7420253", "0.7412071", "0.7404194", "0.7401253", "0.7391451", "0.7378938", "0.73537546", "0.7350614", "0.73383427", "0.73153335", "0.73057383", "0.7304367", "0.7301035", "0.72947466", "0.7281956", "0.72782004", "0.72749007", "0.7266205", "0.72652555", "0.72637546", "0.72628933", "0.7247905", "0.724665", "0.72409475", "0.72379154", "0.723359", "0.7232379", "0.72246397" ]
0.0
-1
Register Custom Post Type
function faq_post_type() { $labels = array( 'name' => _x( 'F.A.Q', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'F.A.Q', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'F.A.Q', 'text_domain' ), 'name_admin_bar' => __( 'Post Type', 'text_domain' ), 'archives' => __( 'Item Archives', 'text_domain' ), 'attributes' => __( 'Item Attributes', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'todos as pegruntas frequentes', 'text_domain' ), 'add_new_item' => __( 'Add nova pergunta', 'text_domain' ), 'add_new' => __( 'nova pergunta', 'text_domain' ), 'new_item' => __( 'nova pergunta', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'view_items' => __( 'View Items', 'text_domain' ), 'search_items' => __( 'Search Item', 'text_domain' ), 'not_found' => __( 'não encontrato', 'text_domain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), 'featured_image' => __( 'Featured Image', 'text_domain' ), 'set_featured_image' => __( 'Set featured image', 'text_domain' ), 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ), 'use_featured_image' => __( 'Use as featured image', 'text_domain' ), 'insert_into_item' => __( 'Insert into item', 'text_domain' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), 'filter_items_list' => __( 'Filter items list', 'text_domain' ), ); $args = array( 'label' => __( 'F.A.Q', 'text_domain' ), 'description' => __( 'F.A.Q', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'faq_post_type', $args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }", "public function registerCustomPostTypes() {\n\n\n }", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "function register_post_types(){\n }", "function register_post_types(){\n }", "public function register_post(): void\n {\n $args = $this->register_post_type_args();\n register_post_type($this->post_type, $args);\n }", "public static function register_post_types() {}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "public function register_post_types() {\n\n\t}", "public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}", "function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}", "public function register_post_type() {\n\t $args = array(\n\t\t\t'public' => true,\n\t\t\t'label' => 'Questions'\n\t\t);\n\t register_post_type( 'questions', $args );\n\t}", "function register_post_types()\n {\n }", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public function register_post_type()\n {\n $labels = [\n 'name' => _x('Chiro Quizzes', 'post type general name', $this->token),\n 'singular_name' => _x('Chiro Quiz', 'post type singular name', $this->token),\n 'add_new' => _x('Add New', $this->token, $this->token),\n 'add_new_item' => sprintf(__('Add New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'edit_item' => sprintf(__('Edit %s', $this->token), __('Chiro Quiz', $this->token)),\n 'new_item' => sprintf(__('New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'all_items' => sprintf(__('All %s', $this->token), __('Chiro Quizzes', $this->token)),\n 'view_item' => sprintf(__('View %s', $this->token), __('Chiro Quiz', $this->token)),\n 'search_items' => sprintf(__('Search %a', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found' => sprintf(__('No %s Found', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found_in_trash' => sprintf(__('No %s Found In Trash', $this->token), __('Chiro Quizzes', $this->token)),\n 'parent_item_colon' => '',\n 'menu_name' => __('Chiro Quizzes', $this->token)\n ];\n\n $slug = __('chiro-quiz', 'pf_chiro_quiz');\n $custom_slug = get_option('pf_chiro_quiz_slug');\n if ($custom_slug && strlen($custom_slug) > 0 && $custom_slug != '') {\n $slug = $custom_slug;\n }\n\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $slug],\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'supports' => ['title'],\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-admin-quiz'\n ];\n\n register_post_type($this->token, $args);\n }", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }", "function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }", "function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "function register_post_types() {\n\t}", "function register_post_types() {\n\t}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "public function add_custom_post_types() {\n //\n }", "public static function register_post_type()\n {\n\n \t register_post_type( 'books',\n\t\t array(\n\t\t 'labels' => array(\n\t\t 'name' => __( 'Books' ),\n\t\t 'singular_name' => __( 'Books' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => false,\n\t\t )\n\t\t );\n\n }", "protected function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'geopin', 'geopin-post-type' ),\n\t\t\t'singular_name' => __( 'geopin Member', 'geopin-post-type' ),\n\t\t\t'add_new' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'add_new_item' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'edit_item' => __( 'Edit geopin', 'geopin-post-type' ),\n\t\t\t'new_item' => __( 'New geopin', 'geopin-post-type' ),\n\t\t\t'view_item' => __( 'View geopin', 'geopin-post-type' ),\n\t\t\t'search_items' => __( 'Search geopin', 'geopin-post-type' ),\n\t\t\t'not_found' => __( 'No geopins found', 'geopin-post-type' ),\n\t\t\t'not_found_in_trash' => __( 'No geopins in the trash', 'geopin-post-type' ),\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t// 'editor',\n\t\t\t'thumbnail',\n\t\t\t// 'custom-fields',\n\t\t\t// 'revisions',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => $supports,\n\t\t\t'public' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array( 'slug' => 'geopin', ), \n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-admin-site',\n\t\t);\n\n\t\t$args = apply_filters( 'geoPin_post_type_args', $args );\n\n\t\tregister_post_type( $this->post_type, $args );\n\t}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "public function create_post_types() {\n }", "function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}", "public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}", "static function register_post_type ()\n {\n register_post_type(\n 'person',\n array(\n 'labels' => array(\n 'name' => __x( 'People', 'post type general name' ),\n 'singular_name' => __x( 'Person', 'post type singular name' ),\n 'menu_name' => __x( 'People', 'admin menu' ),\n 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ),\n 'add_new' => __x( 'Add New', 'book' ),\n 'add_new_item' => ___( 'Add New Person' ),\n 'new_item' => ___( 'New Person' ),\n 'edit_item' => ___( 'Edit Person' ),\n 'view_item' => ___( 'View Person' ),\n 'all_items' => ___( 'All People' ),\n 'search_items' => ___( 'Search People' ),\n 'parent_item_colon' => ___( 'Parent People:' ),\n 'not_found' => ___( 'No persons found.' ),\n 'not_found_in_trash' => ___( 'No persons found in Trash.' )\n ),\n 'description' => ___( 'Noteworthy people' ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'people' ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ));\n }", "public function create_post_type() {\n\t\t\n \t\tregister_post_type(self::POST_TYPE,\n \t\t\tarray(\n \t\t\t\t'labels' => array(\n \t\t\t\t\t'name' => \"Custom\",\n \t\t\t\t\t'singular_name' => __(ucwords(str_replace(\"_\", \" \", self::POST_TYPE)))\n \t\t\t\t),\n \t\t\t\t'public' => true,\n \t\t\t\t'has_archive' => true,\n \t\t\t\t'description' => __(\"This is WP Custom Post Type\"),\n \t\t\t\t'supports' => array('title', 'editor', 'excerpt','thumbnail','custom-fields'),\n \t\t\t)\n \t\t);\n\n\t\t\tregister_taxonomy(\n\t\t\t\t'custom-category',\n\t\t\t\tself::POST_TYPE,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Category' ),\n\t\t\t\t\t'rewrite' => array( 'slug' => 'custom-category' ),\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function compendium_register_type($slug, $name, $pname, $dicon) {\n $pt_slug = $slug;\n $tax_slug = $slug . '-category';\n\n register_post_type($pt_slug, array(\n 'labels' => array(\n 'name' => $pname,\n 'singular_name' => $name,\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New '.$name,\n 'edit_item' => 'Edit '.$name,\n 'new_item' => 'New '.$name,\n 'view_item' => 'View '.$name,\n 'search_items' => 'Search '.$pname,\n 'not_found' => 'No '.$pname.' found',\n 'not_found_in_trash' => 'No '.$pname.' found in trash',\n ),\n 'public' => true,\n 'menu_position' => 35,\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => $dicon,\n 'rewrite' => array(\n 'slug' => 'resource-center/' . $pt_slug,\n 'with_front' => true\n ),\n ));\n\n register_taxonomy($tax_slug, $pt_slug, array(\n 'labels' => array(\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'hierarchical' => true,\n ));\n}", "public static function register_post_type() {\n\t\tregister_post_type( 'drsa_ad', self::arguments() );\n\t}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }", "function theme_custom_post_type() {\n\tregister_post_type( 'custom_type',\n\n\t\t// Array with all the options for the custom post type\n\t\tarray( 'labels' => array(\n\t\t\t'name'\t\t\t\t\t=> __( 'Custom Types' ), // Name of the custom post type group\n\t\t\t'singular_name'\t\t\t=> __( 'Custom Post' ), // Name of the custom post type singular\n\t\t\t'all_items'\t\t\t\t=> __( 'All Custom Posts' ),\n\t\t\t'add_new' \t\t\t\t=> __( 'Add New' ),\n\t\t\t'add_new_item' \t\t\t=> __( 'Add New Custom Type' ),\n\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ),\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Post Types' ),\n\t\t\t'new_item'\t\t\t\t=> __( 'New Post Type' ),\n\t\t\t'view_item'\t\t\t\t=> __( 'View Post Type' ),\n\t\t\t'search_items'\t\t\t=> __( 'Search Post Type' ),\n\t\t\t'not_found'\t\t\t\t=> __( 'Nothing found in the Database.' ),\n\t\t\t'not_found_in_trash'\t=> __( 'Nothing found in Trash' ),\n\t\t\t'parent_item_colon' \t=> ''\n\t\t\t),\n\n\t\t\t'description' \t\t\t=> __( 'This is the example custom post type' ), // Custom post type description\n\t\t\t'public' \t\t\t\t=> true,\n\t\t\t'publicly_queryable' \t=> true,\n\t\t\t'exclude_from_search' \t=> false,\n\t\t\t'show_ui' \t\t\t\t=> true,\n\t\t\t'query_var' \t\t\t=> true,\n\t\t\t'menu_position' \t\t=> 5, // The order the custom post type appears on the admin menu\n\t\t\t// 'menu_icon' \t\t\t=> get_stylesheet_directory_uri() . '/assets/images/custom-post-icon.png',\n\t\t\t'rewrite'\t\t\t\t=> array( 'slug' => 'custom_type', 'with_front' => false ), // You may specify its url slug\n\t\t\t'has_archive' \t\t\t=> 'custom_type', // You mary rename the slug here\n\t\t\t'capability_type' \t\t=> 'post',\n\t\t\t'hierarchical' \t\t\t=> false,\n\n\t\t\t// Enable post editor support\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'trackbacks',\n\t\t\t\t'custom-fields',\n\t\t\t\t'comments',\n\t\t\t\t'revisions',\n\t\t\t\t'sticky'\n\t\t\t)\n\t\t)\n\t);\n\n\t// This adds your post categories to your custom post type\n\tregister_taxonomy_for_object_type( 'category', 'custom_type' );\n\n\t// This adds your post tags to your custom post type\n\tregister_taxonomy_for_object_type( 'post_tag', 'custom_type' );\n\n}", "function add_custom_post_type() \n {\n // add custom type evenementen\n $labels = array(\n 'name' => _x('Quotes', 'post type general name', $this->localization_domain),\n 'singular_name' => _x('Quote', 'post type singular name', $this->localization_domain),\n 'add_new' => _x('Add Quote', 'event', $this->localization_domain),\n 'add_new_item' => __('Add New Quote', $this->localization_domain),\n 'edit_item' => __('Edit Quote', $this->localization_domain),\n 'new_item' => __('New Quote', $this->localization_domain),\n 'view_item' => __('View Quote', $this->localization_domain),\n 'search_items' => __('Search Quotes', $this->localization_domain),\n 'not_found' => __('No Quotes found', $this->localization_domain),\n 'not_found_in_trash' => __('No Quotes found in Trash', $this->localization_domain), \n 'parent_item_colon' => ''\n );\n $type_args = array(\n 'labels' => $labels,\n 'description' => __('bbQuotations offers a simple quotes custom post type. Useful for pull quotes or just random quotes on your site.',\n $this->localization_domain),\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => $this->options['bbquotations-slug']),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 5,\n 'supports' => array('title','editor','author')\n ); \n register_post_type( $this->custom_post_type_name, $type_args);\n }", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "function food_specials_custompost() {\r\n\t$args = array(\r\n\t\t'label' => 'Daily Food Specials',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'capability_type' => 'post',\r\n\t\t'rewrite' => array('slug' => 'food_specials'),\r\n\t\t'query_var' => true,\r\n\t\t'supports' => array(\r\n\t\t\t'title', 'editor', 'excerpt', 'comments', 'thumbnail', 'author',)\r\n\t\t);\r\n\tregister_post_type('food_specials', $args);\r\n}", "public function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Movies', 'Post type general name', 'plugintest' ),\n\t\t\t'singular_name' => _x( 'Movie', 'Post type singular name', 'plugintest' ),\n\t\t\t'menu_name' => _x( 'Movies', 'Admin Menu text', 'plugintest' ),\n\t\t\t'name_admin_bar' => _x( 'Movie', 'Admin Menu Toolbar text', 'plugintest' ),\n\t\t\t'add_new' => __( 'Add New', 'plugintest' ),\n\t\t\t'add_new_item' => __( 'Add New Movie', 'plugintest' ),\n\t\t\t'new_item' => __( 'Aaaaaa', 'plugintest' ),\n\t\t\t'view_item' => __( 'View Movie', 'plugintest' ),\n\t\t\t'edit_item' => __( 'Edit Movie', 'plugintest' ),\n\t\t\t'all_items' => __( 'All Movies', 'plugintest' ),\n\t\t\t'search_items' => __( 'Search Movies', 'plugintest' ),\n\t\t\t'parent_item_colon' => __( 'Parent Movies', 'plugintest' ),\n\t\t\t'not_found' => __( 'No Movies found.', 'plugintest' ),\n\t\t\t'not_found_in_trash' => __( 'No Movies found in Trash.', 'plugintest' ),\n\t\t\t'featured_image' => _x( 'Movie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'item_published' => __( 'New Movie Published.', 'plugintest' ),\n\t\t\t'item_updated' => __( 'Movie post updated.', 'plugintest' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'movie' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => false,\n\t\t\t'has_archive' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t\t'taxonomies' => array( 'category', 'post_tag' ), // Using wordpess category and tags.\n\t\t);\n\n\t\tregister_post_type( 'movie', $args );\n\t\tflush_rewrite_rules();\n\n\t\t$category_labels = array(\n\t\t\t'name' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'singular_name' => esc_html__( 'Movie Category', 'plugintest' ),\n\t\t\t'all_items' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => esc_html__( 'Edit Category', 'plugintest' ),\n\t\t\t'update_item' => esc_html__( 'Update Category', 'plugintest' ),\n\t\t\t'add_new_item' => esc_html__( 'Add New Movie Category', 'plugintest' ),\n\t\t\t'new_item_name' => esc_html__( 'New Movie Name', 'plugintest' ),\n\t\t\t'menu_name' => esc_html__( 'Genre', 'plugintest' ),\n\t\t\t'search_items' => esc_html__( 'Search Categories', 'plugintest' ),\n\t\t);\n\n\t\t$category_args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'labels' => $category_labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t\t);\n\n\t\tregister_taxonomy( 'genre', array( self::$post_type ), $category_args );\n\t}", "public function register_post_type()\n\t{\n\n\t\tregister_post_type( 'partner', array(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x( 'Partners', 'post type general name', 'custom-post-type-partners' ),\n\t\t\t\t'singular_name' => _x( 'Partner', 'post type singular name', 'custom-post-type-partners' ),\n\t\t\t\t'add_new' => _x( 'Add New', 'Partner', 'custom-post-type-partners' ),\n\t\t\t\t'add_new_item' => __( 'Add New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'edit_item' => __( 'Edit Partner', 'custom-post-type-partners' ),\n\t\t\t\t'new_item' => __( 'New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'all_items' => __( 'All Partners', 'custom-post-type-partners' ),\n\t\t\t\t'view_item' => __( 'View Partner', 'custom-post-type-partners' ),\n\t\t\t\t'search_items' => __( 'Search Partners', 'custom-post-type-partners' ),\n\t\t\t\t'not_found' => __( 'No Partners found', 'custom-post-type-partners' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Partners found in Trash', 'custom-post-type-partners' ),\n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => __( 'Partners', 'custom-post-type-partners' )\n\t\t\t),\n\t\t\t'public' => TRUE,\n\t\t\t'publicly_queryable' => TRUE,\n\t\t\t'show_ui' => TRUE,\n\t\t\t'show_in_menu' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => TRUE,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => FALSE,\n\t\t\t'hierarchical' => FALSE,\n\t\t\t'menu_position' => NULL,\n\t\t\t'menu_icon' => 'dashicons-admin-links',\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' )\n\t\t) );\n\n\t}", "public function customPostType()\n {\n\n if (empty($this->custom_post_types)) {\n return;\n }\n\n foreach ($this->custom_post_types as $post_type) {\n register_post_type(\n $post_type['post_type'],\n [\n 'labels' => [\n 'name' => __($post_type['name'], 'vrcoder'),\n 'singular_name' => __($post_type['singular_name'], 'vrcoder'),\n 'menu_name' => __($post_type['name'], 'vrcoder'),\n 'name_admin_bar' => __($post_type['singular_name'], 'vrcoder'),\n 'archives' => __($post_type['singular_name'] . ' Archives', 'vrcoder'),\n 'attributes' => __($post_type['singular_name'] . ' Attributes', 'vrcoder'), \n 'parent_item_colon' => __('Parent ' . $post_type['singular_name'], 'vrcoder'),\n 'all_items' => __('All ' . $post_type['name'], 'vrcoder'),\n 'add_new_item' => __('Add new ' . $post_type['singular_name'], 'vrcoder'),\n 'add_new' => __('Add new', 'vrcoder'),\n 'new_item' => __('New ' . $post_type['singular_name'], 'vrcoder'),\n 'edit_item' => __('Edit ' . $post_type['singular_name'], 'vrcoder'),\n 'update_item' => __('Update' . $post_type['singular_name'], 'vrcoder'),\n 'view_item' => __('View' . $post_type['singular_name'], 'vrcoder'),\n 'view_items' => __('View' . $post_type['name'], 'vrcoder'),\n 'search_items' => __('Search' . $post_type['name'], 'vrcoder'),\n 'not_found' => __('No' . $post_type['singular_name'] . ' Found', 'vrcoder'),\n 'not_found_in_trash' => __('No' . $post_type['singular_name'] . ' Found in Trash', 'vrcoder'),\n 'featured_image' => __('Featured Image', 'vrcoder'),\n 'set_featured_image' => __('Set Featured Image', 'vrcoder'),\n 'remove_featured_image' => __('Remove Featured Image', 'vrcoder'),\n 'use_featured_image' => __('Use Featured Image', 'vrcoder'),\n 'insert_into_item' => __('Insert into' . $post_type['singular_name'], 'vrcoder'),\n 'uploaded_to_this_item' => __('Upload to this' . $post_type['singular_name'], 'vrcoder'),\n 'items_list' => __($post_type['name'] . ' List', 'vrcoder'),\n 'items_list_navigation' => __($post_type['name'] . ' List Navigation', 'vrcoder'),\n 'filter_items_list' => __('Filter' . $post_type['name'] . ' List', 'vrcoder'),\n ],\n 'label' => __($post_type['singular_name'], 'vrcoder'),\n 'description' => __($post_type['name'] . ' Custom Post Type', 'vrcoder'),\n 'supports' => $post_type['supports'],\n 'show_in_rest' => $post_type['show_in_rest'],\n 'taxonomies' => $post_type['taxonomies'],\n 'hierarchical' => $post_type['hierarchical'],\n 'public' => $post_type['public'],\n 'show_ui' => $post_type['show_ui'],\n 'show_in_menu' => $post_type['show_in_menu'],\n 'menu_position' => $post_type['menu_position'],\n 'show_in_admin_bar' => $post_type['show_in_admin_bar'],\n 'show_in_nav_menus' => $post_type['show_in_nav_menus'],\n 'can_export' => $post_type['can_export'],\n 'has_archive' => $post_type['has_archive'],\n 'exclude_from_search' => $post_type['exclude_from_search'],\n 'publicly_queryable' => $post_type['publicly_queryable'],\n 'capability_type' => $post_type['capability_type'],\n 'menu_icon' => $post_type['menu_icon']\n ]\n );\n }\n\n }", "public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }", "function pluginprefix_setup_post_type()\n{\n register_post_type('post-nasa-gallery', [\n 'label' => 'Nasa Images Posts',\n 'public' => true\n ]);\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public function register_post_types() {\n require_once('includes/post-types.php');\n }", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}", "public static function register_type() {\n\t\tregister_graphql_object_type(\n\t\t\t'PostTypeLabelDetails',\n\t\t\t[\n\t\t\t\t'description' => __( 'Details for labels of the PostType', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'name' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'General name for the post type, usually plural.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'singularName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Name for one object of this post type.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->singular_name ) ? $labels->singular_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNew' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Default is ‘Add New’ for both hierarchical and non-hierarchical types.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new ) ? $labels->add_new : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for adding a new singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new_item ) ? $labels->add_new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'editItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for editing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->edit_item ) ? $labels->edit_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'newItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the new item page title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->new_item ) ? $labels->new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_item ) ? $labels->view_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing post type archives.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_items ) ? $labels->view_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'searchItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for searching plural items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->search_items ) ? $labels->search_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFound' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are found.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found ) ? $labels->not_found : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFoundInTrash' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are in the trash.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found_in_trash ) ? $labels->not_found_in_trash : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'parentItemColon' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used to prefix parents of hierarchical items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->parent_item_colon ) ? $labels->parent_item_colon : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'allItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label to signify all items in a submenu link.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->all_items ) ? $labels->all_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'archives' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for archives in nav menus', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the attributes meta box.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'insertIntoItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame button.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->insert_into_item ) ? $labels->insert_into_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'uploadedToThisItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame filter.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->uploaded_to_this_item ) ? $labels->uploaded_to_this_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'featuredImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the Featured Image meta box title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->featured_image ) ? $labels->featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'setFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for setting the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->set_featured_image ) ? $labels->set_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'removeFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for removing the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->remove_featured_image ) ? $labels->remove_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'useFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label in the media frame for using a featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->use_featured_item ) ? $labels->use_featured_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'menuName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the menu name.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->menu_name ) ? $labels->menu_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'filterItemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table views hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->filter_items_list ) ? $labels->filter_items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsListNavigation' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table pagination hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list_navigation ) ? $labels->items_list_navigation : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list ) ? $labels->items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function cptui_register_my_cpts_how_it_works() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"How it Work\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"how_it_works\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"how_it_works\", $args );\n}", "function add_my_custom_posttype_waarden(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe waarde toe',\n 'add_new_item' => 'Voeg nieuwe waarde toe',\n 'name' => 'waarden',\n 'singular_name' => 'waarden',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'waarden van Ben & Jerry',\n 'public' => true,\n 'menu_position' => 6,\n 'menu_icon' => 'dashicons-layout', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n \n );\n register_post_type( 'waarden', $args ); \n }", "function custom_post_type() {\n $labels = array(\n 'name' => _x( 'Ort', 'Post Type General Name', 'twentythirteen' ),\n 'singular_name' => _x( 'Ort', 'Post Type Singular Name', 'twentythirteen' ),\n 'menu_name' => __( 'Orter', 'twentythirteen' ),\n 'all_items' => __( 'Alla Orter', 'twentythirteen' ),\n 'view_item' => __( 'View Ort', 'twentythirteen' ),\n 'add_new_item' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'add_new' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'edit_item' => __( 'Redigera Ort', 'twentythirteen' ),\n 'update_item' => __( 'Upddatera Ort', 'twentythirteen' ),\n 'search_items' => __( 'Sök Ort', 'twentythirteen' ),\n 'not_found' => __( 'Not Found', 'twentythirteen' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n );\n \n $args = array(\n 'label' => __( 'cities', 'twentythirteen' ),\n 'description' => __( 'City Post Page', 'twentythirteen' ),\n 'labels' => $labels,\n 'supports' => array('title','thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n register_post_type( 'cities', $args );\n\n }", "function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}", "function add_custom_post_type() {\n\tregister_post_type( 'learning_resource',\n array(\n 'labels' => array(\n 'name' => __( 'Learning Resources' ),\n 'singular_name' => __( 'Learning Resource' )\n ),\n 'public' => true,\n 'has_archive' => true,\n )\n );\n}", "static function register() {\n // register the post type\n register_post_type('sale-flat', array(\n\t\t\n\t\t\t'labels'=> array(\n\t\t\t\t'name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'singular_name' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'menu_name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'name_admin_bar' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new' => _x( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new_item' => __( 'Új eladó ingatlan hozzáadása', 'theme-phrases' ),\n\t\t\t\t'new_item' => __( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'edit_item' => __( 'Eladó ingatlan szerkesztése', 'theme-phrases' ),\n\t\t\t\t'view_item' => __( 'Eladó ingatlan megtekintése', 'theme-phrases' ),\n\t\t\t\t'all_items' => __( 'Összes eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'search_items' => __( 'Eladó ingatlan keresése', 'theme-phrases' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent eladó ingatlan:', 'theme-phrases' ),\n\t\t\t\t'not_found' => __( 'Nincsenek eladó ingatlanok.', 'theme-phrases' ),\n\t\t\t\t'not_found_in_trash' => __( 'Nincsenek eladó ingatlanok a kukában.', 'theme-phrases' )\n\t\t\t),\n 'description' => __('Eladó ingatlanok', 'theme-phrases'),\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'public' => true,\n 'show_ui' => true,\n 'auto-draft' => false,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'menu_position' => 4,\n 'menu_icon'\t=> 'dashicons-tag',\n 'revisions' => false,\n 'hierarchical' => true,\n 'has_archive' => true,\n\t\t\t'supports' => array('title','editor','thumbnail'),\n 'rewrite' => false,\n 'can_export' => false,\n 'capabilities' => array (\n 'create_posts' => 'edit_posts',\n 'edit_post' => 'edit_posts',\n 'read_post' => 'edit_posts',\n 'delete_posts' => 'edit_posts',\n 'delete_post' => 'edit_posts',\n 'edit_posts' => 'edit_posts',\n 'edit_others_posts' => 'edit_posts',\n 'publish_posts' => 'edit_posts',\n 'read_private_posts' => 'edit_posts',\n ),\n 'register_meta_box_cb' => array('SaleFlatPostType', 'add_metabox') \n ));\n }", "public function register_content_type() {\n\t\t$labels = array(\n\t\t\t'name' => 'Honor Rolls',\n\t\t\t'singular_name' => 'Honor Roll',\n\t\t\t'add_new' => 'Add New',\n\t\t\t'add_new_item' => 'Add New Honor Roll',\n\t\t\t'edit_item' => 'Edit Honor Roll',\n\t\t\t'new_item' => 'New Honor Roll',\n\t\t\t'all_items' => 'All Honor Rolls',\n\t\t\t'view_item' => 'View Honor Rolls',\n\t\t\t'search_items' => 'Search Honor Rolls',\n\t\t\t'not_found' => 'No Honor Rolls found',\n\t\t\t'not_found_in_trash' => 'No Honor Rolls found in Trash',\n\t\t\t'menu_name' => 'Honor Rolls',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'supports' => array( 'title' ),\n\t\t);\n\t\tregister_post_type( $this::$content_type_slug, $args );\n\t}", "public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }", "function wpcp_custom_post_type()\n{\n register_post_type('wpcp_server',\n array(\n 'labels' => array(\n 'name' => __('Servers', 'textdomain'),\n 'singular_name' => __('Server', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => false,\n 'delete_with_user' => false,\n \"supports\" => array(\"customer\", \"author\"),\n 'menu_icon' => 'dashicons-cloud'\n )\n );\n}", "function create_post_type(){\n register_post_type('recipes', [ \n 'labels' => [\n 'name' => 'Recipes', //Etikett i plural Etikett i singular\n 'singular_name' => 'Recipe', //Vad som ska stå i ”Lägg till...” knappen\n 'add_new' => 'New Recipe', //Vad som ska stå i ”Lägg till ny...” knappen\n 'add_new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'edit_item' => 'Edit Recipe', //Vad som ska stå i ”Redigera...” länken\n 'new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'search_items' => 'Search for Recipe', //Vad som ska stå i sökrutan i listningen\n 'not_found' => 'No Recipe Found', \n 'all_items' => 'All Recipes', //Vad som ska stå i ”Alla...” länken\n ],\n 'supports' => array( 'thumbnail' ),\n 'description' => 'The Big Tasty!', //En kort beskrivning av posttypen\n 'public' => true, //Om och hur posttypen ska visas för olika användare\n 'exclude_from_search' => false, //Om posttypens poster ska exkluderas vid sökning\n 'show_ui' => true, //Om posttypen ska kunna hanteras från admin\n 'show_in_nav_menus' => true, //Om poster av posttypen ska kunna läggas till i menyer\n 'show_in_menu' => true, //Vart posttypen ska listas i admin (vänster eller topp)\n 'show_in_admin_bar' => true, //Om posttypen ska visas i toppbar’en\n 'menu_position' => 10, //Vart i vänstermenyn posttypen ska visas\n 'hierarchical' => false, //Om poster i posttypen ska kunna ha föräldrar, likt Sidor\n 'menu_icon' => 'dashicons-food', //Ikon för posttypen\n 'supports' => array('title' , 'editor'), //Vad som ska synas när man skapar/redigerar en post \n 'taxonomies' => array('category'), //Vilka taxonomier som ska tillhöra posttypen\n 'has_archive' => true, //Om posttypen ska ha arkivsida\n 'rewrite' => [ //Hur posttypens rewrites ska hanteras...\n 'slug' => 'recipe', //Permalänkstrukturen för posttypen\n 'with_front' => true //Om permalänkarna ska låta föregås av sluggen\n ] \n ]);\n\n}", "function create_post_type() {\n\n // register external_post as a Custom Post Type\n register_post_type( 'external_post', \n array( \n 'labels' => array( \n 'name' => __('External Posts'), \n 'singular_name' => __('External Post') \n ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array('title', 'excerpt'),\n 'rewrite' => array('slug' => 'external','with_front' => false) \n ) \n ); \n\n // connect external_post to category taxonomy\n register_taxonomy_for_object_type('category', 'external_post');\n register_taxonomy_for_object_type('post_tag', 'external_post');\n\n\n // register wp_tool as a Custom Post Type\n register_post_type('wp_tool',\n array( \n 'labels' => array( \n 'name' => __('WordPress Tools'), \n 'singular_name' => __('WordPress Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'tool','with_front' => false) \n ) \n );\n\n // connect wp_tool to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'wp_tool');\n register_taxonomy_for_object_type('category', 'wp_tool');\n\n\n // reregister default post so we can set a custom slug\n register_post_type('post', array(\n 'labels' => array(\n 'name_admin_bar' => _x('Post', 'add new on admin bar' ),\n ),\n 'public' => true,\n '_builtin' => false, \n '_edit_link' => 'post.php?post=%d', \n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'show_in_menu' => false,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'article'),\n 'query_var' => false,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats', 'column_info'),\n )); \n\n // register external_tool as a Custom Post Type\n register_post_type('external_tool',\n array(\n 'labels' => array( \n 'name' => __('External Tools'), \n 'singular_name' => __('External Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'special','with_front' => false) \n ) \n ); \n\n // connect external_tool to category taxonomy\n register_taxonomy_for_object_type('category', 'external_tool');\n register_taxonomy_for_object_type('meta_info', 'external_tool');\n\n\n // register city_journal as a Custom Post Type\n register_post_type('city_journal',\n array(\n 'labels' => array( \n 'name' => __('CityJournal Entry'),\n 'singular_name' => __('CityJournal Entry')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'cityjournal','with_front' => false) \n ) \n ); \n\n // connect city_journal to category taxonomy\n register_taxonomy_for_object_type('category', 'city_journal');\n register_taxonomy_for_object_type('meta_info', 'city_journal'); \n\n\n // register people_project as a Custom Post Type\n register_post_type('people_project',\n array(\n 'labels' => array( \n 'name' => __('People & Projects'),\n 'singular_name' => __('People & Project')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'excerpt', 'thumbnail', 'meta_info'),\n ) \n ); \n\n // connect people_project to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'people_project'); \n\n\n register_post_type('discussion',\n array( \n 'labels' => array( \n 'name' => __('Discussions'), \n 'singular_name' => __('Discussion') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'discussion','with_front' => false) \n ) \n );\n\n // connect discussion to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'discussion');\n register_taxonomy_for_object_type('category', 'discussion');\n\n}", "function bs_configure_custom_post_types($args)\n{\n function bs_custom_post_types()\n {\n global $bs_config;\n\n foreach ($bs_config[\"custom-post-types\"] as $key => $type) {\n $type = bs_defaults($type, [\n \"public\" => true,\n ]);\n\n if (isset($type[\"name\"])) {\n $type[\"labels\"][\"name\"] = $type[\"name\"];\n }\n\n if (isset($type[\"slug\"])) {\n $type[\"rewrite\"][\"slug\"] = $type[\"slug\"];\n }\n\n if (isset($type[\"admin_only\"]) && $type[\"admin_only\"]) {\n $type[\"public\"] = false;\n $type[\"show_ui\"] = true;\n }\n\n register_post_type($key, bs_array_omit($type, [\"slug\", \"name\", \"admin_only\"]));\n }\n }\n add_action(\"init\", \"bs_custom_post_types\");\n}", "function add_my_custom_posttype_recepten(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuw recept toe',\n 'add_new_item' => 'Voeg nieuw recept toe',\n 'name' => 'Recepten',\n 'singular_name' => 'recept',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije recepten van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-book-alt', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'comments'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-recepten.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n\n );\n\n register_post_type( 'recepten', $args ); \n \n }", "function create_post_type() {\r\n register_post_type( 'nyheter',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Nyheter' ),\r\n 'singular_name' => __( 'Nyheter' )\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail')\r\n )\r\n );\r\n}", "function zmpm_register_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => 'Permissions',\n\t\t'singular_name' => 'Permission',\n\t\t'menu_name' => 'Permissions',\n\t\t'name_admin_bar' => 'Permission',\n\t\t'archives' => 'Permission Archives',\n\t\t'attributes' => 'Permission Attributes',\n\t\t'parent_item_colon' => 'Parent Permission:',\n\t\t'all_items' => 'Permissions',\n\t\t'add_new_item' => 'Add New Permission',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Permission',\n\t\t'edit_item' => 'Edit Permission',\n\t\t'update_item' => 'Update Permission',\n\t\t'view_item' => 'View Permission',\n\t\t'view_items' => 'View Permissions',\n\t\t'search_items' => 'Search Permission',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not Found in Trash',\n\t\t'featured_image' => 'Featured Image',\n\t\t'set_featured_image' => 'Set featured image',\n\t\t'remove_featured_image' => 'Remove featured image',\n\t\t'use_featured_image' => 'Use as featured image',\n\t\t'insert_into_item' => 'Insert into permission',\n\t\t'uploaded_to_this_item' => 'Uploaded to this permission',\n\t\t'items_list' => 'Permissions list',\n\t\t'items_list_navigation' => 'Permissions list navigation',\n\t\t'filter_items_list' => 'Filter permissions list',\n\t);\n\t$args = array(\n\t\t'label' => 'Permission',\n\t\t'description' => 'ZingMap permissions',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'users.php',\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-lock',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'zmpm_permission', $args );\n\t\n}", "public function register_estate_post_type() {\r\n $options = get_option( 'myhome_redux' );\r\n // define post type slug\r\n if ( ! empty( $options['mh-estate-slug'] ) ) {\r\n $slug = $options['mh-estate-slug'];\r\n } else {\r\n $slug = 'properties';\r\n }\r\n\r\n register_post_type( 'estate', array(\r\n 'labels' => array(\r\n 'name'\t\t\t => esc_html__( 'Properties', 'myhome-core' ),\r\n 'singular_name'\t => esc_html__( 'Property', 'myhome-core' ),\r\n 'menu_name' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'name_admin_bar' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new_item' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'new_item' => esc_html__( 'New Property', 'myhome-core' ),\r\n 'edit_item' => esc_html__( 'Edit Property', 'myhome-core' ),\r\n 'view_item' => esc_html__( 'View Property', 'myhome-core' ),\r\n 'all_items' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'search_items' => esc_html__( 'Search property', 'myhome-core' ),\r\n 'not_found' => esc_html__( 'No Property Found found.', 'myhome-core' ),\r\n 'not_found_in_trash' => esc_html__( 'No Property found in Trash.', 'myhome-core' )\r\n ),\r\n 'show_in_rest' => true,\r\n 'query_var' => true,\r\n 'public'\t\t => true,\r\n 'has_archive'\t => true,\r\n 'menu_position' => 21,\r\n 'menu_icon' => 'dashicons-admin-home',\r\n 'capability_type' => array( 'estate', 'estates' ),\r\n 'map_meta_cap' => true,\r\n 'rewrite'\t\t => array( 'slug' => $slug ),\r\n 'supports'\t\t => array(\r\n 'title',\r\n 'author',\r\n 'editor',\r\n 'thumbnail',\r\n )\r\n ) );\r\n }", "function create_volunteer_custom_post() {\n register_post_type( 'volunteers',\n array(\n 'labels' => array(\n 'name' => __( 'Board Members' ),\n 'singular_name' => __( 'Board Member' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields'\n )\n ));\n}", "public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }", "public function register_post_type()\n\t{\n\n\t\tregister_taxonomy( $this->post_type_name . '_words', $this->post_type_name, array(\n\t\t\t'label' => 'Words',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Word',\n\t\t\t\t'menu_name' => 'Words',\n\t\t\t\t'all_items' => 'All words',\n\t\t\t\t'edit_item' => 'Edit word',\n\t\t\t\t'view_item' => 'View word',\n\t\t\t\t'update_item' => 'View word',\n\t\t\t\t'add_new_item' => 'Add word',\n\t\t\t\t'new_item_name' => 'New word',\n\t\t\t\t'search_items' => 'Search words',\n\t\t\t\t'popular_items' => 'Popular words',\n\t\t\t\t'separate_items_with_commas' => 'Separate words with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove words',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used words',\n\t\t\t\t'not_found' => 'No words found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => FALSE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'word',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\tregister_taxonomy( $this->post_type_name . '_partsofspeech', $this->post_type_name, array(\n\t\t\t'label' => 'Parts of Speech',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Part of Speech',\n\t\t\t\t'menu_name' => 'Parts of Speech',\n\t\t\t\t'all_items' => 'All parts of speech',\n\t\t\t\t'edit_item' => 'Edit part of speech',\n\t\t\t\t'view_item' => 'View part of speech',\n\t\t\t\t'update_item' => 'View part of speech',\n\t\t\t\t'add_new_item' => 'Add part of speech',\n\t\t\t\t'new_item_name' => 'New part of speech',\n\t\t\t\t'search_items' => 'Search parts of speech',\n\t\t\t\t'popular_items' => 'Popular parts of speech',\n\t\t\t\t'separate_items_with_commas' => 'Separate parts of speech with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove parts of speech',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used parts of speech',\n\t\t\t\t'not_found' => 'No parts of speech found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'partofspeech',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\t// register the damn post type already\n\t\tregister_post_type( \n\t\t\t$this->post_type_name,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Definitions',\n\t\t\t\t\t'singular_name' => 'Definition',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Definition',\n\t\t\t\t\t'edit_item' => 'Edit Definition',\n\t\t\t\t\t'new_item' => 'New Definition',\n\t\t\t\t\t'all_items' => 'All Definitions',\n\t\t\t\t\t'view_item' => 'View Definitions',\n\t\t\t\t\t'search_items' => 'Search Definitions',\n\t\t\t\t\t'not_found' => 'No definitions found',\n\t\t\t\t\t'not_found_in_trash' => 'No definitions found in Trash',\n\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t'menu_name' => 'Definitions',\n\t\t\t\t),\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'trackbacks',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'has_archive' => 'definitions',\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'define',\n\t\t\t\t\t'with_front' => FALSE,\n\t\t\t\t),\n\t\t\t\t'register_meta_box_cb' => array( $this, 'metaboxes' ),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'taxonomies' => array(\n\t\t\t\t\t$this->post_type_name . '_partsofspeech',\n\t\t\t\t\t$this->post_type_name . '_words',\n\t\t\t\t),\n\t\t\t\t'menu_position' => 5,\n\t\t\t)\n\t\t);\n\t}", "function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}", "public function createPostTypes()\n {\n }", "function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}", "protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }", "function register_type( $post_type_singular, $post_type_plural, $options = array() ) {\n\n\t$text_domain = 'sgdf';\n\n\t$labels = array(\n\t\t'name' => _x( ucwords( $post_type_plural ), 'post type general name', $text_domain ),\n\t\t'singular_name' => _x( ucwords( $post_type_singular ), 'post type singular name', $text_domain ),\n\t\t'menu_name' => _x( ucwords( $post_type_plural ), 'admin menu', $text_domain ),\n\t\t'name_admin_bar' => _x( ucwords( $post_type_singular ), 'add new on admin bar', $text_domain ),\n\t\t'add_new' => _x( 'Add New', 'book', $text_domain ),\n\t\t'add_new_item' => __( 'Add New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'new_item' => __( 'New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'edit_item' => __( 'Edit ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'view_item' => __( 'View ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'all_items' => __( 'All ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'search_items' => __( 'Search ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'parent_item_colon' => __( 'Parent ' . ucwords( $post_type_plural ) . ':', $text_domain ),\n\t\t'not_found' => __( 'No ' . $post_type_plural . ' found.', $text_domain ),\n\t\t'not_found_in_trash' => __( 'No ' . $post_type_plural . ' found in Trash.', $text_domain )\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => $post_type_singular ),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'menu_icon' \t => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t);\n\n\tforeach ($options as $key => $option) {\n\t\t$args[$key] = $option;\n\t}\n\n\treturn register_post_type( $post_type_singular, $args );\n}", "public function register() {\r\n add_action('post_updated', array($this, 'save_meta'), null, 2 );\r\n\r\n $original_config = $this->get_config();\r\n // push it through a filter so a theme can change the terminology\r\n $filtered_config = apply_filters('ah-wp-dl-res-config',$original_config);\r\n register_post_type(self::POST_TYPE, $filtered_config);\r\n\r\n register_taxonomy(self::POST_TYPE . '_cat',\r\n array(self::POST_TYPE),\r\n array('hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => __( 'Categories' ),\r\n 'singular_name' => __( 'Category' ),\r\n 'search_items' => __( 'Search Categories' ),\r\n 'all_items' => __( 'All Categories' ),\r\n 'parent_item' => __( 'Parent Category' ),\r\n 'parent_item_colon' => __( 'Parent Category:' ),\r\n 'edit_item' => __( 'Edit Category' ),\r\n 'update_item' => __( 'Update Category' ),\r\n 'add_new_item' => __( 'Add New Category' ),\r\n 'new_item_name' => __( 'New Category Name')\r\n ),\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'documents/categories' ),\r\n )\r\n );\r\n }", "function stock_toolkit_custom_post()\n\t{\n\tregister_post_type('slide', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Slides') ,\n\t\t\t'singular_name' => __('Slide')\n\t\t) ,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'custom-fields',\n\t\t\t'thumbnail',\n\t\t\t'page-attributes'\n\t\t) ,\n\t\t'public' => false,\n\t\t'show_ui' => true\n\t));\n\t}", "function testimonials_register_post_type() {\n\n $labels = [\n 'name' => __('Testimonials'),\n 'singular_name' => __('Testimonial'),\n 'add_new' => __('Add new', 'Testimonials'),\n 'add_new_item' => __('Add new Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_item' => __('Search Testimonials'),\n 'not_found' => __('No Testimonial found'),\n 'not_found_in_trash' => __('No Testimonial found in trash'),\n 'parent_item_colon' => ''\n ];\n\n register_post_type(TESTIMONIAL_TYPE, [\n 'labels' => $labels,\n 'public' => true,\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'hierarchical' => false,\n 'supports' => ['title', 'editor', 'custom-fields']\n ]);\n\n register_taxonomy_for_object_type(CRAFT_TAX_NAME, TESTIMONIAL_TYPE);\n}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function register_location_content_type(){\n\t\t //Labels for post type\n\t\t $labels = array(\n 'name' => 'Add Portfolio',\n 'singular_name' => 'Portfolio',\n 'menu_name' => 'Add Portfolio',\n 'name_admin_bar' => 'Add Portfolio',\n 'add_new' => 'Add New', \n 'add_new_item' => 'Add New Portfolio Item',\n 'new_item' => 'New Portfolio Item', \n 'edit_item' => 'Edit Portfolio Item',\n 'view_item' => 'View Portfolio Item',\n 'all_items' => 'All Portfolio Items',\n 'search_items' => 'Search Portfolio Items',\n 'parent_item_colon' => 'Parent Portfolio Item: ', \n 'not_found' => 'No Portfolio Items found.', \n 'not_found_in_trash' => 'No Portfolio Items found in Trash.',\n );\n //arguments for post type\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable'=> true,\n 'show_ui' => true,\n 'show_in_nav' => true,\n 'query_var' => true,\n 'hierarchical' => false,\n 'supports' => array('title','thumbnail','editor'),\n 'has_archive' => true,\n 'menu_position' => 20,\n 'show_in_admin_bar' => true,\n 'menu_icon' => 'dashicons-location-alt',\n 'rewrite'\t\t\t=> array('slug' => 'locations', 'with_front' => 'true')\n );\n //register post type\n register_post_type('wp_locations', $args);\n\t}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}", "function humcore_register_post_type() {\n\n\t// Define the labels to be used by the post type humcore_deposits.\n\t$labels = array(\n\t\t// 'name' => _x( 'HumCORE Deposits', 'post type general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Deposit', 'post type singular name', 'humcore_domain' ),\n\t\t'menu_name' => _x( 'HumCORE Deposits', 'admin menu', 'humcore_domain' ),\n\t\t'name_admin_bar' => _x( 'Deposit', 'add new on admin bar', 'humcore_domain' ),\n\t\t'add_new' => _x( 'Add New', 'add new', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Deposits', 'humcore_domain' ),\n\t\t'new_item' => __( 'New Deposit', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Deposit', 'humcore_domain' ),\n\t\t'view_item' => __( 'View Deposit', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Deposits', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Deposits', 'humcore_domain' ),\n\t\t'not_found' => __( 'No Deposits found', 'humcore_domain' ),\n\t\t'not_found_in_trash' => __( 'No Deposits found in Trash', 'humcore_domain' ),\n\t\t'parent_item_colon' => '',\n\t);\n\n\t$post_type_args = array(\n\t\t'label' => __( 'HumCORE Deposits', 'humcore_domain' ),\n\t\t'labels' => $labels,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'humcore_deposit',\n\t\t\t'with_front' => true,\n\t\t),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => false,\n\t\t'hierarchical' => true,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'author', 'excerpt' ),\n\t\t// 'supports' => array( 'title', 'author', 'excerpt', 'custom-fields', revisions', 'page-attributes' ),\n\t\t'register_meta_box_cb' => 'humcore_add_post_type_metabox',\n\t);\n\n\tregister_post_type( 'humcore_deposit', $post_type_args );\n}", "public static function register_type() {\n\n\t\tregister_graphql_enum_type(\n\t\t\t'ContentNodeIdTypeEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t'values' => self::get_values(),\n\t\t\t]\n\t\t);\n\n\t\t$allowed_post_types = \\WPGraphQL::get_allowed_post_types();\n\t\tif ( ! empty( $allowed_post_types ) && is_array( $allowed_post_types ) ) {\n\t\t\tforeach ( $allowed_post_types as $post_type ) {\n\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\tif ( empty( $post_type_object ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$values = self::get_values();\n\t\t\t\tif ( ! $post_type_object->hierarchical ) {\n\t\t\t\t\t$values['slug'] = [\n\t\t\t\t\t\t'name' => 'SLUG',\n\t\t\t\t\t\t'value' => 'slug',\n\t\t\t\t\t\t'description' => __( 'Identify a resource by the slug. Available to non-hierarchcial Types where the slug is a unique identifier.', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tif ( 'attachment' === $post_type_object->name ) {\n\t\t\t\t\t$values['source_url'] = [\n\t\t\t\t\t\t'name' => 'SOURCE_URL',\n\t\t\t\t\t\t'value' => 'source_url',\n\t\t\t\t\t\t'description' => __( 'Identify a media item by its source url', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Register a unique Enum per Post Type. This allows for granular control\n\t\t\t\t * over filtering and customizing the values available per Post Type.\n\t\t\t\t */\n\t\t\t\tregister_graphql_enum_type(\n\t\t\t\t\t$post_type_object->graphql_single_name . 'IdType',\n\t\t\t\t\t[\n\t\t\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t\t\t'values' => $values,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t}", "public function registerPostTypes()\n {\n // Get the post types from the config.\n $postTypes = config('post-types');\n\n $translater = new Translater($postTypes, 'post-types');\n $postTypes = $translater->translate([\n '*.label',\n '*.labels.*',\n '*.names.singular',\n '*.names.plural',\n ]);\n\n // Iterate over each post type.\n collect($postTypes)->each(function ($item, $key) {\n\n // Check if names are set, if not keep it as an empty array\n $names = $item['names'] ?? [];\n\n // Unset names from item\n unset($item['names']);\n\n // Register the extended post type.\n register_extended_post_type($key, $item, $names);\n });\n }", "function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}", "function rng_create_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Post Types Plural', 'Post Type General Name', 'translate_name' ),\n\t\t'singular_name' => _x( 'Post Type Singular', 'Post Type Singular Name', 'translate_name' ),\n\t\t'menu_name' => __( 'Post Types', 'translate_name' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'translate_name' ),\n\t\t'archives' => __( 'Item Archives', 'translate_name' ),\n\t\t'attributes' => __( 'Item Attributes', 'translate_name' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'translate_name' ),\n\t\t'all_items' => __( 'All Items', 'translate_name' ),\n\t\t'add_new_item' => __( 'Add New Item', 'translate_name' ),\n\t\t'add_new' => __( 'Add New', 'translate_name' ),\n\t\t'new_item' => __( 'New Item', 'translate_name' ),\n\t\t'edit_item' => __( 'Edit Item', 'translate_name' ),\n\t\t'update_item' => __( 'Update Item', 'translate_name' ),\n\t\t'view_item' => __( 'View Item', 'translate_name' ),\n\t\t'view_items' => __( 'View Items', 'translate_name' ),\n\t\t'search_items' => __( 'Search Item', 'translate_name' ),\n\t\t'not_found' => __( 'Not found', 'translate_name' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'translate_name' ),\n\t\t'featured_image' => __( 'Featured Image', 'translate_name' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'translate_name' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'translate_name' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'translate_name' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'translate_name' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'translate_name' ),\n\t\t'items_list' => __( 'Items list', 'translate_name' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'translate_name' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'translate_name' ),\n\t);\n\t$args = array(\n 'public' => true,\n\t\t'label' => __( 'Post Type Singular', 'translate_name' ),\n\t\t'description' => __( 'Post Type Description', 'translate_name' ),\n 'labels' => $labels,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu'\t\t\t=> true,\n\t\t'show_in_admin_bar'\t\t=> true,\n\t\t'menu_position'\t\t\t=> 5,\n\t\t// 'menu_icon' \t\t\t=> get_bloginfo('template_directory') . '/images/portfolio-icon.png',\n\t\t'menu_icon'\t\t\t\t=> 'dashicon-groups',\n\t\t'has_archive'\t\t\t=> true,\n\t\t'capability_type'\t\t=> array('book','books'),\n\t\t'capabilities' \t\t\t=> array(\n\t\t\t'edit_post' => 'edit_book', \n\t\t\t'read_post' => 'read_book', \n\t\t\t'delete_post' => 'delete_book', \n\t\t\t'edit_posts' => 'edit_books', \n\t\t\t'edit_others_posts' => 'edit_others_books', \n\t\t\t'publish_posts' => 'publish_books', \n\t\t\t'read_private_posts' => 'read_private_books', \n\t\t\t'create_posts' => 'edit_books', \n\t\t),\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\n\t);\n\tregister_post_type( 'book', $args );\n\n}", "function create_custom_post_types(){\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_company = array(\n\t\t'name' => __('Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Company', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Company', 'threedee-expo'),\n\t\t'new_item' => __('New Company', 'threedee-expo'),\n\t\t'view_item' => __('View Company', 'threedee-expo'),\n\t\t'search_items' => __('Search Companies', 'threedee-expo'),\n\t\t'not_found' => __('No companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Companies', 'threedee-expo'),\n\t\t'archives' => __('Company Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_company = array(\n\t\t'publish_posts' => 'publish_companies',\n\t\t'edit_posts' => 'edit_companies',\n\t\t'edit_others_posts' => 'edit_others_companies',\n\t\t'delete_posts' => 'delete_companies',\n\t\t'delete_others_posts' => 'delete_others_companies',\n\t\t'read_private_posts' => 'read_private_companies',\n\t\t'edit_post' => 'edit_company',\n\t\t'delete_post' => 'delete_company',\n\t\t'read_post' => 'read_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_company = array(\n\t\t'labels' => $args_labels_company,\n\t\t'description' => 'Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'company'),\n\t\t'menu_icon' => 'dashicons-businessman',\n\t\t'capability_type' => 'companies',\n\t\t'capabilities' => $args_capabilities_company,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_group_of_companies = array(\n\t\t'name' => __('Group of Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Group of Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Group of Companies', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Group of Companies', 'threedee-expo'),\n\t\t'new_item' => __('New Group of Companies', 'threedee-expo'),\n\t\t'view_item' => __('View Group of Companies', 'threedee-expo'),\n\t\t'search_items' => __('Search Group of Companies', 'threedee-expo'),\n\t\t'not_found' => __('No Group of Companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No Group of Companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Group of Companies', 'threedee-expo'),\n\t\t'archives' => __('Group of Companies Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_group_of_companies = array(\n\t\t'publish_posts' => 'publish_group_of_companies',\n\t\t'edit_posts' => 'edit_group_of_companies',\n\t\t'edit_others_posts' => 'edit_others_group_of_companies',\n\t\t'delete_posts' => 'delete_group_of_companies',\n\t\t'delete_others_posts' => 'delete_others_group_of_companies',\n\t\t'read_private_posts' => 'read_private_group_of_companies',\n\t\t'edit_post' => 'edit_group_of_company',\n\t\t'delete_post' => 'delete_group_of_company',\n\t\t'read_post' => 'read_group_of_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_group_of_companies = array(\n\t\t'labels' => $args_labels_group_of_companies,\n\t\t'description' => 'Group of Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'group_of_companies'),\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'capability_type' => 'group_of_companies',\n\t\t'capabilities' => $args_capabilities_group_of_companies,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\tregister_post_type( 'companies', $args_company);\n\tregister_post_type( 'group_of_companies',$args_group_of_companies);\n}", "function news_custom_post() {\n $args = array(\n 'public' => true,\n 'label' => 'News',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n 'show_ui' => true,\n 'publicly_queryable' => true,\n 'taxonomies' => array('category', 'post_tag'),\n 'rewrite' => array( 'slug' => 'news' )\n\t\n );\n register_post_type('news', $args);\n}", "function cadastrando_post_type_clientes() {\n\n $nomeSingular = 'Cliente';\n $nomePlural = 'Clientes';\n $descricao = 'Clientes da minha empresa';\n\n $labels = array(\n 'name' => $nomePlural,\n 'name_singular' => $nomeSingular,\n 'add_new_item' => 'Adicionar novo ' . $nomeSingular,\n 'edit_item' => 'Editar ' . $nomeSingular\n );\n\n $supports = array(\n 'title',\n 'editor',\n 'thumbnail'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => $descricao,\n 'public' => true,\n 'menu_icon' => 'dashicons-id-alt',\n 'supports' => $supports\n );\n\n register_post_type( 'cliente', $args);\n}", "function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "function create_posttype() \n {\n register_post_type( 'mist_employee',\n array(\n 'labels' => array(\n 'name' => __( 'Employees' ),\n 'singular_name' => __( 'Employee' )\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'employees'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-businessman'\n )\n );\n register_post_type( 'mist_message',\n array(\n 'labels' => array(\n 'name' => __( 'Person Messages' ),\n 'singular_name' => __( 'Message' ),\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'message'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-testimonial'\n )\n );\n add_post_type_support('mist_message', 'excerpt');\n \n }", "function planoType() {\r\n\t$labels = array(\r\n\t\t'name' => _x('Planos', 'post type general name'),\r\n\t 'singular_name' => _x('Plano', 'post type singular name'),\r\n\t 'add_new' => _x('Adicionar Novo', 'slideshow item'),\r\n\t 'add_new_item' => __('Adicionar Novo Plano'),\r\n\t 'edit_item' => __('Editar Plano'),\r\n\t 'new_item' => __('Novo Plano'),\r\n\t 'view_item' => __('Ver Plano'),\r\n\t 'search_items' => __('Procurar Plano'),\r\n\t 'not_found' => __('Nenhum Plano Encontrado'),\r\n\t 'not_found_in_trash' => __('Nenhum Plano na Lixeira'),\r\n\t 'parent_item_colon' => ''\r\n\t);\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 4,\r\n 'supports' => array('title','editor'),\r\n 'rewrite' => array('slug' => 'plano')\r\n );\r\n\r\n register_post_type( 'plano' , $args ); # registering the new post type\r\n}", "function products_type() {\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n\n $args = array(\n 'label' => 'Productos',\n 'description' => 'Productos de Platzi',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n\n register_post_type('producto', $args);\n}", "function add_my_custom_posttype_smaken(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe smaak toe',\n 'add_new_item' => 'Voeg nieuwe smaak toe',\n 'name' => 'Smaken',\n 'singular_name' => 'Smaak',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije smaken van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-carrot', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n );\n register_post_type( 'smaken', $args ); \n }", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}" ]
[ "0.85713065", "0.8507504", "0.8346772", "0.8311665", "0.8260396", "0.82509744", "0.8213945", "0.8198455", "0.8182247", "0.8178489", "0.8175288", "0.8116956", "0.8096055", "0.8095977", "0.80908006", "0.8090349", "0.80708134", "0.80631447", "0.8057007", "0.804112", "0.80282766", "0.80076975", "0.8003802", "0.8001489", "0.7976903", "0.7976903", "0.7976467", "0.794635", "0.7901641", "0.7810948", "0.7798417", "0.77755654", "0.77747816", "0.7771966", "0.77656025", "0.7754728", "0.77172256", "0.769398", "0.7686712", "0.76841015", "0.76800853", "0.76573", "0.7633265", "0.76286715", "0.76250696", "0.7621496", "0.7616436", "0.7600351", "0.7597508", "0.7552298", "0.7548145", "0.7533635", "0.75291395", "0.7515946", "0.7513173", "0.7506658", "0.75009054", "0.7499127", "0.7484695", "0.7472208", "0.7467623", "0.74574304", "0.74550474", "0.7454685", "0.7451049", "0.7449392", "0.74448353", "0.7439846", "0.7438957", "0.7434441", "0.74327123", "0.7431696", "0.7423696", "0.7419655", "0.74125296", "0.7403553", "0.7400346", "0.73923665", "0.7377957", "0.7354617", "0.73505706", "0.7337408", "0.7315919", "0.73057175", "0.73050237", "0.73009634", "0.72950935", "0.7281986", "0.72763866", "0.7274012", "0.72658783", "0.7265073", "0.7263839", "0.7262491", "0.72480756", "0.7246405", "0.7240788", "0.7238302", "0.72336066", "0.72323775", "0.72236764" ]
0.0
-1
Register Custom Post Type
function cursos_post_type() { $labels = array( 'name' => _x( 'cursos', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'curso', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'cursos', 'text_domain' ), 'name_admin_bar' => __( 'Post Type', 'text_domain' ), 'archives' => __( 'Item Archives', 'text_domain' ), 'attributes' => __( 'Item Attributes', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'Todos os cursos', 'text_domain' ), 'add_new_item' => __( 'Add nova pergunta', 'text_domain' ), 'add_new' => __( 'novo cursoa', 'text_domain' ), 'new_item' => __( 'nova pergunta', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'view_items' => __( 'View Items', 'text_domain' ), 'search_items' => __( 'Search Item', 'text_domain' ), 'not_found' => __( 'não encontrato', 'text_domain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), 'featured_image' => __( 'Featured Image', 'text_domain' ), 'set_featured_image' => __( 'Set featured image', 'text_domain' ), 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ), 'use_featured_image' => __( 'Use as featured image', 'text_domain' ), 'insert_into_item' => __( 'Insert into item', 'text_domain' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), 'filter_items_list' => __( 'Filter items list', 'text_domain' ), ); $args = array( 'label' => __( 'cursos', 'text_domain' ), 'description' => __( 'cursos', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'excerpt'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'cursos_post_type', $args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }", "public function registerCustomPostTypes() {\n\n\n }", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "function register_post_types(){\n }", "function register_post_types(){\n }", "public function register_post(): void\n {\n $args = $this->register_post_type_args();\n register_post_type($this->post_type, $args);\n }", "public static function register_post_types() {}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "public function register_post_types() {\n\n\t}", "public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}", "function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}", "public function register_post_type() {\n\t $args = array(\n\t\t\t'public' => true,\n\t\t\t'label' => 'Questions'\n\t\t);\n\t register_post_type( 'questions', $args );\n\t}", "function register_post_types()\n {\n }", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public function register_post_type()\n {\n $labels = [\n 'name' => _x('Chiro Quizzes', 'post type general name', $this->token),\n 'singular_name' => _x('Chiro Quiz', 'post type singular name', $this->token),\n 'add_new' => _x('Add New', $this->token, $this->token),\n 'add_new_item' => sprintf(__('Add New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'edit_item' => sprintf(__('Edit %s', $this->token), __('Chiro Quiz', $this->token)),\n 'new_item' => sprintf(__('New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'all_items' => sprintf(__('All %s', $this->token), __('Chiro Quizzes', $this->token)),\n 'view_item' => sprintf(__('View %s', $this->token), __('Chiro Quiz', $this->token)),\n 'search_items' => sprintf(__('Search %a', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found' => sprintf(__('No %s Found', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found_in_trash' => sprintf(__('No %s Found In Trash', $this->token), __('Chiro Quizzes', $this->token)),\n 'parent_item_colon' => '',\n 'menu_name' => __('Chiro Quizzes', $this->token)\n ];\n\n $slug = __('chiro-quiz', 'pf_chiro_quiz');\n $custom_slug = get_option('pf_chiro_quiz_slug');\n if ($custom_slug && strlen($custom_slug) > 0 && $custom_slug != '') {\n $slug = $custom_slug;\n }\n\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $slug],\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'supports' => ['title'],\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-admin-quiz'\n ];\n\n register_post_type($this->token, $args);\n }", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }", "function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }", "function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "function register_post_types() {\n\t}", "function register_post_types() {\n\t}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "public function add_custom_post_types() {\n //\n }", "public static function register_post_type()\n {\n\n \t register_post_type( 'books',\n\t\t array(\n\t\t 'labels' => array(\n\t\t 'name' => __( 'Books' ),\n\t\t 'singular_name' => __( 'Books' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => false,\n\t\t )\n\t\t );\n\n }", "protected function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'geopin', 'geopin-post-type' ),\n\t\t\t'singular_name' => __( 'geopin Member', 'geopin-post-type' ),\n\t\t\t'add_new' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'add_new_item' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'edit_item' => __( 'Edit geopin', 'geopin-post-type' ),\n\t\t\t'new_item' => __( 'New geopin', 'geopin-post-type' ),\n\t\t\t'view_item' => __( 'View geopin', 'geopin-post-type' ),\n\t\t\t'search_items' => __( 'Search geopin', 'geopin-post-type' ),\n\t\t\t'not_found' => __( 'No geopins found', 'geopin-post-type' ),\n\t\t\t'not_found_in_trash' => __( 'No geopins in the trash', 'geopin-post-type' ),\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t// 'editor',\n\t\t\t'thumbnail',\n\t\t\t// 'custom-fields',\n\t\t\t// 'revisions',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => $supports,\n\t\t\t'public' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array( 'slug' => 'geopin', ), \n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-admin-site',\n\t\t);\n\n\t\t$args = apply_filters( 'geoPin_post_type_args', $args );\n\n\t\tregister_post_type( $this->post_type, $args );\n\t}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "public function create_post_types() {\n }", "function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}", "public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}", "static function register_post_type ()\n {\n register_post_type(\n 'person',\n array(\n 'labels' => array(\n 'name' => __x( 'People', 'post type general name' ),\n 'singular_name' => __x( 'Person', 'post type singular name' ),\n 'menu_name' => __x( 'People', 'admin menu' ),\n 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ),\n 'add_new' => __x( 'Add New', 'book' ),\n 'add_new_item' => ___( 'Add New Person' ),\n 'new_item' => ___( 'New Person' ),\n 'edit_item' => ___( 'Edit Person' ),\n 'view_item' => ___( 'View Person' ),\n 'all_items' => ___( 'All People' ),\n 'search_items' => ___( 'Search People' ),\n 'parent_item_colon' => ___( 'Parent People:' ),\n 'not_found' => ___( 'No persons found.' ),\n 'not_found_in_trash' => ___( 'No persons found in Trash.' )\n ),\n 'description' => ___( 'Noteworthy people' ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'people' ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ));\n }", "public function create_post_type() {\n\t\t\n \t\tregister_post_type(self::POST_TYPE,\n \t\t\tarray(\n \t\t\t\t'labels' => array(\n \t\t\t\t\t'name' => \"Custom\",\n \t\t\t\t\t'singular_name' => __(ucwords(str_replace(\"_\", \" \", self::POST_TYPE)))\n \t\t\t\t),\n \t\t\t\t'public' => true,\n \t\t\t\t'has_archive' => true,\n \t\t\t\t'description' => __(\"This is WP Custom Post Type\"),\n \t\t\t\t'supports' => array('title', 'editor', 'excerpt','thumbnail','custom-fields'),\n \t\t\t)\n \t\t);\n\n\t\t\tregister_taxonomy(\n\t\t\t\t'custom-category',\n\t\t\t\tself::POST_TYPE,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Category' ),\n\t\t\t\t\t'rewrite' => array( 'slug' => 'custom-category' ),\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function compendium_register_type($slug, $name, $pname, $dicon) {\n $pt_slug = $slug;\n $tax_slug = $slug . '-category';\n\n register_post_type($pt_slug, array(\n 'labels' => array(\n 'name' => $pname,\n 'singular_name' => $name,\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New '.$name,\n 'edit_item' => 'Edit '.$name,\n 'new_item' => 'New '.$name,\n 'view_item' => 'View '.$name,\n 'search_items' => 'Search '.$pname,\n 'not_found' => 'No '.$pname.' found',\n 'not_found_in_trash' => 'No '.$pname.' found in trash',\n ),\n 'public' => true,\n 'menu_position' => 35,\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => $dicon,\n 'rewrite' => array(\n 'slug' => 'resource-center/' . $pt_slug,\n 'with_front' => true\n ),\n ));\n\n register_taxonomy($tax_slug, $pt_slug, array(\n 'labels' => array(\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'hierarchical' => true,\n ));\n}", "public static function register_post_type() {\n\t\tregister_post_type( 'drsa_ad', self::arguments() );\n\t}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }", "function theme_custom_post_type() {\n\tregister_post_type( 'custom_type',\n\n\t\t// Array with all the options for the custom post type\n\t\tarray( 'labels' => array(\n\t\t\t'name'\t\t\t\t\t=> __( 'Custom Types' ), // Name of the custom post type group\n\t\t\t'singular_name'\t\t\t=> __( 'Custom Post' ), // Name of the custom post type singular\n\t\t\t'all_items'\t\t\t\t=> __( 'All Custom Posts' ),\n\t\t\t'add_new' \t\t\t\t=> __( 'Add New' ),\n\t\t\t'add_new_item' \t\t\t=> __( 'Add New Custom Type' ),\n\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ),\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Post Types' ),\n\t\t\t'new_item'\t\t\t\t=> __( 'New Post Type' ),\n\t\t\t'view_item'\t\t\t\t=> __( 'View Post Type' ),\n\t\t\t'search_items'\t\t\t=> __( 'Search Post Type' ),\n\t\t\t'not_found'\t\t\t\t=> __( 'Nothing found in the Database.' ),\n\t\t\t'not_found_in_trash'\t=> __( 'Nothing found in Trash' ),\n\t\t\t'parent_item_colon' \t=> ''\n\t\t\t),\n\n\t\t\t'description' \t\t\t=> __( 'This is the example custom post type' ), // Custom post type description\n\t\t\t'public' \t\t\t\t=> true,\n\t\t\t'publicly_queryable' \t=> true,\n\t\t\t'exclude_from_search' \t=> false,\n\t\t\t'show_ui' \t\t\t\t=> true,\n\t\t\t'query_var' \t\t\t=> true,\n\t\t\t'menu_position' \t\t=> 5, // The order the custom post type appears on the admin menu\n\t\t\t// 'menu_icon' \t\t\t=> get_stylesheet_directory_uri() . '/assets/images/custom-post-icon.png',\n\t\t\t'rewrite'\t\t\t\t=> array( 'slug' => 'custom_type', 'with_front' => false ), // You may specify its url slug\n\t\t\t'has_archive' \t\t\t=> 'custom_type', // You mary rename the slug here\n\t\t\t'capability_type' \t\t=> 'post',\n\t\t\t'hierarchical' \t\t\t=> false,\n\n\t\t\t// Enable post editor support\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'trackbacks',\n\t\t\t\t'custom-fields',\n\t\t\t\t'comments',\n\t\t\t\t'revisions',\n\t\t\t\t'sticky'\n\t\t\t)\n\t\t)\n\t);\n\n\t// This adds your post categories to your custom post type\n\tregister_taxonomy_for_object_type( 'category', 'custom_type' );\n\n\t// This adds your post tags to your custom post type\n\tregister_taxonomy_for_object_type( 'post_tag', 'custom_type' );\n\n}", "function add_custom_post_type() \n {\n // add custom type evenementen\n $labels = array(\n 'name' => _x('Quotes', 'post type general name', $this->localization_domain),\n 'singular_name' => _x('Quote', 'post type singular name', $this->localization_domain),\n 'add_new' => _x('Add Quote', 'event', $this->localization_domain),\n 'add_new_item' => __('Add New Quote', $this->localization_domain),\n 'edit_item' => __('Edit Quote', $this->localization_domain),\n 'new_item' => __('New Quote', $this->localization_domain),\n 'view_item' => __('View Quote', $this->localization_domain),\n 'search_items' => __('Search Quotes', $this->localization_domain),\n 'not_found' => __('No Quotes found', $this->localization_domain),\n 'not_found_in_trash' => __('No Quotes found in Trash', $this->localization_domain), \n 'parent_item_colon' => ''\n );\n $type_args = array(\n 'labels' => $labels,\n 'description' => __('bbQuotations offers a simple quotes custom post type. Useful for pull quotes or just random quotes on your site.',\n $this->localization_domain),\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => $this->options['bbquotations-slug']),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 5,\n 'supports' => array('title','editor','author')\n ); \n register_post_type( $this->custom_post_type_name, $type_args);\n }", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "function food_specials_custompost() {\r\n\t$args = array(\r\n\t\t'label' => 'Daily Food Specials',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'capability_type' => 'post',\r\n\t\t'rewrite' => array('slug' => 'food_specials'),\r\n\t\t'query_var' => true,\r\n\t\t'supports' => array(\r\n\t\t\t'title', 'editor', 'excerpt', 'comments', 'thumbnail', 'author',)\r\n\t\t);\r\n\tregister_post_type('food_specials', $args);\r\n}", "public function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Movies', 'Post type general name', 'plugintest' ),\n\t\t\t'singular_name' => _x( 'Movie', 'Post type singular name', 'plugintest' ),\n\t\t\t'menu_name' => _x( 'Movies', 'Admin Menu text', 'plugintest' ),\n\t\t\t'name_admin_bar' => _x( 'Movie', 'Admin Menu Toolbar text', 'plugintest' ),\n\t\t\t'add_new' => __( 'Add New', 'plugintest' ),\n\t\t\t'add_new_item' => __( 'Add New Movie', 'plugintest' ),\n\t\t\t'new_item' => __( 'Aaaaaa', 'plugintest' ),\n\t\t\t'view_item' => __( 'View Movie', 'plugintest' ),\n\t\t\t'edit_item' => __( 'Edit Movie', 'plugintest' ),\n\t\t\t'all_items' => __( 'All Movies', 'plugintest' ),\n\t\t\t'search_items' => __( 'Search Movies', 'plugintest' ),\n\t\t\t'parent_item_colon' => __( 'Parent Movies', 'plugintest' ),\n\t\t\t'not_found' => __( 'No Movies found.', 'plugintest' ),\n\t\t\t'not_found_in_trash' => __( 'No Movies found in Trash.', 'plugintest' ),\n\t\t\t'featured_image' => _x( 'Movie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'item_published' => __( 'New Movie Published.', 'plugintest' ),\n\t\t\t'item_updated' => __( 'Movie post updated.', 'plugintest' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'movie' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => false,\n\t\t\t'has_archive' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t\t'taxonomies' => array( 'category', 'post_tag' ), // Using wordpess category and tags.\n\t\t);\n\n\t\tregister_post_type( 'movie', $args );\n\t\tflush_rewrite_rules();\n\n\t\t$category_labels = array(\n\t\t\t'name' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'singular_name' => esc_html__( 'Movie Category', 'plugintest' ),\n\t\t\t'all_items' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => esc_html__( 'Edit Category', 'plugintest' ),\n\t\t\t'update_item' => esc_html__( 'Update Category', 'plugintest' ),\n\t\t\t'add_new_item' => esc_html__( 'Add New Movie Category', 'plugintest' ),\n\t\t\t'new_item_name' => esc_html__( 'New Movie Name', 'plugintest' ),\n\t\t\t'menu_name' => esc_html__( 'Genre', 'plugintest' ),\n\t\t\t'search_items' => esc_html__( 'Search Categories', 'plugintest' ),\n\t\t);\n\n\t\t$category_args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'labels' => $category_labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t\t);\n\n\t\tregister_taxonomy( 'genre', array( self::$post_type ), $category_args );\n\t}", "public function register_post_type()\n\t{\n\n\t\tregister_post_type( 'partner', array(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x( 'Partners', 'post type general name', 'custom-post-type-partners' ),\n\t\t\t\t'singular_name' => _x( 'Partner', 'post type singular name', 'custom-post-type-partners' ),\n\t\t\t\t'add_new' => _x( 'Add New', 'Partner', 'custom-post-type-partners' ),\n\t\t\t\t'add_new_item' => __( 'Add New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'edit_item' => __( 'Edit Partner', 'custom-post-type-partners' ),\n\t\t\t\t'new_item' => __( 'New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'all_items' => __( 'All Partners', 'custom-post-type-partners' ),\n\t\t\t\t'view_item' => __( 'View Partner', 'custom-post-type-partners' ),\n\t\t\t\t'search_items' => __( 'Search Partners', 'custom-post-type-partners' ),\n\t\t\t\t'not_found' => __( 'No Partners found', 'custom-post-type-partners' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Partners found in Trash', 'custom-post-type-partners' ),\n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => __( 'Partners', 'custom-post-type-partners' )\n\t\t\t),\n\t\t\t'public' => TRUE,\n\t\t\t'publicly_queryable' => TRUE,\n\t\t\t'show_ui' => TRUE,\n\t\t\t'show_in_menu' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => TRUE,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => FALSE,\n\t\t\t'hierarchical' => FALSE,\n\t\t\t'menu_position' => NULL,\n\t\t\t'menu_icon' => 'dashicons-admin-links',\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' )\n\t\t) );\n\n\t}", "public function customPostType()\n {\n\n if (empty($this->custom_post_types)) {\n return;\n }\n\n foreach ($this->custom_post_types as $post_type) {\n register_post_type(\n $post_type['post_type'],\n [\n 'labels' => [\n 'name' => __($post_type['name'], 'vrcoder'),\n 'singular_name' => __($post_type['singular_name'], 'vrcoder'),\n 'menu_name' => __($post_type['name'], 'vrcoder'),\n 'name_admin_bar' => __($post_type['singular_name'], 'vrcoder'),\n 'archives' => __($post_type['singular_name'] . ' Archives', 'vrcoder'),\n 'attributes' => __($post_type['singular_name'] . ' Attributes', 'vrcoder'), \n 'parent_item_colon' => __('Parent ' . $post_type['singular_name'], 'vrcoder'),\n 'all_items' => __('All ' . $post_type['name'], 'vrcoder'),\n 'add_new_item' => __('Add new ' . $post_type['singular_name'], 'vrcoder'),\n 'add_new' => __('Add new', 'vrcoder'),\n 'new_item' => __('New ' . $post_type['singular_name'], 'vrcoder'),\n 'edit_item' => __('Edit ' . $post_type['singular_name'], 'vrcoder'),\n 'update_item' => __('Update' . $post_type['singular_name'], 'vrcoder'),\n 'view_item' => __('View' . $post_type['singular_name'], 'vrcoder'),\n 'view_items' => __('View' . $post_type['name'], 'vrcoder'),\n 'search_items' => __('Search' . $post_type['name'], 'vrcoder'),\n 'not_found' => __('No' . $post_type['singular_name'] . ' Found', 'vrcoder'),\n 'not_found_in_trash' => __('No' . $post_type['singular_name'] . ' Found in Trash', 'vrcoder'),\n 'featured_image' => __('Featured Image', 'vrcoder'),\n 'set_featured_image' => __('Set Featured Image', 'vrcoder'),\n 'remove_featured_image' => __('Remove Featured Image', 'vrcoder'),\n 'use_featured_image' => __('Use Featured Image', 'vrcoder'),\n 'insert_into_item' => __('Insert into' . $post_type['singular_name'], 'vrcoder'),\n 'uploaded_to_this_item' => __('Upload to this' . $post_type['singular_name'], 'vrcoder'),\n 'items_list' => __($post_type['name'] . ' List', 'vrcoder'),\n 'items_list_navigation' => __($post_type['name'] . ' List Navigation', 'vrcoder'),\n 'filter_items_list' => __('Filter' . $post_type['name'] . ' List', 'vrcoder'),\n ],\n 'label' => __($post_type['singular_name'], 'vrcoder'),\n 'description' => __($post_type['name'] . ' Custom Post Type', 'vrcoder'),\n 'supports' => $post_type['supports'],\n 'show_in_rest' => $post_type['show_in_rest'],\n 'taxonomies' => $post_type['taxonomies'],\n 'hierarchical' => $post_type['hierarchical'],\n 'public' => $post_type['public'],\n 'show_ui' => $post_type['show_ui'],\n 'show_in_menu' => $post_type['show_in_menu'],\n 'menu_position' => $post_type['menu_position'],\n 'show_in_admin_bar' => $post_type['show_in_admin_bar'],\n 'show_in_nav_menus' => $post_type['show_in_nav_menus'],\n 'can_export' => $post_type['can_export'],\n 'has_archive' => $post_type['has_archive'],\n 'exclude_from_search' => $post_type['exclude_from_search'],\n 'publicly_queryable' => $post_type['publicly_queryable'],\n 'capability_type' => $post_type['capability_type'],\n 'menu_icon' => $post_type['menu_icon']\n ]\n );\n }\n\n }", "public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }", "function pluginprefix_setup_post_type()\n{\n register_post_type('post-nasa-gallery', [\n 'label' => 'Nasa Images Posts',\n 'public' => true\n ]);\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public function register_post_types() {\n require_once('includes/post-types.php');\n }", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}", "public static function register_type() {\n\t\tregister_graphql_object_type(\n\t\t\t'PostTypeLabelDetails',\n\t\t\t[\n\t\t\t\t'description' => __( 'Details for labels of the PostType', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'name' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'General name for the post type, usually plural.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'singularName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Name for one object of this post type.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->singular_name ) ? $labels->singular_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNew' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Default is ‘Add New’ for both hierarchical and non-hierarchical types.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new ) ? $labels->add_new : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for adding a new singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new_item ) ? $labels->add_new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'editItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for editing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->edit_item ) ? $labels->edit_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'newItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the new item page title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->new_item ) ? $labels->new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_item ) ? $labels->view_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing post type archives.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_items ) ? $labels->view_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'searchItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for searching plural items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->search_items ) ? $labels->search_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFound' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are found.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found ) ? $labels->not_found : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFoundInTrash' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are in the trash.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found_in_trash ) ? $labels->not_found_in_trash : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'parentItemColon' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used to prefix parents of hierarchical items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->parent_item_colon ) ? $labels->parent_item_colon : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'allItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label to signify all items in a submenu link.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->all_items ) ? $labels->all_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'archives' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for archives in nav menus', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the attributes meta box.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'insertIntoItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame button.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->insert_into_item ) ? $labels->insert_into_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'uploadedToThisItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame filter.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->uploaded_to_this_item ) ? $labels->uploaded_to_this_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'featuredImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the Featured Image meta box title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->featured_image ) ? $labels->featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'setFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for setting the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->set_featured_image ) ? $labels->set_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'removeFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for removing the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->remove_featured_image ) ? $labels->remove_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'useFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label in the media frame for using a featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->use_featured_item ) ? $labels->use_featured_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'menuName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the menu name.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->menu_name ) ? $labels->menu_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'filterItemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table views hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->filter_items_list ) ? $labels->filter_items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsListNavigation' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table pagination hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list_navigation ) ? $labels->items_list_navigation : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list ) ? $labels->items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function cptui_register_my_cpts_how_it_works() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"How it Work\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"how_it_works\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"how_it_works\", $args );\n}", "function add_my_custom_posttype_waarden(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe waarde toe',\n 'add_new_item' => 'Voeg nieuwe waarde toe',\n 'name' => 'waarden',\n 'singular_name' => 'waarden',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'waarden van Ben & Jerry',\n 'public' => true,\n 'menu_position' => 6,\n 'menu_icon' => 'dashicons-layout', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n \n );\n register_post_type( 'waarden', $args ); \n }", "function custom_post_type() {\n $labels = array(\n 'name' => _x( 'Ort', 'Post Type General Name', 'twentythirteen' ),\n 'singular_name' => _x( 'Ort', 'Post Type Singular Name', 'twentythirteen' ),\n 'menu_name' => __( 'Orter', 'twentythirteen' ),\n 'all_items' => __( 'Alla Orter', 'twentythirteen' ),\n 'view_item' => __( 'View Ort', 'twentythirteen' ),\n 'add_new_item' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'add_new' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'edit_item' => __( 'Redigera Ort', 'twentythirteen' ),\n 'update_item' => __( 'Upddatera Ort', 'twentythirteen' ),\n 'search_items' => __( 'Sök Ort', 'twentythirteen' ),\n 'not_found' => __( 'Not Found', 'twentythirteen' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n );\n \n $args = array(\n 'label' => __( 'cities', 'twentythirteen' ),\n 'description' => __( 'City Post Page', 'twentythirteen' ),\n 'labels' => $labels,\n 'supports' => array('title','thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n register_post_type( 'cities', $args );\n\n }", "function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}", "function add_custom_post_type() {\n\tregister_post_type( 'learning_resource',\n array(\n 'labels' => array(\n 'name' => __( 'Learning Resources' ),\n 'singular_name' => __( 'Learning Resource' )\n ),\n 'public' => true,\n 'has_archive' => true,\n )\n );\n}", "static function register() {\n // register the post type\n register_post_type('sale-flat', array(\n\t\t\n\t\t\t'labels'=> array(\n\t\t\t\t'name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'singular_name' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'menu_name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'name_admin_bar' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new' => _x( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new_item' => __( 'Új eladó ingatlan hozzáadása', 'theme-phrases' ),\n\t\t\t\t'new_item' => __( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'edit_item' => __( 'Eladó ingatlan szerkesztése', 'theme-phrases' ),\n\t\t\t\t'view_item' => __( 'Eladó ingatlan megtekintése', 'theme-phrases' ),\n\t\t\t\t'all_items' => __( 'Összes eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'search_items' => __( 'Eladó ingatlan keresése', 'theme-phrases' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent eladó ingatlan:', 'theme-phrases' ),\n\t\t\t\t'not_found' => __( 'Nincsenek eladó ingatlanok.', 'theme-phrases' ),\n\t\t\t\t'not_found_in_trash' => __( 'Nincsenek eladó ingatlanok a kukában.', 'theme-phrases' )\n\t\t\t),\n 'description' => __('Eladó ingatlanok', 'theme-phrases'),\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'public' => true,\n 'show_ui' => true,\n 'auto-draft' => false,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'menu_position' => 4,\n 'menu_icon'\t=> 'dashicons-tag',\n 'revisions' => false,\n 'hierarchical' => true,\n 'has_archive' => true,\n\t\t\t'supports' => array('title','editor','thumbnail'),\n 'rewrite' => false,\n 'can_export' => false,\n 'capabilities' => array (\n 'create_posts' => 'edit_posts',\n 'edit_post' => 'edit_posts',\n 'read_post' => 'edit_posts',\n 'delete_posts' => 'edit_posts',\n 'delete_post' => 'edit_posts',\n 'edit_posts' => 'edit_posts',\n 'edit_others_posts' => 'edit_posts',\n 'publish_posts' => 'edit_posts',\n 'read_private_posts' => 'edit_posts',\n ),\n 'register_meta_box_cb' => array('SaleFlatPostType', 'add_metabox') \n ));\n }", "public function register_content_type() {\n\t\t$labels = array(\n\t\t\t'name' => 'Honor Rolls',\n\t\t\t'singular_name' => 'Honor Roll',\n\t\t\t'add_new' => 'Add New',\n\t\t\t'add_new_item' => 'Add New Honor Roll',\n\t\t\t'edit_item' => 'Edit Honor Roll',\n\t\t\t'new_item' => 'New Honor Roll',\n\t\t\t'all_items' => 'All Honor Rolls',\n\t\t\t'view_item' => 'View Honor Rolls',\n\t\t\t'search_items' => 'Search Honor Rolls',\n\t\t\t'not_found' => 'No Honor Rolls found',\n\t\t\t'not_found_in_trash' => 'No Honor Rolls found in Trash',\n\t\t\t'menu_name' => 'Honor Rolls',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'supports' => array( 'title' ),\n\t\t);\n\t\tregister_post_type( $this::$content_type_slug, $args );\n\t}", "public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }", "function wpcp_custom_post_type()\n{\n register_post_type('wpcp_server',\n array(\n 'labels' => array(\n 'name' => __('Servers', 'textdomain'),\n 'singular_name' => __('Server', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => false,\n 'delete_with_user' => false,\n \"supports\" => array(\"customer\", \"author\"),\n 'menu_icon' => 'dashicons-cloud'\n )\n );\n}", "function create_post_type(){\n register_post_type('recipes', [ \n 'labels' => [\n 'name' => 'Recipes', //Etikett i plural Etikett i singular\n 'singular_name' => 'Recipe', //Vad som ska stå i ”Lägg till...” knappen\n 'add_new' => 'New Recipe', //Vad som ska stå i ”Lägg till ny...” knappen\n 'add_new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'edit_item' => 'Edit Recipe', //Vad som ska stå i ”Redigera...” länken\n 'new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'search_items' => 'Search for Recipe', //Vad som ska stå i sökrutan i listningen\n 'not_found' => 'No Recipe Found', \n 'all_items' => 'All Recipes', //Vad som ska stå i ”Alla...” länken\n ],\n 'supports' => array( 'thumbnail' ),\n 'description' => 'The Big Tasty!', //En kort beskrivning av posttypen\n 'public' => true, //Om och hur posttypen ska visas för olika användare\n 'exclude_from_search' => false, //Om posttypens poster ska exkluderas vid sökning\n 'show_ui' => true, //Om posttypen ska kunna hanteras från admin\n 'show_in_nav_menus' => true, //Om poster av posttypen ska kunna läggas till i menyer\n 'show_in_menu' => true, //Vart posttypen ska listas i admin (vänster eller topp)\n 'show_in_admin_bar' => true, //Om posttypen ska visas i toppbar’en\n 'menu_position' => 10, //Vart i vänstermenyn posttypen ska visas\n 'hierarchical' => false, //Om poster i posttypen ska kunna ha föräldrar, likt Sidor\n 'menu_icon' => 'dashicons-food', //Ikon för posttypen\n 'supports' => array('title' , 'editor'), //Vad som ska synas när man skapar/redigerar en post \n 'taxonomies' => array('category'), //Vilka taxonomier som ska tillhöra posttypen\n 'has_archive' => true, //Om posttypen ska ha arkivsida\n 'rewrite' => [ //Hur posttypens rewrites ska hanteras...\n 'slug' => 'recipe', //Permalänkstrukturen för posttypen\n 'with_front' => true //Om permalänkarna ska låta föregås av sluggen\n ] \n ]);\n\n}", "function create_post_type() {\n\n // register external_post as a Custom Post Type\n register_post_type( 'external_post', \n array( \n 'labels' => array( \n 'name' => __('External Posts'), \n 'singular_name' => __('External Post') \n ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array('title', 'excerpt'),\n 'rewrite' => array('slug' => 'external','with_front' => false) \n ) \n ); \n\n // connect external_post to category taxonomy\n register_taxonomy_for_object_type('category', 'external_post');\n register_taxonomy_for_object_type('post_tag', 'external_post');\n\n\n // register wp_tool as a Custom Post Type\n register_post_type('wp_tool',\n array( \n 'labels' => array( \n 'name' => __('WordPress Tools'), \n 'singular_name' => __('WordPress Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'tool','with_front' => false) \n ) \n );\n\n // connect wp_tool to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'wp_tool');\n register_taxonomy_for_object_type('category', 'wp_tool');\n\n\n // reregister default post so we can set a custom slug\n register_post_type('post', array(\n 'labels' => array(\n 'name_admin_bar' => _x('Post', 'add new on admin bar' ),\n ),\n 'public' => true,\n '_builtin' => false, \n '_edit_link' => 'post.php?post=%d', \n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'show_in_menu' => false,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'article'),\n 'query_var' => false,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats', 'column_info'),\n )); \n\n // register external_tool as a Custom Post Type\n register_post_type('external_tool',\n array(\n 'labels' => array( \n 'name' => __('External Tools'), \n 'singular_name' => __('External Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'special','with_front' => false) \n ) \n ); \n\n // connect external_tool to category taxonomy\n register_taxonomy_for_object_type('category', 'external_tool');\n register_taxonomy_for_object_type('meta_info', 'external_tool');\n\n\n // register city_journal as a Custom Post Type\n register_post_type('city_journal',\n array(\n 'labels' => array( \n 'name' => __('CityJournal Entry'),\n 'singular_name' => __('CityJournal Entry')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'cityjournal','with_front' => false) \n ) \n ); \n\n // connect city_journal to category taxonomy\n register_taxonomy_for_object_type('category', 'city_journal');\n register_taxonomy_for_object_type('meta_info', 'city_journal'); \n\n\n // register people_project as a Custom Post Type\n register_post_type('people_project',\n array(\n 'labels' => array( \n 'name' => __('People & Projects'),\n 'singular_name' => __('People & Project')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'excerpt', 'thumbnail', 'meta_info'),\n ) \n ); \n\n // connect people_project to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'people_project'); \n\n\n register_post_type('discussion',\n array( \n 'labels' => array( \n 'name' => __('Discussions'), \n 'singular_name' => __('Discussion') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'discussion','with_front' => false) \n ) \n );\n\n // connect discussion to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'discussion');\n register_taxonomy_for_object_type('category', 'discussion');\n\n}", "function bs_configure_custom_post_types($args)\n{\n function bs_custom_post_types()\n {\n global $bs_config;\n\n foreach ($bs_config[\"custom-post-types\"] as $key => $type) {\n $type = bs_defaults($type, [\n \"public\" => true,\n ]);\n\n if (isset($type[\"name\"])) {\n $type[\"labels\"][\"name\"] = $type[\"name\"];\n }\n\n if (isset($type[\"slug\"])) {\n $type[\"rewrite\"][\"slug\"] = $type[\"slug\"];\n }\n\n if (isset($type[\"admin_only\"]) && $type[\"admin_only\"]) {\n $type[\"public\"] = false;\n $type[\"show_ui\"] = true;\n }\n\n register_post_type($key, bs_array_omit($type, [\"slug\", \"name\", \"admin_only\"]));\n }\n }\n add_action(\"init\", \"bs_custom_post_types\");\n}", "function add_my_custom_posttype_recepten(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuw recept toe',\n 'add_new_item' => 'Voeg nieuw recept toe',\n 'name' => 'Recepten',\n 'singular_name' => 'recept',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije recepten van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-book-alt', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'comments'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-recepten.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n\n );\n\n register_post_type( 'recepten', $args ); \n \n }", "function create_post_type() {\r\n register_post_type( 'nyheter',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Nyheter' ),\r\n 'singular_name' => __( 'Nyheter' )\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail')\r\n )\r\n );\r\n}", "function zmpm_register_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => 'Permissions',\n\t\t'singular_name' => 'Permission',\n\t\t'menu_name' => 'Permissions',\n\t\t'name_admin_bar' => 'Permission',\n\t\t'archives' => 'Permission Archives',\n\t\t'attributes' => 'Permission Attributes',\n\t\t'parent_item_colon' => 'Parent Permission:',\n\t\t'all_items' => 'Permissions',\n\t\t'add_new_item' => 'Add New Permission',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Permission',\n\t\t'edit_item' => 'Edit Permission',\n\t\t'update_item' => 'Update Permission',\n\t\t'view_item' => 'View Permission',\n\t\t'view_items' => 'View Permissions',\n\t\t'search_items' => 'Search Permission',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not Found in Trash',\n\t\t'featured_image' => 'Featured Image',\n\t\t'set_featured_image' => 'Set featured image',\n\t\t'remove_featured_image' => 'Remove featured image',\n\t\t'use_featured_image' => 'Use as featured image',\n\t\t'insert_into_item' => 'Insert into permission',\n\t\t'uploaded_to_this_item' => 'Uploaded to this permission',\n\t\t'items_list' => 'Permissions list',\n\t\t'items_list_navigation' => 'Permissions list navigation',\n\t\t'filter_items_list' => 'Filter permissions list',\n\t);\n\t$args = array(\n\t\t'label' => 'Permission',\n\t\t'description' => 'ZingMap permissions',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'users.php',\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-lock',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'zmpm_permission', $args );\n\t\n}", "public function register_estate_post_type() {\r\n $options = get_option( 'myhome_redux' );\r\n // define post type slug\r\n if ( ! empty( $options['mh-estate-slug'] ) ) {\r\n $slug = $options['mh-estate-slug'];\r\n } else {\r\n $slug = 'properties';\r\n }\r\n\r\n register_post_type( 'estate', array(\r\n 'labels' => array(\r\n 'name'\t\t\t => esc_html__( 'Properties', 'myhome-core' ),\r\n 'singular_name'\t => esc_html__( 'Property', 'myhome-core' ),\r\n 'menu_name' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'name_admin_bar' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new_item' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'new_item' => esc_html__( 'New Property', 'myhome-core' ),\r\n 'edit_item' => esc_html__( 'Edit Property', 'myhome-core' ),\r\n 'view_item' => esc_html__( 'View Property', 'myhome-core' ),\r\n 'all_items' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'search_items' => esc_html__( 'Search property', 'myhome-core' ),\r\n 'not_found' => esc_html__( 'No Property Found found.', 'myhome-core' ),\r\n 'not_found_in_trash' => esc_html__( 'No Property found in Trash.', 'myhome-core' )\r\n ),\r\n 'show_in_rest' => true,\r\n 'query_var' => true,\r\n 'public'\t\t => true,\r\n 'has_archive'\t => true,\r\n 'menu_position' => 21,\r\n 'menu_icon' => 'dashicons-admin-home',\r\n 'capability_type' => array( 'estate', 'estates' ),\r\n 'map_meta_cap' => true,\r\n 'rewrite'\t\t => array( 'slug' => $slug ),\r\n 'supports'\t\t => array(\r\n 'title',\r\n 'author',\r\n 'editor',\r\n 'thumbnail',\r\n )\r\n ) );\r\n }", "function create_volunteer_custom_post() {\n register_post_type( 'volunteers',\n array(\n 'labels' => array(\n 'name' => __( 'Board Members' ),\n 'singular_name' => __( 'Board Member' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields'\n )\n ));\n}", "public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }", "public function register_post_type()\n\t{\n\n\t\tregister_taxonomy( $this->post_type_name . '_words', $this->post_type_name, array(\n\t\t\t'label' => 'Words',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Word',\n\t\t\t\t'menu_name' => 'Words',\n\t\t\t\t'all_items' => 'All words',\n\t\t\t\t'edit_item' => 'Edit word',\n\t\t\t\t'view_item' => 'View word',\n\t\t\t\t'update_item' => 'View word',\n\t\t\t\t'add_new_item' => 'Add word',\n\t\t\t\t'new_item_name' => 'New word',\n\t\t\t\t'search_items' => 'Search words',\n\t\t\t\t'popular_items' => 'Popular words',\n\t\t\t\t'separate_items_with_commas' => 'Separate words with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove words',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used words',\n\t\t\t\t'not_found' => 'No words found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => FALSE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'word',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\tregister_taxonomy( $this->post_type_name . '_partsofspeech', $this->post_type_name, array(\n\t\t\t'label' => 'Parts of Speech',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Part of Speech',\n\t\t\t\t'menu_name' => 'Parts of Speech',\n\t\t\t\t'all_items' => 'All parts of speech',\n\t\t\t\t'edit_item' => 'Edit part of speech',\n\t\t\t\t'view_item' => 'View part of speech',\n\t\t\t\t'update_item' => 'View part of speech',\n\t\t\t\t'add_new_item' => 'Add part of speech',\n\t\t\t\t'new_item_name' => 'New part of speech',\n\t\t\t\t'search_items' => 'Search parts of speech',\n\t\t\t\t'popular_items' => 'Popular parts of speech',\n\t\t\t\t'separate_items_with_commas' => 'Separate parts of speech with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove parts of speech',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used parts of speech',\n\t\t\t\t'not_found' => 'No parts of speech found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'partofspeech',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\t// register the damn post type already\n\t\tregister_post_type( \n\t\t\t$this->post_type_name,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Definitions',\n\t\t\t\t\t'singular_name' => 'Definition',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Definition',\n\t\t\t\t\t'edit_item' => 'Edit Definition',\n\t\t\t\t\t'new_item' => 'New Definition',\n\t\t\t\t\t'all_items' => 'All Definitions',\n\t\t\t\t\t'view_item' => 'View Definitions',\n\t\t\t\t\t'search_items' => 'Search Definitions',\n\t\t\t\t\t'not_found' => 'No definitions found',\n\t\t\t\t\t'not_found_in_trash' => 'No definitions found in Trash',\n\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t'menu_name' => 'Definitions',\n\t\t\t\t),\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'trackbacks',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'has_archive' => 'definitions',\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'define',\n\t\t\t\t\t'with_front' => FALSE,\n\t\t\t\t),\n\t\t\t\t'register_meta_box_cb' => array( $this, 'metaboxes' ),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'taxonomies' => array(\n\t\t\t\t\t$this->post_type_name . '_partsofspeech',\n\t\t\t\t\t$this->post_type_name . '_words',\n\t\t\t\t),\n\t\t\t\t'menu_position' => 5,\n\t\t\t)\n\t\t);\n\t}", "function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}", "public function createPostTypes()\n {\n }", "function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}", "protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }", "function register_type( $post_type_singular, $post_type_plural, $options = array() ) {\n\n\t$text_domain = 'sgdf';\n\n\t$labels = array(\n\t\t'name' => _x( ucwords( $post_type_plural ), 'post type general name', $text_domain ),\n\t\t'singular_name' => _x( ucwords( $post_type_singular ), 'post type singular name', $text_domain ),\n\t\t'menu_name' => _x( ucwords( $post_type_plural ), 'admin menu', $text_domain ),\n\t\t'name_admin_bar' => _x( ucwords( $post_type_singular ), 'add new on admin bar', $text_domain ),\n\t\t'add_new' => _x( 'Add New', 'book', $text_domain ),\n\t\t'add_new_item' => __( 'Add New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'new_item' => __( 'New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'edit_item' => __( 'Edit ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'view_item' => __( 'View ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'all_items' => __( 'All ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'search_items' => __( 'Search ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'parent_item_colon' => __( 'Parent ' . ucwords( $post_type_plural ) . ':', $text_domain ),\n\t\t'not_found' => __( 'No ' . $post_type_plural . ' found.', $text_domain ),\n\t\t'not_found_in_trash' => __( 'No ' . $post_type_plural . ' found in Trash.', $text_domain )\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => $post_type_singular ),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'menu_icon' \t => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t);\n\n\tforeach ($options as $key => $option) {\n\t\t$args[$key] = $option;\n\t}\n\n\treturn register_post_type( $post_type_singular, $args );\n}", "public function register() {\r\n add_action('post_updated', array($this, 'save_meta'), null, 2 );\r\n\r\n $original_config = $this->get_config();\r\n // push it through a filter so a theme can change the terminology\r\n $filtered_config = apply_filters('ah-wp-dl-res-config',$original_config);\r\n register_post_type(self::POST_TYPE, $filtered_config);\r\n\r\n register_taxonomy(self::POST_TYPE . '_cat',\r\n array(self::POST_TYPE),\r\n array('hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => __( 'Categories' ),\r\n 'singular_name' => __( 'Category' ),\r\n 'search_items' => __( 'Search Categories' ),\r\n 'all_items' => __( 'All Categories' ),\r\n 'parent_item' => __( 'Parent Category' ),\r\n 'parent_item_colon' => __( 'Parent Category:' ),\r\n 'edit_item' => __( 'Edit Category' ),\r\n 'update_item' => __( 'Update Category' ),\r\n 'add_new_item' => __( 'Add New Category' ),\r\n 'new_item_name' => __( 'New Category Name')\r\n ),\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'documents/categories' ),\r\n )\r\n );\r\n }", "function stock_toolkit_custom_post()\n\t{\n\tregister_post_type('slide', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Slides') ,\n\t\t\t'singular_name' => __('Slide')\n\t\t) ,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'custom-fields',\n\t\t\t'thumbnail',\n\t\t\t'page-attributes'\n\t\t) ,\n\t\t'public' => false,\n\t\t'show_ui' => true\n\t));\n\t}", "function testimonials_register_post_type() {\n\n $labels = [\n 'name' => __('Testimonials'),\n 'singular_name' => __('Testimonial'),\n 'add_new' => __('Add new', 'Testimonials'),\n 'add_new_item' => __('Add new Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_item' => __('Search Testimonials'),\n 'not_found' => __('No Testimonial found'),\n 'not_found_in_trash' => __('No Testimonial found in trash'),\n 'parent_item_colon' => ''\n ];\n\n register_post_type(TESTIMONIAL_TYPE, [\n 'labels' => $labels,\n 'public' => true,\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'hierarchical' => false,\n 'supports' => ['title', 'editor', 'custom-fields']\n ]);\n\n register_taxonomy_for_object_type(CRAFT_TAX_NAME, TESTIMONIAL_TYPE);\n}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function register_location_content_type(){\n\t\t //Labels for post type\n\t\t $labels = array(\n 'name' => 'Add Portfolio',\n 'singular_name' => 'Portfolio',\n 'menu_name' => 'Add Portfolio',\n 'name_admin_bar' => 'Add Portfolio',\n 'add_new' => 'Add New', \n 'add_new_item' => 'Add New Portfolio Item',\n 'new_item' => 'New Portfolio Item', \n 'edit_item' => 'Edit Portfolio Item',\n 'view_item' => 'View Portfolio Item',\n 'all_items' => 'All Portfolio Items',\n 'search_items' => 'Search Portfolio Items',\n 'parent_item_colon' => 'Parent Portfolio Item: ', \n 'not_found' => 'No Portfolio Items found.', \n 'not_found_in_trash' => 'No Portfolio Items found in Trash.',\n );\n //arguments for post type\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable'=> true,\n 'show_ui' => true,\n 'show_in_nav' => true,\n 'query_var' => true,\n 'hierarchical' => false,\n 'supports' => array('title','thumbnail','editor'),\n 'has_archive' => true,\n 'menu_position' => 20,\n 'show_in_admin_bar' => true,\n 'menu_icon' => 'dashicons-location-alt',\n 'rewrite'\t\t\t=> array('slug' => 'locations', 'with_front' => 'true')\n );\n //register post type\n register_post_type('wp_locations', $args);\n\t}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}", "function humcore_register_post_type() {\n\n\t// Define the labels to be used by the post type humcore_deposits.\n\t$labels = array(\n\t\t// 'name' => _x( 'HumCORE Deposits', 'post type general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Deposit', 'post type singular name', 'humcore_domain' ),\n\t\t'menu_name' => _x( 'HumCORE Deposits', 'admin menu', 'humcore_domain' ),\n\t\t'name_admin_bar' => _x( 'Deposit', 'add new on admin bar', 'humcore_domain' ),\n\t\t'add_new' => _x( 'Add New', 'add new', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Deposits', 'humcore_domain' ),\n\t\t'new_item' => __( 'New Deposit', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Deposit', 'humcore_domain' ),\n\t\t'view_item' => __( 'View Deposit', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Deposits', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Deposits', 'humcore_domain' ),\n\t\t'not_found' => __( 'No Deposits found', 'humcore_domain' ),\n\t\t'not_found_in_trash' => __( 'No Deposits found in Trash', 'humcore_domain' ),\n\t\t'parent_item_colon' => '',\n\t);\n\n\t$post_type_args = array(\n\t\t'label' => __( 'HumCORE Deposits', 'humcore_domain' ),\n\t\t'labels' => $labels,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'humcore_deposit',\n\t\t\t'with_front' => true,\n\t\t),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => false,\n\t\t'hierarchical' => true,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'author', 'excerpt' ),\n\t\t// 'supports' => array( 'title', 'author', 'excerpt', 'custom-fields', revisions', 'page-attributes' ),\n\t\t'register_meta_box_cb' => 'humcore_add_post_type_metabox',\n\t);\n\n\tregister_post_type( 'humcore_deposit', $post_type_args );\n}", "public static function register_type() {\n\n\t\tregister_graphql_enum_type(\n\t\t\t'ContentNodeIdTypeEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t'values' => self::get_values(),\n\t\t\t]\n\t\t);\n\n\t\t$allowed_post_types = \\WPGraphQL::get_allowed_post_types();\n\t\tif ( ! empty( $allowed_post_types ) && is_array( $allowed_post_types ) ) {\n\t\t\tforeach ( $allowed_post_types as $post_type ) {\n\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\tif ( empty( $post_type_object ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$values = self::get_values();\n\t\t\t\tif ( ! $post_type_object->hierarchical ) {\n\t\t\t\t\t$values['slug'] = [\n\t\t\t\t\t\t'name' => 'SLUG',\n\t\t\t\t\t\t'value' => 'slug',\n\t\t\t\t\t\t'description' => __( 'Identify a resource by the slug. Available to non-hierarchcial Types where the slug is a unique identifier.', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tif ( 'attachment' === $post_type_object->name ) {\n\t\t\t\t\t$values['source_url'] = [\n\t\t\t\t\t\t'name' => 'SOURCE_URL',\n\t\t\t\t\t\t'value' => 'source_url',\n\t\t\t\t\t\t'description' => __( 'Identify a media item by its source url', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Register a unique Enum per Post Type. This allows for granular control\n\t\t\t\t * over filtering and customizing the values available per Post Type.\n\t\t\t\t */\n\t\t\t\tregister_graphql_enum_type(\n\t\t\t\t\t$post_type_object->graphql_single_name . 'IdType',\n\t\t\t\t\t[\n\t\t\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t\t\t'values' => $values,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t}", "public function registerPostTypes()\n {\n // Get the post types from the config.\n $postTypes = config('post-types');\n\n $translater = new Translater($postTypes, 'post-types');\n $postTypes = $translater->translate([\n '*.label',\n '*.labels.*',\n '*.names.singular',\n '*.names.plural',\n ]);\n\n // Iterate over each post type.\n collect($postTypes)->each(function ($item, $key) {\n\n // Check if names are set, if not keep it as an empty array\n $names = $item['names'] ?? [];\n\n // Unset names from item\n unset($item['names']);\n\n // Register the extended post type.\n register_extended_post_type($key, $item, $names);\n });\n }", "function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}", "function rng_create_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Post Types Plural', 'Post Type General Name', 'translate_name' ),\n\t\t'singular_name' => _x( 'Post Type Singular', 'Post Type Singular Name', 'translate_name' ),\n\t\t'menu_name' => __( 'Post Types', 'translate_name' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'translate_name' ),\n\t\t'archives' => __( 'Item Archives', 'translate_name' ),\n\t\t'attributes' => __( 'Item Attributes', 'translate_name' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'translate_name' ),\n\t\t'all_items' => __( 'All Items', 'translate_name' ),\n\t\t'add_new_item' => __( 'Add New Item', 'translate_name' ),\n\t\t'add_new' => __( 'Add New', 'translate_name' ),\n\t\t'new_item' => __( 'New Item', 'translate_name' ),\n\t\t'edit_item' => __( 'Edit Item', 'translate_name' ),\n\t\t'update_item' => __( 'Update Item', 'translate_name' ),\n\t\t'view_item' => __( 'View Item', 'translate_name' ),\n\t\t'view_items' => __( 'View Items', 'translate_name' ),\n\t\t'search_items' => __( 'Search Item', 'translate_name' ),\n\t\t'not_found' => __( 'Not found', 'translate_name' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'translate_name' ),\n\t\t'featured_image' => __( 'Featured Image', 'translate_name' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'translate_name' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'translate_name' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'translate_name' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'translate_name' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'translate_name' ),\n\t\t'items_list' => __( 'Items list', 'translate_name' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'translate_name' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'translate_name' ),\n\t);\n\t$args = array(\n 'public' => true,\n\t\t'label' => __( 'Post Type Singular', 'translate_name' ),\n\t\t'description' => __( 'Post Type Description', 'translate_name' ),\n 'labels' => $labels,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu'\t\t\t=> true,\n\t\t'show_in_admin_bar'\t\t=> true,\n\t\t'menu_position'\t\t\t=> 5,\n\t\t// 'menu_icon' \t\t\t=> get_bloginfo('template_directory') . '/images/portfolio-icon.png',\n\t\t'menu_icon'\t\t\t\t=> 'dashicon-groups',\n\t\t'has_archive'\t\t\t=> true,\n\t\t'capability_type'\t\t=> array('book','books'),\n\t\t'capabilities' \t\t\t=> array(\n\t\t\t'edit_post' => 'edit_book', \n\t\t\t'read_post' => 'read_book', \n\t\t\t'delete_post' => 'delete_book', \n\t\t\t'edit_posts' => 'edit_books', \n\t\t\t'edit_others_posts' => 'edit_others_books', \n\t\t\t'publish_posts' => 'publish_books', \n\t\t\t'read_private_posts' => 'read_private_books', \n\t\t\t'create_posts' => 'edit_books', \n\t\t),\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\n\t);\n\tregister_post_type( 'book', $args );\n\n}", "function create_custom_post_types(){\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_company = array(\n\t\t'name' => __('Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Company', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Company', 'threedee-expo'),\n\t\t'new_item' => __('New Company', 'threedee-expo'),\n\t\t'view_item' => __('View Company', 'threedee-expo'),\n\t\t'search_items' => __('Search Companies', 'threedee-expo'),\n\t\t'not_found' => __('No companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Companies', 'threedee-expo'),\n\t\t'archives' => __('Company Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_company = array(\n\t\t'publish_posts' => 'publish_companies',\n\t\t'edit_posts' => 'edit_companies',\n\t\t'edit_others_posts' => 'edit_others_companies',\n\t\t'delete_posts' => 'delete_companies',\n\t\t'delete_others_posts' => 'delete_others_companies',\n\t\t'read_private_posts' => 'read_private_companies',\n\t\t'edit_post' => 'edit_company',\n\t\t'delete_post' => 'delete_company',\n\t\t'read_post' => 'read_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_company = array(\n\t\t'labels' => $args_labels_company,\n\t\t'description' => 'Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'company'),\n\t\t'menu_icon' => 'dashicons-businessman',\n\t\t'capability_type' => 'companies',\n\t\t'capabilities' => $args_capabilities_company,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_group_of_companies = array(\n\t\t'name' => __('Group of Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Group of Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Group of Companies', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Group of Companies', 'threedee-expo'),\n\t\t'new_item' => __('New Group of Companies', 'threedee-expo'),\n\t\t'view_item' => __('View Group of Companies', 'threedee-expo'),\n\t\t'search_items' => __('Search Group of Companies', 'threedee-expo'),\n\t\t'not_found' => __('No Group of Companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No Group of Companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Group of Companies', 'threedee-expo'),\n\t\t'archives' => __('Group of Companies Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_group_of_companies = array(\n\t\t'publish_posts' => 'publish_group_of_companies',\n\t\t'edit_posts' => 'edit_group_of_companies',\n\t\t'edit_others_posts' => 'edit_others_group_of_companies',\n\t\t'delete_posts' => 'delete_group_of_companies',\n\t\t'delete_others_posts' => 'delete_others_group_of_companies',\n\t\t'read_private_posts' => 'read_private_group_of_companies',\n\t\t'edit_post' => 'edit_group_of_company',\n\t\t'delete_post' => 'delete_group_of_company',\n\t\t'read_post' => 'read_group_of_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_group_of_companies = array(\n\t\t'labels' => $args_labels_group_of_companies,\n\t\t'description' => 'Group of Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'group_of_companies'),\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'capability_type' => 'group_of_companies',\n\t\t'capabilities' => $args_capabilities_group_of_companies,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\tregister_post_type( 'companies', $args_company);\n\tregister_post_type( 'group_of_companies',$args_group_of_companies);\n}", "function news_custom_post() {\n $args = array(\n 'public' => true,\n 'label' => 'News',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n 'show_ui' => true,\n 'publicly_queryable' => true,\n 'taxonomies' => array('category', 'post_tag'),\n 'rewrite' => array( 'slug' => 'news' )\n\t\n );\n register_post_type('news', $args);\n}", "function cadastrando_post_type_clientes() {\n\n $nomeSingular = 'Cliente';\n $nomePlural = 'Clientes';\n $descricao = 'Clientes da minha empresa';\n\n $labels = array(\n 'name' => $nomePlural,\n 'name_singular' => $nomeSingular,\n 'add_new_item' => 'Adicionar novo ' . $nomeSingular,\n 'edit_item' => 'Editar ' . $nomeSingular\n );\n\n $supports = array(\n 'title',\n 'editor',\n 'thumbnail'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => $descricao,\n 'public' => true,\n 'menu_icon' => 'dashicons-id-alt',\n 'supports' => $supports\n );\n\n register_post_type( 'cliente', $args);\n}", "function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "function create_posttype() \n {\n register_post_type( 'mist_employee',\n array(\n 'labels' => array(\n 'name' => __( 'Employees' ),\n 'singular_name' => __( 'Employee' )\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'employees'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-businessman'\n )\n );\n register_post_type( 'mist_message',\n array(\n 'labels' => array(\n 'name' => __( 'Person Messages' ),\n 'singular_name' => __( 'Message' ),\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'message'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-testimonial'\n )\n );\n add_post_type_support('mist_message', 'excerpt');\n \n }", "function planoType() {\r\n\t$labels = array(\r\n\t\t'name' => _x('Planos', 'post type general name'),\r\n\t 'singular_name' => _x('Plano', 'post type singular name'),\r\n\t 'add_new' => _x('Adicionar Novo', 'slideshow item'),\r\n\t 'add_new_item' => __('Adicionar Novo Plano'),\r\n\t 'edit_item' => __('Editar Plano'),\r\n\t 'new_item' => __('Novo Plano'),\r\n\t 'view_item' => __('Ver Plano'),\r\n\t 'search_items' => __('Procurar Plano'),\r\n\t 'not_found' => __('Nenhum Plano Encontrado'),\r\n\t 'not_found_in_trash' => __('Nenhum Plano na Lixeira'),\r\n\t 'parent_item_colon' => ''\r\n\t);\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 4,\r\n 'supports' => array('title','editor'),\r\n 'rewrite' => array('slug' => 'plano')\r\n );\r\n\r\n register_post_type( 'plano' , $args ); # registering the new post type\r\n}", "function products_type() {\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n\n $args = array(\n 'label' => 'Productos',\n 'description' => 'Productos de Platzi',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n\n register_post_type('producto', $args);\n}", "function add_my_custom_posttype_smaken(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe smaak toe',\n 'add_new_item' => 'Voeg nieuwe smaak toe',\n 'name' => 'Smaken',\n 'singular_name' => 'Smaak',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije smaken van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-carrot', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n );\n register_post_type( 'smaken', $args ); \n }", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}" ]
[ "0.85713065", "0.8507504", "0.8346772", "0.8311665", "0.8260396", "0.82509744", "0.8213945", "0.8198455", "0.8182247", "0.8178489", "0.8175288", "0.8116956", "0.8096055", "0.8095977", "0.80908006", "0.8090349", "0.80708134", "0.80631447", "0.8057007", "0.804112", "0.80282766", "0.80076975", "0.8003802", "0.8001489", "0.7976903", "0.7976903", "0.7976467", "0.794635", "0.7901641", "0.7810948", "0.7798417", "0.77755654", "0.77747816", "0.7771966", "0.77656025", "0.7754728", "0.77172256", "0.769398", "0.7686712", "0.76841015", "0.76800853", "0.76573", "0.7633265", "0.76286715", "0.76250696", "0.7621496", "0.7616436", "0.7600351", "0.7597508", "0.7552298", "0.7548145", "0.7533635", "0.75291395", "0.7515946", "0.7513173", "0.7506658", "0.75009054", "0.7499127", "0.7484695", "0.7472208", "0.7467623", "0.74574304", "0.74550474", "0.7454685", "0.7451049", "0.7449392", "0.74448353", "0.7439846", "0.7438957", "0.7434441", "0.74327123", "0.7431696", "0.7423696", "0.7419655", "0.74125296", "0.7403553", "0.7400346", "0.73923665", "0.7377957", "0.7354617", "0.73505706", "0.7337408", "0.7315919", "0.73057175", "0.73050237", "0.73009634", "0.72950935", "0.7281986", "0.72763866", "0.7274012", "0.72658783", "0.7265073", "0.7263839", "0.7262491", "0.72480756", "0.7246405", "0.7240788", "0.7238302", "0.72336066", "0.72323775", "0.72236764" ]
0.0
-1
Register Custom Post Type
function classTools_post_type() { $labels = array( 'name' => _x( 'Ferramentas', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'ferramenta', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Ferramenta', 'text_domain' ), 'name_admin_bar' => __( 'Post Type', 'text_domain' ), 'archives' => __( 'Item Archives', 'text_domain' ), 'attributes' => __( 'Item Attributes', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'todas as ferramentas', 'text_domain' ), 'add_new_item' => __( 'Add novaferramenta', 'text_domain' ), 'add_new' => __( 'nova ferramenta', 'text_domain' ), 'new_item' => __( 'nova ferramenta', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'view_items' => __( 'View Items', 'text_domain' ), 'search_items' => __( 'Search Item', 'text_domain' ), 'not_found' => __( 'não encontrado', 'text_domain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), 'featured_image' => __( 'Featured Image', 'text_domain' ), 'set_featured_image' => __( 'Set featured image', 'text_domain' ), 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ), 'use_featured_image' => __( 'Use as featured image', 'text_domain' ), 'insert_into_item' => __( 'Insert into item', 'text_domain' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), 'filter_items_list' => __( 'Filter items list', 'text_domain' ), ); $args = array( 'label' => __( 'ferramentas', 'text_domain' ), 'description' => __( 'ferramentas', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'classTools_post_type', $args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }", "public function registerCustomPostTypes() {\n\n\n }", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "function register_post_types(){\n }", "function register_post_types(){\n }", "public function register_post(): void\n {\n $args = $this->register_post_type_args();\n register_post_type($this->post_type, $args);\n }", "public static function register_post_types() {}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}", "public function register_post_types() {\n\n\t}", "public function register_post_type() {\n\t $args = array(\n\t\t\t'public' => true,\n\t\t\t'label' => 'Questions'\n\t\t);\n\t register_post_type( 'questions', $args );\n\t}", "function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}", "function register_post_types()\n {\n }", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public function register_post_type()\n {\n $labels = [\n 'name' => _x('Chiro Quizzes', 'post type general name', $this->token),\n 'singular_name' => _x('Chiro Quiz', 'post type singular name', $this->token),\n 'add_new' => _x('Add New', $this->token, $this->token),\n 'add_new_item' => sprintf(__('Add New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'edit_item' => sprintf(__('Edit %s', $this->token), __('Chiro Quiz', $this->token)),\n 'new_item' => sprintf(__('New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'all_items' => sprintf(__('All %s', $this->token), __('Chiro Quizzes', $this->token)),\n 'view_item' => sprintf(__('View %s', $this->token), __('Chiro Quiz', $this->token)),\n 'search_items' => sprintf(__('Search %a', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found' => sprintf(__('No %s Found', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found_in_trash' => sprintf(__('No %s Found In Trash', $this->token), __('Chiro Quizzes', $this->token)),\n 'parent_item_colon' => '',\n 'menu_name' => __('Chiro Quizzes', $this->token)\n ];\n\n $slug = __('chiro-quiz', 'pf_chiro_quiz');\n $custom_slug = get_option('pf_chiro_quiz_slug');\n if ($custom_slug && strlen($custom_slug) > 0 && $custom_slug != '') {\n $slug = $custom_slug;\n }\n\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $slug],\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'supports' => ['title'],\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-admin-quiz'\n ];\n\n register_post_type($this->token, $args);\n }", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }", "function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }", "function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "function register_post_types() {\n\t}", "function register_post_types() {\n\t}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "public function add_custom_post_types() {\n //\n }", "public static function register_post_type()\n {\n\n \t register_post_type( 'books',\n\t\t array(\n\t\t 'labels' => array(\n\t\t 'name' => __( 'Books' ),\n\t\t 'singular_name' => __( 'Books' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => false,\n\t\t )\n\t\t );\n\n }", "protected function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'geopin', 'geopin-post-type' ),\n\t\t\t'singular_name' => __( 'geopin Member', 'geopin-post-type' ),\n\t\t\t'add_new' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'add_new_item' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'edit_item' => __( 'Edit geopin', 'geopin-post-type' ),\n\t\t\t'new_item' => __( 'New geopin', 'geopin-post-type' ),\n\t\t\t'view_item' => __( 'View geopin', 'geopin-post-type' ),\n\t\t\t'search_items' => __( 'Search geopin', 'geopin-post-type' ),\n\t\t\t'not_found' => __( 'No geopins found', 'geopin-post-type' ),\n\t\t\t'not_found_in_trash' => __( 'No geopins in the trash', 'geopin-post-type' ),\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t// 'editor',\n\t\t\t'thumbnail',\n\t\t\t// 'custom-fields',\n\t\t\t// 'revisions',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => $supports,\n\t\t\t'public' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array( 'slug' => 'geopin', ), \n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-admin-site',\n\t\t);\n\n\t\t$args = apply_filters( 'geoPin_post_type_args', $args );\n\n\t\tregister_post_type( $this->post_type, $args );\n\t}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "public function create_post_types() {\n }", "function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}", "public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}", "static function register_post_type ()\n {\n register_post_type(\n 'person',\n array(\n 'labels' => array(\n 'name' => __x( 'People', 'post type general name' ),\n 'singular_name' => __x( 'Person', 'post type singular name' ),\n 'menu_name' => __x( 'People', 'admin menu' ),\n 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ),\n 'add_new' => __x( 'Add New', 'book' ),\n 'add_new_item' => ___( 'Add New Person' ),\n 'new_item' => ___( 'New Person' ),\n 'edit_item' => ___( 'Edit Person' ),\n 'view_item' => ___( 'View Person' ),\n 'all_items' => ___( 'All People' ),\n 'search_items' => ___( 'Search People' ),\n 'parent_item_colon' => ___( 'Parent People:' ),\n 'not_found' => ___( 'No persons found.' ),\n 'not_found_in_trash' => ___( 'No persons found in Trash.' )\n ),\n 'description' => ___( 'Noteworthy people' ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'people' ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ));\n }", "public function create_post_type() {\n\t\t\n \t\tregister_post_type(self::POST_TYPE,\n \t\t\tarray(\n \t\t\t\t'labels' => array(\n \t\t\t\t\t'name' => \"Custom\",\n \t\t\t\t\t'singular_name' => __(ucwords(str_replace(\"_\", \" \", self::POST_TYPE)))\n \t\t\t\t),\n \t\t\t\t'public' => true,\n \t\t\t\t'has_archive' => true,\n \t\t\t\t'description' => __(\"This is WP Custom Post Type\"),\n \t\t\t\t'supports' => array('title', 'editor', 'excerpt','thumbnail','custom-fields'),\n \t\t\t)\n \t\t);\n\n\t\t\tregister_taxonomy(\n\t\t\t\t'custom-category',\n\t\t\t\tself::POST_TYPE,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Category' ),\n\t\t\t\t\t'rewrite' => array( 'slug' => 'custom-category' ),\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function compendium_register_type($slug, $name, $pname, $dicon) {\n $pt_slug = $slug;\n $tax_slug = $slug . '-category';\n\n register_post_type($pt_slug, array(\n 'labels' => array(\n 'name' => $pname,\n 'singular_name' => $name,\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New '.$name,\n 'edit_item' => 'Edit '.$name,\n 'new_item' => 'New '.$name,\n 'view_item' => 'View '.$name,\n 'search_items' => 'Search '.$pname,\n 'not_found' => 'No '.$pname.' found',\n 'not_found_in_trash' => 'No '.$pname.' found in trash',\n ),\n 'public' => true,\n 'menu_position' => 35,\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => $dicon,\n 'rewrite' => array(\n 'slug' => 'resource-center/' . $pt_slug,\n 'with_front' => true\n ),\n ));\n\n register_taxonomy($tax_slug, $pt_slug, array(\n 'labels' => array(\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'hierarchical' => true,\n ));\n}", "public static function register_post_type() {\n\t\tregister_post_type( 'drsa_ad', self::arguments() );\n\t}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }", "function theme_custom_post_type() {\n\tregister_post_type( 'custom_type',\n\n\t\t// Array with all the options for the custom post type\n\t\tarray( 'labels' => array(\n\t\t\t'name'\t\t\t\t\t=> __( 'Custom Types' ), // Name of the custom post type group\n\t\t\t'singular_name'\t\t\t=> __( 'Custom Post' ), // Name of the custom post type singular\n\t\t\t'all_items'\t\t\t\t=> __( 'All Custom Posts' ),\n\t\t\t'add_new' \t\t\t\t=> __( 'Add New' ),\n\t\t\t'add_new_item' \t\t\t=> __( 'Add New Custom Type' ),\n\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ),\n\t\t\t'edit_item'\t\t\t\t=> __( 'Edit Post Types' ),\n\t\t\t'new_item'\t\t\t\t=> __( 'New Post Type' ),\n\t\t\t'view_item'\t\t\t\t=> __( 'View Post Type' ),\n\t\t\t'search_items'\t\t\t=> __( 'Search Post Type' ),\n\t\t\t'not_found'\t\t\t\t=> __( 'Nothing found in the Database.' ),\n\t\t\t'not_found_in_trash'\t=> __( 'Nothing found in Trash' ),\n\t\t\t'parent_item_colon' \t=> ''\n\t\t\t),\n\n\t\t\t'description' \t\t\t=> __( 'This is the example custom post type' ), // Custom post type description\n\t\t\t'public' \t\t\t\t=> true,\n\t\t\t'publicly_queryable' \t=> true,\n\t\t\t'exclude_from_search' \t=> false,\n\t\t\t'show_ui' \t\t\t\t=> true,\n\t\t\t'query_var' \t\t\t=> true,\n\t\t\t'menu_position' \t\t=> 5, // The order the custom post type appears on the admin menu\n\t\t\t// 'menu_icon' \t\t\t=> get_stylesheet_directory_uri() . '/assets/images/custom-post-icon.png',\n\t\t\t'rewrite'\t\t\t\t=> array( 'slug' => 'custom_type', 'with_front' => false ), // You may specify its url slug\n\t\t\t'has_archive' \t\t\t=> 'custom_type', // You mary rename the slug here\n\t\t\t'capability_type' \t\t=> 'post',\n\t\t\t'hierarchical' \t\t\t=> false,\n\n\t\t\t// Enable post editor support\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'trackbacks',\n\t\t\t\t'custom-fields',\n\t\t\t\t'comments',\n\t\t\t\t'revisions',\n\t\t\t\t'sticky'\n\t\t\t)\n\t\t)\n\t);\n\n\t// This adds your post categories to your custom post type\n\tregister_taxonomy_for_object_type( 'category', 'custom_type' );\n\n\t// This adds your post tags to your custom post type\n\tregister_taxonomy_for_object_type( 'post_tag', 'custom_type' );\n\n}", "function add_custom_post_type() \n {\n // add custom type evenementen\n $labels = array(\n 'name' => _x('Quotes', 'post type general name', $this->localization_domain),\n 'singular_name' => _x('Quote', 'post type singular name', $this->localization_domain),\n 'add_new' => _x('Add Quote', 'event', $this->localization_domain),\n 'add_new_item' => __('Add New Quote', $this->localization_domain),\n 'edit_item' => __('Edit Quote', $this->localization_domain),\n 'new_item' => __('New Quote', $this->localization_domain),\n 'view_item' => __('View Quote', $this->localization_domain),\n 'search_items' => __('Search Quotes', $this->localization_domain),\n 'not_found' => __('No Quotes found', $this->localization_domain),\n 'not_found_in_trash' => __('No Quotes found in Trash', $this->localization_domain), \n 'parent_item_colon' => ''\n );\n $type_args = array(\n 'labels' => $labels,\n 'description' => __('bbQuotations offers a simple quotes custom post type. Useful for pull quotes or just random quotes on your site.',\n $this->localization_domain),\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => $this->options['bbquotations-slug']),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 5,\n 'supports' => array('title','editor','author')\n ); \n register_post_type( $this->custom_post_type_name, $type_args);\n }", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "function food_specials_custompost() {\r\n\t$args = array(\r\n\t\t'label' => 'Daily Food Specials',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'capability_type' => 'post',\r\n\t\t'rewrite' => array('slug' => 'food_specials'),\r\n\t\t'query_var' => true,\r\n\t\t'supports' => array(\r\n\t\t\t'title', 'editor', 'excerpt', 'comments', 'thumbnail', 'author',)\r\n\t\t);\r\n\tregister_post_type('food_specials', $args);\r\n}", "public function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Movies', 'Post type general name', 'plugintest' ),\n\t\t\t'singular_name' => _x( 'Movie', 'Post type singular name', 'plugintest' ),\n\t\t\t'menu_name' => _x( 'Movies', 'Admin Menu text', 'plugintest' ),\n\t\t\t'name_admin_bar' => _x( 'Movie', 'Admin Menu Toolbar text', 'plugintest' ),\n\t\t\t'add_new' => __( 'Add New', 'plugintest' ),\n\t\t\t'add_new_item' => __( 'Add New Movie', 'plugintest' ),\n\t\t\t'new_item' => __( 'Aaaaaa', 'plugintest' ),\n\t\t\t'view_item' => __( 'View Movie', 'plugintest' ),\n\t\t\t'edit_item' => __( 'Edit Movie', 'plugintest' ),\n\t\t\t'all_items' => __( 'All Movies', 'plugintest' ),\n\t\t\t'search_items' => __( 'Search Movies', 'plugintest' ),\n\t\t\t'parent_item_colon' => __( 'Parent Movies', 'plugintest' ),\n\t\t\t'not_found' => __( 'No Movies found.', 'plugintest' ),\n\t\t\t'not_found_in_trash' => __( 'No Movies found in Trash.', 'plugintest' ),\n\t\t\t'featured_image' => _x( 'Movie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'item_published' => __( 'New Movie Published.', 'plugintest' ),\n\t\t\t'item_updated' => __( 'Movie post updated.', 'plugintest' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'movie' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => false,\n\t\t\t'has_archive' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t\t'taxonomies' => array( 'category', 'post_tag' ), // Using wordpess category and tags.\n\t\t);\n\n\t\tregister_post_type( 'movie', $args );\n\t\tflush_rewrite_rules();\n\n\t\t$category_labels = array(\n\t\t\t'name' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'singular_name' => esc_html__( 'Movie Category', 'plugintest' ),\n\t\t\t'all_items' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => esc_html__( 'Edit Category', 'plugintest' ),\n\t\t\t'update_item' => esc_html__( 'Update Category', 'plugintest' ),\n\t\t\t'add_new_item' => esc_html__( 'Add New Movie Category', 'plugintest' ),\n\t\t\t'new_item_name' => esc_html__( 'New Movie Name', 'plugintest' ),\n\t\t\t'menu_name' => esc_html__( 'Genre', 'plugintest' ),\n\t\t\t'search_items' => esc_html__( 'Search Categories', 'plugintest' ),\n\t\t);\n\n\t\t$category_args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'labels' => $category_labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t\t);\n\n\t\tregister_taxonomy( 'genre', array( self::$post_type ), $category_args );\n\t}", "public function register_post_type()\n\t{\n\n\t\tregister_post_type( 'partner', array(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x( 'Partners', 'post type general name', 'custom-post-type-partners' ),\n\t\t\t\t'singular_name' => _x( 'Partner', 'post type singular name', 'custom-post-type-partners' ),\n\t\t\t\t'add_new' => _x( 'Add New', 'Partner', 'custom-post-type-partners' ),\n\t\t\t\t'add_new_item' => __( 'Add New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'edit_item' => __( 'Edit Partner', 'custom-post-type-partners' ),\n\t\t\t\t'new_item' => __( 'New Partner', 'custom-post-type-partners' ),\n\t\t\t\t'all_items' => __( 'All Partners', 'custom-post-type-partners' ),\n\t\t\t\t'view_item' => __( 'View Partner', 'custom-post-type-partners' ),\n\t\t\t\t'search_items' => __( 'Search Partners', 'custom-post-type-partners' ),\n\t\t\t\t'not_found' => __( 'No Partners found', 'custom-post-type-partners' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Partners found in Trash', 'custom-post-type-partners' ),\n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => __( 'Partners', 'custom-post-type-partners' )\n\t\t\t),\n\t\t\t'public' => TRUE,\n\t\t\t'publicly_queryable' => TRUE,\n\t\t\t'show_ui' => TRUE,\n\t\t\t'show_in_menu' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => TRUE,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => FALSE,\n\t\t\t'hierarchical' => FALSE,\n\t\t\t'menu_position' => NULL,\n\t\t\t'menu_icon' => 'dashicons-admin-links',\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' )\n\t\t) );\n\n\t}", "public function customPostType()\n {\n\n if (empty($this->custom_post_types)) {\n return;\n }\n\n foreach ($this->custom_post_types as $post_type) {\n register_post_type(\n $post_type['post_type'],\n [\n 'labels' => [\n 'name' => __($post_type['name'], 'vrcoder'),\n 'singular_name' => __($post_type['singular_name'], 'vrcoder'),\n 'menu_name' => __($post_type['name'], 'vrcoder'),\n 'name_admin_bar' => __($post_type['singular_name'], 'vrcoder'),\n 'archives' => __($post_type['singular_name'] . ' Archives', 'vrcoder'),\n 'attributes' => __($post_type['singular_name'] . ' Attributes', 'vrcoder'), \n 'parent_item_colon' => __('Parent ' . $post_type['singular_name'], 'vrcoder'),\n 'all_items' => __('All ' . $post_type['name'], 'vrcoder'),\n 'add_new_item' => __('Add new ' . $post_type['singular_name'], 'vrcoder'),\n 'add_new' => __('Add new', 'vrcoder'),\n 'new_item' => __('New ' . $post_type['singular_name'], 'vrcoder'),\n 'edit_item' => __('Edit ' . $post_type['singular_name'], 'vrcoder'),\n 'update_item' => __('Update' . $post_type['singular_name'], 'vrcoder'),\n 'view_item' => __('View' . $post_type['singular_name'], 'vrcoder'),\n 'view_items' => __('View' . $post_type['name'], 'vrcoder'),\n 'search_items' => __('Search' . $post_type['name'], 'vrcoder'),\n 'not_found' => __('No' . $post_type['singular_name'] . ' Found', 'vrcoder'),\n 'not_found_in_trash' => __('No' . $post_type['singular_name'] . ' Found in Trash', 'vrcoder'),\n 'featured_image' => __('Featured Image', 'vrcoder'),\n 'set_featured_image' => __('Set Featured Image', 'vrcoder'),\n 'remove_featured_image' => __('Remove Featured Image', 'vrcoder'),\n 'use_featured_image' => __('Use Featured Image', 'vrcoder'),\n 'insert_into_item' => __('Insert into' . $post_type['singular_name'], 'vrcoder'),\n 'uploaded_to_this_item' => __('Upload to this' . $post_type['singular_name'], 'vrcoder'),\n 'items_list' => __($post_type['name'] . ' List', 'vrcoder'),\n 'items_list_navigation' => __($post_type['name'] . ' List Navigation', 'vrcoder'),\n 'filter_items_list' => __('Filter' . $post_type['name'] . ' List', 'vrcoder'),\n ],\n 'label' => __($post_type['singular_name'], 'vrcoder'),\n 'description' => __($post_type['name'] . ' Custom Post Type', 'vrcoder'),\n 'supports' => $post_type['supports'],\n 'show_in_rest' => $post_type['show_in_rest'],\n 'taxonomies' => $post_type['taxonomies'],\n 'hierarchical' => $post_type['hierarchical'],\n 'public' => $post_type['public'],\n 'show_ui' => $post_type['show_ui'],\n 'show_in_menu' => $post_type['show_in_menu'],\n 'menu_position' => $post_type['menu_position'],\n 'show_in_admin_bar' => $post_type['show_in_admin_bar'],\n 'show_in_nav_menus' => $post_type['show_in_nav_menus'],\n 'can_export' => $post_type['can_export'],\n 'has_archive' => $post_type['has_archive'],\n 'exclude_from_search' => $post_type['exclude_from_search'],\n 'publicly_queryable' => $post_type['publicly_queryable'],\n 'capability_type' => $post_type['capability_type'],\n 'menu_icon' => $post_type['menu_icon']\n ]\n );\n }\n\n }", "public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }", "function pluginprefix_setup_post_type()\n{\n register_post_type('post-nasa-gallery', [\n 'label' => 'Nasa Images Posts',\n 'public' => true\n ]);\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public function register_post_types() {\n require_once('includes/post-types.php');\n }", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}", "public static function register_type() {\n\t\tregister_graphql_object_type(\n\t\t\t'PostTypeLabelDetails',\n\t\t\t[\n\t\t\t\t'description' => __( 'Details for labels of the PostType', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'name' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'General name for the post type, usually plural.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'singularName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Name for one object of this post type.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->singular_name ) ? $labels->singular_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNew' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Default is ‘Add New’ for both hierarchical and non-hierarchical types.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new ) ? $labels->add_new : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'addNewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for adding a new singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->add_new_item ) ? $labels->add_new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'editItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for editing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->edit_item ) ? $labels->edit_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'newItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the new item page title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->new_item ) ? $labels->new_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing a singular item.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_item ) ? $labels->view_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'viewItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for viewing post type archives.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->view_items ) ? $labels->view_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'searchItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for searching plural items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->search_items ) ? $labels->search_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFound' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are found.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found ) ? $labels->not_found : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'notFoundInTrash' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used when no items are in the trash.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->not_found_in_trash ) ? $labels->not_found_in_trash : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'parentItemColon' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label used to prefix parents of hierarchical items.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->parent_item_colon ) ? $labels->parent_item_colon : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'allItems' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label to signify all items in a submenu link.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->all_items ) ? $labels->all_items : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'archives' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for archives in nav menus', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the attributes meta box.', 'wp-graphql' ),\n\t\t\t\t\t],\n\t\t\t\t\t'insertIntoItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame button.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->insert_into_item ) ? $labels->insert_into_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'uploadedToThisItem' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the media frame filter.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->uploaded_to_this_item ) ? $labels->uploaded_to_this_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'featuredImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the Featured Image meta box title.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->featured_image ) ? $labels->featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'setFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for setting the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->set_featured_image ) ? $labels->set_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'removeFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for removing the featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->remove_featured_image ) ? $labels->remove_featured_image : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'useFeaturedImage' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label in the media frame for using a featured image.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->use_featured_item ) ? $labels->use_featured_item : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'menuName' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the menu name.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->menu_name ) ? $labels->menu_name : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'filterItemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table views hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->filter_items_list ) ? $labels->filter_items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsListNavigation' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table pagination hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list_navigation ) ? $labels->items_list_navigation : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t'itemsList' => [\n\t\t\t\t\t\t'type' => 'String',\n\t\t\t\t\t\t'description' => __( 'Label for the table hidden heading.', 'wp-graphql' ),\n\t\t\t\t\t\t'resolve' => function( $labels ) {\n\t\t\t\t\t\t\treturn ! empty( $labels->items_list ) ? $labels->items_list : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function cptui_register_my_cpts_how_it_works() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"How it Work\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"how_it_works\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"how_it_works\", $args );\n}", "function add_my_custom_posttype_waarden(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe waarde toe',\n 'add_new_item' => 'Voeg nieuwe waarde toe',\n 'name' => 'waarden',\n 'singular_name' => 'waarden',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'waarden van Ben & Jerry',\n 'public' => true,\n 'menu_position' => 6,\n 'menu_icon' => 'dashicons-layout', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n \n );\n register_post_type( 'waarden', $args ); \n }", "function custom_post_type() {\n $labels = array(\n 'name' => _x( 'Ort', 'Post Type General Name', 'twentythirteen' ),\n 'singular_name' => _x( 'Ort', 'Post Type Singular Name', 'twentythirteen' ),\n 'menu_name' => __( 'Orter', 'twentythirteen' ),\n 'all_items' => __( 'Alla Orter', 'twentythirteen' ),\n 'view_item' => __( 'View Ort', 'twentythirteen' ),\n 'add_new_item' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'add_new' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'edit_item' => __( 'Redigera Ort', 'twentythirteen' ),\n 'update_item' => __( 'Upddatera Ort', 'twentythirteen' ),\n 'search_items' => __( 'Sök Ort', 'twentythirteen' ),\n 'not_found' => __( 'Not Found', 'twentythirteen' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n );\n \n $args = array(\n 'label' => __( 'cities', 'twentythirteen' ),\n 'description' => __( 'City Post Page', 'twentythirteen' ),\n 'labels' => $labels,\n 'supports' => array('title','thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n register_post_type( 'cities', $args );\n\n }", "function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}", "function add_custom_post_type() {\n\tregister_post_type( 'learning_resource',\n array(\n 'labels' => array(\n 'name' => __( 'Learning Resources' ),\n 'singular_name' => __( 'Learning Resource' )\n ),\n 'public' => true,\n 'has_archive' => true,\n )\n );\n}", "static function register() {\n // register the post type\n register_post_type('sale-flat', array(\n\t\t\n\t\t\t'labels'=> array(\n\t\t\t\t'name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'singular_name' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'menu_name' => _x( 'Eladó ingatlanok', 'theme-phrases' ),\n\t\t\t\t'name_admin_bar' => _x( 'Eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new' => _x( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'add_new_item' => __( 'Új eladó ingatlan hozzáadása', 'theme-phrases' ),\n\t\t\t\t'new_item' => __( 'Új eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'edit_item' => __( 'Eladó ingatlan szerkesztése', 'theme-phrases' ),\n\t\t\t\t'view_item' => __( 'Eladó ingatlan megtekintése', 'theme-phrases' ),\n\t\t\t\t'all_items' => __( 'Összes eladó ingatlan', 'theme-phrases' ),\n\t\t\t\t'search_items' => __( 'Eladó ingatlan keresése', 'theme-phrases' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent eladó ingatlan:', 'theme-phrases' ),\n\t\t\t\t'not_found' => __( 'Nincsenek eladó ingatlanok.', 'theme-phrases' ),\n\t\t\t\t'not_found_in_trash' => __( 'Nincsenek eladó ingatlanok a kukában.', 'theme-phrases' )\n\t\t\t),\n 'description' => __('Eladó ingatlanok', 'theme-phrases'),\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'public' => true,\n 'show_ui' => true,\n 'auto-draft' => false,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'menu_position' => 4,\n 'menu_icon'\t=> 'dashicons-tag',\n 'revisions' => false,\n 'hierarchical' => true,\n 'has_archive' => true,\n\t\t\t'supports' => array('title','editor','thumbnail'),\n 'rewrite' => false,\n 'can_export' => false,\n 'capabilities' => array (\n 'create_posts' => 'edit_posts',\n 'edit_post' => 'edit_posts',\n 'read_post' => 'edit_posts',\n 'delete_posts' => 'edit_posts',\n 'delete_post' => 'edit_posts',\n 'edit_posts' => 'edit_posts',\n 'edit_others_posts' => 'edit_posts',\n 'publish_posts' => 'edit_posts',\n 'read_private_posts' => 'edit_posts',\n ),\n 'register_meta_box_cb' => array('SaleFlatPostType', 'add_metabox') \n ));\n }", "public function register_content_type() {\n\t\t$labels = array(\n\t\t\t'name' => 'Honor Rolls',\n\t\t\t'singular_name' => 'Honor Roll',\n\t\t\t'add_new' => 'Add New',\n\t\t\t'add_new_item' => 'Add New Honor Roll',\n\t\t\t'edit_item' => 'Edit Honor Roll',\n\t\t\t'new_item' => 'New Honor Roll',\n\t\t\t'all_items' => 'All Honor Rolls',\n\t\t\t'view_item' => 'View Honor Rolls',\n\t\t\t'search_items' => 'Search Honor Rolls',\n\t\t\t'not_found' => 'No Honor Rolls found',\n\t\t\t'not_found_in_trash' => 'No Honor Rolls found in Trash',\n\t\t\t'menu_name' => 'Honor Rolls',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'supports' => array( 'title' ),\n\t\t);\n\t\tregister_post_type( $this::$content_type_slug, $args );\n\t}", "public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }", "function wpcp_custom_post_type()\n{\n register_post_type('wpcp_server',\n array(\n 'labels' => array(\n 'name' => __('Servers', 'textdomain'),\n 'singular_name' => __('Server', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => false,\n 'delete_with_user' => false,\n \"supports\" => array(\"customer\", \"author\"),\n 'menu_icon' => 'dashicons-cloud'\n )\n );\n}", "function create_post_type(){\n register_post_type('recipes', [ \n 'labels' => [\n 'name' => 'Recipes', //Etikett i plural Etikett i singular\n 'singular_name' => 'Recipe', //Vad som ska stå i ”Lägg till...” knappen\n 'add_new' => 'New Recipe', //Vad som ska stå i ”Lägg till ny...” knappen\n 'add_new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'edit_item' => 'Edit Recipe', //Vad som ska stå i ”Redigera...” länken\n 'new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'search_items' => 'Search for Recipe', //Vad som ska stå i sökrutan i listningen\n 'not_found' => 'No Recipe Found', \n 'all_items' => 'All Recipes', //Vad som ska stå i ”Alla...” länken\n ],\n 'supports' => array( 'thumbnail' ),\n 'description' => 'The Big Tasty!', //En kort beskrivning av posttypen\n 'public' => true, //Om och hur posttypen ska visas för olika användare\n 'exclude_from_search' => false, //Om posttypens poster ska exkluderas vid sökning\n 'show_ui' => true, //Om posttypen ska kunna hanteras från admin\n 'show_in_nav_menus' => true, //Om poster av posttypen ska kunna läggas till i menyer\n 'show_in_menu' => true, //Vart posttypen ska listas i admin (vänster eller topp)\n 'show_in_admin_bar' => true, //Om posttypen ska visas i toppbar’en\n 'menu_position' => 10, //Vart i vänstermenyn posttypen ska visas\n 'hierarchical' => false, //Om poster i posttypen ska kunna ha föräldrar, likt Sidor\n 'menu_icon' => 'dashicons-food', //Ikon för posttypen\n 'supports' => array('title' , 'editor'), //Vad som ska synas när man skapar/redigerar en post \n 'taxonomies' => array('category'), //Vilka taxonomier som ska tillhöra posttypen\n 'has_archive' => true, //Om posttypen ska ha arkivsida\n 'rewrite' => [ //Hur posttypens rewrites ska hanteras...\n 'slug' => 'recipe', //Permalänkstrukturen för posttypen\n 'with_front' => true //Om permalänkarna ska låta föregås av sluggen\n ] \n ]);\n\n}", "function create_post_type() {\n\n // register external_post as a Custom Post Type\n register_post_type( 'external_post', \n array( \n 'labels' => array( \n 'name' => __('External Posts'), \n 'singular_name' => __('External Post') \n ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array('title', 'excerpt'),\n 'rewrite' => array('slug' => 'external','with_front' => false) \n ) \n ); \n\n // connect external_post to category taxonomy\n register_taxonomy_for_object_type('category', 'external_post');\n register_taxonomy_for_object_type('post_tag', 'external_post');\n\n\n // register wp_tool as a Custom Post Type\n register_post_type('wp_tool',\n array( \n 'labels' => array( \n 'name' => __('WordPress Tools'), \n 'singular_name' => __('WordPress Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'tool','with_front' => false) \n ) \n );\n\n // connect wp_tool to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'wp_tool');\n register_taxonomy_for_object_type('category', 'wp_tool');\n\n\n // reregister default post so we can set a custom slug\n register_post_type('post', array(\n 'labels' => array(\n 'name_admin_bar' => _x('Post', 'add new on admin bar' ),\n ),\n 'public' => true,\n '_builtin' => false, \n '_edit_link' => 'post.php?post=%d', \n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'show_in_menu' => false,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'article'),\n 'query_var' => false,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats', 'column_info'),\n )); \n\n // register external_tool as a Custom Post Type\n register_post_type('external_tool',\n array(\n 'labels' => array( \n 'name' => __('External Tools'), \n 'singular_name' => __('External Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'special','with_front' => false) \n ) \n ); \n\n // connect external_tool to category taxonomy\n register_taxonomy_for_object_type('category', 'external_tool');\n register_taxonomy_for_object_type('meta_info', 'external_tool');\n\n\n // register city_journal as a Custom Post Type\n register_post_type('city_journal',\n array(\n 'labels' => array( \n 'name' => __('CityJournal Entry'),\n 'singular_name' => __('CityJournal Entry')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'cityjournal','with_front' => false) \n ) \n ); \n\n // connect city_journal to category taxonomy\n register_taxonomy_for_object_type('category', 'city_journal');\n register_taxonomy_for_object_type('meta_info', 'city_journal'); \n\n\n // register people_project as a Custom Post Type\n register_post_type('people_project',\n array(\n 'labels' => array( \n 'name' => __('People & Projects'),\n 'singular_name' => __('People & Project')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'excerpt', 'thumbnail', 'meta_info'),\n ) \n ); \n\n // connect people_project to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'people_project'); \n\n\n register_post_type('discussion',\n array( \n 'labels' => array( \n 'name' => __('Discussions'), \n 'singular_name' => __('Discussion') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'discussion','with_front' => false) \n ) \n );\n\n // connect discussion to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'discussion');\n register_taxonomy_for_object_type('category', 'discussion');\n\n}", "function bs_configure_custom_post_types($args)\n{\n function bs_custom_post_types()\n {\n global $bs_config;\n\n foreach ($bs_config[\"custom-post-types\"] as $key => $type) {\n $type = bs_defaults($type, [\n \"public\" => true,\n ]);\n\n if (isset($type[\"name\"])) {\n $type[\"labels\"][\"name\"] = $type[\"name\"];\n }\n\n if (isset($type[\"slug\"])) {\n $type[\"rewrite\"][\"slug\"] = $type[\"slug\"];\n }\n\n if (isset($type[\"admin_only\"]) && $type[\"admin_only\"]) {\n $type[\"public\"] = false;\n $type[\"show_ui\"] = true;\n }\n\n register_post_type($key, bs_array_omit($type, [\"slug\", \"name\", \"admin_only\"]));\n }\n }\n add_action(\"init\", \"bs_custom_post_types\");\n}", "function add_my_custom_posttype_recepten(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuw recept toe',\n 'add_new_item' => 'Voeg nieuw recept toe',\n 'name' => 'Recepten',\n 'singular_name' => 'recept',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije recepten van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-book-alt', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'comments'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-recepten.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n\n );\n\n register_post_type( 'recepten', $args ); \n \n }", "function create_post_type() {\r\n register_post_type( 'nyheter',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Nyheter' ),\r\n 'singular_name' => __( 'Nyheter' )\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail')\r\n )\r\n );\r\n}", "function zmpm_register_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => 'Permissions',\n\t\t'singular_name' => 'Permission',\n\t\t'menu_name' => 'Permissions',\n\t\t'name_admin_bar' => 'Permission',\n\t\t'archives' => 'Permission Archives',\n\t\t'attributes' => 'Permission Attributes',\n\t\t'parent_item_colon' => 'Parent Permission:',\n\t\t'all_items' => 'Permissions',\n\t\t'add_new_item' => 'Add New Permission',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Permission',\n\t\t'edit_item' => 'Edit Permission',\n\t\t'update_item' => 'Update Permission',\n\t\t'view_item' => 'View Permission',\n\t\t'view_items' => 'View Permissions',\n\t\t'search_items' => 'Search Permission',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not Found in Trash',\n\t\t'featured_image' => 'Featured Image',\n\t\t'set_featured_image' => 'Set featured image',\n\t\t'remove_featured_image' => 'Remove featured image',\n\t\t'use_featured_image' => 'Use as featured image',\n\t\t'insert_into_item' => 'Insert into permission',\n\t\t'uploaded_to_this_item' => 'Uploaded to this permission',\n\t\t'items_list' => 'Permissions list',\n\t\t'items_list_navigation' => 'Permissions list navigation',\n\t\t'filter_items_list' => 'Filter permissions list',\n\t);\n\t$args = array(\n\t\t'label' => 'Permission',\n\t\t'description' => 'ZingMap permissions',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'users.php',\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-lock',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'zmpm_permission', $args );\n\t\n}", "public function register_estate_post_type() {\r\n $options = get_option( 'myhome_redux' );\r\n // define post type slug\r\n if ( ! empty( $options['mh-estate-slug'] ) ) {\r\n $slug = $options['mh-estate-slug'];\r\n } else {\r\n $slug = 'properties';\r\n }\r\n\r\n register_post_type( 'estate', array(\r\n 'labels' => array(\r\n 'name'\t\t\t => esc_html__( 'Properties', 'myhome-core' ),\r\n 'singular_name'\t => esc_html__( 'Property', 'myhome-core' ),\r\n 'menu_name' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'name_admin_bar' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new_item' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'new_item' => esc_html__( 'New Property', 'myhome-core' ),\r\n 'edit_item' => esc_html__( 'Edit Property', 'myhome-core' ),\r\n 'view_item' => esc_html__( 'View Property', 'myhome-core' ),\r\n 'all_items' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'search_items' => esc_html__( 'Search property', 'myhome-core' ),\r\n 'not_found' => esc_html__( 'No Property Found found.', 'myhome-core' ),\r\n 'not_found_in_trash' => esc_html__( 'No Property found in Trash.', 'myhome-core' )\r\n ),\r\n 'show_in_rest' => true,\r\n 'query_var' => true,\r\n 'public'\t\t => true,\r\n 'has_archive'\t => true,\r\n 'menu_position' => 21,\r\n 'menu_icon' => 'dashicons-admin-home',\r\n 'capability_type' => array( 'estate', 'estates' ),\r\n 'map_meta_cap' => true,\r\n 'rewrite'\t\t => array( 'slug' => $slug ),\r\n 'supports'\t\t => array(\r\n 'title',\r\n 'author',\r\n 'editor',\r\n 'thumbnail',\r\n )\r\n ) );\r\n }", "function create_volunteer_custom_post() {\n register_post_type( 'volunteers',\n array(\n 'labels' => array(\n 'name' => __( 'Board Members' ),\n 'singular_name' => __( 'Board Member' ),\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields'\n )\n ));\n}", "public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }", "public function register_post_type()\n\t{\n\n\t\tregister_taxonomy( $this->post_type_name . '_words', $this->post_type_name, array(\n\t\t\t'label' => 'Words',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Word',\n\t\t\t\t'menu_name' => 'Words',\n\t\t\t\t'all_items' => 'All words',\n\t\t\t\t'edit_item' => 'Edit word',\n\t\t\t\t'view_item' => 'View word',\n\t\t\t\t'update_item' => 'View word',\n\t\t\t\t'add_new_item' => 'Add word',\n\t\t\t\t'new_item_name' => 'New word',\n\t\t\t\t'search_items' => 'Search words',\n\t\t\t\t'popular_items' => 'Popular words',\n\t\t\t\t'separate_items_with_commas' => 'Separate words with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove words',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used words',\n\t\t\t\t'not_found' => 'No words found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => FALSE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'word',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\tregister_taxonomy( $this->post_type_name . '_partsofspeech', $this->post_type_name, array(\n\t\t\t'label' => 'Parts of Speech',\n\t\t\t'labels' => array(\n\t\t\t\t'singular_name' => 'Part of Speech',\n\t\t\t\t'menu_name' => 'Parts of Speech',\n\t\t\t\t'all_items' => 'All parts of speech',\n\t\t\t\t'edit_item' => 'Edit part of speech',\n\t\t\t\t'view_item' => 'View part of speech',\n\t\t\t\t'update_item' => 'View part of speech',\n\t\t\t\t'add_new_item' => 'Add part of speech',\n\t\t\t\t'new_item_name' => 'New part of speech',\n\t\t\t\t'search_items' => 'Search parts of speech',\n\t\t\t\t'popular_items' => 'Popular parts of speech',\n\t\t\t\t'separate_items_with_commas' => 'Separate parts of speech with commas',\n\t\t\t\t'add_or_remove_items' => 'Add or remove parts of speech',\n\t\t\t\t'choose_from_most_used' => 'Choose from most used parts of speech',\n\t\t\t\t'not_found' => 'No parts of speech found',\n\t\t\t),\n\t\t\t'show_ui' => FALSE,\n\t\t\t'show_admin_column' => TRUE,\n\t\t\t'query_var' => TRUE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'partofspeech',\n\t\t\t\t'with_front' => FALSE,\n\t\t\t),\n\t\t));\n\n\t\t// register the damn post type already\n\t\tregister_post_type( \n\t\t\t$this->post_type_name,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Definitions',\n\t\t\t\t\t'singular_name' => 'Definition',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Definition',\n\t\t\t\t\t'edit_item' => 'Edit Definition',\n\t\t\t\t\t'new_item' => 'New Definition',\n\t\t\t\t\t'all_items' => 'All Definitions',\n\t\t\t\t\t'view_item' => 'View Definitions',\n\t\t\t\t\t'search_items' => 'Search Definitions',\n\t\t\t\t\t'not_found' => 'No definitions found',\n\t\t\t\t\t'not_found_in_trash' => 'No definitions found in Trash',\n\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t'menu_name' => 'Definitions',\n\t\t\t\t),\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'trackbacks',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'has_archive' => 'definitions',\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'define',\n\t\t\t\t\t'with_front' => FALSE,\n\t\t\t\t),\n\t\t\t\t'register_meta_box_cb' => array( $this, 'metaboxes' ),\n\t\t\t\t'public' => TRUE,\n\t\t\t\t'taxonomies' => array(\n\t\t\t\t\t$this->post_type_name . '_partsofspeech',\n\t\t\t\t\t$this->post_type_name . '_words',\n\t\t\t\t),\n\t\t\t\t'menu_position' => 5,\n\t\t\t)\n\t\t);\n\t}", "function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}", "public function createPostTypes()\n {\n }", "function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}", "protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }", "function register_type( $post_type_singular, $post_type_plural, $options = array() ) {\n\n\t$text_domain = 'sgdf';\n\n\t$labels = array(\n\t\t'name' => _x( ucwords( $post_type_plural ), 'post type general name', $text_domain ),\n\t\t'singular_name' => _x( ucwords( $post_type_singular ), 'post type singular name', $text_domain ),\n\t\t'menu_name' => _x( ucwords( $post_type_plural ), 'admin menu', $text_domain ),\n\t\t'name_admin_bar' => _x( ucwords( $post_type_singular ), 'add new on admin bar', $text_domain ),\n\t\t'add_new' => _x( 'Add New', 'book', $text_domain ),\n\t\t'add_new_item' => __( 'Add New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'new_item' => __( 'New ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'edit_item' => __( 'Edit ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'view_item' => __( 'View ' . ucwords( $post_type_singular ), $text_domain ),\n\t\t'all_items' => __( 'All ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'search_items' => __( 'Search ' . ucwords( $post_type_plural ), $text_domain ),\n\t\t'parent_item_colon' => __( 'Parent ' . ucwords( $post_type_plural ) . ':', $text_domain ),\n\t\t'not_found' => __( 'No ' . $post_type_plural . ' found.', $text_domain ),\n\t\t'not_found_in_trash' => __( 'No ' . $post_type_plural . ' found in Trash.', $text_domain )\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => $post_type_singular ),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'menu_icon' \t => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t);\n\n\tforeach ($options as $key => $option) {\n\t\t$args[$key] = $option;\n\t}\n\n\treturn register_post_type( $post_type_singular, $args );\n}", "public function register() {\r\n add_action('post_updated', array($this, 'save_meta'), null, 2 );\r\n\r\n $original_config = $this->get_config();\r\n // push it through a filter so a theme can change the terminology\r\n $filtered_config = apply_filters('ah-wp-dl-res-config',$original_config);\r\n register_post_type(self::POST_TYPE, $filtered_config);\r\n\r\n register_taxonomy(self::POST_TYPE . '_cat',\r\n array(self::POST_TYPE),\r\n array('hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => __( 'Categories' ),\r\n 'singular_name' => __( 'Category' ),\r\n 'search_items' => __( 'Search Categories' ),\r\n 'all_items' => __( 'All Categories' ),\r\n 'parent_item' => __( 'Parent Category' ),\r\n 'parent_item_colon' => __( 'Parent Category:' ),\r\n 'edit_item' => __( 'Edit Category' ),\r\n 'update_item' => __( 'Update Category' ),\r\n 'add_new_item' => __( 'Add New Category' ),\r\n 'new_item_name' => __( 'New Category Name')\r\n ),\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'documents/categories' ),\r\n )\r\n );\r\n }", "function stock_toolkit_custom_post()\n\t{\n\tregister_post_type('slide', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Slides') ,\n\t\t\t'singular_name' => __('Slide')\n\t\t) ,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'custom-fields',\n\t\t\t'thumbnail',\n\t\t\t'page-attributes'\n\t\t) ,\n\t\t'public' => false,\n\t\t'show_ui' => true\n\t));\n\t}", "function testimonials_register_post_type() {\n\n $labels = [\n 'name' => __('Testimonials'),\n 'singular_name' => __('Testimonial'),\n 'add_new' => __('Add new', 'Testimonials'),\n 'add_new_item' => __('Add new Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_item' => __('Search Testimonials'),\n 'not_found' => __('No Testimonial found'),\n 'not_found_in_trash' => __('No Testimonial found in trash'),\n 'parent_item_colon' => ''\n ];\n\n register_post_type(TESTIMONIAL_TYPE, [\n 'labels' => $labels,\n 'public' => true,\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'hierarchical' => false,\n 'supports' => ['title', 'editor', 'custom-fields']\n ]);\n\n register_taxonomy_for_object_type(CRAFT_TAX_NAME, TESTIMONIAL_TYPE);\n}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function register_location_content_type(){\n\t\t //Labels for post type\n\t\t $labels = array(\n 'name' => 'Add Portfolio',\n 'singular_name' => 'Portfolio',\n 'menu_name' => 'Add Portfolio',\n 'name_admin_bar' => 'Add Portfolio',\n 'add_new' => 'Add New', \n 'add_new_item' => 'Add New Portfolio Item',\n 'new_item' => 'New Portfolio Item', \n 'edit_item' => 'Edit Portfolio Item',\n 'view_item' => 'View Portfolio Item',\n 'all_items' => 'All Portfolio Items',\n 'search_items' => 'Search Portfolio Items',\n 'parent_item_colon' => 'Parent Portfolio Item: ', \n 'not_found' => 'No Portfolio Items found.', \n 'not_found_in_trash' => 'No Portfolio Items found in Trash.',\n );\n //arguments for post type\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable'=> true,\n 'show_ui' => true,\n 'show_in_nav' => true,\n 'query_var' => true,\n 'hierarchical' => false,\n 'supports' => array('title','thumbnail','editor'),\n 'has_archive' => true,\n 'menu_position' => 20,\n 'show_in_admin_bar' => true,\n 'menu_icon' => 'dashicons-location-alt',\n 'rewrite'\t\t\t=> array('slug' => 'locations', 'with_front' => 'true')\n );\n //register post type\n register_post_type('wp_locations', $args);\n\t}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}", "function humcore_register_post_type() {\n\n\t// Define the labels to be used by the post type humcore_deposits.\n\t$labels = array(\n\t\t// 'name' => _x( 'HumCORE Deposits', 'post type general name', 'humcore_domain' ),\n\t\t'singular_name' => _x( 'Deposit', 'post type singular name', 'humcore_domain' ),\n\t\t'menu_name' => _x( 'HumCORE Deposits', 'admin menu', 'humcore_domain' ),\n\t\t'name_admin_bar' => _x( 'Deposit', 'add new on admin bar', 'humcore_domain' ),\n\t\t'add_new' => _x( 'Add New', 'add new', 'humcore_domain' ),\n\t\t'add_new_item' => __( 'Add New Deposits', 'humcore_domain' ),\n\t\t'new_item' => __( 'New Deposit', 'humcore_domain' ),\n\t\t'edit_item' => __( 'Edit Deposit', 'humcore_domain' ),\n\t\t'view_item' => __( 'View Deposit', 'humcore_domain' ),\n\t\t'all_items' => __( 'All Deposits', 'humcore_domain' ),\n\t\t'search_items' => __( 'Search Deposits', 'humcore_domain' ),\n\t\t'not_found' => __( 'No Deposits found', 'humcore_domain' ),\n\t\t'not_found_in_trash' => __( 'No Deposits found in Trash', 'humcore_domain' ),\n\t\t'parent_item_colon' => '',\n\t);\n\n\t$post_type_args = array(\n\t\t'label' => __( 'HumCORE Deposits', 'humcore_domain' ),\n\t\t'labels' => $labels,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => false,\n\t\t'query_var' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'humcore_deposit',\n\t\t\t'with_front' => true,\n\t\t),\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => false,\n\t\t'hierarchical' => true,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'author', 'excerpt' ),\n\t\t// 'supports' => array( 'title', 'author', 'excerpt', 'custom-fields', revisions', 'page-attributes' ),\n\t\t'register_meta_box_cb' => 'humcore_add_post_type_metabox',\n\t);\n\n\tregister_post_type( 'humcore_deposit', $post_type_args );\n}", "public static function register_type() {\n\n\t\tregister_graphql_enum_type(\n\t\t\t'ContentNodeIdTypeEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t'values' => self::get_values(),\n\t\t\t]\n\t\t);\n\n\t\t$allowed_post_types = \\WPGraphQL::get_allowed_post_types();\n\t\tif ( ! empty( $allowed_post_types ) && is_array( $allowed_post_types ) ) {\n\t\t\tforeach ( $allowed_post_types as $post_type ) {\n\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\tif ( empty( $post_type_object ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$values = self::get_values();\n\t\t\t\tif ( ! $post_type_object->hierarchical ) {\n\t\t\t\t\t$values['slug'] = [\n\t\t\t\t\t\t'name' => 'SLUG',\n\t\t\t\t\t\t'value' => 'slug',\n\t\t\t\t\t\t'description' => __( 'Identify a resource by the slug. Available to non-hierarchcial Types where the slug is a unique identifier.', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tif ( 'attachment' === $post_type_object->name ) {\n\t\t\t\t\t$values['source_url'] = [\n\t\t\t\t\t\t'name' => 'SOURCE_URL',\n\t\t\t\t\t\t'value' => 'source_url',\n\t\t\t\t\t\t'description' => __( 'Identify a media item by its source url', 'wp-graphql' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Register a unique Enum per Post Type. This allows for granular control\n\t\t\t\t * over filtering and customizing the values available per Post Type.\n\t\t\t\t */\n\t\t\t\tregister_graphql_enum_type(\n\t\t\t\t\t$post_type_object->graphql_single_name . 'IdType',\n\t\t\t\t\t[\n\t\t\t\t\t\t'description' => __( 'The Type of Identifier used to fetch a single resource. Default is ID.', 'wp-graphql' ),\n\t\t\t\t\t\t'values' => $values,\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t}", "public function registerPostTypes()\n {\n // Get the post types from the config.\n $postTypes = config('post-types');\n\n $translater = new Translater($postTypes, 'post-types');\n $postTypes = $translater->translate([\n '*.label',\n '*.labels.*',\n '*.names.singular',\n '*.names.plural',\n ]);\n\n // Iterate over each post type.\n collect($postTypes)->each(function ($item, $key) {\n\n // Check if names are set, if not keep it as an empty array\n $names = $item['names'] ?? [];\n\n // Unset names from item\n unset($item['names']);\n\n // Register the extended post type.\n register_extended_post_type($key, $item, $names);\n });\n }", "function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}", "function rng_create_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Post Types Plural', 'Post Type General Name', 'translate_name' ),\n\t\t'singular_name' => _x( 'Post Type Singular', 'Post Type Singular Name', 'translate_name' ),\n\t\t'menu_name' => __( 'Post Types', 'translate_name' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'translate_name' ),\n\t\t'archives' => __( 'Item Archives', 'translate_name' ),\n\t\t'attributes' => __( 'Item Attributes', 'translate_name' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'translate_name' ),\n\t\t'all_items' => __( 'All Items', 'translate_name' ),\n\t\t'add_new_item' => __( 'Add New Item', 'translate_name' ),\n\t\t'add_new' => __( 'Add New', 'translate_name' ),\n\t\t'new_item' => __( 'New Item', 'translate_name' ),\n\t\t'edit_item' => __( 'Edit Item', 'translate_name' ),\n\t\t'update_item' => __( 'Update Item', 'translate_name' ),\n\t\t'view_item' => __( 'View Item', 'translate_name' ),\n\t\t'view_items' => __( 'View Items', 'translate_name' ),\n\t\t'search_items' => __( 'Search Item', 'translate_name' ),\n\t\t'not_found' => __( 'Not found', 'translate_name' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'translate_name' ),\n\t\t'featured_image' => __( 'Featured Image', 'translate_name' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'translate_name' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'translate_name' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'translate_name' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'translate_name' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'translate_name' ),\n\t\t'items_list' => __( 'Items list', 'translate_name' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'translate_name' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'translate_name' ),\n\t);\n\t$args = array(\n 'public' => true,\n\t\t'label' => __( 'Post Type Singular', 'translate_name' ),\n\t\t'description' => __( 'Post Type Description', 'translate_name' ),\n 'labels' => $labels,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu'\t\t\t=> true,\n\t\t'show_in_admin_bar'\t\t=> true,\n\t\t'menu_position'\t\t\t=> 5,\n\t\t// 'menu_icon' \t\t\t=> get_bloginfo('template_directory') . '/images/portfolio-icon.png',\n\t\t'menu_icon'\t\t\t\t=> 'dashicon-groups',\n\t\t'has_archive'\t\t\t=> true,\n\t\t'capability_type'\t\t=> array('book','books'),\n\t\t'capabilities' \t\t\t=> array(\n\t\t\t'edit_post' => 'edit_book', \n\t\t\t'read_post' => 'read_book', \n\t\t\t'delete_post' => 'delete_book', \n\t\t\t'edit_posts' => 'edit_books', \n\t\t\t'edit_others_posts' => 'edit_others_books', \n\t\t\t'publish_posts' => 'publish_books', \n\t\t\t'read_private_posts' => 'read_private_books', \n\t\t\t'create_posts' => 'edit_books', \n\t\t),\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\n\t);\n\tregister_post_type( 'book', $args );\n\n}", "function create_custom_post_types(){\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_company = array(\n\t\t'name' => __('Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Company', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Company', 'threedee-expo'),\n\t\t'new_item' => __('New Company', 'threedee-expo'),\n\t\t'view_item' => __('View Company', 'threedee-expo'),\n\t\t'search_items' => __('Search Companies', 'threedee-expo'),\n\t\t'not_found' => __('No companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Companies', 'threedee-expo'),\n\t\t'archives' => __('Company Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_company = array(\n\t\t'publish_posts' => 'publish_companies',\n\t\t'edit_posts' => 'edit_companies',\n\t\t'edit_others_posts' => 'edit_others_companies',\n\t\t'delete_posts' => 'delete_companies',\n\t\t'delete_others_posts' => 'delete_others_companies',\n\t\t'read_private_posts' => 'read_private_companies',\n\t\t'edit_post' => 'edit_company',\n\t\t'delete_post' => 'delete_company',\n\t\t'read_post' => 'read_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_company = array(\n\t\t'labels' => $args_labels_company,\n\t\t'description' => 'Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'company'),\n\t\t'menu_icon' => 'dashicons-businessman',\n\t\t'capability_type' => 'companies',\n\t\t'capabilities' => $args_capabilities_company,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\t/**\n\t * Arguments for company labels\n\t */\n\t$args_labels_group_of_companies = array(\n\t\t'name' => __('Group of Companies', 'threedee-expo'),\n\t\t'singular_name' => __('Group of Company', 'threedee-expo'),\n\t\t'add_new_item' => __('Add New Group of Companies', 'threedee-expo'),\n\t\t'edit_item' => __('Edit Group of Companies', 'threedee-expo'),\n\t\t'new_item' => __('New Group of Companies', 'threedee-expo'),\n\t\t'view_item' => __('View Group of Companies', 'threedee-expo'),\n\t\t'search_items' => __('Search Group of Companies', 'threedee-expo'),\n\t\t'not_found' => __('No Group of Companies found', 'threedee-expo'),\n\t\t'not_found_in_trash'=> __('No Group of Companies found in Trash', 'threedee-expo'),\n\t\t'all_items' => __('All Group of Companies', 'threedee-expo'),\n\t\t'archives' => __('Group of Companies Archives', 'threedee-expo'),\n\t);\n\t/**\n\t * Arguments for company capabilities\n\t */\n\t$args_capabilities_group_of_companies = array(\n\t\t'publish_posts' => 'publish_group_of_companies',\n\t\t'edit_posts' => 'edit_group_of_companies',\n\t\t'edit_others_posts' => 'edit_others_group_of_companies',\n\t\t'delete_posts' => 'delete_group_of_companies',\n\t\t'delete_others_posts' => 'delete_others_group_of_companies',\n\t\t'read_private_posts' => 'read_private_group_of_companies',\n\t\t'edit_post' => 'edit_group_of_company',\n\t\t'delete_post' => 'delete_group_of_company',\n\t\t'read_post' => 'read_group_of_company',\n\t);\n\t/**\n\t * Arguments for register companies\n\t */\n\t$args_group_of_companies = array(\n\t\t'labels' => $args_labels_group_of_companies,\n\t\t'description' => 'Group of Companies.',\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t => array('slug' => 'group_of_companies'),\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'capability_type' => 'group_of_companies',\n\t\t'capabilities' => $args_capabilities_group_of_companies,\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array('author','title')\n\t);\n\tregister_post_type( 'companies', $args_company);\n\tregister_post_type( 'group_of_companies',$args_group_of_companies);\n}", "function news_custom_post() {\n $args = array(\n 'public' => true,\n 'label' => 'News',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n 'show_ui' => true,\n 'publicly_queryable' => true,\n 'taxonomies' => array('category', 'post_tag'),\n 'rewrite' => array( 'slug' => 'news' )\n\t\n );\n register_post_type('news', $args);\n}", "function cadastrando_post_type_clientes() {\n\n $nomeSingular = 'Cliente';\n $nomePlural = 'Clientes';\n $descricao = 'Clientes da minha empresa';\n\n $labels = array(\n 'name' => $nomePlural,\n 'name_singular' => $nomeSingular,\n 'add_new_item' => 'Adicionar novo ' . $nomeSingular,\n 'edit_item' => 'Editar ' . $nomeSingular\n );\n\n $supports = array(\n 'title',\n 'editor',\n 'thumbnail'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => $descricao,\n 'public' => true,\n 'menu_icon' => 'dashicons-id-alt',\n 'supports' => $supports\n );\n\n register_post_type( 'cliente', $args);\n}", "function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "function create_posttype() \n {\n register_post_type( 'mist_employee',\n array(\n 'labels' => array(\n 'name' => __( 'Employees' ),\n 'singular_name' => __( 'Employee' )\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'employees'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-businessman'\n )\n );\n register_post_type( 'mist_message',\n array(\n 'labels' => array(\n 'name' => __( 'Person Messages' ),\n 'singular_name' => __( 'Message' ),\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'message'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-testimonial'\n )\n );\n add_post_type_support('mist_message', 'excerpt');\n \n }", "function planoType() {\r\n\t$labels = array(\r\n\t\t'name' => _x('Planos', 'post type general name'),\r\n\t 'singular_name' => _x('Plano', 'post type singular name'),\r\n\t 'add_new' => _x('Adicionar Novo', 'slideshow item'),\r\n\t 'add_new_item' => __('Adicionar Novo Plano'),\r\n\t 'edit_item' => __('Editar Plano'),\r\n\t 'new_item' => __('Novo Plano'),\r\n\t 'view_item' => __('Ver Plano'),\r\n\t 'search_items' => __('Procurar Plano'),\r\n\t 'not_found' => __('Nenhum Plano Encontrado'),\r\n\t 'not_found_in_trash' => __('Nenhum Plano na Lixeira'),\r\n\t 'parent_item_colon' => ''\r\n\t);\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 4,\r\n 'supports' => array('title','editor'),\r\n 'rewrite' => array('slug' => 'plano')\r\n );\r\n\r\n register_post_type( 'plano' , $args ); # registering the new post type\r\n}", "function products_type() {\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n\n $args = array(\n 'label' => 'Productos',\n 'description' => 'Productos de Platzi',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n\n register_post_type('producto', $args);\n}", "function add_my_custom_posttype_smaken(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe smaak toe',\n 'add_new_item' => 'Voeg nieuwe smaak toe',\n 'name' => 'Smaken',\n 'singular_name' => 'Smaak',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije smaken van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-carrot', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n );\n register_post_type( 'smaken', $args ); \n }", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}" ]
[ "0.857139", "0.85078686", "0.8346599", "0.8311953", "0.82610744", "0.8250901", "0.8214435", "0.8198544", "0.8182374", "0.8179937", "0.81755054", "0.81174445", "0.8096789", "0.8096372", "0.80902606", "0.80897415", "0.80710834", "0.80636066", "0.80564845", "0.8040697", "0.8028535", "0.80075175", "0.80036855", "0.80013466", "0.79770595", "0.79770595", "0.79767126", "0.79460543", "0.7902275", "0.78118813", "0.77982503", "0.7775229", "0.7774863", "0.7772572", "0.7765738", "0.7754492", "0.7716954", "0.76941246", "0.76865613", "0.7684255", "0.7679882", "0.76570755", "0.7633588", "0.76283216", "0.7624794", "0.76204956", "0.7616058", "0.75999016", "0.7597309", "0.75528544", "0.7547459", "0.7533931", "0.75300646", "0.75150895", "0.7513497", "0.75065076", "0.7500322", "0.74983376", "0.74841005", "0.7471556", "0.74676055", "0.74574304", "0.7454962", "0.7454553", "0.74508953", "0.74489313", "0.74447536", "0.74401814", "0.7437474", "0.7434089", "0.7432328", "0.7432143", "0.74233043", "0.74198055", "0.7412465", "0.7403442", "0.7400146", "0.73916614", "0.7378359", "0.735437", "0.7350496", "0.7337624", "0.73149323", "0.7305451", "0.73045343", "0.73003393", "0.7294812", "0.7281938", "0.7277364", "0.7274458", "0.72656375", "0.7264499", "0.72629976", "0.72621894", "0.72482127", "0.72462267", "0.72407717", "0.72372895", "0.72325337", "0.72316885", "0.72240907" ]
0.0
-1
=======> How to display the widget on the screen.
function widget($args, $widgetData) { //=======> widget body echo $before_widget; $curlHandler = curl_init(); $userName = 'integracao-mooc'; $password = '123'; curl_setopt_array($curlHandler, [ CURLOPT_URL => 'http://troia.cefor.cefetes.br:8082/mooc-api/buscar-cursos-inscricoes-abertas', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => $userName . ':' . $password, ]); $response = curl_exec($curlHandler); ; $json_str = $response; $jsonObj = json_decode($json_str); $cursos = $jsonObj->cursos; ?> <div class="container-fluid" id="cursos"> <div class="container"> <div class="top-section"> <h2 class="titulo-section2">Nossos Cursos</h2> </div> <div class="row"> <?php //navega pelos elementos do array, imprimindo cada empregado /*foreach ( $cursos as $curso) { echo "<div class='card-curso'> <img class='img-curso' src='/images/cursos/vitrine_FerramentaGravacaoVideo.jpg' alt='$curso->nome'> <div class='descricao'> <h6> $curso->nome</h6> <a href='$curso->link' target='_blank' class='btn2'>Acessar curso</a> </div> </div>"; echo "<br>"; }*/ $args = array( 'post_type' => 'cursos_post_type' ); // the query $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { $lista_post_curso = []; while ( $the_query->have_posts() ) { $the_query->the_post(); $titulo = get_the_title(); $resumo = get_the_excerpt(); echo "<div class='card-curso'>"; if ( has_post_thumbnail() ) { the_post_thumbnail('medium', array('class' => 'img-curso')); } echo" <div class='descricao'> <h6> $titulo</h6> $resumo <a href='$meta' target='_blank' class='btn2'>Acessar curso</a> </div> </div>"; echo "<br>"; array_push($lista_post_curso, $titulo); } } wp_reset_postdata(); /* $lista_moodle_curso = []; foreach ($cursos as $curso){ $nome = $curso->nome; array_push($lista_moodle_curso, $nome); } print_r($lista_post_curso); echo "<BR>"; print_r($lista_moodle_curso); $testar = in_array($lista_post_curso, $cursos); curl_close($curlHandler);*/ ?> </div> </div> </div> <?php echo $after_widget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showWidget($login) {\n\t\t\n\t\t$window = HeadsUpWidget::Create($login);\n\t\t$window->setSize($this->config->width, 50);\n\t\t$window->setText($this->config->text);\n\t\t$window->setUrl($this->config->url);\n\t\t$pos = explode(\",\", $this->config->pos);\n\t\t$window->setPosition($pos[0], $pos[1]);\n\t\t$window->show();\n\t}", "public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function getWidget();", "public static function widget() {\n require_once( 'includes/widget.php' );\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public static function widget() {\n \n\t\t$start = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t$remaining_days = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t\n\t\t// Display Dashboard widget\n\t\trequire_once( 'red-flag-parking-display.php' );\n }", "public function show() {\n echo $this->mountElement();\n }", "public function widget( $args, $instance ){}", "public function startup() {\n parent::startup(); \n self::renderShow(); \n }", "public static function register() {\n\t register_widget( __CLASS__ );\n\t}", "function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function addWidget()\r\n {\r\n }", "public function widget($hArgs, $hInstance)\n {\n echo $this->generateWidget($hArgs, $hInstance);\n\t}", "public function indexAction()\n {\n $this->view->widget = $this->_getWidget();\n }", "public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}", "function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function show();", "public function show();", "public function show();", "public function show();", "private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}", "function display() {\r parent::display();\r }", "function ThemeistsLogoShowcase()\n\t\t\t{\n\t\t\n\t\t\t\t//load_plugin_textdomain( self::locale, false, plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . '/lang/' );\n\n\t\t\n\t\t\t\t$widget_opts = array (\n\n\t\t\t\t\t'classname' => 'ThemeistsLogoShowcase', \n\t\t\t\t\t'description' => __( 'A simple widget to showcase your client\\'s logos', self::locale )\n\n\t\t\t\t);\n\n\t\t\t\t$control_options = array(\n\n\t\t\t\t\t'width' => '400'\n\n\t\t\t\t);\n\n\t\t\t\t//Register the widget\n\t\t\t\t$this->WP_Widget( self::slug, __( self::name, self::locale ), $widget_opts, $control_options );\n\t\t\n\t\t \t// Load JavaScript and stylesheets\n\t\t \t$this->register_scripts_and_styles();\n\t\t\n\t\t\t}", "function suhv_widgets()\n{\n register_widget( 'Suhv_Widgets' );\n}", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function display() {\n echo $this->render();\n }", "public function widget($args, $instance){\n $this->coreWidget->renderWidget($args, $instance);\n }", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function widget($args, $instance) {\n $feedData = $this->_collect_data($instance);\n $this->_print_widget($args, $instance, $feedData);\n }", "protected function _screen() {}", "function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}", "function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}", "function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}", "public function render_screen_layout()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function show() {\n \n }", "public function show()\n {\n //\n }", "static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}", "function cm_load_widget_r() {\n\tregister_widget( 'cm_widget_r' );\n}", "function FM_WebCam_Widget(){\r\n $widget_ops = array('classname' => 'FM_WebCam_Widget', 'description' => __( \"Show WebCam in Sidebar\") );\r\n $control_ops = array('width' => 300, 'height' => 300);\r\n $this->WP_Widget('FM_WebCam', __('FM_WebCam'), $widget_ops, $control_ops);\r\n }", "public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }", "public function show()\n\t{\n\t\t\n\t}", "function FM_WebCam_WidgetInit() {\r\n register_widget('FM_WebCam_Widget');\r\n }", "function anariel_homesponsorstext_Widget() {\n\t\n\t\t/* Widget settings. */\n\t\t$widget_ops = array( 'classname' => 'anariel_homesponsorstext_widget', 'description' => __('Sponsors Text Block - place to add sposors text (we used this widget on home and about pages)', 'anariel') );\n\n\t\t/* Widget control settings. */\n\t\t$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'anariel_homesponsorstext_widget' );\n\n\t\t/* Create the widget. */\n\t\t$this->WP_Widget( 'anariel_homesponsorstext_widget', __('Anariel-Sponsors Text Widget', 'anariel'), $widget_ops, $control_ops );\n\t}", "function widget( $args, $instance ) {\n extract( $args );\n\n /* Before widget (defined by themes). */\n echo $before_widget;\n\n echo $before_title . 'thunderstorm-stream' . $after_title;\n thunderstorm_stream_box();\n\n /* After widget (defined by themes). */\n echo $after_widget;\n }", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "function ftagementor_description_Widget() {\r\r\n register_widget( 'ftagementor_description_Widget' );\r\r\n}", "public static function widget() {\n\t\t$username = self::get_dashboard_widget_option(self::wid, 'username');\n\t\t$apikey = self::get_dashboard_widget_option(self::wid, 'apikey');\n\t\t$project_id = self::get_dashboard_widget_option(self::wid, 'project_id');\n\t\t$ref_url = 'http://go.endcore.64905.digistore24.com/';\n\t\t$check = ($username && $apikey && $project_id ? true : false);\n \n\t\tif(!$check) {\n\t\t\techo '<h4 style=\"text-align:right; padding-right: 40px; padding-top: 10px\">' . __( 'Bitte prüfe die Einstellungen &and;', 'affiliatetheme-backend' ) . '</h4>&nbsp;';\n ?>\n <div class=\"rankalyst-text\">\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\"><img src=\"<?php echo get_template_directory_uri(); ?>/_/img/rankalyst.png\"></a>\n <p><?php printf(__('Mit <a href=\"%s\" target=\"_blank\">Rankalyst</a> kannst du 10 Keywords kostenlos tracken!', 'affiliatetheme-backend'), $ref_url); ?></p>\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\" class=\"button button-primary\"><?php _e('Kostenlos starten', 'affiliatetheme-backend'); ?></a>\n </div>\n <?php\n\t\t}\n\t\t\n\t\t/* @TODO Rankingchange <span class=\"plus\">+</span> bzw Minus ausgeben, jenachdem ob Change positiv oder negativ. */\n\n ?>\n <div class=\"rankalyst-data\">\n <ul class=\"rankalyst-tabs\">\n <li><a href=\"#\" data-type=\"organic\" class=\"active\"><?php _e('Organic', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"mobile\"><?php _e('Mobile', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"local\"><?php _e('Local', 'affiliatetheme-backend'); ?></a></li>\n </ul>\n\n <div class=\"rankalyst-tab active\" data-type=\"organic\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 1);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"mobile\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 2);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"local\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 3);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n </div>\n <?php\n }", "public function render_widget() {\n\n return Widget::render($this->settings);\n\n }", "function WeblizarTwitterWidget() {\r\n\tregister_widget( 'WeblizarTwitter' );\r\n}", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "function widget($args, $instance){\n\t\t\n\t\t$output = '<div id=\"fb_like_box\" class=\"xs-invisible hidden-xs hidden-sm widget fb_like_box clearfix\"><div class=\"mmb-vmenublockheader\"><h3 class=\"t\">facebook</h3></div><div id=\"fbHolder\" class=\"mmb-blockcontent\"><p>Carregant...</p></div></div>';\n\t\techo $args['before_widget'].$output.$args['after_widget'];\n\t}", "abstract protected function show();", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function actionLoadWidget() {\n\t\ttry {\n\t\t\tif (($id = Yii::app()->getRequest()->getQuery(\"medcard\")) == null) {\n\t\t\t\tthrow new CException(\"Can't resolve \\\"medcard\\\" identification number as query parameter\");\n\t\t\t}\n\t\t\tif (Laboratory_Medcard::model()->findByPk($id) == null) {\n\t\t\t\tthrow new CException(\"Unresolved laboratory's medcard identification number \\\"{$id}\\\"\");\n\t\t\t}\n\t\t\t$widget = $this->getWidget(\"AutoForm\", [\n\t\t\t\t\"model\" => new Laboratory_Form_Direction(\"laboratory.treatment.register\", [\n\t\t\t\t\t\"medcard_id\" => $id\n\t\t\t\t])\n\t\t\t]);\n\t\t\t$this->leave([\n\t\t\t\t\"component\" => $widget,\n\t\t\t\t\"status\" => true\n\t\t\t]);\n\t\t} catch (Exception $e) {\n\t\t\t$this->exception($e);\n\t\t}\n\t}", "public abstract function display();", "function hotpro_load_widget() {register_widget( 'data_hotpro_widget' );}", "public function show()\n\t{\n\n\t}", "public function run()\n {\n $this->render('search-triple-widget');\n }", "public function init()\n {\n // Initialize widget.\n }", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "function Wfc_Developer_Dashboard_Widget(){\n wp_add_dashboard_widget( \"wfc_developer_dashboard\", __( \"WFC Dashboard Widget\" ), \"wfc_developer_dashboard\" );\n }", "function register_broker_widget() {\n register_widget( 'Broker_Widget' );\n}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function renderWidgets()\r\n {\r\n foreach ($this->_widgets as $widget)\r\n {\r\n echo current($widget);\r\n }\r\n\r\n }", "function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}", "protected function makeJqWidget()\n {\n parent::makeJqWidget();\n Application::executeJsFunction('qc.dialog', $this->getJqControlId(), Application::PRIORITY_HIGH);\n }", "function form($instance) {\n\t\techo '<p>Place on any sidebar to display Twitter feed.</p>';\n\t}", "public function display()\n\t{\n\t\t$serviceLocator = $this->_application->getServiceLocator();\n\t\t$eventDispatcher = $this->_application->getEventDispatcher();\n\n\t\t// Finish configuring Open Power Template\n\t\t$opt = $serviceLocator->get('template.Opt');\n\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.template.configure',\n\t\t\tarray('opt' => $opt)\n\t\t));\n\n\t\t$opt->setup();\n\n\t\t// Configure the layout view\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.configure',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\n\t\t// Add placeholders\n\t\tforeach($this->_placeholders as $name => &$placeholder)\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($placeholder as $view)\n\t\t\t{\n\t\t\t\t$data[] = array('view' => $view);\n\t\t\t}\n\t\t\t$this->_layout->assign($name, $data);\n\t\t}\n\n\t\t// Render everything. Actually, this is redirected to events, so\n\t\t// that we can easily change the exact rendering procedure.\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.render',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\t\t$this->_output->render($this->_layout);\n\t}", "abstract function buildShowLayout(): void;", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show() {\n\t}", "function Show()\r\n\t{\r\n\r\n\t}" ]
[ "0.71723706", "0.6841738", "0.6840688", "0.67530185", "0.6743847", "0.67279756", "0.667344", "0.6655251", "0.66241246", "0.66241246", "0.6610231", "0.6610231", "0.6610231", "0.66101635", "0.6571742", "0.65162563", "0.6447376", "0.64377904", "0.64360344", "0.6416886", "0.6405268", "0.6402825", "0.63920724", "0.6365802", "0.63473785", "0.6321859", "0.63159543", "0.63159543", "0.63159543", "0.63159543", "0.6297446", "0.6295739", "0.6293674", "0.6259567", "0.62537944", "0.62385696", "0.6235149", "0.61981046", "0.61425674", "0.61425674", "0.61425674", "0.61211693", "0.6104715", "0.6088214", "0.6085798", "0.6075973", "0.6075379", "0.60674435", "0.6055891", "0.6045545", "0.60230935", "0.60230935", "0.6022948", "0.6022948", "0.600113", "0.60001343", "0.5993964", "0.5992828", "0.5988905", "0.59832335", "0.5983116", "0.59674513", "0.596628", "0.5957381", "0.595607", "0.5949415", "0.5949105", "0.59478927", "0.59337175", "0.59304327", "0.5917553", "0.5915237", "0.5903713", "0.58921266", "0.58846295", "0.58743995", "0.5863983", "0.5860015", "0.5847866", "0.58472645", "0.58472645", "0.58449996", "0.5842313", "0.5841186", "0.5830705", "0.5830705", "0.5816142", "0.58089036", "0.57983005", "0.5796818", "0.5793948", "0.5791088", "0.5783609", "0.5783609", "0.5783609", "0.5783609", "0.5783609", "0.5783609", "0.5783609", "0.57833356", "0.57817924" ]
0.0
-1
=======> How to display the widget on the screen.
function widget($args, $widgetData) { //=======> widget body echo $before_widget; ?> <div class="container-fluid" id="como-funciona"> <div class="container" > <?php $args = array( 'post_type' => 'howTo_post_type' ); // the query $the_query = new WP_Query( $args );?> <div class="top-section"> <h2 class="titulo-section">O que é?</h2> </div> <?php if ( $the_query->have_posts() ) { $lista_post_curso = []; while ( $the_query->have_posts() ) { $the_query->the_post(); $conteudo = get_the_content(); $titulo = get_the_title(); if ($titulo === 'O que é?'){ echo ' <div class="mooc">'; the_content(); echo '</div> <div class="top-section"> <h2 class="titulo-section">Como Funciona</h2> </div> <div class="row">'; }else{ echo "<div class='card-howTo'>"; if ( has_post_thumbnail() ) { the_post_thumbnail('medium', array('class' => 'icone1')); } echo"<h6> $titulo</h6> $conteudo </div> "; echo "<br>"; } } } wp_reset_postdata(); ?> </div> </div> </div> <?php echo $after_widget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showWidget($login) {\n\t\t\n\t\t$window = HeadsUpWidget::Create($login);\n\t\t$window->setSize($this->config->width, 50);\n\t\t$window->setText($this->config->text);\n\t\t$window->setUrl($this->config->url);\n\t\t$pos = explode(\",\", $this->config->pos);\n\t\t$window->setPosition($pos[0], $pos[1]);\n\t\t$window->show();\n\t}", "public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function getWidget();", "public static function widget() {\n require_once( 'includes/widget.php' );\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public static function widget() {\n \n\t\t$start = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t$remaining_days = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t\n\t\t// Display Dashboard widget\n\t\trequire_once( 'red-flag-parking-display.php' );\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public function show() {\n echo $this->mountElement();\n }", "public function widget( $args, $instance ){}", "public function startup() {\n parent::startup(); \n self::renderShow(); \n }", "public static function register() {\n\t register_widget( __CLASS__ );\n\t}", "function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function addWidget()\r\n {\r\n }", "public function widget($hArgs, $hInstance)\n {\n echo $this->generateWidget($hArgs, $hInstance);\n\t}", "public function indexAction()\n {\n $this->view->widget = $this->_getWidget();\n }", "public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}", "function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function show();", "public function show();", "public function show();", "public function show();", "private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}", "function ThemeistsLogoShowcase()\n\t\t\t{\n\t\t\n\t\t\t\t//load_plugin_textdomain( self::locale, false, plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . '/lang/' );\n\n\t\t\n\t\t\t\t$widget_opts = array (\n\n\t\t\t\t\t'classname' => 'ThemeistsLogoShowcase', \n\t\t\t\t\t'description' => __( 'A simple widget to showcase your client\\'s logos', self::locale )\n\n\t\t\t\t);\n\n\t\t\t\t$control_options = array(\n\n\t\t\t\t\t'width' => '400'\n\n\t\t\t\t);\n\n\t\t\t\t//Register the widget\n\t\t\t\t$this->WP_Widget( self::slug, __( self::name, self::locale ), $widget_opts, $control_options );\n\t\t\n\t\t \t// Load JavaScript and stylesheets\n\t\t \t$this->register_scripts_and_styles();\n\t\t\n\t\t\t}", "function display() {\r parent::display();\r }", "function suhv_widgets()\n{\n register_widget( 'Suhv_Widgets' );\n}", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function display() {\n echo $this->render();\n }", "public function widget($args, $instance){\n $this->coreWidget->renderWidget($args, $instance);\n }", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function widget($args, $instance) {\n $feedData = $this->_collect_data($instance);\n $this->_print_widget($args, $instance, $feedData);\n }", "function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}", "protected function _screen() {}", "function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}", "function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}", "public function render_screen_layout()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function show() {\n \n }", "public function show()\n {\n //\n }", "static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}", "function cm_load_widget_r() {\n\tregister_widget( 'cm_widget_r' );\n}", "function FM_WebCam_Widget(){\r\n $widget_ops = array('classname' => 'FM_WebCam_Widget', 'description' => __( \"Show WebCam in Sidebar\") );\r\n $control_ops = array('width' => 300, 'height' => 300);\r\n $this->WP_Widget('FM_WebCam', __('FM_WebCam'), $widget_ops, $control_ops);\r\n }", "public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }", "public function show()\n\t{\n\t\t\n\t}", "function FM_WebCam_WidgetInit() {\r\n register_widget('FM_WebCam_Widget');\r\n }", "function anariel_homesponsorstext_Widget() {\n\t\n\t\t/* Widget settings. */\n\t\t$widget_ops = array( 'classname' => 'anariel_homesponsorstext_widget', 'description' => __('Sponsors Text Block - place to add sposors text (we used this widget on home and about pages)', 'anariel') );\n\n\t\t/* Widget control settings. */\n\t\t$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'anariel_homesponsorstext_widget' );\n\n\t\t/* Create the widget. */\n\t\t$this->WP_Widget( 'anariel_homesponsorstext_widget', __('Anariel-Sponsors Text Widget', 'anariel'), $widget_ops, $control_ops );\n\t}", "function widget( $args, $instance ) {\n extract( $args );\n\n /* Before widget (defined by themes). */\n echo $before_widget;\n\n echo $before_title . 'thunderstorm-stream' . $after_title;\n thunderstorm_stream_box();\n\n /* After widget (defined by themes). */\n echo $after_widget;\n }", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "function ftagementor_description_Widget() {\r\r\n register_widget( 'ftagementor_description_Widget' );\r\r\n}", "public static function widget() {\n\t\t$username = self::get_dashboard_widget_option(self::wid, 'username');\n\t\t$apikey = self::get_dashboard_widget_option(self::wid, 'apikey');\n\t\t$project_id = self::get_dashboard_widget_option(self::wid, 'project_id');\n\t\t$ref_url = 'http://go.endcore.64905.digistore24.com/';\n\t\t$check = ($username && $apikey && $project_id ? true : false);\n \n\t\tif(!$check) {\n\t\t\techo '<h4 style=\"text-align:right; padding-right: 40px; padding-top: 10px\">' . __( 'Bitte prüfe die Einstellungen &and;', 'affiliatetheme-backend' ) . '</h4>&nbsp;';\n ?>\n <div class=\"rankalyst-text\">\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\"><img src=\"<?php echo get_template_directory_uri(); ?>/_/img/rankalyst.png\"></a>\n <p><?php printf(__('Mit <a href=\"%s\" target=\"_blank\">Rankalyst</a> kannst du 10 Keywords kostenlos tracken!', 'affiliatetheme-backend'), $ref_url); ?></p>\n <a href=\"<?php echo $ref_url; ?>\" target=\"_blank\" class=\"button button-primary\"><?php _e('Kostenlos starten', 'affiliatetheme-backend'); ?></a>\n </div>\n <?php\n\t\t}\n\t\t\n\t\t/* @TODO Rankingchange <span class=\"plus\">+</span> bzw Minus ausgeben, jenachdem ob Change positiv oder negativ. */\n\n ?>\n <div class=\"rankalyst-data\">\n <ul class=\"rankalyst-tabs\">\n <li><a href=\"#\" data-type=\"organic\" class=\"active\"><?php _e('Organic', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"mobile\"><?php _e('Mobile', 'affiliatetheme-backend'); ?></a></li>\n <li><a href=\"#\" data-type=\"local\"><?php _e('Local', 'affiliatetheme-backend'); ?></a></li>\n </ul>\n\n <div class=\"rankalyst-tab active\" data-type=\"organic\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 1);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"mobile\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 2);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n\n <div class=\"rankalyst-tab\" data-type=\"local\">\n <?php\n $rankalyst = new AT_Rankalyst_API($username, $apikey, $project_id, 3);\n if($rankalyst) {\n\t $response = $rankalyst->data();\n\t if($response) {\n\t\t if ( $response->status != 'success' ) {\n\t\t\t echo '<div class=\"rankalyst-text\"><p style=\"color: #c01313; margin-top: 10px\">' . $response->message . '</p></div>';\n\t\t } else {\n\t\t\t if ( $response->data ) {\n\t\t\t\t $data = $response->data->items;\n\t\t\t\t $rankalyst->output( $data );\n\t\t\t }\n\t\t }\n\t }\n }\n ?>\n </div>\n </div>\n <?php\n }", "public function render_widget() {\n\n return Widget::render($this->settings);\n\n }", "function WeblizarTwitterWidget() {\r\n\tregister_widget( 'WeblizarTwitter' );\r\n}", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "function widget($args, $instance){\n\t\t\n\t\t$output = '<div id=\"fb_like_box\" class=\"xs-invisible hidden-xs hidden-sm widget fb_like_box clearfix\"><div class=\"mmb-vmenublockheader\"><h3 class=\"t\">facebook</h3></div><div id=\"fbHolder\" class=\"mmb-blockcontent\"><p>Carregant...</p></div></div>';\n\t\techo $args['before_widget'].$output.$args['after_widget'];\n\t}", "abstract protected function show();", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function actionLoadWidget() {\n\t\ttry {\n\t\t\tif (($id = Yii::app()->getRequest()->getQuery(\"medcard\")) == null) {\n\t\t\t\tthrow new CException(\"Can't resolve \\\"medcard\\\" identification number as query parameter\");\n\t\t\t}\n\t\t\tif (Laboratory_Medcard::model()->findByPk($id) == null) {\n\t\t\t\tthrow new CException(\"Unresolved laboratory's medcard identification number \\\"{$id}\\\"\");\n\t\t\t}\n\t\t\t$widget = $this->getWidget(\"AutoForm\", [\n\t\t\t\t\"model\" => new Laboratory_Form_Direction(\"laboratory.treatment.register\", [\n\t\t\t\t\t\"medcard_id\" => $id\n\t\t\t\t])\n\t\t\t]);\n\t\t\t$this->leave([\n\t\t\t\t\"component\" => $widget,\n\t\t\t\t\"status\" => true\n\t\t\t]);\n\t\t} catch (Exception $e) {\n\t\t\t$this->exception($e);\n\t\t}\n\t}", "public abstract function display();", "function hotpro_load_widget() {register_widget( 'data_hotpro_widget' );}", "public function show()\n\t{\n\n\t}", "public function run()\n {\n $this->render('search-triple-widget');\n }", "public function init()\n {\n // Initialize widget.\n }", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "function Wfc_Developer_Dashboard_Widget(){\n wp_add_dashboard_widget( \"wfc_developer_dashboard\", __( \"WFC Dashboard Widget\" ), \"wfc_developer_dashboard\" );\n }", "function register_broker_widget() {\n register_widget( 'Broker_Widget' );\n}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function renderWidgets()\r\n {\r\n foreach ($this->_widgets as $widget)\r\n {\r\n echo current($widget);\r\n }\r\n\r\n }", "function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}", "protected function makeJqWidget()\n {\n parent::makeJqWidget();\n Application::executeJsFunction('qc.dialog', $this->getJqControlId(), Application::PRIORITY_HIGH);\n }", "function form($instance) {\n\t\techo '<p>Place on any sidebar to display Twitter feed.</p>';\n\t}", "public function display()\n\t{\n\t\t$serviceLocator = $this->_application->getServiceLocator();\n\t\t$eventDispatcher = $this->_application->getEventDispatcher();\n\n\t\t// Finish configuring Open Power Template\n\t\t$opt = $serviceLocator->get('template.Opt');\n\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.template.configure',\n\t\t\tarray('opt' => $opt)\n\t\t));\n\n\t\t$opt->setup();\n\n\t\t// Configure the layout view\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.configure',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\n\t\t// Add placeholders\n\t\tforeach($this->_placeholders as $name => &$placeholder)\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($placeholder as $view)\n\t\t\t{\n\t\t\t\t$data[] = array('view' => $view);\n\t\t\t}\n\t\t\t$this->_layout->assign($name, $data);\n\t\t}\n\n\t\t// Render everything. Actually, this is redirected to events, so\n\t\t// that we can easily change the exact rendering procedure.\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.render',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\t\t$this->_output->render($this->_layout);\n\t}", "abstract function buildShowLayout(): void;", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show() {\n\t}", "function Show()\r\n\t{\r\n\r\n\t}" ]
[ "0.71726185", "0.68407875", "0.6838434", "0.67505753", "0.6744319", "0.67290175", "0.6672501", "0.6652589", "0.6626374", "0.6626374", "0.6610621", "0.66081464", "0.66081464", "0.66081464", "0.65711737", "0.6516793", "0.64470345", "0.64395577", "0.6437412", "0.6417798", "0.6405341", "0.64037234", "0.63908154", "0.63680786", "0.63488567", "0.6319783", "0.6313463", "0.6313463", "0.6313463", "0.6313463", "0.62960756", "0.6295015", "0.62936485", "0.62605536", "0.6255339", "0.6238525", "0.62367415", "0.6198205", "0.6140003", "0.6140003", "0.6140003", "0.61190265", "0.61064494", "0.60891825", "0.6086509", "0.6076069", "0.60739434", "0.6069185", "0.6057108", "0.60446703", "0.60206383", "0.60206383", "0.602049", "0.602049", "0.59986925", "0.5997531", "0.59956425", "0.59944296", "0.5989885", "0.59804463", "0.5980329", "0.5969197", "0.59670126", "0.5957971", "0.5955379", "0.5950431", "0.59494394", "0.5948525", "0.5934756", "0.5931742", "0.591835", "0.59122217", "0.59022206", "0.5891689", "0.58815026", "0.5874326", "0.5861208", "0.5859013", "0.58492655", "0.58467627", "0.58446467", "0.58446467", "0.58432645", "0.58414286", "0.58280075", "0.58280075", "0.5818381", "0.58078957", "0.5798793", "0.5797022", "0.5792582", "0.57898706", "0.5780974", "0.5780974", "0.5780974", "0.5780974", "0.5780974", "0.5780974", "0.5780974", "0.57806265", "0.577971" ]
0.0
-1
Sets the connection status of the db
private function setConnStatus ($valid, $status) { $this->valid = $valid; $this->conn_status = $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConnection( $v ){ if( $this->connection != $v ){ $this->dirty = true; } $this->connection = $v; }", "public function setDbConnection($value)\n {\n $this->_db = $value;\n }", "private function setConnectionStat($bool){\n\t\t$this->m_IsConnected = $bool;\n\t}", "public function setConnection()\r\n {\r\n $this->con = $this->db->getConnection();\r\n }", "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "protected static function setConnection(){\n static::$conn = connection\\DBconnect::makeInstance();\n }", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function setActive($value) {\n if ($value != $this->_active) {\n if ($value)\n $this->connect();\n else\n $this->close();\n }\n }", "public function __construct()\n\t{\n\t\t$this->conn = 'connected';\n\t}", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function setConnectionOverride(\\codename\\core\\database $db) {\r\n $this->db = $db;\r\n }", "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "public function setConnection() {\n\t\t$con = Config::get('librarydirectory::database.default');\n\t\tif ( $con && $con !== 'default' ) {\n\t\t\t$config = Config::get('librarydirectory::database.connections.'.$con);\n\t\t} else {\n\t\t\t$con = Config::get('database.default');\n\t\t\t$config = Config::get('database.connections.'.$con);\n\t\t}\n\t\tConfig::set('database.connections.'.$con, $config);\n\t}", "private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}", "function getConnStatus() \n {\n\t\t\treturn $this->connectionStatus;\n\t\t}", "private function setConnection()\n {\n $cn = new \\MongoClient();\n if(env('DB_ENV','development')=='development')\n self::$database= $cn->selectDB(\"dbAbbaDev01\");\n else\n self::$database = $cn->selectDB(\"dbAbbaProd01\");\n }", "function setCONN($ConnNewValue){\n $this->CONN=$ConnNewValue;\n }", "static public function setConnection($name)\n {\n self::create_connection($name);\n self::$activeConnectionName = $name;\n return true;\n }", "public function setConnection($name);", "private function db_connect() {\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : TRUE;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t// Connect to database.\n\t\tif ( DEBUG_MODE ) {\n\t\t\t$this->dbcon = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t} else {\n\t\t\t$this->dbcon = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t}\n\n\t\tif ( mysqli_connect_errno () ) {\n\t\t\t/* ===== Bail ===== */\n\t\t\tif (DEBUG_DISPLAY) {\n\t\t\t\techo (\"Failed to connect to MySQL: \" . mysqli_connect_error() . '<br />');\n\t\t\t}\n\t\t}\n\n\t\t// Set charset.\n\t\tmysqli_set_charset ( $this->dbcon, $this->dbcharset );\n\n\t\t// Set collate.\n\t\t// mysqli_query ( $this->dbcon, \"COLLATE {$this->dbcollate}\" );\n\n\t\t// Set the database as ready for queries.\n\t\t$this->ready = TRUE;\n\t}", "private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}", "private function updateStatus()\n {\n $this->setStatus(\n socket_get_status(pfsockopen($this->uri, $this->port))\n );\n }", "function connect() {\n\t\t$config = $this->config;\n\t\t$this->connection = $config['connect']($config['database']);\n\t\t$this->connected = is_resource($this->connection);\n\n\t\tif ($this->connected) {\n\t\t\t$this->_execute('PRAGMA count_changes = 1;');\n\t\t}\n\t\treturn $this->connected;\n\t}", "public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }", "private function setConnection(){\n\t\t$this->_connection = new mysqli($this->_host, $this->_username, \n\t\t\t$this->_password, $this->_database);\n\t\n\t\t// Error handling\n\t\tif(mysqli_connect_error()) {\n\t\t\ttrigger_error(\"Failed to conencto to MySQL: \" . mysqli_connect_error(),\n\t\t\t\t E_USER_ERROR);\n\t\t}\n\n\t}", "public function setActiveConnection( $conn ){\r\n $this->_activeConnection = $conn;\r\n $this->_driver = $this->_connections[$this->_activeConnection];\r\n }", "public function setCurrent(){ Database::$cDB = $this; }", "private function setConnection() {\n if( $this->_connection ) { # prevent creation of additional connection\n $this->_connection;\n }\n $db_dsn = \"mysql:host=\".$this->db_host.\";port=\".$this->db_port.\";dbname=\".$this->db_name.\";charset=\".$this->db_char;\n $this->_connection = new PDO($db_dsn,$this->db_user,$this->db_pass,$this->db_opts);\n }", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "public static function open_db_connection(){\r\n self::$connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\r\n\t\t}", "public function sync()\n {\n if( $this->dirty )\n {\n if( !Master::$cMaster->APICall('0.9.1/db/' . $this->ulA->db->ID . '/ul/' . $this->ulA->ID, array( 'setConnection' => $this->json() ) ) ){ commandResult( 500, \"Could not set connection \" . $this->description() ); }\n $this->dirty = false;\n\n return true;\n }\n\n return false;\n }", "public function doEnableDb() {\r\n\t\t$this->db = xn(\"db\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"enablesharding\" => $this->db\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public static function init($db){\r\n self::$conn = $db;\r\n }", "private function databaseConnection(){\n \t\tif($this->connection != null){\n \t\t\treturn;\n \t\t} else {\n \t\t\t$this->connection = mysqli_connect(\"127.0.0.1\", \"user\", \"password\", \"database\") or die(\"Error \" . mysqli_error($this->connection));\n \t\t}\n\n\t}", "public function getStatusConnection()\n {\n return $this->statusConnection;\n }", "public static function resetCurrentConnection() {\n Doctrine_Manager::getInstance()->setCurrentConnection(self::CONNECTION_ICINGA);\n }", "protected static function set_status()\n {\n }", "public function openConnection() {\n $this->mysqli = new mysqli($this->hostname, $this->username, $this->password, $this->database);\n if (mysqli_connect_errno()) {\n header( 'HTTP/1.1 500 DB Error' );\n die(mysqli_connect_error());\n }\n }", "function setConnection( $connId )\n\t{\n\t\tglobal $cman;\n\t\t$this->_connection = $cman->byId( $connId );\n\t}", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}", "private function setConnection(){\n try {\n $this->connection = new PDO('mysql:host='.self::HOST.';dbname='.self::NAME.';', self::USER, self::PASS);\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n die('ERROR: '.$e->getMessage());\n }\n }", "public function changeStatus(): void\n {\n if ('online' === $this->online_status) {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'offline' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'offline';\n } else {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'online' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'online';\n }\n\n // Don't forget to regenerate URL cache to make online machine available\n if (rex_addon::get('url')->isAvailable()) {\n d2u_addon_backend_helper::generateUrlCache('reference_id');\n d2u_addon_backend_helper::generateUrlCache('tag_id');\n }\n }", "protected function setConnection () : void\n {\n $this->connection = new PDO(\"mysql:host=\" . $this->db_host, $this->db_user, $this->db_password , self::PDO_OPTIONS);\n }", "public function setDataConnection(){\n \n \n }", "public function open_db_connection() {\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // cgecking if the connection has errors\n if($this->connection->connect_errno) {\n die(\"Database connection failed\" . $this->connection->connect_error);\n }\n }", "public function setConnection()\n {\n $db = new Mysqli($this->db_host, $this->db_user, $this->db_pass, $this->db_name, $this->db_port);\n \n return $this->connection = $db;\n }", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "public function changeclientstatus() {\r\n\t\t$this->clients->changeclientstatus();\r\n\t}", "public function setDbConnection($conn)\n {\n $this->dbConn = $conn;\n }", "private function setRabbitMQServerConnected($connectionStatus)\n\t{\n\t\t$this->isRabbitMQServerConnected = $connectionStatus;\n\t}", "private function open_connection(){\n\t\t$this -> conn = new mysqli(self::$SERVER, self::$USER, self::$PASS, $this -> DATABASE);\n\t}", "private function dbConnect(){\n\t\t\t$mysqli = $this->mysqli = new mysqli(self::DB_SERVER, self::DB_USER, self::DB_PASSWORD, self::DB);\n mysqli_set_charset($mysqli, \"utf8\");\n if ($mysqli->connect_errno) {\n $this->response('', 204); // server error \n }\n\t\t}", "public function connectToDB() {}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "private function setConexion()\r\n\t\t{\r\n\t\t\t$this->_conexion = New ConexionController();\r\n\t\t\t$this->_conn = $this->_conexion->initConectar('db');\r\n\t\t}", "private function setConexion()\r\n\t\t{\r\n\t\t\t$this->_conexion = New ConexionController();\r\n\t\t\t$this->_conn = $this->_conexion->initConectar('db');\r\n\t\t}", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "private function setHostStatus(): void\n {\n $this->host_status = $this->getHostStatus();\n }", "protected function connect() {\n $this->connection = 'resource';\n echo $this->name . ' connected '.\"<br>\" ;\n }", "private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }", "public function connectDB() {}", "public function setConnection(){\n try {\n $connection = new PDO(\"mysql:host=\".$this->serverName.\";dbname=\".$this->dbName,$this->userName,$this->password);\n $connection->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n echo json_encode(\"Connected successfully to database!!!\");\n return $connection;\n } catch (PDOException $e) {\n echo json_encode(\"Connection failed: \".$e->getMessage());\n }\n }", "public function setConnection ($connection)\n {\n $this->db = $connection;\n }", "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "public function connect()\n {\n if ($this->isConnected()) return;\n\n $this->connectionManager = new mysqli(\n $this->hostname, $this->username, $this->password, $this->schema, $this->port);\n \n if (mysqli_connect_errno())\n $this->isConnected = false;\n else\n $this->isConnected = true;\n }", "public function open_db_connection()\n\t{\n\n\t\t$this->connection = new mysqli(DB_HOST,DB_USER,\n\t\t\tDB_PASS,DB_NAME);\n\n\t\tif ($this->connection->connect_errno):\n\t\t\tdie('database connection failed badly' . $this->connection->connect_error);\n\t\tendif;\n\n\t}", "private function setStatusConnection($statusConnection)\n {\n if (is_string($statusConnection)) {\n $this->statusConnection = $statusConnection;\n }\n\n return $this;\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "public function setConnectionMode($mode)\n {\n $modes = [\n self::HOT_CONNECTION_MODE,\n self::COLD_CONNECTION_MODE,\n ];\n\n if (in_array($mode, $modes)) {\n $this->connectionMode = $mode;\n }\n }", "public function open() {\n\n\t\t$this->openConnection();\n\n\t\tif (parent::ping() === false) {\n\t\t\t$this->openConnection(true);\n\t\t}\n\n\t}", "public function useConnection($mode)\r\n {\r\n if ($mode == 'master') {\r\n if (!isset($this->pdoList[0])) {\r\n $this->connectMaster();\r\n } else {\r\n $this->pdo = $this->pdoList[0];\r\n }\r\n } else {\r\n if ($mode == 'slave') {\r\n $this->pdo = $this->pdoList[1];\r\n }\r\n }\r\n $this->autoToggle = false;\r\n }", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "function barrier() {\n\t\t\tif ($this->dbh && $this->dbh !== $this->dbh_select) {\n\t\t\t\tif ($this->dbh_select) {\n\t\t\t\t\t$this->dbh = & $this->dbh_select;\n\t\t\t\t} else {\n\t\t\t\t\t$this->connect();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function setDbPort ($dbPort) {\n $this->dbPort = $dbPort;\n }", "function set_mysql_conn($open=True){\n\tif ($open){\n\t\ttry {\n\t\t$GLOBALS['conn'] = new mysqli(HOST, USER, PASSWORD, DBNAME);\n\t\t} catch (mysqli_sql_exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t} else {\n\t\t$GLOBALS['conn']->close();\n\t}\n}", "public function setConnectionType($type)\n {\n $this->_connectionType = $type;\n }", "function dbInit()\n {\n if ( $this->IsConnected == false )\n {\n $this->Database = eZDB::globalDatabase();\n $this->IsConnected = true;\n }\n }", "function set_db($db) {\n $this->db = $db;\n }", "protected function CeateDatabaseConnection()\r\n\t{\r\n\t\t// Create an instance of the database for use in the system\r\n\t\tif($this->InProduction($_SERVER['SERVER_NAME']))\r\n\t\t\t//$this->Database\t= new Database('gstour.db.4628821.hostedresource.com','gstour','Golf1215','gstour');\r\n\t\t\t$this->Database\t= new Database('97.74.149.114','gstour','Golf1215','gstour');\r\n\t\telse\r\n\t\t\t$this->Database\t= new Database('localhost','root','','test');\r\n\t}", "public function connectMaster()\r\n {\r\n $masterConfig = $this->config['master'];\r\n $this->app->logDebug(\"DB Connect Master {$masterConfig[4]}:host={$masterConfig[0]};dbname={$masterConfig[1]}\");\r\n if (isset($this->pdoList[0])) {\r\n $this->pdoList[0];\r\n return;\r\n }\r\n try {\r\n $this->pdo = new PDO(\"{$masterConfig[4]}:host={$masterConfig[0]};dbname={$masterConfig[1]}\",\r\n $masterConfig[2], $masterConfig[3], [PDO::ATTR_PERSISTENT => $masterConfig[5]]);\r\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $this->connected = true;\r\n } catch (PDOException $e) {\r\n throw new SqlMagicException('Failed to open the DB connection', SqlMagicException::DB_CONN_ERROR);\r\n }\r\n $this->pdoList[0] = $this->pdo;\r\n }", "final public function db($db)\r\n\t{ //select db\r\n\r\n\t\t$this->db = $db;\r\n\t}", "public function testConnection() {\n //Set the connection string.\n $success = $this->setConnection();\n if ($success === true) {\n $this->connect();\n }\n }", "public function setConn($conn){\n\t\t$this->conn = $conn;\n\t}", "private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }", "function connect() {\n trigger_before( 'connect', $this, $this );\n $this->conn = mysql_connect($this->host,$this->user,$this->pass,$this->opt1,$this->opt2);\n if (!$this->conn) {\n $this->db_open = false;\n trigger_error(\"Sorry, the database connection failed. Please check your database connection settings.\".@mysql_error($this->conn), E_USER_ERROR );\n } else {\n $this->db_open = mysql_select_db($this->dbname);\n if (!$this->db_open)\n trigger_error(@mysql_error($this->conn), E_USER_ERROR );\n }\n return $this->db_open;\n }", "function edit(){\n $this->connect(); // open connection\n $this->disconnect(); // close connection\n }", "protected final function connect($active = \"global\") {\n if (!isset($this->dbConf[$active])) {\n common::$log->addCritical(\"No supported connection scheme! ->\",array('SCHEME'=>$active));\n exit(\"PDO: No supported connection scheme!\");\n }\n\n if($this->cluster) {\n ini_set(\"default_socket_timeout\", 1);\n foreach($this->dbConf as $name => $config) {\n if($name == 'global') { //init global db\n $dbConf = $this->dbConf['global'];\n if (!$dsn = $this->dsn('global')) {\n $this->log->addCritical(\"Driver is missing! ->\", array('SCHEME' => $name, 'CONFIG' => $dbConf));\n exit(\"PDO: Driver is missing!\");\n }\n\n try {\n $db = new \\PDO($dsn, $dbConf['username'], $dbConf['password'], array(\\PDO::ATTR_PERSISTENT => $dbConf['persistent'],\n \\PDO::ATTR_TIMEOUT => 5,\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n\n $this->dbHandle[] = $db;\n } catch (PDOException $Exception) {\n $this->log->addWarning(\"Connection Exception! ->\",array('MSG'=>$Exception->getMessage(),'CONFIG'=>$dbConf));\n }\n }\n\n if($name != 'global') { // init masters\n $dbConf = $this->dbConf[$name];\n if (!$dsn = $this->dsn($name)) {\n $this->log->addCritical(\"Driver is missing! ->\", array('SCHEME' => $name, 'CONFIG' => $dbConf));\n exit(\"PDO: Driver is missing!\");\n }\n\n try {\n $port = ($dbConf['driver'] == 'mysql' ? 3306 : 1433); $host = $dbConf['hostname'];\n $ipport = explode(':',$dbConf['hostname'],1);\n if(count($ipport) == 2) {\n $port = $ipport[1];\n $host = $ipport[0];\n } unset($ipport);\n\n if(common::ping_port($host,$port,0.1)) {\n $db = new \\PDO($dsn, $dbConf['username'], $dbConf['password'], array(\\PDO::ATTR_PERSISTENT => $dbConf['persistent'],\n \\PDO::ATTR_TIMEOUT => 1,\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n\n $this->dbHandle[] = $db;\n } else {\n $this->log->addWarning(\"No Connection to Server ->\",array('HOST'=>$dbConf['hostname'],'CONFIG'=>$dbConf));\n }\n } catch (PDOException $Exception) {\n $this->log->addWarning(\"Connection Exception! ->\",array('MSG'=>$Exception->getMessage(),'CONFIG'=>$dbConf));\n }\n }\n }\n\n $this->active = 'master'; //mark as active\n } else if($this->master_slave) {\n try {\n //Init Master\n $dbConf = $this->dbConf[$active];\n if (!$dsn = $this->dsn($active)) {\n $this->log->addCritical(\"Driver is missing! ->\", array('SCHEME' => $active, 'CONFIG' => $dbConf));\n exit(\"PDO: Driver is missing!\");\n }\n\n $db = new \\PDO($dsn, $dbConf['username'], $dbConf['password'], array(\\PDO::ATTR_PERSISTENT => $dbConf['persistent'],\n \\PDO::ATTR_TIMEOUT => 5,\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n $this->dbHandle[] = $db;\n } catch (PDOException $Exception) {\n $this->log->addCritical(\"Connection Exception! ->\",array('MSG'=>$Exception->getMessage(),'CONFIG'=>$dbConf));\n exit(\"PDO: Connection Exception: \" . $Exception->getMessage());\n }\n\n // Init Slaves\n foreach($this->dbConf as $name => $config) {\n if($name != 'global' && $name != 'master') { // init slaves\n $dbConf = $this->dbConf[$name];\n if (!$dsn = $this->dsn($name)) {\n $this->log->addCritical(\"Driver is missing! ->\", array('SCHEME' => $name, 'CONFIG' => $dbConf));\n exit(\"PDO: Driver is missing!\");\n }\n\n try {\n $port = ($dbConf['driver'] == 'mysql' ? 3306 : 1433); $host = $dbConf['hostname'];\n $ipport = explode(':',$dbConf['hostname'],1);\n if(count($ipport) == 2) {\n $port = $ipport[1];\n $host = $ipport[0];\n } unset($ipport);\n\n if(common::ping_port($host,$port,0.1)) {\n $db = new \\PDO($dsn, $dbConf['username'], $dbConf['password'], array(\\PDO::ATTR_PERSISTENT => $dbConf['persistent'],\n \\PDO::ATTR_TIMEOUT => 1,\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n\n $this->dbHandle[] = $db;\n } else {\n $this->log->addWarning(\"No Connection to Server ->\",array('HOST'=>$dbConf['hostname'],'CONFIG'=>$dbConf));\n }\n } catch (PDOException $Exception) {\n $this->log->addWarning(\"Connection Exception! ->\",array('MSG'=>$Exception->getMessage(),'CONFIG'=>$dbConf));\n }\n }\n }\n\n $this->active = 'master'; //mark as active\n } else {\n try {\n $dbConf = $this->dbConf[$active];\n if (!$dsn = $this->dsn($active)) {\n $this->log->addCritical(\"Driver is missing! ->\", array('SCHEME' => $active, 'CONFIG' => $dbConf));\n exit(\"PDO: Driver is missing!\");\n }\n\n $db = new \\PDO($dsn, $dbConf['username'], $dbConf['password'], array(\\PDO::ATTR_PERSISTENT => $dbConf['persistent'],\n \\PDO::ATTR_TIMEOUT => 5,\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n $this->dbHandle = $db;\n $this->active = $active; //mark as active\n } catch (PDOException $Exception) {\n $this->log->addCritical(\"Connection Exception! ->\",array('MSG'=>$Exception->getMessage(),'CONFIG'=>$dbConf));\n exit(\"PDO: Connection Exception: \" . $Exception->getMessage());\n }\n }\n }", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "public function connect_db() {\n }", "public function server_connection(){\n\t\t\n\t\tif(!$this->persist_connection){\n\t\t\t\t\n\t\t\t$this->connection = @mysql_connect($this->server, $this->user, $this->password);\n\t\t\t\t\n\t\t\n\t\t}else{\n\t\t\t\t\n\t\t\t$this->connection = @mysql_pconnect($this->server, $this->user, $this->password);\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif (!$this->connection) {\n\t\t\n\t\t\tthrow new Exception(\"Could not connect to server &nbsp;: &nbsp \" . $this->server . \"\");\n\t\t\texit();\n\t\t}\n\t\t\n\t\tif (!@mysql_ping($this->connection)) {\n\t\t\n\t\t\tthrow new Exception(\"Lost connection to Server &nbsp;: &nbsp \" . $this->server . \"\");\n\t\t\texit();\n\t\t}\n\t\t\n\t}", "public function checkConnection()\n {\n $this->last_error = '';\n if (!isset($this->database)) \n $this->connect();\n }", "function Open($dados) {\r\n if (!isset($this->status)) {\r\n $this->conexao = mysqli_connect($dados[\"HOST\"], $dados[\"USERNAME\"], $dados[\"PASSWORD\"], $dados[\"DBNAME\"]);\r\n //mysqli_set_charset($this->conexao, 'utf-8');\r\n if (mysqli_connect_errno() != 0) {\r\n $this->error = \"Nao foi possivel conectar no banco de dados <b>\\\"\" . $dados[\"DBNAME\"] . \"\\\"</b>\";\r\n $this->status = false;\r\n $this->isError = true;\r\n } else {\r\n $this->status = true;\r\n }\r\n }\r\n // echo \"status: #\".$this->status.\"#\";\r\n return $this->status;\r\n }", "public function open_db_connection() {\n //$this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n //the more \"object oriented\" way of doing this is this next line:\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n if( $this->connection->connect_errno ) {\n die(\"Database connection failed badly\" . $this->connection->connect_error);\n }\n\n }", "private function open_db_connection(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME) \n or\n die(\"database connection failed\" . $this->connection->connect_error);\n \n }", "function dbInit()\n {\n if ( $this->IsConnected == false )\n {\n $this->Database =& eZDB::globalDatabase();\n $this->IsConnected = true;\n }\n }", "public function setStatus()\r\n\t{\r\n\t\t$this->getHostStatus();\r\n\t}" ]
[ "0.69942194", "0.67562056", "0.656131", "0.64680207", "0.64010745", "0.62817025", "0.62606585", "0.62579876", "0.6117569", "0.6049777", "0.60005707", "0.59966993", "0.5994025", "0.5971324", "0.5943246", "0.5932044", "0.5931189", "0.5910605", "0.5901469", "0.5879733", "0.5876502", "0.5819413", "0.5814837", "0.58147407", "0.5773565", "0.5763715", "0.5754662", "0.57489973", "0.5714269", "0.571301", "0.5707783", "0.5686427", "0.5682531", "0.56701005", "0.5669172", "0.5668637", "0.56649196", "0.56478286", "0.5644796", "0.5638477", "0.56348455", "0.56324875", "0.562251", "0.5613425", "0.5610255", "0.5607775", "0.559349", "0.55933934", "0.55879", "0.55810237", "0.55757475", "0.5568003", "0.55579215", "0.5554755", "0.5537365", "0.5536533", "0.5530264", "0.5530264", "0.55256814", "0.5516311", "0.55147076", "0.5505359", "0.5484807", "0.5483459", "0.54824054", "0.5482243", "0.548029", "0.54797834", "0.547091", "0.5468517", "0.54670143", "0.5450152", "0.5447492", "0.54469895", "0.5445331", "0.5440831", "0.5436989", "0.5433813", "0.5432095", "0.54273283", "0.541629", "0.5416166", "0.540605", "0.5406031", "0.5401191", "0.53974766", "0.539682", "0.5386984", "0.53858393", "0.5383708", "0.5382856", "0.5382425", "0.5380996", "0.53804886", "0.53755647", "0.53754354", "0.53737736", "0.5372934", "0.536786", "0.5356239" ]
0.6268274
6
Return the connection status as an array
public function getConnStatus () { return array( "valid" => $this->valid, "status" => $this->conn_status ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getConnStatus() \n {\n\t\t\treturn $this->connectionStatus;\n\t\t}", "public function getStatusConnection()\n {\n return $this->statusConnection;\n }", "public function status()\n {\n return $this->doRequest('GET', 'check-connection-session', []);\n }", "public function getHealthStatus(): array\n {\n $redis = null;\n $mysql = null;\n $mongo = null;\n\n try {\n $redis = $this->redisConnection();\n }catch (RedisException $e) {\n $redis = $e->getMessage();\n }\n\n try {\n $mysql = $this->mysqlConnection();\n }catch (PDOException $e) {\n $mysql = $e->getMessage();\n }\n\n try {\n $mongo = $this->mongoConnection();\n }catch (AuthenticationException | ConnectionTimeoutException | RuntimeException\n | InvalidArgumentException | Exception $e) {\n $mongo = $e->getMessage();\n }\n\n return [\n 'php' => phpversion(),\n 'redis' => $redis,\n 'mysql' => $mysql,\n 'mongo' => $mongo,\n 'endpoint' => $this->endpointConnection()\n ];\n }", "public function connectionStatus()\r\n {\r\n if ($this->checkIfErrorExist) {\r\n //Connection Unsuccessful\r\n return $this->errorMessages;\r\n }\r\n //Connection Successful\r\n return \"Successful\";\r\n }", "public function status()\n {\n return array_map(\n function (array $status) {\n return Status::fromArray($status);\n },\n $this->client->get('status')\n );\n }", "function &getStatus(){\n\t\treturn array();\n\t}", "public function getStatus()\r\n\t{\r\n\t\treturn [\r\n\t\t\t'code' => $this -> result,\r\n\t\t\t'errcode' => $this -> errorCode,\r\n\t\t\t'message' => $this -> errorMessage\r\n\t\t];\r\n\t}", "public function getConnectionStatus()\n {\n $connection = $this->serverAttributes()['HTTP_CONNECTION'];\n\n if (!$connection) {\n return false;\n }\n\n return $connection;\n }", "protected function getMemcachedConnectionStatus() {}", "private function getConnectStatus () \n\t\t{\t\n\t\t\t$status_data = file ( $this->config['status'] ) ;\n\t\t\t$i = 0;\n\t\t\twhile ( $i < count ( $status_data ) ) {\n\t\t\t\t$buffer = explode (\",\" , $status_data [$i] ) ;\n\t\t\t\tif ( count ( $buffer ) == 4) { /* part private ip and public ip */\n\t\t\t\t\tif ( strstr( $status_data[$i], $this->c ) ) {\n\t\t\t\t\t\t$status_info = explode (\",\" , $status_data[$i] );\n\t\t\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t\t\t$this->result['data']['status'] = \"Connected\";\n\t\t\t\t\t\t$this->result['data']['private_ip'] = trim($status_info[0]);\t\n\t\t\t\t\t\t$this->result['data']['public_ip'] = trim($status_info[2]);\t\n\t\t\t\t\t\t$this->result['data']['connect_date'] = trim($status_info[3]);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t} /* Not found in openvpn-status.log */\n\t\t\tif ( ! isset( $this->result['data']['status'] ) ) \n\t\t\t\t$this->result['data']['result'] = \"Offline [note: status.log refresh every 1 minute.]\";\n\t\t\treturn;\n\t\t}", "function get_status() { \n\n\t\t/* Construct the Array */\n\t\t$array['state'] \t= false; //$this->_mpd->state;\n\t\t$array['volume']\t= $this->XBMCCmd(\"GetVolume\");\n\n\t\treturn $array;\n\n\t}", "public function get_status()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$q = $this->_conn->prepare(\"select * from sandbox.dbo.daemon where dbtype = :dbtype order by object asc\");\n\t\t\t\n\t\t\t$dbtype = 'live';\n\t\t\t$q->bindParam(':dbtype', $dbtype);\n\n\t\t\t$q->execute();\n\t\t\t$rs = $q->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\treturn 'ERRORdd: ' . $e->getMessage();\n\t\t}\n\t\t\n\t\treturn $rs;\n\t}", "public function GetConnectionStatistics()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->get_connection_stats();\r\n }", "public function getStatus(): array\n {\n $this->parseResponse();\n return $this->getData();\n }", "function ts3client_getConnectionStatus($serverConnectionHandlerID, &$result) {}", "public function status() {\n\n\t\t/* Construct the Array */\n\t\t$array['state'] \t= $this->_httpq->state();\n\t\t$array['volume']\t= $this->_httpq->get_volume();\n\t\t$array['repeat']\t= $this->_httpq->get_repeat();\n\t\t$array['random']\t= $this->_httpq->get_random();\n\t\t$array['track']\t\t= $this->_httpq->get_now_playing();\n\n\t\tpreg_match(\"/song=(\\d+)\\&/\",$array['track'],$matches);\n\t\t$song_id = $matches['1'];\n\t\t$song = new Song($song_id);\n\t\t$array['track_title'] \t= $song->title;\n\t\t$array['track_artist'] \t= $song->get_artist_name();\n\t\t$array['track_album']\t= $song->get_album_name();\n\n\t\treturn $array;\n\n\t}", "public static function status()\n {\n return plexcel_status(self::getConnection());\n }", "public function monitoring()\n {\n return (array) $this->connection()->smembers('monitoring');\n }", "public function getStatus()\n {\n return $this->query('mnsync status');\n }", "static public function activeConnectionData()\n {\n if (!self::$activeConnectionName)\n throw new Exception\\RuntimeException(\"No database connection is active\");\n return array_merge(self::$_connection_data[self::$activeConnectionName], ['name' => self::$activeConnectionName]);\n }", "public function getStatusArray()\n\t{\n\t\treturn $this->makeReturnTable();\n\t}", "function pdo_stat() {\r\n return array_column(pdo_query(\"SHOW STATUS\")->fetchAll(), \"Value\", \"Variable_name\");\r\n }", "private function getConnectionInfo()\n {\n return [\n 'host' => $this->getSocketEndPoint(),\n 'ssl_file' => $this->sslPem,\n 'pass_phrase'=> $this->passPhrase\n ];\n }", "public function status() {\n \n if(!$this->isReady()) {\n $this->error(\"status() - not ready.\");\n return false;\n }\n \n /* get the status */\n \n $details = $this->doCommand(\"status\");\n \n if(!$details) {\n $this->error(\"status() - could not get status: \".$this->getError());\n return false;\n }\n \n if(count($details) < 7) {\n $this->error(\"status() - missing status lines.\");\n return false;\n }\n \n /* we want the 'value' of each line */\n \n for($i=0; $i<7; $i++) {\n \n $item = trim($details[$i]);\n $matches = array();\n \n if(empty($item)) {\n continue;\n }\n \n if(!preg_match('/^[^:]+:\\s+(.*)$/', $item, $matches)) {\n $this->error(\"status() - can't match status line: $item\");\n return false;\n }\n $details[$i] = $matches[1];\n } \n \n /* convert to a PHP object */\n \n $result = (object)array(\n \"status\" => $details[0],\n \"reads\" => $details[1],\n \"writes\" => $details[2],\n \"uptime\" => $details[3],\n \"uphours\" => sprintf(\"%02d hours %02d min %02d sec\", floor($details[3]/3600), ($details[3]/60)%60, $details[3]%60),\n \"cmds\" => $details[4],\n \"config\" => $details[5],\n \"log\" => $details[6],\n );\n \n /* all done */\n \n return $result;\n }", "public function status()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/status');\n return $response->getApiData();\n }", "public function getconnectioncount()\n\t{\n\t\treturn $this->connect('getconnectioncount');\n\t}", "public function getContent_statusArray() {\n\t\tif (!$this->_content_statusArray) {\n\t\t\t$this->_content_statusArray[CONTENT_CONTENT_STATUS_PUBLISHED] = _CO_CONTENT_CONTENT_STATUS_PUBLISHED;\n\t\t\t$this->_content_statusArray[CONTENT_CONTENT_STATUS_PENDING] = _CO_CONTENT_CONTENT_STATUS_PENDING;\n\t\t\t$this->_content_statusArray[CONTENT_CONTENT_STATUS_DRAFT] = _CO_CONTENT_CONTENT_STATUS_DRAFT;\n\t\t\t$this->_content_statusArray[CONTENT_CONTENT_STATUS_PRIVATE] = _CO_CONTENT_CONTENT_STATUS_PRIVATE;\n\t\t\t$this->_content_statusArray[CONTENT_CONTENT_STATUS_EXPIRED] = _CO_CONTENT_CONTENT_STATUS_EXPIRED;\n\t\t}\n\t\treturn $this->_content_statusArray;\n\t}", "function getStatus() {\n \t\n \t$status = array();\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_contacter'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"to_contact\"] = $result['num_contact'];\n\n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'contacte'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"contacted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_rappeler'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"call_back\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'termine'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"deleted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_motif FROM mp_activation_motifs\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n\n $status[\"number_motif\"] = $result['num_motif'];\n \n \n return $status;\n }", "public function status() : array\n {\n $this->reloadPids();\n\n $workerStatus = [];\n if (empty($this->pids)) {\n return $workerStatus;\n }\n\n $Client = new \\GearmanClient();\n $Client->addServer($this->gearmanHost, $this->gearmanPort);\n $Client->setTimeout(1000);\n foreach ($this->pids as $pool => $workerPids) {\n $workerStatus[$pool] = [];\n foreach ($workerPids as $workerName => $workerPid) {\n // raises php warning on timeout so we need the \"evil @\" here...\n $workerStatus[$pool][$workerName] = false;\n $start = microtime(true);\n $pong = @$Client->doHigh('ping_'.$workerName, 'ping');\n if ($pong === 'pong') {\n $jobinfo = @$Client->doHigh('jobinfo_'.$workerName, 'foo');\n $jobinfo = json_decode($jobinfo, true);\n $workerStatus[$pool][$workerName] = $jobinfo;\n $pingtime = microtime(true) - $start;\n $workerStatus[$pool][$workerName]['ping'] = $pingtime;\n $workerStatus[$pool][$workerName]['status'] = 'idle';\n } else {\n $workerStatus[$pool][$workerName]['jobs_total'] = 'n/a';\n $workerStatus[$pool][$workerName]['avg_jobs_min'] = 'n/a';\n $workerStatus[$pool][$workerName]['uptime_seconds'] = 0;\n $workerStatus[$pool][$workerName]['ping'] = 0;\n $workerStatus[$pool][$workerName]['status'] = 'busy';\n }\n }\n }\n\n return $workerStatus;\n }", "public function status() {\n return ChannelDetails::from($this->ably->get(\"/channels/\" . $this->getName()));\n }", "public function getAllEncodingStatus()\n {\n $stream = new StreamStatus();\n $statusALL = array($stream);\n return $statusALL;\n }", "public function fcpoGetStatus() \n {\n $sQuery = \"SELECT oxid FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}' ORDER BY fcpo_sequencenumber ASC\";\n $aRows = $this->_oFcpoDb->getAll($sQuery);\n\n $aStatus = array();\n foreach ($aRows as $aRow) {\n $oTransactionStatus = $this->_oFcpoHelper->getFactoryObject('fcpotransactionstatus');\n $sTransactionStatusOxid = (isset($aRow[0])) ? $aRow[0] : $aRow['oxid'];\n $oTransactionStatus->load($sTransactionStatusOxid);\n $aStatus[] = $oTransactionStatus;\n }\n\n return $aStatus;\n }", "public function checkStatus() {\r\n\t\t$tmpArray = [1, 1]; // INIT;\r\n\t\t\r\n\t\t$tmpArray = [ $this->is_updated[0], $this->is_updated[1] ];\r\n\t\treturn $tmpArray;\r\n\t}", "public function setStatus() \n {\n // set status\n $status = array();\n $status['error'] = 0;\n $status['message'] = 'OK';\n\n return $status;\n }", "public function setStatus() \n {\n // set status\n $status = array();\n $status['error'] = 0;\n $status['message'] = 'OK';\n\n return $status;\n }", "public function getStatus()\n {\n return $this->_makeCall('status');\n }", "function getConnections(): array;", "function getStatus()\n {\n $url = API_URL . 'status';\n $xml = simplexml_load_file($url);\n return array(\n array(\n 'round' => $xml->round,\n 'state' => $xml->state,\n 'desc' => $xml->desc\n )\n );\n }", "public function status()\n {\n return (\n $this->status\n );\n }", "public function getTransactionStatusInfos() {\n return $this->transactionStatusInfos;\n }", "public static function getStatuses(): array;", "abstract public function _get_connected();", "public function GetServerStatus()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->stat();\r\n }", "public function getStatus()\n {\n $this->execute();\n \n return $this->status;\n }", "public function getStatus() {\n global $xmlConfig;\n\n // Get the configuration object\n $xpath = OpenVPNRpc::xpathRoot;\n $object = $xmlConfig->get($xpath);\n if (is_null($object)) {\n throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED, $xpath);\n }\n\n $initd = new OMVSysVInitScript(\"openvpn\");\n return array(\n \"name\" => $this->getName(),\n \"title\" => gettext(\"OpenVPN\"),\n \"enabled\" => boolval($object['enable']),\n \"running\" => ($initd->status() == 0)\n );\n\n }", "static public function connections()\n {\n return self::$_connection_data;\n }", "public function status() { \n\n\t\t$track = $this->_mpd->current_track_id;\n\n\t\t/* Construct the Array */\n\t\t$array['state'] \t= $this->_mpd->state;\n\t\t$array['volume']\t= $this->_mpd->volume;\n\t\t$array['repeat']\t= $this->_mpd->repeat;\n\t\t$array['random']\t= $this->_mpd->random;\n\t\t$array['track']\t\t= $track+1;\n\t\t\n\t\t$url_data = $this->parse_url($this->_mpd->playlist[$track]['file']);\n\t\t$song = new Song($url_data['oid']);\n\t\t$array['track_title'] \t= $song->title;\n\t\t$array['track_artist'] \t= $song->get_artist_name();\n\t\t$array['track_album']\t= $song->get_album_name();\n\n\t\treturn $array;\n\n\t}", "protected function connection()\n {\n return [\n 'host' => !empty($this->config['host']) ? $this->config['host'] : null,\n 'port' => !empty($this->config['port']) ? $this->config['port'] : null,\n 'url' => !empty($this->config['url']) ? $this->config['url'] : null,\n ];\n }", "public function checkConnection()\n {\n try {\n $this->execute('', [], true);\n } catch (\\Exception $e) {\n if ($e->hasResponse()) {\n switch ($e->getResponse()->getStatusCode()) {\n case 403:\n return [\n 'status' => 0,\n 'error' => 'auth_error',\n 'verbose' => 'Check Username and Password/Access Key.'\n ];\n default:\n return [\n 'status' => 0,\n 'error' => 'unknown',\n 'verbose' => 'An unknown error has occurred. Server replied with: ' . $e->getResponse()->getStatusCode()\n ];\n }\n } else {\n return [\n 'status' => 0,\n 'error' => 'conn_error',\n 'verbose' => 'Check CSF or hostname/port.'\n ];\n }\n return false;\n }\n\n return [\n 'status' => 1,\n 'error' => false,\n 'verbose' => 'Everything is working.'\n ];\n }", "public function stream_stat(): array\n {\n return (array)$this->content;\n }", "public static function getStatus()\n {\n function_exists('pcntl_signal_dispatch') && pcntl_signal_dispatch();\n return self::$status;\n }", "public function getHealth()\n {\n if(!$this->checkConnection()){\n return false;\n }\n\n if(!$this->login()){\n return false;\n }\n\n if(!$this->getServerObjects()){\n return false;\n }\n $url = 'https://' . trim($this->ip) . ':8080/health?sid=' . trim($this->sid);\n\n $responseJson_str = file_get_contents($url, null, $this->stream_context);\n $comment_position = strripos($responseJson_str, '/*'); //отрезаем комментарий в конце ответа сервера\n $responseJson_str = substr($responseJson_str, 0, $comment_position);\n $server_health = json_decode($responseJson_str, true);\n\n $channelsHealth = [];\n $result = $server_health;\n if (!empty($this->channels)) {\n foreach ($this->channels as $channel) {\n $url = 'https://' . trim($this->ip) . ':8080/settings/channels/' . $channel['guid'] . '/flags/signal?sid=' . trim($this->sid); //получения статуса канала\n $responseJson_str = file_get_contents($url, NULL, $this->stream_context);\n $comment_position = strripos($responseJson_str, '/*'); //отрезаем комментарий в конце ответа сервера\n $responseJson_str = substr($responseJson_str, 0, $comment_position);\n $channelHealth = json_decode($responseJson_str, true);\n\n $channelsHealth[] = [\n 'name' => $channel['name'],\n 'guid' => $channel['guid'],\n 'signal' => $channelHealth['value']\n ];\n }\n if (isset($channelsHealth) && !empty($channelsHealth) && is_array($channelsHealth)) {\n //$result = array_merge($server_health, $channelsHealth);\n $result['channels_health']=$channelsHealth;\n }\n }\n\n return $result;\n }", "public static function info() {\n return self::instance()->getClient()->get('api/status/info');\n }", "public function connected()\n\t{\n\t\treturn $this->CLI->boolQuery($this->SqueezePlyrID.\" connected ?\");\n\t}", "public static function getArrayStatus() {\n return array(\n self::STATUS_INACTIVE => DomainConst::CONTENT00408,\n self::STATUS_ACTIVE => DomainConst::CONTENT00539,\n self::STATUS_APPROVED => DomainConst::CONTENT00476,\n self::STATUS_CANCEL => DomainConst::CONTENT00477,\n self::STATUS_REQUIRED_UPDATE => DomainConst::CONTENT00478,\n );\n }", "public function getStatus()\n {\n return $this->getData('status');\n }", "public function getStatus() {\n\t\t\t$sql = \"SELECT status FROM persons WHERE idPerson = $this->idPerson\";\n\t\t\treturn ($data = $this->getArray($sql)) ? $data['status'] : '';\n\t\t}", "public function getStatus()\n {\n foreach($this->data as $domain => $rang)\n {\n //init work with curl\n $ch = curl_init($domain);\n\n //return answer in string unless showing in brows \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //for redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n //take a headers in answer (status coming)\n curl_setopt($ch, CURLOPT_HEADER, false);\n\n //make request to curk\n curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $time = round(curl_getinfo($ch, CURLINFO_CONNECT_TIME), 2);\n\n curl_close($ch);\n\n //complited array with result\n $this->result[] = [\n 'domain' => $domain,\n 'rang' => $rang,\n 'http_code' => $http_code,\n 'time' => $time\n ];\n\n }\n\n return $this->result; \n }", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}", "public function ping(): array;", "public function status()\n {\n return $this->getStatus();\n }", "public function getStatus(){\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "public function getStatus()\n\t{\n\t\treturn $this->status; \n\n\t}", "public function getStatus(): ?array\n {\n if (count($this->status) == 0) {\n return null;\n }\n return $this->status['value'];\n }", "public function status() {\n\t\treturn $this->_status;\n\t}", "public function getStatus()\n {\n return $this->data['status'];\n }", "public function getStatus()\n {\n return $this->result->getStatus();\n }", "public function getConnections(): array\n {\n return $this->connections;\n }", "public function getConnections(): array\n {\n return $this->connections;\n }", "public function getStatus(){\n return array_get($this->status,$this->a_active,'[N\\A]');\n }", "public static function getServerStatusInfo()\n\t{\n\t\treturn array(\n\t\t\tMHTTPD::getSoftwareInfo(),\n\t\t\tdate('r', MHTTPD::$info['launched']),\n\t\t\tMHTTPD::getStatCount('up', true),\n\t\t\tMHTTPD::getStatCount('down', true),\n\t\t\tMHTTPD::getClientsSummary(),\n\t\t\tMFCGI::getScoreboard(true),\n\t\t\tMHTTPD::getAbortedSummary(),\n\t\t\tMHTTPD::getHandlers(true),\n\t\t\tMHTTPD::getSignature(),\n\t\t);\n\t}", "public function status()\n {\n return $this->_status;\n }", "public function getStatus() {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "function getStatus()\n {\n if (!isset($this->bstatus) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->bstatus;\n }", "function getStatus()\n {\n if (!isset($this->bstatus) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->bstatus;\n }", "function pdo_get_host_info($link=NULL) {\r\n return pdo_handle($link)->getAttribute(PDO::ATTR_CONNECTION_STATUS);\r\n }", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function status()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\r\n\t\t{\r\n\t\t\treturn $this->status;\r\n\t\t}", "public function jsonSerialize()\n {\n return $this->connections;\n }", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();" ]
[ "0.77470666", "0.7653448", "0.7296624", "0.7167624", "0.7015119", "0.68753445", "0.67995673", "0.6771282", "0.6690714", "0.66894704", "0.6608156", "0.6599766", "0.65947264", "0.65779465", "0.6569051", "0.65573406", "0.6551256", "0.6507903", "0.6454671", "0.64117885", "0.6400665", "0.63978714", "0.63723534", "0.63477975", "0.6344658", "0.6302385", "0.628822", "0.62836504", "0.626578", "0.626269", "0.6222866", "0.6199373", "0.61758715", "0.6139658", "0.6131538", "0.6131538", "0.61314666", "0.6121184", "0.61201566", "0.6107137", "0.6105089", "0.610057", "0.609809", "0.6090397", "0.60847384", "0.6083885", "0.6077756", "0.606628", "0.6052312", "0.60511243", "0.6036482", "0.603183", "0.6030501", "0.6030119", "0.6019183", "0.6008966", "0.5998978", "0.5991112", "0.59899247", "0.59878564", "0.5986763", "0.5982187", "0.5979788", "0.5974671", "0.5974593", "0.5959373", "0.59575695", "0.5951041", "0.5947305", "0.5946514", "0.5946514", "0.59460956", "0.5945795", "0.5944168", "0.5930897", "0.5930295", "0.5930295", "0.5930295", "0.5930295", "0.59215724", "0.59215724", "0.59215724", "0.59215724", "0.59200495", "0.59200495", "0.59166694", "0.5913718", "0.5913718", "0.5911615", "0.5911615", "0.5911615", "0.5910297", "0.5905066", "0.5905066", "0.58997244", "0.5899473", "0.5897116", "0.5897116", "0.5897116", "0.5897116" ]
0.86206186
0
Gets the last error
public function getLastLog () { return end($this->log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_last_error() {\n\t\treturn $this->errors[count($this->errors - 1)];\n\t}", "public function get_last_error() {\n\t\treturn $this->last_error;\n\t}", "public function get_last_error() {\n\t\treturn $this->_error;\n\t}", "public function get_last_error() {\n return $this->last_error;\n }", "public function lastError()\n {\n return $this->error;\n }", "public function get_last_error()\n {\n return $this->_error;\n }", "public function getLastError() { return end($this->_traiat_errors); }", "function lastError();", "protected function getLastError()\n {\n return error_get_last();\n }", "public function getLastError()\n {\n return $this->lastErrorMsg;\n }", "public function lastError()\r\n\t{\r\n\t\treturn @mssql_get_last_message();\r\n\t}", "public function getErrorMsg()\r\n {\r\n return $this->lastErrorMsg;\r\n }", "public function getError() {\n return imap_last_error();\n }", "public function getError()\n {\n return imap_last_error();\n }", "public function getLastErrorMessage()\n {\n return $this->lastErrorMessage;\n }", "public function getLastError() {\n\t\t\treturn $this->lastError;\n\t\t}", "public function getError() {\n\t\treturn $this->current_error;\n\t}", "public function getLastError()\n {\n return $this->lastError;\n }", "public function getLastError()\n {\n return $this->lastError;\n }", "public function getError() {\n\t\treturn $this->lastError;\n\t}", "public function getError()\n {\n return $this->currentError;\n }", "public final function last_error()\n {\n return isset($this->error) ? $this->error : false;\n }", "public function lastError(){\n $error = '';\n \n if ($this->connection){\n $error = mysql_error( $this->connection );\n }\n \n return $error;\n }", "public function get_last_error() {\n return @ldap_error($this->_conn);\n }", "public function lastError()\r\n\t{\r\n\t\tif( $this->conn->Errors->Count )\r\n\t\t\treturn $this->conn->Errors[ $this->conn->Errors->Count - 1 ]->Description;\r\n\t\t\r\n\t\treturn '';\r\n\t}", "function GetError() \r\n{ \r\n$theerror = $this->LastError; \r\n$this->ClearError(); \r\nreturn $theerror; \r\n}", "public function getLastError() {}", "public function getLastError()\r\n\t{\r\n\t\t// TODO: we should move this to returning an Error\r\n\t\t$numErrors = count($this->errors);\r\n\t\tif ($numErrors > 0)\r\n\t\t{\r\n\t\t\treturn $this->errors[$numErrors-1]['message'];\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}", "public function getLastError()\n {\n return $this->_errorMsg;\n }", "public function lastError()\n {\n if (!empty($this->_query->_ERRORS)) {\n echo '<pre>';\n echo $this->_query->_ERRORSPLAIN[ count($this->_query->_ERRORS) - 1 ];\n echo '</pre>';\n } elseif (!empty($this->_ERRORS)) {\n echo '<pre>';\n echo $this->_ERRORSPLAIN[ count($this->_ERRORS) - 1 ];\n echo '</pre>';\n }\n }", "public function getError()\n {\n return count($this->errors) ? current($this->errors) : NULL;\n }", "function getError()\n\t{\n\t\treturn $this->err;\n\t}", "function msgsrv_last_error () {}", "public function lastError()\r\n\t{\r\n\t\treturn @db2_stmt_errormsg();\r\n\t}", "public function getError()\n\t{\n\t\treturn $this->err;\n\t}", "public function getLastError();", "public function getError () {\n\t\t\treturn $this->error; // seems useless for now\n\t\t}", "public function getLastError() {\n return $_SESSION['last_login_error'];\n }", "public function getError()\n {\n if (!empty($this->lastError)) {\n return $this->lastError;\n }\n\n return $this->wpdb->last_error;\n }", "public function error()\n\t{\n\t\treturn reset($this->errors);\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError() {\n\t\treturn self::$error;\n\t}", "public function getError()\n {\n $nb_errors = count($this->errors);\n\n if (0 === $nb_errors) {\n return null;\n }\n\n return $this->errors[$nb_errors - 1];\n }", "public function getLastError(): string\r\n {\r\n return $this->lastError;\r\n }", "public static function getError()\n\t{\n\t\treturn self::$error;\n\t}", "public function get_error()\n\t\t{\n\t\t\treturn $this->error;\n\t\t}", "public function getLastError(): string\n {\n return $this->lastError;\n }", "public function getError() {}", "abstract public function getLastError();", "abstract public function getLastError();", "public final function getLastErrorMsg() {\n return $this->lastErrorMsg;\n }", "protected function getLastError() {}", "function getError(){\n\t\t\treturn $this->error;\n\t\t}", "public function getError() \n {\n $this->execute();\n \n return $this->error;\n }", "public function getError()\n\t{\n\t\t$arr = each($this->error);\n\t\treturn $arr['value'];\n\t}", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function lasterror(){\n\t\treturn mysqli_error($this->connection);\t\n\t}", "function lastErrNo(){\n if ( $this->connection ){\n return mysql_errno( $this->connection );\n } else {\n return mysql_errno();\n }\n }", "public function getError();", "public function getError();", "public function getError();", "public function getLastErrorMessage(): ?string;", "public function getLastError(): ?string\n {\n return $this->last_error;\n }", "function mg_api_last_error($error = null)\n{\n static $last_error;\n\n if (null === $error) {\n return $last_error;\n } else {\n $tmp = $last_error;\n $last_error = $error;\n\n return $tmp;\n }\n}", "public final function last_error_message()\n {\n return isset($this->error) ? $this->error['message'] : '';\n }", "public function getError()\n\t{\n\t\treturn $this->_error;\n\t}", "public function getCurrentError()\n {\n return $this->getCurrent(self::NAMESPACE_ERROR);\n }", "public function getError() {\n return $this->error;\n }", "public function getError() {\n return $this->error;\n }", "public function getError() {\n return $this->error;\n }", "public function getLastError()\n {\n if (!empty($this->_query->_ERRORS)) {\n return $this->_query->_ERRORSPLAIN[ count($this->_query->_ERRORS) - 1 ];\n } elseif (!empty($this->_ERRORS)) {\n return $this->_ERRORSPLAIN[ count($this->_ERRORS) - 1 ];\n }\n\n return false;\n }", "public function getError() {\r\n return $this->error;\r\n }", "public function getError()\n\t{\n\t\treturn $this->_usrError;\n\t}", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getError()\n {\n return $this->error;\n }", "public function getLastError()\n {\n return 0;\n }", "public final function last_error_code()\n {\n return isset($this->error) ? $this->error['code'] : 0;\n }", "public function getError() {\n\n return $this->error;\n }", "protected function _getErrorMessage()\n {\n return pg_last_error($this->conn_id);\n }", "public function getError() {\n return $this->_error;\n }", "public function getError(){\n\t\treturn $this->error;\n\t}", "public function get_error() {\n return $this->error;\n }" ]
[ "0.90816796", "0.89857006", "0.8921801", "0.8850575", "0.88078725", "0.8767492", "0.85560364", "0.84735197", "0.8448337", "0.8382195", "0.8219918", "0.8210006", "0.81858337", "0.8167085", "0.8157783", "0.8082624", "0.8082398", "0.8061151", "0.8061151", "0.7986681", "0.7959126", "0.78848475", "0.7830399", "0.78246903", "0.77547014", "0.77337605", "0.7719374", "0.7698044", "0.7696404", "0.7694466", "0.769163", "0.7684668", "0.76674956", "0.7654567", "0.76421845", "0.7637914", "0.7629939", "0.7610184", "0.76031625", "0.75768507", "0.7573622", "0.7573622", "0.7573622", "0.75547105", "0.7554463", "0.7554262", "0.7540003", "0.75258696", "0.7520874", "0.7520599", "0.7516312", "0.7516312", "0.7509691", "0.7500717", "0.7496225", "0.7489492", "0.7487631", "0.7473401", "0.7473401", "0.7470219", "0.74626845", "0.74585146", "0.74585146", "0.74585146", "0.74543965", "0.74530995", "0.7437055", "0.7436959", "0.7431842", "0.74294126", "0.7409201", "0.7409201", "0.7409201", "0.7407932", "0.7401343", "0.7399421", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.739784", "0.73864233", "0.73782676", "0.73714036", "0.73658466", "0.7364091", "0.7360741", "0.7359786" ]
0.0
-1
Gets the PDO error and resturns it as string
private function parsePDOError($conn = null) { $db = (isset($conn) && !empty($conn) && is_object($conn)) ? $conn : $this->conn; $error = $db->errorInfo(); return "$error[0][$error[1]]: $error[2]"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function error()\n {\n $e = $this->conn->errorInfo();\n return $e[2];\n }", "public function getError() \n {\n $this->execute();\n \n return $this->error;\n }", "function error_string($query)\n\t{\n\t\tif(!is_object($query) || !method_exists($query, \"errorInfo\"))\n\t\t{\n\t\t\treturn $this->db->errorInfo();\n\t\t}\n\t\treturn $query->errorInfo();\n\t}", "public function get_error() {\n \t$error = oci_error($this->resource);\n \treturn $error[ 'code' ] . ': ' . $error[ 'message' ];\n }", "public function sql_error()\n {\n return $this->link->error;\n }", "public function getLastError()\n {\n if (null !== $this->connection()) {\n $message = sprintf('%s (%i)', odbc_errormsg($this->connection()), odbc_error($this->connection()));\n return $message;\n }\n }", "function pdo_error($link=NULL) {\r\n #\r\n #### Possibly better to also keep a $pdo_last_stmt to get possible errors from there?\r\n # PDO::errorInfo might be empty\r\n # Keeping PDO::ERRMODE_WARNING per default isn't as advisable for production setups.\r\n #\r\n # Similar wrapper in https://www.kitware.com/svn/CDash/trunk/cdash/pdocore.php\r\n # also just uses PDO::errorInfo\r\n #\r\n global $pdo_last_stmt;\r\n $link = pdo_handle($link);\r\n\r\n # we don't really know what ran last, PDO:: or PDOStatement::\r\n if (!empty($pdo_last_stmt)) {\r\n $error = $pdo_last_stmt[spl_object_hash($link)]->errorInfo();\r\n }\r\n else {\r\n $error = $link->errorInfo();\r\n }\r\n return $error[2];\r\n }", "public function getError(){\n\t\treturn $this->connection->error;\n\t}", "public function getLastError() {\n\t\tif (null !== $this->connection) {\n\t\t\t$message = sprintf('%s (%i)', odbc_errormsg($this->connection), odbc_error($this->connection));\n\t\t\treturn $message;\n\t\t}\n\t}", "public function getError(){\n return $this->sqli->error;\n }", "function sql_error($dbh=NULL)\n {\n global $SQL_DBH;\n $db = (!is_null($dbh) ? $dbh : $SQL_DBH);\n if ( is_object($db) )\n $error = $db->errorInfo();\n else\n $error = array('Handle is not object','','');\n if ($error[0] != '00000') {\n return $error[0].'-'.$error[1].' '.$error[2];\n }\n else return '';\n }", "protected function _getErrorMessage()\n {\n return pg_last_error($this->conn_id);\n }", "public function error()\n {\n if(is_resource($this->link))\n {\n return pg_last_error($this->link);\n }\n else\n {\n return '';\n }\n }", "public function GetError(){\n return $this->conexion->error;\n }", "public function getError() {\n return $this->connection->error;\n }", "function error($err=''){\n\t\tif(!$this->id_connection){\n\t\t\treturn @pg_last_error() ? @pg_last_error().$err : \"[Error Desconocido en PostgreSQL \\\"$err\\\"]\";\n\t\t}\n\t\t$this->last_error.= $err;\n\t\t$this->log($this->last_error, Logger::ERROR);\n\t\treturn pg_last_error($this->id_connection).$err;\n\t}", "public function sql_error() {}", "public function sql_error() {}", "public function lastError()\r\n\t{\r\n\t\tif( $this->conn->Errors->Count )\r\n\t\t\treturn $this->conn->Errors[ $this->conn->Errors->Count - 1 ]->Description;\r\n\t\t\r\n\t\treturn '';\r\n\t}", "public function error() {\n\t\tif (!$this->connection) return @pg_last_error();\n\t\treturn pg_last_error($this->connection);\n\t}", "function error($err=''){\n\t\tif(!$this->Id_Connection){\n\t\t\treturn @pg_last_error() ? @pg_last_error() : \"[Error Desconocido en PostgreSQL $err]\";\n\t\t}\n\t\treturn pg_last_error($this->Id_Connection);\n\t}", "public function errorInfo() {\n return self::$PDOInstance->errorInfo();\n }", "public function get_connect_error() {\n \t$error = oci_error();\n \treturn $error[ 'code' ] . ': ' . $error[ 'message' ];\n }", "public function getPDOException() : PDOException {\n return $this->pdo_exception;\n }", "private function echoPDOException(PDOException $e){\r\n $message = '<b>Exception in '.$e->getFile().' on line '.$e->getLine().' </b>: '.$e->getMessage();\r\n echo $message;\r\n \r\n //PDO informations\r\n if($this->verbose){\r\n\r\n echo \"\\n\\n Call trace:\";\r\n echo $e->getTraceAsString();\r\n\r\n echo \"\\n PDO last error:\";\r\n print_r($this->db->errorInfo);\r\n }\r\n }", "public function getErrorMessage()\n\t\t{\n\t\t\t$error = $this->statement->errorInfo();\n\t\t\t$errorText \t= '<h6>Something happened ... :(</h6>';\n\t\t\t$errorText .= 'Error code : '.$error[0].'<br>';\n\t\t\t$errorText .= 'Driver error code : '.$error[1].'<br>';\n\t\t\t$errorText .= 'Error Message : '.$error[2].'<br>';\n\t\t\treturn $errorText;\n\t\t}", "public function lastError()\r\n\t{\r\n\t\treturn @db2_stmt_errormsg();\r\n\t}", "function Error() \n\t{\n\t\treturn $this->db->errorInfo();\n\t}", "final public function error_get() : string{\r\n return (string) ($this->code != 0) ? \"[<b>{$this->code}</b>]: \".$this->message : $this->message;\r\n }", "public function lastError(){\n $error = '';\n \n if ($this->connection){\n $error = mysql_error( $this->connection );\n }\n \n return $error;\n }", "function pdo_errno($link=NULL) {\r\n $error = pdo_handle($link)->errorInfo();\r\n return $error[1];\r\n }", "public function get_db_error()\n\t{\n\t\t$db_error = $this->db->error();\n\n\t\t$result['status'] = false;\n\t\t$result['data'] = $db_error['message'];\n\n\t\treturn $result;\n\t}", "function ErrorMsg()\n\t{\n\t\tif ($this->_errorMsg !== false) return $this->_errorMsg;\n\t\tif (ADODB_PHPVER >= 0x4300) {\n\t\t\tif (!empty($this->_resultid)) {\n\t\t\t\t$this->_errorMsg = @pg_result_error($this->_resultid);\n\t\t\t\tif ($this->_errorMsg) return $this->_errorMsg;\n\t\t\t}\n\n\t\t\tif (!empty($this->_connectionID)) {\n\t\t\t\t$this->_errorMsg = @pg_last_error($this->_connectionID);\n\t\t\t} else $this->_errorMsg = $this->_errconnect();\n\t\t} else {\n\t\t\tif (empty($this->_connectionID)) $this->_errconnect();\n\t\t\telse $this->_errorMsg = @pg_errormessage($this->_connectionID);\n\t\t}\n\t\treturn $this->_errorMsg;\n\t}", "public function error()\n {\n return mysql_error($this->mysql);\n }", "public function getError(): string\n {\n return $this->error;\n }", "public function error() {\n $connection = $this->connect();\n return $connection->error;\n }", "public function error() {\n\t\t$connection = $this -> connect();\n\t\treturn $connection -> error;\n\t}", "function db_driver_error()\n{\n global $_db;\n\n return pg_result_error($_db['resource'][$_db['target']]['dbh']);\n}", "public function getError() : string\r\n {\r\n return $this->strError;\r\n }", "public static function outputDbError($db) { #keep\n?>\n<div>\n <p>\n <b>Oops! Could not get a valid result.</b>\n </p>\n <p>\n PDO::errorCode(): <?= $db->errorCode() ?>\n </p>\n <div>\n PDO::errorInfo():\n <pre><?php print_r($db->errorInfo()) ?></pre>\n </div>\n</div>\n<?php\n }", "public function error() {\n $connection = $this -> connect();\n return $connection -> error;\n }", "public function lastError()\r\n\t{\r\n\t\treturn @mssql_get_last_message();\r\n\t}", "public function error() {\n $connection = $this -> connect();\n return $connection -> error;\n }", "private function error(): array\n {\n $error = [];\n $pdoError = $this->statement->errorInfo();\n if (empty($pdoError[0]) || $pdoError[0] == '00000')\n return $error;\n\n $error['code'] = isset($pdoError[1]) ? $pdoError[0] . '/' . $pdoError[1] : $pdoError[0];\n if (isset($pdoError[2]))\n $error['message'] = $pdoError[2];\n\n return $error;\n }", "public function errorInfo()\n {\n return $this->conn->errorInfo();\n }", "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "function db_error() {\n $connection = db_connect();\n $error = $connection->error;\n\n return $error;\n}", "function error($sql) {\n\tif (defined('DEBUG')) {\n\t\tdie($sql);\n\t}\n\theader('Content-Type: application/json');\n\tdie('{\"result\":\"error\"}');\n}", "public function getError(): string\n {\n return $this->Error;\n }", "public function lastDBError() {\n\t\t\t// Connect to the database\n\t\t\t$connection = $this->openConnection();\n\t\t\treturn $connection->error;\n\t\t}", "public function getErrMsg()\n {\n return $this->get(self::ERRMSG);\n }", "public function getError(): ?string\n {\n return $this->debugMessage;\n }", "public function _getDbConnectError($error) {\n if (strpos($error, 'Unknown MySQL server host') !== false) # 2002\n return 'DB_HOST_ERROR';\n else if (strpos($error, 'Access denied for user') !== false) # 1044 / 1045\n return 'DB_LOGIN_ERROR';\n else if (strpos($error, 'Unknown database') !== false) # 1049\n return 'DB_NAME_ERROR';\n else if (strpos($error, 'Invalid characterset or character') !== false) # 2019\n return 'DB_CHARSET_ERROR';\n else\n return $error;\n }", "public function get_error();", "public function get_error();", "public function toPrintableString(): string\n {\n $parentMessage = parent::toPrintableString();\n $pdoMessageString = empty($this->originalPdoExeption) ?\n null : $this->originalPdoExeption->getMessage();\n\n return sprintf(\n \"VgaDatabaseException thrown. \" . PHP_EOL\n . \"%s\" . PHP_EOL\n . \"PDO Message: %s\" . PHP_EOL,\n\n $parentMessage,\n $pdoMessageString\n );\n }", "public function error(): string\n {\n return $this->error;\n }", "public function sql_errno()\n {\n return $this->link->errno;\n }", "public function getLastError()\n {\n $result = '';\n\n if (is_object($this->provider)) {\n $result = $this->provider->getLastError();\n }\n\n return $result;\n }", "function pg_result_error_field($result, int $fieldcode): ?string\n{\n error_clear_last();\n $result = \\pg_result_error_field($result, $fieldcode);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "public function getError(): string\n {\n foreach ($this->getBulkResponses() as $bulkResponse) {\n if ($bulkResponse->hasError()) {\n return $bulkResponse->getError();\n }\n }\n\n return '';\n }", "public function getError();", "public function getError();", "public function getError();", "public function sql_errno() {}", "public function sql_errno() {}", "public function GetErrorMessage()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->error;\r\n }", "public function getErrorMsg()\n\t{\n\t\treturn $this->error;\n\t}", "abstract protected function _getErrorString();", "public function getError() {}", "public function error()\n {\n // phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved\n return mysql_error($this->wpdb->dbh);\n }", "function handle_db_error($exception) {\n echo '<p><strong>' . htmlspecialchars('Exception : ' . $exception->getMessage()) . '</strong></p>';\n}", "function handle_db_error($exception) {\n echo '<p><strong>' . htmlspecialchars('Exception : ' . $exception->getMessage()) . '</strong></p>';\n}", "public static function errorCode(): ?string {\r\n return self::getConnection()->errorCode();\r\n }", "public function getLastError(): string\r\n {\r\n return $this->lastError;\r\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function get_error()\n\t\t{\n\t\t\treturn $this->error;\n\t\t}", "function error_text()\n\t{\n\t\treturn $this->_mysql_error;\n\t}", "public function error($err=''){\n\t\tif(!$this->id_connection){\n\t\t\t$this->last_error = ibase_errmsg() ? ibase_errmsg() : \"[Error Desconocido en Firebird: $err]\";\n\t\t\t$this->log($this->last_error, Logger::ERROR);\n\t\t\treturn $this->last_error;\n\t\t}\n\t\t$this->last_error = ibase_errmsg() ? ibase_errmsg() : \"[Error Desconocido en Firebird: $err]\";\n\t\t$this->last_error.= $err;\n\t\t$this->log($this->last_error, Logger::ERROR);\n\t\treturn $this->last_error;\n\t}", "public function getLastError(): string\n {\n return $this->lastError;\n }", "public function get_error() {\n return $this->error;\n }", "public function getError()\n\t{\n\t\treturn $this->err;\n\t}", "public function errorMessage() {\r\n\t\tif ($this->hasError()) {\r\n\t\t\treturn \"Query:\\n{$this->sql}\\nAnswer:\\n{$this->errorString}\";\r\n\t\t}\r\n\r\n\t\treturn 'No error occurred.';\r\n\t}", "public function get_error() {\r\n return $this->error;\r\n }", "public function get_last_error() {\n return @ldap_error($this->_conn);\n }", "public function showError($stmt){\r\n\t echo \"<pre>\";\r\n\t print_r($stmt->errorInfo());\r\n\t echo \"</pre>\";\r\n\t}", "public function getError()\r\n {\r\n return count($this->strError) == 0 ? null :\r\n (count($this->strError) == 1 ? $this->strError[0] :\r\n $this->strError);\r\n }", "public function showError($stmt){\n //echo \"<pre>\";\n //print_r($stmt->errorInfo());\n //echo \"</pre>\";\n\t}", "protected function getLastError()\n {\n return mysqli_error($this->connection);\n }", "private static function _getSQLSRVError()\n {\n \t$result = null;\n \t$errors = sqlsrv_errors();\n \tself::_getSQLSRVError1($errors, $result);\n \treturn $result;\n }", "function getError()\n\t{\n\t\treturn $this->err;\n\t}", "function getErrorString() {\n\t\tswitch ($this->getErrorType()) {\n\t\t\tcase INSTALLER_ERROR_DB:\n\t\t\t\treturn 'DB: ' . $this->getErrorMsg();\n\t\t\tdefault:\n\t\t\t\treturn __($this->getErrorMsg());\n\t\t}\n\t}", "public function getErrorDetails($qid) {\n\t\tif ($query = $this->db->prepare ('SELECT msg FROM queryerror WHERE qid = ?')) {\n\t\t\t$query->bind_param ( 'i', $qid );\n\t\t\t$query->execute ();\n\t\t\t$result = $query->get_result ();\n\t\t\t\n\t\t\tif (! $result) {\n\t\t\t\tthrow new dbException ( $this->db->error, 500 );\n\t\t\t}\n\t\t\t\n\t\t\tif ($result->num_rows == 0) {\n\t\t\t\t$msg = 'Error: no details!';\n\t\t\t} else {\n\t\t\t\t$msg = nl2br($result->fetch_assoc()['msg']);\n\t\t\t}\n\t\n\t\t\t$result->close ();\n\t\n\t\t\treturn $msg;\n\t\t} else {\n\t\t\tthrow new dbException ( '500' );\n\t\t}\n\t}", "function getErro(){\n\t\t$erro;\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$erro = mssql_get_last_message();\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$erro1 = oci_error($this->cursor);\n\t\t\t\t$erro = $erro1[\"message\"];\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$erro = pg_last_error($this->conexao);\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$erro = mysql_error();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $erro;\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError() {\n\t\treturn $this->error;\n\t}", "public function getError(){\n if (empty($this->getErrorCode())) {\n return null;\n }\n return $this->getErrorCode().': '.$this->getErrorMessage();\n }", "function checkError($db, $ret, $string){\n\t\tif(!$ret){\n\t echo pg_last_error($db);\n\t } else {\n\t echo $string;\n\t }\n\t}" ]
[ "0.70142186", "0.67824394", "0.6754173", "0.66905725", "0.666458", "0.66605884", "0.6626543", "0.66248643", "0.66139627", "0.6604736", "0.6580129", "0.65671265", "0.64817643", "0.6473563", "0.6472034", "0.6464085", "0.6460329", "0.6460329", "0.6440056", "0.64364827", "0.64351887", "0.64309174", "0.63936913", "0.63819075", "0.631695", "0.63159174", "0.631392", "0.62817675", "0.6256755", "0.625558", "0.6233356", "0.62141263", "0.6167227", "0.61583006", "0.6155155", "0.61489975", "0.6137781", "0.61217654", "0.6111015", "0.6106351", "0.6097456", "0.60893697", "0.60827786", "0.60683674", "0.6056769", "0.6051651", "0.60325515", "0.6008603", "0.59989065", "0.59931225", "0.59914416", "0.59884155", "0.59836674", "0.5983496", "0.5983496", "0.59694237", "0.5966135", "0.59638697", "0.5963622", "0.59634054", "0.59606296", "0.5950871", "0.5950871", "0.5950871", "0.594584", "0.594584", "0.59381753", "0.59146965", "0.59137124", "0.5913167", "0.5903317", "0.58778495", "0.58778495", "0.586056", "0.5848803", "0.5830095", "0.5830095", "0.5823621", "0.58207667", "0.58184886", "0.58171475", "0.5812211", "0.58100635", "0.57949686", "0.57903117", "0.57833725", "0.5770069", "0.5742173", "0.5741813", "0.57416016", "0.5735302", "0.57276106", "0.57226115", "0.5714867", "0.5702345", "0.56993735", "0.56993735", "0.56993735", "0.569607", "0.5694647" ]
0.716326
0
Tries to find if there is a PDO error
private function hasPDOError ($conn = null) { $db = (isset($conn) && !empty($conn) && is_object($conn)) ? $conn : $this->conn; $error = $db->errorInfo(); return (empty($error[1]) && empty($error[2]) && (empty($error[0]) || $error[0] == 0)) ? false : true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pdo_error($link=NULL) {\r\n #\r\n #### Possibly better to also keep a $pdo_last_stmt to get possible errors from there?\r\n # PDO::errorInfo might be empty\r\n # Keeping PDO::ERRMODE_WARNING per default isn't as advisable for production setups.\r\n #\r\n # Similar wrapper in https://www.kitware.com/svn/CDash/trunk/cdash/pdocore.php\r\n # also just uses PDO::errorInfo\r\n #\r\n global $pdo_last_stmt;\r\n $link = pdo_handle($link);\r\n\r\n # we don't really know what ran last, PDO:: or PDOStatement::\r\n if (!empty($pdo_last_stmt)) {\r\n $error = $pdo_last_stmt[spl_object_hash($link)]->errorInfo();\r\n }\r\n else {\r\n $error = $link->errorInfo();\r\n }\r\n return $error[2];\r\n }", "function pdo_errno($link=NULL) {\r\n $error = pdo_handle($link)->errorInfo();\r\n return $error[1];\r\n }", "function checkForDbError($preparedStatement) {\n\t\t\t$error = $preparedStatement->errorInfo();\n\t\t\tif ($error != null && count($error) > 0 && $error[0] > 0)\n\t\t\t\tdie(\"Insert failed on: $error[2]\");\n\t}", "protected function checkIfPdoConnectionIsSet()\n {\n if (! static::$pdo) {\n throw new Exception('Please specify the proper PDO connection first.');\n }\n }", "function db_driver_error()\n{\n global $_db;\n\n return pg_result_error($_db['resource'][$_db['target']]['dbh']);\n}", "function tableExists($pdo, $table) {\r\n // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.\r\n try {\r\n $result = $pdo->query(\"SELECT 1 FROM $table LIMIT 1\");\r\n } catch (Exception $e) {\r\n // We got an exception == table not found\r\n return FALSE;\r\n }\r\n\r\n // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)\r\n return $result !== FALSE;\r\n}", "function log_pdo_db_error ( $php_self = '', $call_id = 0, $db = null, $sql = '' , $params = '' , $method_name = '', $call_style = '', $error = '' ) {\n\t\tif ( !$db ) {\n\t\t\t$db_connect_result = pdo_db_connect ();\n\t\t\tif ( $db_connect_result['rc'] == '1' ) {\n\t\t\t\t$db = $db_connect_result['db'];\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} //!$db\n\t\t\n\t\t$params = serialize( $params );\n\t\t$error_sql = \"INSERT INTO tbl_db_errors ( php_self, call_id, sql_query, params, method_name, call_style, member_id, error ) VALUES ( ?,?,?,?,?,?,?,? )\";\n\t\t$error_params = array( $php_self, $call_id, $sql, $params, $method_name, $call_style, NULL, $error );\n\t\t$stmt = $db->prepare( $error_sql );\n\t\t$stmt->execute( $error_params );\n\t\t$result = $stmt-> rowCount();\n\t\treturn true;\n\t}", "public function valid()\n {\n throw new PDOException('valid() method is not implemented for Oci8PDO_Statement');\n }", "public function testPdoException() {\n\n\t\t$cfg = new PdoConnectionTestConfig();\n\n\t\t$conn = new \\Scrivo\\PdoConnection($cfg);\n\n\t}", "private function runPrepStmtChkErr(&$stmt) {\n // Execute the query\n if($stmt->execute()) {\n return true;\n }\n\n // Print error if something goes wrong\n echo \"\\nPDOStatement::errorInfo():\\n\";\n $err_arr = $stmt->errorInfo();\n print_r($err_arr);\n\n return false;\n }", "public function sql_error() {}", "public function sql_error() {}", "public function isQueryExceptions()\n {\n return $this->getAttribute(\\PDO::ATTR_ERRMODE) == \\PDO::ERRMODE_EXCEPTION;\n }", "public function sql_errno() {}", "public function sql_errno() {}", "public function getPDOException() : PDOException {\n return $this->pdo_exception;\n }", "function db_error() {\n $connection = db_connect();\n $error = $connection->error;\n\n return $error;\n}", "public function isPdo();", "function sql_error($dbh=NULL)\n {\n global $SQL_DBH;\n $db = (!is_null($dbh) ? $dbh : $SQL_DBH);\n if ( is_object($db) )\n $error = $db->errorInfo();\n else\n $error = array('Handle is not object','','');\n if ($error[0] != '00000') {\n return $error[0].'-'.$error[1].' '.$error[2];\n }\n else return '';\n }", "function tableExists($pdo, $table) {\n \n // Try a select statement against the table\n // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.\n try {\n $result = $pdo->query(\"SELECT 1 FROM $table LIMIT 1\");\n } catch (Exception $e) {\n // We got an exception == table not found\n return FALSE;\n }\n // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)\n return $result !== FALSE;\n \n }", "public function testPDOExceptionCausesServiceToReturnFalse()\n {\n $this->db->expects($this->at(0))\n ->method('prepare')\n ->with('SELECT id FROM `users` WHERE id = :id')\n ->will($this->returnValue($this->statement));\n\n $this->statement->expects($this->once())\n ->method('execute')\n ->with($this->isType('array'))\n ->will($this->returnValue($this->statement));\n\n $this->statement->expects($this->once())\n ->method('rowCount')\n ->will($this->returnValue(0));\n\n $this->db->expects($this->at(1))\n ->method('prepare')\n ->will($this->throwException(new \\PDOException));\n $user = new User();\n $user->id = '123abcde45';\n $user->firstName = 'Test';\n $user->lastName = 'User';\n $user->email = 'test.user@gmail.com';\n $user->githubHandle = 'testuser';\n $user->ircNick = 'testUser';\n $user->twitterHandle = '@testUser';\n $user->mentorAvailable = true;\n $user->apprenticeAvailable = false;\n $user->timezone = 'America/Chicago';\n $userService = new UserService($this->db);\n $result = $userService->create($user);\n $this->assertFalse($result);\n }", "private function parsePDOError($conn = null) {\n $db = (isset($conn) && !empty($conn) && is_object($conn)) ? $conn : $this->conn;\n $error = $db->errorInfo();\n return \"$error[0][$error[1]]: $error[2]\";\n }", "public function lastDBError() {\n\t\t\t// Connect to the database\n\t\t\t$connection = $this->openConnection();\n\t\t\treturn $connection->error;\n\t\t}", "private function echoPDOException(PDOException $e){\r\n $message = '<b>Exception in '.$e->getFile().' on line '.$e->getLine().' </b>: '.$e->getMessage();\r\n echo $message;\r\n \r\n //PDO informations\r\n if($this->verbose){\r\n\r\n echo \"\\n\\n Call trace:\";\r\n echo $e->getTraceAsString();\r\n\r\n echo \"\\n PDO last error:\";\r\n print_r($this->db->errorInfo);\r\n }\r\n }", "protected function errorCheck($query) : void\n {\n $info = $query->errorInfo();\n\n if ($info[0] !== \\PDO::ERR_NONE) {\n die('We have : ' . $info[2]);\n }\n }", "function db_errno() {\n\t$DB = DB::DB()->getLink();\n\treturn $DB->errno;\n}", "function db_error() {\n\t$DB = DB::DB()->getLink();\n\treturn $DB->error;\n}", "protected function tableExists($pdo, $table) {\n // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.\n try {\n $result = $pdo->query(\"SELECT 1 FROM $table LIMIT 1\");\n } catch (Exception $e) {\n // We got an exception == table not found\n return FALSE;\n }\n\n // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)\n return $result !== FALSE;\n }", "function pdo_stmt($stmt) {\r\n\r\n if (is_object($stmt)) {\r\n return $stmt;\r\n }\r\n else {\r\n return new pdo_dummy(\"Your last query was unsuccessful and returned FALSE instead of a fetchable result. See pdo_error() to find out why.\");\r\n }\r\n }", "public function error() {\n\t\t$connection = $this -> connect();\n\t\treturn $connection -> error;\n\t}", "public function assertDBConnectionExists()\n {\n $pdo = '';\n\n try {\n $pdo = DB::connection()->getPdo();\n } catch (Exception $e) {\n }\n\n $this->assertTrue(is_object($pdo));\n }", "public function isError () {\n return $this->c2mysql->isError();\n }", "private function is_db_available(){\n \t$host = Configuration::DB_HOST;\n\t\t$dbname = Configuration::DB_NAME;\n\t\t$dbuser = Configuration::DB_USER;\n\t\t$dbpass = Configuration::DB_PASS;\n\t\t$con = null;\n\t\ttry{\n\t\t\t$con = new PDO(\"mysql:host=$host;dbname=$dbname\", $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t\t$con = null;\n\t\treturn true;\n }", "public function isError()\n {\n return self::dbLink;\n }", "public function sql_errno()\n {\n return $this->link->errno;\n }", "function _db_errno($link = NULL) {\n\treturn @mysql_errno($link);\n}", "public function sql_error()\n {\n return $this->link->error;\n }", "private function isConnected(): bool\n {\n return isset(static::$connectionDb) ? static::$connectionDb instanceof PDO : false;\n }", "public function isConnected()\n {\n return static::$DB instanceof PDO;\n }", "protected function runStatementWithException(\\PDO $pdo, $sql, array $params = array())\n\t{\n\t\t$statement = $pdo->prepare($sql);\n\t\t$ok = $statement->execute($params);\n\n\t\tif ($ok === false)\n\t\t{\n\t\t\tthrow new \\Exception(\n\t\t\t\t\"Database call failed:\" . print_r($statement->errorInfo(), true)\n\t\t\t);\n\t\t}\n\n\t\treturn $statement;\t\t\n\t}", "protected function error()\n\t{\t\t\n\t\tif(self::$arrDbConf[$this -> databaseName] !== 1)\n\t\tthrow new SystemException('Không tồn tại con trỏ database!');\n\t\telseif($this -> tableName ==='')\n\t\tthrow new SystemException('Không tồn tại tên bảng!');\n\t\telse\n\t\treturn true;\n\t}", "function db_connect()\n{\n try {\n $PDO = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n return $PDO;\n } catch (PDOException $th) {\n echo \"Error: \" . $th->getMessage();\n }\n}", "protected function _testconn($conn)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$supportedDrivers = PDO::getAvailableDrivers();\r\n\r\n\t\t\tif(!in_array($conn['dbtype'], $supportedDrivers)){\r\n\t\t\t\techo \"PDO connection error: The driver for: '\" . $conn['dbtype'] . \"' has not been installed on this server.\"; //shove this into a JSON doc\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\ttry{\r\n\t\t\t\t\t$_db = new PDO(\"{$conn['dbtype']}:host={$conn['dbhost']};dbname={$conn['dbname']}\", $conn['dbuser'], $conn['dbpass']);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(PDOException $error){\r\n\t\t\t\t\techo \"Error!: \" . $error->getMessage() . \"<br/>\";\r\n\t\t\t\t\tdie();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $_db;\r\n\t\t}", "function errortrap_odbc($conn, $statement, $values) {\n if(!$rs = odbc_execute($statement, $values)) {\n echo \"<br/>\" . odbc_errormsg($conn);\n }\n return $rs;\n}", "function count_pdo($query = '', $bind = '') {\r\n if ($query == '') {\r\n error_log(\"The Count function query is empty!\");\r\n return false;\r\n }\r\n\r\n// END TEST FOR EMPTY VALUES\r\n\r\n if (!isset($GLOBALS['db_conn']) || $GLOBALS['db_conn'] == '') {\r\n $db = db_con();\r\n } else {\r\n $db = $GLOBALS['db_conn'];\r\n }\r\n\r\n try {\r\n if ($bind == '') {\r\n $query = substr($db->quote($query), 1, -1);\r\n $stmt = $db->query($query);\r\n $row_count = $stmt->fetchColumn();\r\n } else {\r\n $stmt = $db->prepare($query);\r\n $stmt->execute($bind);\r\n $row_count = $stmt->fetchColumn();\r\n }\r\n } catch (PDOException $ex) {\r\n $ex->getMessage();\r\n error_log(\"There was a PDO query error! Query: \" . $query . \" || PDO Message: \" . $ex);\r\n return false;\r\n }\r\n\r\n return $row_count;\r\n}", "function dbConnect(){\r\n global $dbHost, $dbName, $dbUser, $dbPassword, $db_connection;\r\n\r\n try {\r\n $db_connection = new PDO(\"mysql:host=$dbHost; dbname=$dbName\", $dbUser, $dbPassword);\r\n } catch(PDOException $error) {\r\n return false;\r\n }\r\n return true;\r\n}", "public function error() {\n\t\tif (!$this->connection) return @pg_last_error();\n\t\treturn pg_last_error($this->connection);\n\t}", "public function testThrowExceptionIfErrorsNoErrors()\n {\n $sqlStatementMock = $this->getMockBuilder(\\PDOStatement::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n // This is the error code returned by mysql if no errors have occurred.\n $sqlStatementMock->expects($this->once())\n ->method('errorCode')\n ->willReturn('00000');\n\n $result = $this->testObject->throwExceptionIfErrors($sqlStatementMock);\n\n $this->assertFalse($result);\n }", "public function testGetUserWhenPDOThrowsException()\n {\n $this->db->expects($this->once())\n ->method('prepare')\n ->will($this->throwException(new \\PDOException));\n $id = 'bbccdd1134';\n $userService = new UserService($this->db);\n $retrievedUser = $userService->retrieve($id);\n $this->assertNull($retrievedUser); \n }", "public function testCheckExpectConnectNullException()\n {\n $PDOFactory = new PDOFactory(\n 'sqlite::memory:',\n null,\n null\n );\n\n $dBBaseTableExistCheck = $this->getDBBaseTableExistCheckBuilder()\n ->disableProxyingToOriginalMethods()\n ->getMock();\n\n $dBBaseTableExistCheck\n ->method('getPDOInstance')\n ->willReturn(null);\n\n $checkResult = $dBBaseTableExistCheck->performCheck();\n\n $this->assertInstanceOf(\n DBExpectConnectCheckException::class,\n $checkResult->getError()\n );\n }", "function valueExists($table, $column, $value) {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $sqlVars = array();\n\n $query = \"SELECT id\n FROM \".$db_table_prefix.$table.\"\n WHERE\n $column = :data\n LIMIT 1\";\n\n // This block allows return false if the table doesn't exist\n try {\n $stmt = $db->prepare($query);\n } catch (PDOException $e) {\n return false;\n }\n\n $sqlVars[':data'] = $value;\n\n if (!$stmt->execute($sqlVars)){\n // Error: column does not exist\n return false;\n }\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($row)\n return true;\n else\n return false;\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n } catch (RuntimeException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n }\n\n}", "function _sql_error()\n\t{\n\t\tif (!$this->dbh)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'message'\t=> @mysqli_connect_error(),\n\t\t\t\t'code'\t\t=> @mysqli_connect_errno()\n\t\t\t);\n\t\t}\n\n\t\treturn array(\n\t\t\t'message'\t=> @mysqli_error($this->dbh),\n\t\t\t'code'\t\t=> @mysqli_errno($this->dbh)\n\t\t);\n\t}", "public static function connectPDO() {\r\n if (DB::instance()->connection) {\r\n return true;\r\n }\r\n\r\n DB::instance()->connection = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD, array(PDO::ATTR_PERSISTENT => true));\r\n DB::instance()->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n // return true only on success\r\n if (DB::instance()->connection) {\r\n $stmt = DB::instance()->connection->query('SELECT connection_id()');\r\n $therow = $stmt->fetch(PDO::FETCH_NUM);\r\n $connectionid = $therow[0];\r\n return $connectionid;\r\n }\r\n\r\n return false;\r\n }", "function pm_die_if_error( $database_object ) {\n\n $newline = \"\\n\";\n\n if( DB::isError( $this->$database_object ) ) {\n\n echo $newline . '<br><br>' . $newline;\n\n if( $this->debug ) {\n echo 'Last recorded statement: ' . $this->statement;\n echo $newline . '<br><br>' . $newline;\n die ( $this->$database_object->getMessage() . '<br>' . $newline );\n }\n else # try not to give a potential hacker any useful info\n die ( 'An error has occurred.' . '<br>' . $newline );\n }\n }", "function newPDO(){\n\ttry { $pdo = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_NAME.\";charset=utf8\",DB_USER,DB_PASSWORD,array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\")); } \n\tcatch (PDOException $e) { echo getMessage(\"DBConnectionError\"); }\n\treturn $pdo;\n}", "function dprv_db_ok()\r\n\t{\r\n\t\t$log = new DPLog();\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->last_error = \"\";\r\n\t\t$sql=\"SELECT last_fingerprint FROM \" . get_option('dprv_prefix') . \"dprv_posts WHERE id = 0 LIMIT 1\";\r\n\t\t$result = $wpdb->get_var($sql);\r\n\t\t$dprv_sql_error = mysql_error();\r\n\t\t$dprv_db_error = $wpdb->last_error;\r\n\t\tif (trim($dprv_db_error) != \"\")\r\n\t\t{\r\n\t\t\t$dprv_this_event = $dprv_db_error . \" while testing for last_fingerprint\";\r\n\t\t\tdprv_record_event($dprv_this_event);\r\n\t\t\tif (strpos(strtolower($dprv_db_error), \"unknown column\") !== false)\r\n\t\t\t{\r\n\t\t\t\treturn -1;\t\t// last fingerprint column does not exist\r\n\t\t\t}\r\n\t\t\treturn 0;\t\t\t// some other error\r\n\t\t}\r\n\t\treturn 1;\t\t\t\t// OK\r\n\t}", "public function lastError()\r\n\t{\r\n\t\treturn @db2_stmt_errormsg();\r\n\t}", "public function error()\n {\n $e = $this->conn->errorInfo();\n return $e[2];\n }", "function die_if_sql_failed($result, $link, $data, $sql) // Colorize: green\n { // Colorize: green\n if (!$result) // Colorize: green\n { // Colorize: green\n $error_details = \"SQL Failed: \" . $sql . \" Error: \" . $link->error; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Database error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }", "private function setErrorMode()\n\t{\n\t\t// get PDO object and enable exception error mode\n\t\t$pdo = $this->getPdo();\n\t\t$this->_errMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t}", "function sql_check($query)\n\t{\n $stmt = prepare($query);\n $return = $stmt->rowCount();\n return $return;\n\n\t\t//sql_connect();\n\t\t//global $defaultdb;\n\t\t//$return = $defaultdb->check($query);\n\t\t//return $return;\n\t}", "public static function HasDatabaseError($data) {\n try {\n if ( empty($result) ) return false; // haven't error\n // Check SQL error\n if ( isset($result[0][0]['error_typ']) && $result[0][0]['error_typ'] != 0 ) {\n // SQL Exception\n if ( $result[0][0]['error_typ'] == 999 ) throw new \\Exception($result[0][0]['remark']);\n // Logic error\n return true;\n }\n return false;\n }\n catch(Exception $e) {\n throw $e;\n }\n }", "function connectDb($host,$db,$username,$password){\n try{\n $conn = new PDO(\"mysql:host=$host;dbname=$db\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $conn;\n }\n catch(PDOException $e){\n echo \"failed to execute the query \".$e->getMessage();\n }\n}", "protected function databaseConnectionIsValid()\n {\n try {\n app('db')->reconnect()->getPdo();\n \n return true;\n } catch (\\PDOException $e) {\n return false;\n }\n }", "function pdo_connect_mysql() {\r\n try {\r\n // Connect to the MySQL database using PDO...\r\n \treturn new PDO('mysql:host=' . db_host . ';dbname=' . db_name . ';charset=utf8', db_user, db_pass);\r\n } catch (PDOException $exception) {\r\n \t// Could not connect to the MySQL database, if this error occurs make sure you check your db settings are correct!\r\n \texit('Failed to connect to database!');\r\n }\r\n}", "function db_errorno($db_link) {\n return mysqli_errno($db_link);\n}", "function pdo_query($sql, $link=NULL, $params=NULL) {\r\n\r\n // separate params from $sql and $link \r\n $params = func_get_args();\r\n $sql = TRIM( array_shift($params) );\r\n $flags = array();\r\n $direct = false;\r\n \r\n\r\n // find pdo $link \r\n if (count($params)) {\r\n // $link can be the first element\r\n if (is_object(reset($params))) {\r\n $link = array_shift($params);\r\n }\r\n // or the last\r\n elseif (is_object(end($params))) {\r\n $link = array_pop($params);\r\n }\r\n }\r\n // or we use the default $pdo\r\n $link = pdo_handle($link);\r\n \r\n // is $params a list to pdo_query(), or just one array with :key=>value pairs?\r\n if (count($params)==1 && is_array($params[0])) {\r\n $params = array_shift($params);\r\n }\r\n\r\n\r\n // add PDO_MySQL driver flag / workaround for specific query types\r\n switch (strtoupper(substr($sql, 0, strspn(strtoupper($sql), \"SELECT,USE,CREATE\")))) {\r\n\r\n // ought to make ->rowCount() work\r\n case \"SELECT\":\r\n $flags[PDO::MYSQL_ATTR_FOUND_ROWS] = true;\r\n break;\r\n\r\n // temporarily disable prepared statement mode for unbindable directives\r\n case \"USE\":\r\n $direct = true;\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\r\n break;\r\n\r\n default:\r\n }\r\n\r\n\r\n // unparameterized query()\r\n if ($direct) {\r\n $stmt = $link->query($sql);\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n }\r\n // or prepare() and execute()\r\n else {\r\n if ($stmt = $link->prepare($sql, $flags)) { // no try-catch in _WARNING mode\r\n $stmt->execute($params);\r\n }\r\n }\r\n \r\n // result\r\n if (!$stmt and PDO_HELPFUL) {\r\n pdo_trigger_error(\"pdo_query() SQL query failed, see pdo_error()\", E_USER_WARNING);\r\n }\r\n elseif (PDO_SEEKABLE & !$direct) {\r\n return new PDOStatement_Seekable($stmt, $params);\r\n }\r\n else {\r\n return $stmt;\r\n }\r\n }", "function db_query($sql, $args=array()) {\n global $DBH;\n $sth = $DBH->prepare($sql);\n try {\n $sth->execute($args);\n } catch(PDOException $e) {\n //error_log(sprintf(\"query: '%s', args: [%s]\", $sql, implode(',', $args)));\n if($e->getCode() == '23000') {\n // '23000' is actually integrity constraint violation, but in case\n // of MySQL it's the same as duplicate key exception.\n $ne = new PDODuplicateKey($e->getMessage(), $e->getCode(), $e);\n $ne->errorInfo = $e->errorInfo;\n throw $ne;\n }\n throw $e;\n }\n return $sth;\n}", "function get_last_error($conn) {\n return mysqli_error($conn);\n}", "public static function tryconnect()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$host = 'localhost';\n\t\t\t\t$dbname = 'inproject';\n\t\t\t\t$userdb = 'root';\n\t\t\t\t$pass = '';\n\t\t\t\t$connection = new PDO(\"mysql:host=$host;dbname=$dbname;charset=utf8\",\"$userdb\",\"$pass\");\n\t\t\t\t$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\tself::$connector = $connection;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch(PDOException $error)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}", "function db_error() {\n $connection = db_connect();\n return mysqli_error($connection);\n}", "private function isExternalDatabaseError()\n {\n $db = new \\mysqli($this->clone->databaseServer, $this->clone->databaseUser, $this->clone->databasePassword, $this->clone->databaseDatabase);\n if ($db->connect_error) {\n return true;\n }\n\n return false;\n }", "public function error() {\n $connection = $this -> connect();\n return $connection -> error;\n }", "private function connectPdo() {\r\n\t\t$this -> link = new PDO('mysql:host=' . $this -> host . ';dbname=' . $this -> base, $this -> user, $this -> pass);\r\n\t\t$this -> link -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t}", "public function execute()\n {\n if (!empty($this->prepare)) {\n try {\n $this->prepare->execute();\n\n } catch (PDOException $e) {\n $this->error = \"Error en la ejecucion: ({$e->errorInfo[0]})<br />\".\n '<pre>'.$this->prepare->queryString.'</pre><br />'.\n $e->errorInfo[2];\n\n $this->showError($this->error);\n }\n return true;\n }\n\n return false;\n }", "public function setException(){\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }", "public function error() {\n $connection = $this -> connect();\n return $connection -> error;\n }", "public static function outputDbError($db) { #keep\n?>\n<div>\n <p>\n <b>Oops! Could not get a valid result.</b>\n </p>\n <p>\n PDO::errorCode(): <?= $db->errorCode() ?>\n </p>\n <div>\n PDO::errorInfo():\n <pre><?php print_r($db->errorInfo()) ?></pre>\n </div>\n</div>\n<?php\n }", "public function error() {\n $connection = $this->connect();\n return $connection->error;\n }", "private function error(): array\n {\n $error = [];\n $pdoError = $this->statement->errorInfo();\n if (empty($pdoError[0]) || $pdoError[0] == '00000')\n return $error;\n\n $error['code'] = isset($pdoError[1]) ? $pdoError[0] . '/' . $pdoError[1] : $pdoError[0];\n if (isset($pdoError[2]))\n $error['message'] = $pdoError[2];\n\n return $error;\n }", "function isPaymentExist($operation_id){\r\n global $pdo;\r\n $stmt = $pdo->prepare('SELECT DepositVerification FROM deposits WHERE DepositVerification = :DepositVerification');\r\n $stmt->bindParam(':DepositVerification', $operation_id);\r\n $stmt->execute();\r\n\r\n return $stmt->rowCount() > 0;\r\n}", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "public function get_db_error()\n\t{\n\t\t$db_error = $this->db->error();\n\n\t\t$result['status'] = false;\n\t\t$result['data'] = $db_error['message'];\n\n\t\treturn $result;\n\t}", "protected function checkDbErrors($query) {\r\n if ($this->connection->errno) {\r\n switch ($this->connection->errno) {\r\n case 1062:\r\n $this->error->setError(TXT_ERROR_DUPLICATE_ENTRY);\r\n break;\r\n case 0:\r\n $this->error->setError(\"ERROR UNKNOWN\");\r\n\r\n default:\r\n $error = \"MySQL error \" . $this->connection->errno . \": \" .\r\n $this->connection->error . \"\\n<br><br>\\n$query\\n<br>\";\r\n $this->error->setError($error);\r\n break;\r\n }\r\n\r\n return TRUE;\r\n }\r\n $this->error->setError(\"No errors.\");\r\n return FALSE;\r\n }", "function _db_error($link = NULL) {\n\treturn @mysql_error($link);\n}", "function sqlSelect($sql){\n try {\n $DBH = new PDO(\"mysql:host=localhost;dbname=\" . DB_NAME, DB_USERNAME, DB_PASSWORD);\n $STH = $DBH->query($sql);\n if ($STH) {\n $STH->setFetchMode(PDO::FETCH_ASSOC);\n return $STH;\n }\n return false;\n }catch(PDOException $e){\n redirect('./', 'DB Error: ' . $e->getMessage());\n }\n}", "function sqlQuery($sql){\n try {\n $db = new PDO(\"mysql:host=localhost;dbname=\" . DB_NAME, DB_USERNAME, DB_PASSWORD);\n $exec = $db->exec($sql);\n if (substr($sql, 0, 6) == \"INSERT\" || substr($sql, 0, 6) == \"insert\") return $db->lastInsertId();\n return $exec;\n }catch(PDOException $e){\n redirect('./', 'DB Error: ' . $e->getMessage());\n }\n}", "function connection($db_config){\n try {\n $connection = new PDO('mysql:host=localhost;dbname='.$db_config['database'], $db_config['user'], $db_config['pass']);\n return $connection;\n } catch (PDOException $e) {\n return false;\n }\n}", "function checkError($db, $ret, $string){\n\t\tif(!$ret){\n\t echo pg_last_error($db);\n\t } else {\n\t echo $string;\n\t }\n\t}", "public function testCommitPdoFailure()\n {\n $this->mockPdo->shouldReceive('beginTransaction')->once()->andReturn(true);\n $this->mockPdo->shouldReceive('commit')->once()->andReturn(false);\n\n $connection = new MockConnection($this->mockConnector, $this->mockCompiler);\n $this->assertTrue($connection->beginTransaction());\n $this->assertFalse($connection->commit());\n }", "function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user information because \".pdoError($e));\n }\n if($this->spdo->query(\"SELECT FOUND_ROWS()\")->fetchColumn() != 1)\n return false;\n return true;\n }", "function pdo_ping($link=NULL) {\r\n return pdo_query(\"SELECT 1\", pdo_handle($link)) ? true : false;\r\n }", "function connect_db($host, $username, $passwd, $port, $db)\n{\n $dbinfo = \"mysql:host=\".$host.\";dbname=\".$db.\";port=\".$port;\n\n if (($host != NULL) && ($username != NULL) && ($port != NULL) && ($db != NULL))\n {\n try\n {\n $db = new PDO($dbinfo, $username, $passwd);\n return $db;\n }\n\n catch (PDOException $e)\n {\n echo \"PDO ERROR\".\" \".$e->getMessage();\n $errorMsg = \"Error connection to DB\";\n echo $errorMsg.PHP_EOL;\n }\n }\n \n else\n {\n $error = \"Bad params! Usage: php connect_db.php host username password port db\";\n echo $error.PHP_EOL;\n }\n}", "public function ping()\n\t{\n\t\tif ( $this->pdo === null ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$this->pdo->query('SELECT 1');\n\t\t\treturn true;\n\t\t} catch ( \\PDOException $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "function database_error()\n {\n\t return mysql_error($this->database_connection);\n\t}", "function error($err=''){\n\t\tif(!$this->Id_Connection){\n\t\t\treturn @pg_last_error() ? @pg_last_error() : \"[Error Desconocido en PostgreSQL $err]\";\n\t\t}\n\t\treturn pg_last_error($this->Id_Connection);\n\t}", "public function isPrepared();" ]
[ "0.7579157", "0.71928257", "0.717657", "0.67096096", "0.6655416", "0.66379917", "0.6585168", "0.65511286", "0.65403444", "0.64983886", "0.64099103", "0.64099103", "0.62885165", "0.6286981", "0.6286981", "0.6242961", "0.6239548", "0.6161418", "0.6155893", "0.6137555", "0.6114129", "0.6111818", "0.60903984", "0.60718185", "0.60023224", "0.59924483", "0.5970991", "0.5961644", "0.59441453", "0.5918725", "0.59072834", "0.5881884", "0.58767575", "0.58678615", "0.58564514", "0.58563024", "0.5843509", "0.58253014", "0.58033276", "0.5798724", "0.5797066", "0.5795344", "0.57817703", "0.5742342", "0.57213193", "0.5720054", "0.57180333", "0.5710489", "0.5698023", "0.56885666", "0.56817394", "0.5666552", "0.5663676", "0.56546247", "0.5645833", "0.5644666", "0.56428206", "0.56407726", "0.56368357", "0.56362", "0.5628006", "0.5627988", "0.5623371", "0.5614403", "0.56020534", "0.5595302", "0.5592637", "0.55778164", "0.5576038", "0.5575661", "0.5574024", "0.5571781", "0.55643487", "0.55582035", "0.55430794", "0.55413616", "0.5538459", "0.55355626", "0.5526024", "0.55120146", "0.55113983", "0.55074537", "0.55074537", "0.55074537", "0.55074537", "0.55070245", "0.55047", "0.5503453", "0.54984987", "0.5485433", "0.54811794", "0.5471342", "0.54687905", "0.5467537", "0.54664755", "0.54615694", "0.54565835", "0.5456175", "0.5455795", "0.5450244" ]
0.7124057
3
Generic wrapper for the PDO "exec" function
protected function exec ($str, $msg = null) { $result = false; $msg = dataDefault($msg, $str); try { $db = $this->conn; $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $db->exec($str); if (!$this->hasPDOError()) { $result = true; $this->log[] = "Successful: '$msg'"; } else { $error = $this->parsePDOError(); $result = false; $this->log[] = "Failed: '$msg'"; } } catch (PDOException $e) { $result = false; $this->log[] = "Exception: '" . $e->getMessage() . "'"; } catch (Exception $e) { $result = false; $this->log[] = "Exception: '" . $e->getMessage() . "'"; } finally { return $result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_raw_exec( $sql )\n{\n return Chev_PDO::instance()->raw_exec( $sql );\n}", "abstract public function exec($sql);", "function exec($sql);", "function exec_query($conn, $query) {\n\tif ($conn) {\n\t\ttry {\n\t\t\t$stmt = $conn->prepare($query);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"<div>Could not access db: \" . $e->getMessage() . \"</div>\";\n\t\t}\n\t}\n\treturn NULL;\n}", "abstract public function exec($query='');", "function dbExec(PDO $db, $sql, array $paramsArray = array()) {\n\treturn executeQuery($db, $sql, $paramsArray, $__returnResultSet = false);\n}", "public function exec($sql){\n try{\n return $this->pdo->exec($sql);\n }catch(\\PDOException $exception){\n echo \"Wrong Message: \".$exception->getMessage();\n }\n }", "public function exec($sql, $params =''){\n\t\ttry {\n $stmt = $this->_pdo->prepare($sql);\n if($params != ''){\n foreach($params as $key => $value){\n $stmt->bindValue($key, $value);\n }\n }\n return $stmt->execute();\n }\n\t\tcatch (PDOException $e) {\n $err_data = array('sql'=>$sql, 'params'=>$params);\n Helper_Error::setError( Helper_Error::ERROR_TYPE_DB , $e->getMessage() , $err_data , $e->getCode() );\n return false;\n\t\t}\n }", "protected abstract function _exec($params = array());", "abstract public function execute($sql);", "function exec_sql_query($db, $sql, $params = array()) {\n try {\n $query = $db->prepare($sql);\n if ($query and $query->execute($params)) {\n return $query;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n return NULL;\n}", "function exec_sql_query($db, $sql, $params = array()) {\n try {\n $query = $db->prepare($sql);\n if ($query and $query->execute($params)) {\n return $query;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n return NULL;\n}", "public abstract function execute($sql);", "function sql_execute($sql)\n{\n global $ctx;\n return $ctx['sqlconn']->query($sql);\n}", "public function exec($statement)\n {\n try {\n return $this->pdo->exec($statement);\n } catch (PDOException $e) {\n throw new Exception\\PDO($e->getMessage(), $e->getCode(), $e);\n }\n }", "abstract public function execute() ;", "public function exec($statement) {\n return self::$PDOInstance->exec($statement);\n }", "function pdo_query($sql, $link=NULL, $params=NULL) {\r\n\r\n // separate params from $sql and $link \r\n $params = func_get_args();\r\n $sql = TRIM( array_shift($params) );\r\n $flags = array();\r\n $direct = false;\r\n \r\n\r\n // find pdo $link \r\n if (count($params)) {\r\n // $link can be the first element\r\n if (is_object(reset($params))) {\r\n $link = array_shift($params);\r\n }\r\n // or the last\r\n elseif (is_object(end($params))) {\r\n $link = array_pop($params);\r\n }\r\n }\r\n // or we use the default $pdo\r\n $link = pdo_handle($link);\r\n \r\n // is $params a list to pdo_query(), or just one array with :key=>value pairs?\r\n if (count($params)==1 && is_array($params[0])) {\r\n $params = array_shift($params);\r\n }\r\n\r\n\r\n // add PDO_MySQL driver flag / workaround for specific query types\r\n switch (strtoupper(substr($sql, 0, strspn(strtoupper($sql), \"SELECT,USE,CREATE\")))) {\r\n\r\n // ought to make ->rowCount() work\r\n case \"SELECT\":\r\n $flags[PDO::MYSQL_ATTR_FOUND_ROWS] = true;\r\n break;\r\n\r\n // temporarily disable prepared statement mode for unbindable directives\r\n case \"USE\":\r\n $direct = true;\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\r\n break;\r\n\r\n default:\r\n }\r\n\r\n\r\n // unparameterized query()\r\n if ($direct) {\r\n $stmt = $link->query($sql);\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n }\r\n // or prepare() and execute()\r\n else {\r\n if ($stmt = $link->prepare($sql, $flags)) { // no try-catch in _WARNING mode\r\n $stmt->execute($params);\r\n }\r\n }\r\n \r\n // result\r\n if (!$stmt and PDO_HELPFUL) {\r\n pdo_trigger_error(\"pdo_query() SQL query failed, see pdo_error()\", E_USER_WARNING);\r\n }\r\n elseif (PDO_SEEKABLE & !$direct) {\r\n return new PDOStatement_Seekable($stmt, $params);\r\n }\r\n else {\r\n return $stmt;\r\n }\r\n }", "abstract public function execute($query);", "public function exec($sql)\n {\n return $this->pdoConnect->exec($sql);\n }", "public function exec($query) {\r\n return $this->PDOInstance->exec($query);\r\n }", "public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }", "public function rawExec(string $sql, array $params=[])\n {\n return $this->getConnection()->rawExec($sql, $params);\n }", "public function customExec($sql)\n {\n try{\n $result = $this->exec($sql);\n }catch(PDOException $e){\n $this->error( $e->getMessage().' => '.$sql);\n $result = false;\n }\n ++self::$count;\n\n return $result;\n }", "public function exec(string $query){\n static::getInstance();\n if($this->connection === null) return null;\n\n try{\n return $this->connection->exec($query);\n }\n catch(PDOException $e){\n return [\"error\" => $e->getMessage()];\n }\n }", "abstract function execute();", "abstract function execute();", "public function execute($sql);", "public function execute($sql);", "private function exec($connection, $query, $params) {\n $statement = $connection->prepare($query);\n $this->bindParameters($statement, $params);\n $result = $statement->execute();\n return $result;\n }", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract function execute ();", "public function exec($sql) {\n $this->setChars();\n $this->result = $this->pdo->exec($sql);\n $substr = substr($sql, 0, 6);\n if ($this->result) {\n return $this->successful($substr);\n } else {\n $error = $this->pdo->errorInfo();\n $error['sql'] = $sql;\n $error['sub'] = $substr;\n $this->error = $error;\n return $this->fail($substr);\n }\n }", "public function exec($stmt, array $params = array())\n{\n\t$sth = db2_prepare($this->dbh, $stmt);\n\t$res = db2_execute($sth, $params);\n\treturn ($res) ? db2_num_rows($this->dbh) : $res;\n}", "public function execute()\n {\n $query = $this->__toString();\n if (!empty($this->params)) {\n $statement = $this->pdo->prepare($query);\n $statement->execute($this->params);\n return $statement;\n }\n return $this->pdo->query($query);\n }", "function dbExec( $sql ) {\n\t\tGLOBAL $db;\n\t\t\n\t\tif ( ($db instanceof PDO) === true ) {\n\t\t\t$count = $db->exec( formatSQL($sql) );\n\t\t\treturn $count;\n\t\t}\n\t}", "function pg_execute($connection = null, string $stmtname = null, array $params = null)\n{\n error_clear_last();\n if ($params !== null) {\n $result = \\pg_execute($connection, $stmtname, $params);\n } elseif ($stmtname !== null) {\n $result = \\pg_execute($connection, $stmtname);\n } elseif ($connection !== null) {\n $result = \\pg_execute($connection);\n } else {\n $result = \\pg_execute();\n }\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "public function execQuery(string $query)\n {\n try{\n $this->connection->exec($query);\n }catch(\\PDOExeption $ex){\n echo $ex->getMessage();\n }\n \n }", "public function execsql($sql)\n {\n try {\n return $this->pdo->exec($sql);\n } catch (PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n }", "public function exec($sql, $params = array()) {\n\n // check if params starts with \":\". Else add it\n foreach ($params as $key => $val) {\n if (substr($key, 0, 1) !== ':') {\n unset($params[$key]);\n $params[':' . $key] = $val;\n } else {\n break;\n }\n }\n\n $query = $this->host->prepare($sql); // there must'n have minus in field names\n $query->execute($params);\n if ($query->errorCode() > 0) {\n echo '<span style=\"background-color: red;\">Error in SQL:</span>';\n var_dump($query->errorInfo());\n var_dump(array('Last Query: ', array($sql)));\n var_dump(array('Last Query Params: ', $params));\n $this->worker->log->error('Error in SQL: ', $query->errorInfo());\n $this->worker->log->info('Last Query: ', array($sql));\n $this->worker->log->info('Last Query Params: ', $params);\n }\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n\n if ($this->utf8Decode) {\n foreach ($result as &$record) {\n foreach ($record as &$attr) {\n $attr = utf8_decode($attr);\n }\n }\n }\n\n return $result;\n }", "function pdo_query($pdo, $query)\n{\n $result = $pdo->query($query);\n \n return $result;\n}", "function prepareAndExecute($pdo, $str){// need to pass in the pdo instance, doesn't have access to it otherwise\n $query = $pdo->prepare($str);\n $query->execute(); //having the return statement here caused error\n return $query;\n}", "public function execute($query);", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "public function exec( $sql, $prepared=array(), $dataTypes=array() )\n {\n if( !$sql ) throw new \\RuntimeException( \"missing Sql statement.\" );\n if( empty( $prepared ) ) {\n $this->pdoStmt = $this->pdoObj->query( $sql );\n }\n else {\n $this->execPrepare( $sql );\n $this->execExecute( $prepared, $dataTypes );\n }\n $this->applyFetchMode();\n return $this->pdoStmt;\n }", "abstract public function executeS($query, $array = true);", "function db_execute($query)\n {\n /*\n * Execute the Query\n */\n $this->varifysql($query[\"SQL\"]);\n return $this->get_conn()->query($query[\"SQL\"], PDO::FETCH_ASSOC);\n }", "function kval_sqlite_exec($sql)\n{\n return kval_sqlite_queryexec(func_get_args())[0];\n}", "public function exec($prepared_values = null) {\n if (!empty($this->_parts['query'])) {\n $res = null;\n foreach($this->_parts['query'] as $one) {\n $res = $this->_connection->query($one);\n }\n $this->_parts['query'] = array();\n return $res;\n }\n return $this->_connection->processQuery($this);\n }", "public function exec($query)\n {\n return $this->getActivePdo()->exec($query);\n }", "abstract public function query($sql, $execute =FALSE);", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "public function execute($sql, $params = array());", "function query($pdo,$query,$data=[]) {\n\t$query = $pdo->prepare($query);\n\t$query->execute($data);\n\treturn $query;\n}", "public function prepareAndExecute (PDO $connection, string $query, array $params = []);", "public function pdoExecute ( $SQL, array $arrParams = array() )\n {\n $PDOStatement = $this->_driver->prepare($SQL);\n $PDOStatement->execute($arrParams);\n\n return $PDOStatement;\n\n }", "public function rawExecute(array $param = array('query'=>'','arrData'=>[])) {\n $qry = isset($param['query']) ? $param['query'] : '';\n $arrData = isset($param['arrData']) ? $param['arrData'] : [];\n\n if( empty( $qry ) ) {\n echo \"missing query\";\n die;\n }\n \n $insert_values = [];\n\n if( !empty( $qry ) ) {\n $countQuestionMarks = 0;\n\n foreach( $qry AS $char ) {\n if( $char == \"?\" )\n $countQuestionMarks++;\n }\n\n if( count($arrData) == $countQuestionMarks ) {\n echo \"data count doesn't match with column count.\";\n die;\n }\n\n if( count( $arrData ) ) {\n $insert_values = $arrData;\n }\n }\n\n $strQry = $qry;\n $pdo = $this->getConnection();\n $this->stmt = $pdo->prepare($strQry);\n\n if( count( $insert_values ) ) {\n $executed = $this->stmt->execute($insert_values);\n } else {\n $executed = $this->stmt->execute();\n }\n \n if( $executed ) {\n echo 'query executed successfully.';\n } else {\n echo 'fails to truncate table';\n }\n \n $this->stmt = null;\n die;\n }", "function runQuery($pdo, $sql, $parameters=array()) {\n if (!is_array($parameters)) {\n $parameters = array($parameters);\n }\n\n $statement = null;\n if (count($parameters) > 0) {\n // Use a prepared statement if parameters \n $statement = $pdo->prepare($sql);\n $executedOk = $statement->execute($parameters);\n if (! $executedOk) {\n throw new PDOException;\n }\n } else {\n // Execute a normal query \n $statement = $pdo->query($sql); \n if (!$statement) {\n throw new PDOException;\n }\n }\n // Return array containing all of result set rows\n return $statement->fetchall(PDO::FETCH_ASSOC);\n}", "function ExecutePreparedQuery($sql, $vars)\n\t{\n\t\tif(empty($pdo))\n\t\t{\n\t\t\t$connectDb = \"mysql:host=\" . $dbServer . \";dbname=\" . $dbName;\n\t\t\t$pdo = new pdo($connectDb, $dbUser, $dbPass);\n\t\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$query = $pdo->prepare($sql);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo(\"<b><font color=\\\"red\\\">Error executing sql query:</font><br><br>\");\n\t\t\tprint_r($e->getMessage());\n\t\t\tdie();\n\t\t}\n\t\tif($query)\n\t\t\t$query->execute($vars);\n\t\telse\n\t\t{\n\t\t\tprint_r($pdo->errorInfo);\n\t\t\tdie();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\t// An insert will throw, this is crappy and should probably be handled better\n\t\t\treturn \"\";\n\t\t}\n\t}", "function sql($DBH, $query, $params, $return) {\n\t\ttry {\n\t\t\t// Prepare statement\n\t\t\t$STH = $DBH->prepare($query);\n\t\t\t// Execute statement\n\t\t\t$STH->execute($params);\n\t\t\t// Decide whether to return the rows themselves, or just count the rows\n\t\t\tif ($return == \"rows\") {\n\t\t\t\treturn $STH->fetchAll();\n\t\t\t}\n\t\t \telseif ($return == \"count\") {\n\t\t\t\treturn $STH->rowCount();\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e) {\n\t\t\tfile_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND); # Errors Log File\n\t\t}\n\t}", "function execute($sth){\n\t\t\n\t\t$exito = $sth->execute();\n\t\t\t\n\t\t$msg='';\n\t\tif ($exito!==true){\n\t\t\t$error=$sth->errorInfo();\t\t\t\n\t\t\t$success=false;\n\t\t\t$msg=$error[2];\t\t\t\t\n\t\t\tif ($msg=='MySQL server has gone away'){\n\t\t\t\t$db=Database::getInstance();\n\t\t\t\t$db->reconectar();\n\t\t\t\treturn $this->execute($sth);\n\t\t\t}\n\t\t\t$datos=array();\n\t\t}else{\n\t\t\t$datos = $sth->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t$success=true;\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'success'\t=>$success,\t\t\t\n\t\t\t'datos' \t=>$datos,\n\t\t\t'msg'\t\t=>$msg\n\t\t);\t\t\t\n\t}", "function executeQuery($conexion, $sql, $params = null) {\n try {\n if ($conexion instanceof PDO) {\n $stmt = $conexion->prepare($sql);\n } else {\n return false;\n }\n\n if ($params != null) {\n foreach ($params as $param => $value) {\n $stmt->bindValue(':' . $param, $value);\n }\n }\n\n $stmt->execute();\n return $stmt;\n } catch (PDOException $ex) {\n logger($ex->getMessage());\n return false;\n }\n}", "function executeStatement($stmt) {\n if (!$stmt->execute()) {\n echo \"Error executing operation.\";\n die();\n }\n}", "private function execute() {\n $this->statement = $this->pdo->prepare($this->queryString);\n\n foreach ($this->params as $boundParam) {\n $this->statement->bindValue($boundParam->name, $boundParam->value, $boundParam->type);\n }\n\n $this->statement->execute();\n }", "public function exec ($sql) {\n $this->query = $this->conn->exec($sql);\n return $this->query;\n }", "function execute_query(): callable {\n return function(PDO $conn, string $query, array $params): ConnectResult {\n $statement = $conn->prepare($query);\n $statement->execute($params);\n\n return new ConnectResult($conn, $statement);\n };\n}", "abstract function executeQuery($cons);", "public function execute(){\n\t\ttry{\n\t\t\t#echo 'exectuteed...' ;\n\t\t\treturn $this->statement->execute() ;\n\t\t}catch(PDOException $e){\n\t\t\t$this->error = $e->getMessage() ;\n\t\t\techo $this->error ;\n\t\t}\n\t}", "public function exec(string $query, $values = [], $binds = '', bool $openConnection = true): bool;", "public function execute($option = array()){\n\t$this->_cursor = $this->_dbh->prepare($this->_sql);\n\t\tif($option){\n\t\t\tfor($i = 0;$i < count($option);$i++){\n\t\t\t\t$this->_cursor->bindParam($i+1,$option[$i]);\n\t\t\t}\n\t\t}\n\t\t$this->_cursor->execute();\n\t\treturn $this->_cursor;\n\t}", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute(): Statement;", "public function query($query){\r\n $args = func_get_args();\r\n array_shift($args); //first element is not an argument but the query itself, should removed\r\n\r\n $reponse = parent::prepare($query);\r\n $reponse->execute($args);\r\n return $reponse;\r\n\r\n }", "public function db_exec($sql)\n {\n $req = $this->db_open()->exec($sql);\n }", "public abstract function exec();", "public function exec_query($conn, $sql, $params=null, $array_indexed=\"\", $raw_return = false){\n\t\tif (is_array($params) && count($params)>0){\n\t\t\t$stm=$this->query($conn, $sql, $params);\n\t\t}\n\t\telse{\n\t\t\t$stm=$conn->query($sql);\n\t\t}\n\t\tif ($stm!==FALSE){\n\t\t\tif ($raw_return){\n\t\t\t\treturn $stm;\n\t\t\t}\n\t\t\tif ($array_indexed===\"\"){\n\t\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data=array();\n\t\t\t\twhile ($obj=$stm->fetch(PDO::FETCH_OBJ)){\n\t\t\t\t\t$data[$obj->$array_indexed]=$obj;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function execute($sql, $vars) {\n\t\t$sth = $this->dbh->prepare($sql);\n\t\tif ($sth->execute($vars)) {\n\t\t return true;\n\t\t} else {\n $this->err($sth->errorInfo());\n return false;\n\t\t}\n }", "protected function exec(string $query, $data = null): bool\n {\n return $this->pdo->prepare($query)->execute($data);\n }", "abstract public function Execute($query, $multiline = FALSE);", "abstract protected function executeSql($sql);", "public function raw_exec( $sql )\n {\n try\n {\n $count = $this->dbh->exec( $sql );\n }\n catch( PDOException $e )\n {\n $this->_debug_error( __LINE__, $e, ' \"%s\" LINE: %d');\n return false;\n }\n return $count;\n }", "public function execute() { \n return $this -> stmt -> execute();\n }" ]
[ "0.75506926", "0.7502506", "0.7412995", "0.71125364", "0.70189357", "0.6989376", "0.68373376", "0.67830753", "0.6736918", "0.6731009", "0.67187774", "0.67187774", "0.67138237", "0.6678799", "0.6653126", "0.66445863", "0.6628576", "0.6614014", "0.6611271", "0.66091067", "0.6608266", "0.6602083", "0.6595211", "0.65684724", "0.6566134", "0.6538565", "0.6538565", "0.6517883", "0.6517883", "0.6515301", "0.65039325", "0.65039325", "0.65039325", "0.65039325", "0.64938915", "0.6492911", "0.6455895", "0.64495105", "0.6418791", "0.6398299", "0.63976306", "0.6392972", "0.638112", "0.6336269", "0.632418", "0.6323855", "0.6322065", "0.63198245", "0.6313734", "0.6312679", "0.630693", "0.6299025", "0.6291769", "0.6272617", "0.62707794", "0.62707794", "0.62707794", "0.62671447", "0.625626", "0.6248785", "0.62437814", "0.6225316", "0.622114", "0.62125105", "0.6210769", "0.62084264", "0.62058336", "0.620175", "0.6199954", "0.6198073", "0.6195179", "0.6173387", "0.6163945", "0.61587894", "0.6153069", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6133048", "0.6124891", "0.6120497", "0.61191607", "0.61188906", "0.61100805", "0.6106056", "0.6099686", "0.6096977", "0.60912097", "0.60860056", "0.6084804" ]
0.0
-1
Generic wrapper for the prepared statement
protected function prepare ($id, $sql) { $stmt = $this->conn->prepare($sql); $operation = strtolower((explode(" ", trim($sql)))[0]); $this->collection->add(new Query($id, $stmt, $operation)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepare(/*# string */ $sql)/*# : bool */;", "static function prepareCommand($sql,$values=array(),$types=null) {\n\t\tif(self::$resource) {\n\t\t\t$stmt = self::$resource->prepare($sql);\n\t\t\tif($stmt) {\n\t\t\t\t/**\n\t\t\t\t * Use sequence of \"s\" (String) if no type list given.\n\t\t\t\t */\n\t\t\t\tif($types === null) {\n\t\t\t\t\t$types = str_repeat('s',count($values)); \n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * Bind parameters\n\t\t\t\t */\n\t\t\t\tif(strlen($types)) {\n\t\t\t\t $args = $values;\n\t\t\t\t array_unshift($args,$types);\n\t\t\t\t call_user_func_array(array($stmt,\"bind_param\"), $args);\n\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\tthrow new Exception('MYSQL: Statement could not be created');\n\t\t\t}\n\t\t\tif($stmt->execute()) {\n\t\t\t\treturn $stmt;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function prepare($sql, $params);", "abstract public function preparedQuery($sql, $parameters, $errorLevel = E_USER_ERROR);", "public function prepare($sql);", "function GenericSQL($sql, $param_type_array, $param_array, $sql_op){\n\tglobal $mysqli;\n\n\ttry{\n\t\tif($stmt=$mysqli->prepare($sql)){\n if($param_type_array !== NULL && $param_array !== NULL)\n call_user_func_array(\n array($stmt, \"bind_param\"), \n array_merge(\n passByReference($param_type_array), \n passByReference($param_array)\n )\n );\n\n $stmt->execute();\n\n if($stmt->affected_rows === 0 && $sql_op !== SQL_SELECT){\n return NOTHING_AFFECTED;\n }elseif($stmt->affected_rows === -1 && $sql_op !== SQL_SELECT){\n return $stmt->errno;\n }elseif($sql_op === SQL_SELECT){\n $data = returnJson($stmt);\n return $data;\n }else{\n return SUCCESS; \n }\n }else{\n // Throw error\n fwrite(STDOUT, \"else\");\n return FAILURE;\n }\n\t}catch (Exception $e) {\n // Return generic error\n fwrite(STDOUT, \"exception\");\n\t\treturn FAILURE;\n }\n}", "function pdo_preparedStmt($pdo,$query,$parmList,$parmData){\n$sql = $pdo->prepare($query);\nfor ($i=0; $i < count($parmList); $i++) { \n $sql->bindParam($parmList[$i], $parmData[$i]);\n}\n\nreturn $sql->execute();\n}", "function query_prepared($query, $param=null)\n { \n $stmt = $this->dbh->prepare($query);\n foreach ($param as $index => $val) {\n // indexing start from 1 in Sqlite3 statement\n if (is_array($val)) {\n $ok = $stmt->bindParam($index + 1, $val);\n } else {\n $ok = $stmt->bindValue($index + 1, $val, $this->getArgType($val));\n }\n \n if (!$ok) {\n $type_error = \"Unable to bind param: $val\";\n $this->register_error($type_error);\n $this->show_errors ? trigger_error($type_error,E_USER_WARNING) : null;\n return false;\n }\n }\n \n return $stmt->execute();\n }", "function pdo_stmt($stmt) {\r\n\r\n if (is_object($stmt)) {\r\n return $stmt;\r\n }\r\n else {\r\n return new pdo_dummy(\"Your last query was unsuccessful and returned FALSE instead of a fetchable result. See pdo_error() to find out why.\");\r\n }\r\n }", "private function PrepStatement()\n\t{\n\t\t$this->stmt = $this->prepare($this->query->statement);\n\t\tif($this->query->parameters !==NULL && $this->query->paramtype !==NULL\n\t\t\t&& count($this->query->parameters) == count($this->query->paramtype))\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, $this->query->paramtype[$parameter]);\n\t\t\t}\n\t\t}\n\t\telseif ($this->query->parameters!==NULL)\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, pdo::PARAM_STR);\n\t\t\t}\n\t\t}\n\t}", "protected function prepareSelectStatement() {}", "function statement_prep($connection, $sql) {\n\t\n\tif($stmt = $connection->prepare($sql)) {\n\t\t\n\t\t/*No Bind params */\n\t\t\n\t\t/*execute statement*/\n\t\t$stmt->execute();\n\t\t\n\t\t/*get result*/\n\t\t$result=$stmt->get_result();\n\t\t\n\t\t$stmt->close();\n\t\t\n\t} else {\n\t\t\t$result=null;\n\t\t\techo 'Prepared statement error: %s\\n'. $connection->error;\n\t}\n\t\n\treturn $result;\n}", "public function prepareUnwrapped(string $sql): \\Doctrine\\DBAL\\Driver\\Statement\n {\n // returns the actual statement\n return parent::prepare($sql);\n }", "public function genericSqlBuilder(string $sql, array $bindings = array()): PDOStatement;", "public function prepareStatement($rawSql);", "protected abstract function getSqlStatement();", "public function executePreparedStatement(string $queryString, string $types, ...$vars) {\n foreach($vars as $var) {\n $var = $this->dbConnection->real_escape_string($var);\n }\n $sqlStatement = $this->dbConnection->prepare($queryString);\n $sqlStatement->bind_param($types, ...$vars);\n if($sqlStatement->execute()) {\n return $sqlStatement;\n } else {\n return null;\n }\n }", "public function statement(): \\PDOStatement;", "public function runQuery($sql){\n $stmt = $this->conn->prepare($sql);\n return $stmt;\n }", "abstract public function execute($sql);", "public function query($rawQuery, $param = array()){\n \n $stmt = $this->conn->prepare($rawQuery);\n \n $this->setParams($stmt, $param);\n \n $stmt->execute();\n \n return $stmt;\n \n}", "public function execute(): Statement;", "public abstract function execute($sql);", "public function prepare(string $statement, array $driverOptions = []): Statement;", "private function prepare($sql, $params, $type) {\n\t\t$connection = $this->getConnection($type);\n\n\t\t//$sql_monitor = new SQLMonitor($sql);\n\t\t//$sql_monitor->start();\n\n\t\t$sth = $connection->prepare($sql, array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => FALSE));\n\t\tforeach ($params AS $key => $value) {\n\t\t\tif (strpos($key, '_') === 0) {\n\t\t\t\t$sth->bindValue(\":{$key}\", $value, PDO::PARAM_INT);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sth->bindValue(\":{$key}\", $value, PDO::PARAM_STR);\n\t\t\t}\n\t\t}\n\t\t$sth->execute();\n\n\t\t//$sql_monitor->finish($sth);\n\n\t\treturn $sth;\n\t}", "public function prepare($statement, $options = null)\n {\n\n // Get instance options\n if($options == null) $options = $this->_options;\n //Replace ? with a pseudo named parameter\n $newStatement = null;\n $parameter = 0;\n while($newStatement !== $statement)\n {\n if($newStatement !== null)\n {\n $statement = $newStatement;\n }\n $newStatement = preg_replace('/\\?/', ':autoparam'.$parameter, $statement, 1);\n $parameter++;\n }\n $statement = $newStatement;\n\n // check if statement is insert function\n if (strpos(strtolower($statement), 'insert into')!==false) {\n preg_match('/insert into\\s+([^\\s\\(]*)?/', strtolower($statement), $matches);\n // store insert into table name\n $this->_table = $matches[1];\n }\n\n //Prepare the statement\n $sth = @oci_parse($this->_dbh, $statement);\n\n if (!$sth) {\n $e = oci_error($this->_dbh);\n throw new Oci8\\Exceptions\\SqlException($e['message']);\n }\n\n if (!is_array($options)) {\n $options = array();\n }\n\n return new Oci8\\Statement($sth, $this, $options);\n }", "function prepare_stmt($conn, $query) {\r\n if (!$stmt = $conn->prepare($query)) {\r\n failure(\"Prepare failed: \" . $conn->error);\r\n }\r\n return $stmt;\r\n}", "public function get($sql)\n{\n $stmt = $this->link->prepare($sql);\n $stmt->execute();\n return $stmt;\n\n}", "protected function prepareWrapped(string $sql): Driver\\Statement\n {\n return new Statement($sql, $this);\n }", "public function GetPreparedStatement() : \\PDOStatement\r\n {\r\n return($this->preparedStatement);\r\n }", "abstract public function prepare($params=array());", "abstract public function prepareSelect();", "function pdo_query($sql, $link=NULL, $params=NULL) {\r\n\r\n // separate params from $sql and $link \r\n $params = func_get_args();\r\n $sql = TRIM( array_shift($params) );\r\n $flags = array();\r\n $direct = false;\r\n \r\n\r\n // find pdo $link \r\n if (count($params)) {\r\n // $link can be the first element\r\n if (is_object(reset($params))) {\r\n $link = array_shift($params);\r\n }\r\n // or the last\r\n elseif (is_object(end($params))) {\r\n $link = array_pop($params);\r\n }\r\n }\r\n // or we use the default $pdo\r\n $link = pdo_handle($link);\r\n \r\n // is $params a list to pdo_query(), or just one array with :key=>value pairs?\r\n if (count($params)==1 && is_array($params[0])) {\r\n $params = array_shift($params);\r\n }\r\n\r\n\r\n // add PDO_MySQL driver flag / workaround for specific query types\r\n switch (strtoupper(substr($sql, 0, strspn(strtoupper($sql), \"SELECT,USE,CREATE\")))) {\r\n\r\n // ought to make ->rowCount() work\r\n case \"SELECT\":\r\n $flags[PDO::MYSQL_ATTR_FOUND_ROWS] = true;\r\n break;\r\n\r\n // temporarily disable prepared statement mode for unbindable directives\r\n case \"USE\":\r\n $direct = true;\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\r\n break;\r\n\r\n default:\r\n }\r\n\r\n\r\n // unparameterized query()\r\n if ($direct) {\r\n $stmt = $link->query($sql);\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n }\r\n // or prepare() and execute()\r\n else {\r\n if ($stmt = $link->prepare($sql, $flags)) { // no try-catch in _WARNING mode\r\n $stmt->execute($params);\r\n }\r\n }\r\n \r\n // result\r\n if (!$stmt and PDO_HELPFUL) {\r\n pdo_trigger_error(\"pdo_query() SQL query failed, see pdo_error()\", E_USER_WARNING);\r\n }\r\n elseif (PDO_SEEKABLE & !$direct) {\r\n return new PDOStatement_Seekable($stmt, $params);\r\n }\r\n else {\r\n return $stmt;\r\n }\r\n }", "public function query($statement, array $parameters = null);", "public function prepare(string $statement, array $driver_options = []): PDOStatement\n {\n return parent::prepare($statement, $driver_options);\n }", "public function preparequery($sql, $type, $inputs){\n if(!$this->getConnection()) {\n return false;\n }\n\n else{\n $stmt = $this->conn->prepare($sql);\n $stmt->bind_param($type);\n $stmt->execute();\n if ($stmt->errno) {\n return false;\n } else {\n $stmt->close();\n return true;\n }\n\n $this->result = mysqli_query($this->conn, $sql);\n }\n}", "public function query($statement);", "public function prepare_statement($query) {\n return ($this->mysqli->prepare($query));\n }", "public function executePreparedSelect(string $queryString, string $types, array $vars, &...$results) {\n\n foreach($vars as $var) {\n $var = $this->dbConnection->real_escape_string($var);\n }\n\n $sqlStatement = $this->dbConnection->prepare($queryString);\n $sqlStatement->bind_param($types, ...$vars);\n\n $sqlStatement->execute();\n $sqlStatement->bind_result(...$results);\n $sqlStatement->store_result();\n return $sqlStatement;\n }", "abstract public function query($sql, $execute =FALSE);", "final protected static function createStatement($statement)\n {\n return DBConnection::getInstance()->prepare($statement);\n }", "private function setStatement($sql,$params){\n $this->isStatement = true;\n\n $this->stmtResult = $this->stmtAffectedRows = null;\n\n $stmt = $this->sqli->prepare($sql);\n\n //check if params is single value so make it an array\n if(gettype($params) !== 'array'){\n $params = [$params];\n }\n\n //since php 5.3 bind_param array must be by ref!!\n $refs = [];\n $bind_str = '';\n foreach($params as $key => $value){\n $bind_str .= $this->getBindParam($value);\n $refs[$key] = &$params[$key];\n }\n\n //add bind str to begining of the array:\n array_unshift($refs,$bind_str);\n call_user_func_array([$stmt,'bind_param'],$refs);\n\n $this->stmtResult = $stmt->execute();\n $this->stmtAffectedRows = $stmt->affected_rows;\n\n //works only on mysqlnd\n $result = $stmt->get_result();\n $stmt->close();\n\n return $result;\n }", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "public function Prepare($statement, $driver_options=NULL)\n {\n// $this->Handle->closeCursor();\n\n $this->Handle = parent::prepare($statement,\n array(PDO::ATTR_STATEMENT_CLASS =>\n array('ExDatabaseStatement')));\n\n if (!$this->Handle instanceof PDOStatement) {\n $error_info = parent::errorInfo();\n throw new ExDatabaseException('Could not prepare query: ' . $error_info[2]);\n }\n\n return $this->Handle;\n }", "public function prepare($statement) {\n if ($this->getConnection()) {\n $mysqli = $this->getConnection()->getMySQLi();\n if ($mysqli) {\n return $mysqli->prepare($statement);\n }\n } else {\n $this->setLog(\\REC1\\Components\\Logger\\Areas::DATABASE_METHODS_ERROR, \"Llamada del método 'prepare' sin establecer una conexión validad a la base de datos\");\n }\n return NULL;\n }", "public function execute($sql, $params = array());", "public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }", "function execute_prepared_query($prep_q, $bound_vars, $bound_var_types, $result_expected = false)\n{\n\tglobal $spebs_db;\n\t$pstmt = $spebs_db -> prepare($prep_q);\t\n\tif($spebs_db->errno != 0)\n\t{\n\t\terror_log(\"PREPARE STATEMENT error \".$spebs_db->errno.\": \".$spebs_db->error.\" (Q = \\\"$prep_q\\\")\");\n\t\treturn false;\n\t}\n\t\n\t$bound_varrefs = array();\n\t$bound_varrefs[0] = $bound_var_types;\n\t$i=1;\n\tforeach($bound_vars AS $thisvar)\n\t{\t\n\t\t${\"x$i\"} = $thisvar;\n\t\t$bound_varrefs[$i] = &${\"x$i\"};\n\t\t$i++;\n\t}\n\t$bind_action = call_user_func_array(array($pstmt, 'bind_param'), $bound_varrefs);\n\tif(!$bind_action)\n\t{\t\n\t\terror_log(\"CALL_USER_FUNC_ARRAY error \");\n\t\treturn false;\n\t}\n\tif($pstmt->errno != 0)\n\t{\n\t\terror_log(\"PREPARED QUERY BIND error \".$pstmt->errno.\": \".$pstmt->error);\n\t\treturn false;\n\t}\t\n\tif($pstmt -> execute())\n\t{\n\t\tif(!$result_expected)\n\t\t{\n\t\t\tif(isset($pstmt -> insert_id) && is_int($pstmt -> insert_id) && $pstmt -> insert_id > 0)\n\t\t\t\t$res = $pstmt -> insert_id;\n\t\t\telse\n\t\t\t\t$res = true;\n\t\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $res;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$results = array();\n\t\t\t$row = array();\n\t\t\t$metadata = $pstmt -> result_metadata();\n\t\t\tforeach($metadata -> fetch_fields() AS $field)\n\t\t\t{\t\n\t\t\t\t$row[$field -> name] = NULL;\n\t\t\t\t$bound_resrefs[] = &$row[$field -> name];\n\t\t\t}\n\t\t\t$bind_action = call_user_func_array(array($pstmt, 'bind_result'), $bound_resrefs);\n\t\t\t$i = 0;\n\t\t\twhile($pstmt -> fetch())\n\t\t\t{\t\n\t\t\t\tforeach($row AS $k => $v)\n\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t}\n\telse\n\t{\n\t\terror_log($pstmt->errno.\": \".$pstmt->error);\n\t\t$pstmt -> close();\t\n\t\treturn false;\n\t}\n}", "private static function executeHelper($sql, $parameters) {\n $connection = self::getConnection();\n $query = $connection->prepare($sql);\n $query->execute($parameters); \n return $query;\n }", "public function &prepare($q)\n {\n self::$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);\n $st = self::$db->prepare($q);\n $st->setFetchMode(PDO::FETCH_CLASS, 'stdClass');\n //$st->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n return $st;\n }", "function pg_prepare($connection = null, string $stmtname = null, string $query = null)\n{\n error_clear_last();\n if ($query !== null) {\n $result = \\pg_prepare($connection, $stmtname, $query);\n } elseif ($stmtname !== null) {\n $result = \\pg_prepare($connection, $stmtname);\n } elseif ($connection !== null) {\n $result = \\pg_prepare($connection);\n } else {\n $result = \\pg_prepare();\n }\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "private function _prepare($sql, $bind)\r\n {\r\n // (?'s) with the given, escaped parameter\r\n // - based on ADOdb emulated prepared statements\r\n\r\n if (is_array($bind))\r\n {\r\n $sqlpieces = explode('?', $sql);\r\n $sql = '';\r\n $i = 0;\r\n\r\n foreach ($bind as $param)\r\n {\r\n $sql .= $sqlpieces[$i];\r\n $sql .= $this->escape($param);\r\n $i += 1;\r\n }\r\n\r\n if (isset($sqlpieces[$i]))\r\n {\r\n $sql .= $sqlpieces[$i];\r\n\r\n if ($i + 1 != sizeof($sqlpieces))\r\n {\r\n throw new Exception(\"could not prepare statment due to parameter mismatch\");\r\n }\r\n }\r\n else if ($i != sizeof($sqlpices))\r\n {\r\n throw new Exception(\"could not prepare statment due to parameter mismatch\");\r\n }\r\n }\r\n\r\n return $sql;\r\n }", "public static function prepare( $stmt )\n {\n $_options = array();\n if ( self::$CURSOR_MODE ):\n switch ( self::$CURSOR_MODE ):\n case 'fw':\n $_options[\\PDO::ATTR_CURSOR] = \\PDO::CURSOR_FWDONLY;\n break;\n case 'scroll':\n $_options[\\PDO::ATTR_CURSOR] = \\PDO::CURSOR_SCROLL;\n break;\n endswitch;\n\n // has type?\n if ( self::$CURSOR_TYPE ):\n //SQL_SRV \n if ( bcDB::resource( 'RDBMS' ) === 'sqlsrv' ):\n switch ( self::$CURSOR_TYPE ):\n case 'static':\n $_options[\\PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE] = \\PDO::SQLSRV_CURSOR_STATIC;\n break;\n case 'dynamic':\n $_options[\\PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE] = \\PDO::SQLSRV_CURSOR_DYNAMIC;\n break;\n case 'keyset':\n $_options[\\PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE] = \\PDO::SQLSRV_CURSOR_KEYSET_DRIVEN;\n break;\n case 'buffered':\n $_options[\\PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE] = \\PDO::SQLSRV_CURSOR_BUFFERED;\n break;\n endswitch;\n endif;\n //todo other drivers if any\n endif;\n endif;\n\n self::$stmt = bcDB::resource( 'CONNECTION' )->prepare( $stmt, $_options );\n }", "public function selectPrepare($sql, $bind = null, $fetch_mode = null)\r\n {\r\n $stmt = $this->getSlave()->prepare($sql);\r\n $stmt->execute($this->_bind($bind));\r\n if (null !== $fetch_mode) {\r\n $stmt->setFetchMode($fetch_mode);\r\n }\r\n return $stmt;\r\n }", "public function PREPARE_STATEMENT($PREPARED_SQL)\r\n {\r\n return $this->statement = $this->Connection->prepare($PREPARED_SQL);\r\n }", "public function execute($sql);", "public function execute($sql);", "public function preparedStatement($sql, $args = NULL)\n\t{\n\t if (!$args)\n\t {\n\t return $this->query($sql);\n\t }\n\t $stmt = $this->pdo->prepare($sql);\n\t $stmt->execute($args);\n\t return $stmt;\n\t}", "function newStatement($sql, $params = array()) {\n if (preg_match('~^\\s*\\(*\\s*(\\w+).*$~m', $sql, $match)) {\n $statement = $match[1];\n } else {\n $statement = $sql;\n }\n\n if (defined('SHOW_DEBUG_INFORMATION')) {\n\t \t$GLOBALS['test_counter']++;\n\t \t$GLOBALS['sql_list'] .= \"<br/>{$sql}\";\n }\n switch(strtoupper($statement)) {\n case 'SELECT':\n case 'SHOW':\n case 'DESCRIBE':\n case 'EXPLAIN':\n if (!class_exists('MySqlQueryStatement')) {\n require_once('db/drivers/mysql/MySqlQueryStatement.class.php');\n }\n return new MySqlQueryStatement($this, $sql);\n case 'INSERT':\n if (!class_exists('MySqlInsertStatement')) {\n require_once('db/drivers/mysql/MySqlInsertStatement.class.php');\n }\n return new MySqlInsertStatement($this, $sql);\n case 'UPDATE':\n case 'DELETE':\n if (!class_exists('MySqlManipulationStatement')) {\n require_once('db/drivers/mysql/MySqlManipulationStatement.class.php'); \n }\n return new MySqlManipulationStatement($this, $sql);\n default:\n if (!class_exists('MySqlStatement')) {\n require_once('db/drivers/mysql/MySqlStatement.class.php'); \n }\n \n return new MySqlStatement($this, $sql);\n }\n }", "function ExecutePreparedQuery($sql, $vars)\n\t{\n\t\tif(empty($pdo))\n\t\t{\n\t\t\t$connectDb = \"mysql:host=\" . $dbServer . \";dbname=\" . $dbName;\n\t\t\t$pdo = new pdo($connectDb, $dbUser, $dbPass);\n\t\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$query = $pdo->prepare($sql);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo(\"<b><font color=\\\"red\\\">Error executing sql query:</font><br><br>\");\n\t\t\tprint_r($e->getMessage());\n\t\t\tdie();\n\t\t}\n\t\tif($query)\n\t\t\t$query->execute($vars);\n\t\telse\n\t\t{\n\t\t\tprint_r($pdo->errorInfo);\n\t\t\tdie();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\t// An insert will throw, this is crappy and should probably be handled better\n\t\t\treturn \"\";\n\t\t}\n\t}", "function prepareSQLStatement($connection, $query){\n\tif (!($sqlPrep = $connection->prepare($query))) {\n\t\techo \"Prepare of the statement <b> $query </b> failed: (\" . $connection->errno . \") \" . $connection->error;\n\t}\n\telse{\n\t\treturn $sqlPrep;\n\t}\n}", "function runQuery($connection, $sql, $parameters=array()) {\n // Ensure parameters are in an array\n if (!is_array($parameters)) {\n $parameters = array($parameters);\n }\n\n $statement = null;\n if (count($parameters) > 0) {\n // Use a prepared statement if parameters\n $statement = $connection->prepare($sql);\n $executedOk = $statement->execute($parameters);\n if (! $executedOk) {\n throw new PDOException;\n }\n } else {\n // Execute a normal query\n $statement = $connection->query($sql);\n if (!$statement) {\n throw new PDOException;\n }\n }\n return $statement;\n}", "public function exec( $sql, $prepared=array(), $dataTypes=array() )\n {\n if( !$sql ) throw new \\RuntimeException( \"missing Sql statement.\" );\n if( empty( $prepared ) ) {\n $this->pdoStmt = $this->pdoObj->query( $sql );\n }\n else {\n $this->execPrepare( $sql );\n $this->execExecute( $prepared, $dataTypes );\n }\n $this->applyFetchMode();\n return $this->pdoStmt;\n }", "protected function executeStatement($mysqli,$sql,$vars,$result_mode=true){\n $stmt = $mysqli->prepare($sql);\n if(!$stmt){\n throw new Doggy_Dba_Exception('Prepare SQL failed:'.$mysqli->error);\n }\n if ($stmt->param_count != count($vars)) {\n throw new Doggy_Dba_Exception('The parameter holder is not same as invoke parameter array.');\n }\n $a = '';\n foreach ($vars as $k => $v) {\n if (is_string($v)) $a .= 's';\n else if (is_integer($v)) $a .= 'i'; \n else $a .= 'd';\n }\n array_unshift($vars,$a);\n call_user_func_array(array($stmt,'bind_param'),$vars);\n $ok = $stmt->execute();\n if($mysqli->errno){\n Doggy_Log_Helper::error('SQL ERROR:'.$mysqli->error.\" SQL:$sql\",__METHOD__);\n throw new Doggy_Dba_Exception('SQL ERROR:'.$mysqli->error);\n }\n if($result_mode){\n return $stmt;\n }else{\n $stmt->close();\n return $ok;\n }\n }", "public function execute($sql, $bind){\n $sth = $this->db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n /* example:\n $bind = array(':calories' => 150, ':colour' => 'red');\n */\n return $sth->execute($bind);\n }", "public function prepare(string $query, ?array $options = null): PDOStatement\n {\n // Get instance options\n if ($options == null) {\n $options = $this->options;\n }\n\n // Skip replacing ? with a pseudo named parameter on alter/create table command\n if ($this->isNamedParameterable($query)) {\n // Replace ? with a pseudo named parameter\n $parameter = 0;\n $query = preg_replace_callback('/(?:\\'[^\\']*\\')(*SKIP)(*F)|\\?/', function () use (&$parameter) {\n return ':p'.$parameter++;\n }, $query);\n }\n\n // check if statement is insert function\n if (str_contains(strtolower($query), 'insert into')) {\n preg_match('/insert into\\s+([^\\s\\(]*)?/', strtolower($query), $matches);\n // store insert into table name\n $this->table = $matches[1];\n }\n\n // Prepare the statement\n $sth = @oci_parse($this->dbh, $query);\n\n if (! $sth) {\n $e = oci_error($this->dbh);\n throw new Oci8Exception($e['message']);\n }\n\n if (! is_array($options)) {\n $options = [];\n }\n\n return new Statement($sth, $this, $options);\n }", "public function prepare() {\n\t\tif ($this->_statement == null) \n\t\t{\n\t\t\ttry {\n\t\t\t\t$this->_statement = $this->_connection->getPdoInstance()->prepare($this->getText());\n\t\t\t\t$this->_paramLog = array();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$errorInfo = $e instanceof PDOException ? $e->errorInfo : null;\n\t\t\t\tthrow new \\GO\\Base\\Exception\\Database('DbCommand failed to prepare the SQL statement: '. $e->getMessage(), $e->getCode(), $errorInfo);\n\t\t\t}\n\t\t}\n\t}", "public function prepare_execute($sql, $params)\n\t{\n\t\t$this->statement = $this->prepare_query($sql, $params);\n\t\t$this->statement->execute();\n\n\t\treturn $this->statement;\n\t}", "protected function execute(string $sql)\n {\n // Prepare a statement\n try {\n $stm = $this->PDO->prepare($sql);\n\n // Bind all parameters\n foreach ($this->Parameters as $index => $value) {\n if ($value == 'NULL') {\n // special rule for NULL values\n $stm->bindValue($index, null, PDO::PARAM_INT);\n } else {\n $stm->bindValue($index, $value, $this->getValueType($value));\n }\n\n // Replace parameter placeholder for internal cache\n $sql = str_replace(' ' . $index . ' ', ($value == 'NULL' ? ' NULL ' : ' \"' . $value . '\" '), $sql);\n }\n\n // reset parameter cache\n $this->Parameters = [];\n $this->ParameterIndex = 1;\n\n // Save query to cache\n $this->History[] = trim($sql);\n\n // execute statement\n if ($stm->execute()) {\n return $stm;\n } else {\n // save the error\n $this->LastError = $stm->errorInfo();\n\n // return false\n return false;\n }\n } catch (PDOException $e) {\n $this->log(new ConnectionException('Failed to execute query!', $e), Environment::E_LEVEL_ERROR);\n return false;\n }\n }", "public function prepare($statement)\n {\n try {\n $stmt = new Statement($statement, $this);\n } catch (Exception $ex) {\n throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement);\n }\n\n $stmt->setFetchMode($this->defaultFetchMode);\n\n return $stmt;\n }", "abstract protected function executeSql($sql);", "public function bind_value(\\PDOStatement $_stmt){\n\n\t\tforeach($this->arguments as $arg){\n\t\t\tif($arg instanceof resolve_to_sql){\n\t\t\t\t$arg->bind_value($_stmt);\n\t\t\t}else{\n\t\t\t\tif(is_object($arg)){\n\t\t\t\t\tthrow new \\Exception(\"Argumento erroneo ('.get_class($arg).') en el grupo al hacer 'bind_value'\");\n\t\t\t\t}else{\n\t\t\t\t\tthrow new \\Exception(\"Argumento erroneo ($arg) en el grupo al hacer 'bind_value'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $_stmt;\n\t}", "private static function prepare($sql)\n {\n return self::$instancia->con->prepare($sql);\n }", "public function prepare($statement, array $driver_options = array())\n\t{\n\t\treturn new MyPDOStatement($this, $statement, $driver_options);\n\t}", "function query($stmt,$values) {\n\t\ttry {\n\t\t $qStmt = $this->dbconn->prepare($stmt);\n\t\t\t$qStmt->execute($values);\n\t\t\treturn $qStmt->fetchAll();\n\t\t} catch(PDOException $e) {\n\t\t\treturn $e;\n\t\t}\n\t}", "public function prepare(string $statement): StatementInterface\n {\n try {\n $stmt = $this->pdo->prepare($statement);\n return new Statement($stmt);\n } catch (PDOException $ex) {\n throw Exception::prepare(__METHOD__, $ex);\n }\n }", "public function prepare($stmtName, $stmt, $values){\n return $this->connection->prepare($stmtName, $stmt, $values);}", "private function bindParams($statement, $params)\n\t{\n\t\tif(!$params) return $statement;\n\n\t\t$types = \"\";\n\t\tif (phpversion() >= '5.3')\n\t\t{\n\t\t $bind = array();\n\t\t foreach($params as $key => $val)\n\t\t {\n\t\t\t\t$types .= $this->mysqlParamType($val);\n\t\t $bind[] = &$params[$key];\n\t\t }\n\t\t} \n\t\telse\n\t\t $bind = array_values($params);\n\n\t\tarray_unshift($bind, $types);\n\tdebug(\"bindParams\", $bind);\n\t\tcall_user_func_array(array($statement, 'bind_param'), $bind);\n\n\t\treturn $statement;\n\t}", "public function prepare(IStatement $stmt, $driver_options=[]) {\n return $this->pdo->prepare($this->render($stmt), $driver_options);\n }", "public function &prepare_self($q)\n {\n $st = &$this->prepare($q);\n $st->setFetchMode(PDO::FETCH_INTO, $this->type);\n //$st->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n return $st;\n }", "public function prepare($statement, array $driver_options=[]) {\n $this->queries[] = $statement;\n if (count($driver_options)) {\n return parent::prepare($statement, $driver_options);\n } else {\n return parent::prepare($statement);\n }\n }", "public function query($query){\r\n $args = func_get_args();\r\n array_shift($args); //first element is not an argument but the query itself, should removed\r\n\r\n $reponse = parent::prepare($query);\r\n $reponse->execute($args);\r\n return $reponse;\r\n\r\n }", "public function statement($query, $bindings = []);", "public function statement($query, $bindings = []);", "public function runQuery($sql){\n $stmt = $this->pdo->prepare($sql);\n return $stmt;\n }", "private function execute($statement, $input_parameters = [])\n {\n try {\n $stmt = $this->connection->prepare($statement);\n $stmt->execute($input_parameters);\n\n return $stmt;\n } catch (PDOException $e) {\n throw new Exception($e->getMessage());\n }\n }", "public function prepare($sql) {\n return $this->conn->prepare($sql);\n }", "public function prepare(string $sql): Statement\n {\n $connection = $this->getWrappedConnection();\n\n try {\n $statement = $connection->prepare($sql);\n } catch (Driver\\Exception $e) {\n throw $this->convertExceptionDuringQuery($e, $sql);\n }\n\n return new Statement($this, $statement, $sql);\n }", "function getResultOfPreparedStatement($result){\n try {\n if($result->num_rows > 0){\n $DbResult = $result->fetch_all(MYSQLI_ASSOC);\n return $DbResult;\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n}", "public static function prepare(string $statement) {\r\n return self::getConnection()->prepare($statement);\r\n }", "public function execute($option = array()){\n\t$this->_cursor = $this->_dbh->prepare($this->_sql);\n\t\tif($option){\n\t\t\tfor($i = 0;$i < count($option);$i++){\n\t\t\t\t$this->_cursor->bindParam($i+1,$option[$i]);\n\t\t\t}\n\t\t}\n\t\t$this->_cursor->execute();\n\t\treturn $this->_cursor;\n\t}", "function executeAsPrepared($sql, $data, $onlyExecute = false)\n {\n if ($this->debug_mode == 2) {\n echo \"executeAsPrepared - $sql<br>\";\n printr($data);\n }\n try {\n if ($sql != $this->lastPrepared) {\n $this->statement = $this->connection->prepare($sql);\n $this->lastPrepared = $sql;\n }\n\n /*\n * Execution de la requete\n */\n $this->lastResultExec = $this->statement->execute($data);\n if ($this->lastResultExec && !$onlyExecute) {\n return $this->statement->fetchAll(PDO::FETCH_ASSOC);\n } else {\n return $this->lastResultExec;\n }\n } catch (PDOException $e) {\n $this->lastResultExec = false;\n if ($this->debug_mode > 0) {\n $this->addMessage($e->getMessage());\n }\n throw new ObjetBDDException($e->getMessage());\n }\n }", "public function select(string $table, string $columns, string $where = \"\", array $bindings = array()): PDOStatement;", "abstract public function execute($query);", "private function stmt_bind_param (&$stmt, &$types, &$parameters)\n\t{\n\t\treturn call_user_func_array('mysqli_stmt_bind_param', array_merge(array($stmt, $types), $parameters));\n\t}", "public function prepare($sql, array $parameters = array())\n {\n $this->statement = $this->connection->prepare($sql, $parameters);\n $this->statement->setFetchMode($this->fetchMode, $this->mappedModelClass->getName());\n }", "public static function prepare($statment){\n $db = DatabaseConnection::getInstance();\n // $db->link->prepare() is a method in PDO class itself, different from this on DatabaseConnection::prepare();\n return $db->link->prepare($statment);\n }", "public function prepare($statement, $driver_options = array())\n {\n $this->last_query = new MockPDOStatement($statement);\n\n return $this->last_query;\n }", "public function prepare($sql)\n {\n return $this->prepareWrapped($sql);\n }", "public function smart_stmt($query, $types, $values) {\n global $mysql;\n\n try {\n $stmt = $mysql->prepare_statement($query);\n\n //checking if query well written\n if (!$stmt)\n throw new Exception(\"Invalid Query: \" . $query);\n\n //binds the values\n call_user_func_array(\n array($stmt, 'bind_param'), array_merge(\n array($types), $values\n )\n );\n $stmt->execute();\n\n if (strpos($query, \"SELECT\") !== false)\n $result = $stmt->get_result();\n elseif (strpos($query, \"INSERT\") !== false)\n $result = $mysql->inserted_id();\n elseif (strpos($query, \"UPDATE\") !== false || strpos($query, \"DELETE\") !== false)\n $result = true;\n \n } catch (Exception $ex) {\n $result = false;\n } finally {\n if ($stmt != false)\n $stmt->close();\n return $result;\n }\n }" ]
[ "0.6912153", "0.6861796", "0.6768063", "0.6765797", "0.6759153", "0.6757322", "0.674325", "0.67332995", "0.67017263", "0.6666937", "0.66292876", "0.6581419", "0.657752", "0.6525461", "0.65218985", "0.6519793", "0.6470869", "0.6461281", "0.6447999", "0.6440679", "0.6361701", "0.63444835", "0.6343702", "0.63295186", "0.63250643", "0.6292538", "0.62827814", "0.6262603", "0.6260666", "0.62564486", "0.6218046", "0.619334", "0.61928695", "0.6181772", "0.615989", "0.61511964", "0.6150963", "0.61315686", "0.6123443", "0.61197114", "0.611461", "0.6088107", "0.6084225", "0.6084225", "0.606835", "0.6065279", "0.6064203", "0.6063212", "0.60551035", "0.6054981", "0.60492635", "0.60473126", "0.60448563", "0.602825", "0.6022063", "0.60193443", "0.6005979", "0.6005979", "0.5989956", "0.5986165", "0.59827816", "0.5982691", "0.5982586", "0.59661937", "0.59378475", "0.59377277", "0.5935411", "0.5932889", "0.59322816", "0.5917449", "0.5914308", "0.5901448", "0.5901233", "0.5888829", "0.58827025", "0.5878878", "0.5876616", "0.58661765", "0.5865124", "0.5862978", "0.5857017", "0.5855477", "0.5835049", "0.5830368", "0.5830368", "0.5826477", "0.5826218", "0.58196694", "0.58175415", "0.58159405", "0.5814989", "0.58145636", "0.5809174", "0.580807", "0.58041257", "0.58026457", "0.5797747", "0.5795453", "0.57850546", "0.5782172", "0.57816494" ]
0.0
-1
Generic wrapper for statement execution
protected function execute ($id, $values = []) { $query = $this->collection->get($id); // The query object $stmt = $query->getStmt(); // PDO prepared statement $stmt->execute($values); // PDO execute with $values $operation = $query->getOperation(); if ($operation === "select") { return $stmt->fetchAll(PDO::FETCH_OBJ); } else { return $stmt->rowCount(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute(): Statement;", "abstract function execute();", "abstract function execute();", "abstract public function execute() ;", "abstract function execute ();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "abstract public function execute();", "public abstract function execute($sql);", "abstract public function execute($sql);", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "public function query($statement);", "public function executeStatement()\n {\n \n }", "abstract public function execute($query);", "abstract public function exec($sql);", "public function getStatement();", "public function getStatement();", "public function getStatement();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "abstract public function executeS($query, $array = true);", "public function execute($sql);", "public function execute($sql);", "abstract public function exec($query='');", "abstract public function Execute();", "public function getStatement() {}", "abstract protected function executeSql($sql);", "abstract function executeQuery($cons);", "function execute();", "public function execute($query);", "public function execute() { \n return $this -> stmt -> execute();\n }", "abstract public function query($sql, $execute =FALSE);", "public function Execute()\r\n {\r\n $this->PREPARE_STATEMENT($this->sql);\r\n return $this->EXECUTE_STATEMENT($this->statement);\r\n \r\n }", "function getStatement() ;", "function sql_execute($sql)\n{\n global $ctx;\n return $ctx['sqlconn']->query($sql);\n}", "public function statement($query, $bindings = []);", "public function statement($query, $bindings = []);", "abstract public function Execute($query, $multiline = FALSE);", "public function query($statement, array $parameters = null);", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "protected abstract function getSqlStatement();", "function executeStatement($stmt) {\n if (!$stmt->execute()) {\n echo \"Error executing operation.\";\n die();\n }\n}", "public function execute($sql, $params = array());", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "abstract function & execute ($config);", "function exec($sql);", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "public function execute()\n {\n $query = $this->__toString();\n if (!empty($this->params)) {\n $statement = $this->pdo->prepare($query);\n $statement->execute($this->params);\n return $statement;\n }\n return $this->pdo->query($query);\n }", "abstract public function query($sql);", "public function statement($query, $bindings = array(), $rawResults = false)\n\t{\n\t\treturn $this->neoeloquent->statement($query, $bindings, $rawResults);\n\t}", "function executePlainSQL($cmdstr) { //takes a plain (no bound variables) SQL command and executes it\n\t//echo \"<br>running \".$cmdstr.\"<br>\";\n\tglobal $oraconn, $success;\n\t$statement = OCIParse($oraconn, $cmdstr); \n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($oraconn); // For OCIParse errors pass the \n\t\t// connection handle\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\t$r = OCIExecute($statement, OCI_DEFAULT);\n\tif (!$r) {\n\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = oci_error($statement); // For OCIExecute errors pass the statementhandle\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t} else {\n\n\t}\n\treturn $statement;\n\n}", "abstract protected function _query($sql);", "public function execute($query)\n {\n }", "public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }", "public function execute() \r\n\t{\r\n\t\treturn $this->objStatement->execute();\r\n\t}", "function db_run_query( $statement ) {\n\n $this->pm_clear_dataset();\n $this->pm_store_statement( $statement );\n $this->pm_debug_statement( $statement );\n if( ! $this->query_is_select ) $this->pm_write_logfile( $statement );\n\n $this->dataset_obj = $this->connection->query( $statement );\n $this->pm_die_if_error( 'dataset_obj' );\n\n if( is_object( $this->dataset_obj )) # updates/inserts/deletes seem to return an integer not an object\n $this->rowcount = $this->dataset_obj->numrows();\n else\n $this->rowcount = ROWCOUNT_NOT_SET;\n\n return $this->dataset_obj;\n }", "public function execute($condition) {\r\n \r\n }", "public function statement($query, $bindings = array())\n {\n return $this->run ( $query, $bindings, function ($me, $query, $bindings)\n {\n if ( $me->pretending () ) return true;\n $bindings = $me->prepareBindings ( $bindings );\n return $me->getPdo ()->prepare ( $query )->execute ( $bindings );\n } );\n }", "abstract public function getStatement(array $row): Transaction;", "function newStatement($sql, $params = array()) {\n if (preg_match('~^\\s*\\(*\\s*(\\w+).*$~m', $sql, $match)) {\n $statement = $match[1];\n } else {\n $statement = $sql;\n }\n\n if (defined('SHOW_DEBUG_INFORMATION')) {\n\t \t$GLOBALS['test_counter']++;\n\t \t$GLOBALS['sql_list'] .= \"<br/>{$sql}\";\n }\n switch(strtoupper($statement)) {\n case 'SELECT':\n case 'SHOW':\n case 'DESCRIBE':\n case 'EXPLAIN':\n if (!class_exists('MySqlQueryStatement')) {\n require_once('db/drivers/mysql/MySqlQueryStatement.class.php');\n }\n return new MySqlQueryStatement($this, $sql);\n case 'INSERT':\n if (!class_exists('MySqlInsertStatement')) {\n require_once('db/drivers/mysql/MySqlInsertStatement.class.php');\n }\n return new MySqlInsertStatement($this, $sql);\n case 'UPDATE':\n case 'DELETE':\n if (!class_exists('MySqlManipulationStatement')) {\n require_once('db/drivers/mysql/MySqlManipulationStatement.class.php'); \n }\n return new MySqlManipulationStatement($this, $sql);\n default:\n if (!class_exists('MySqlStatement')) {\n require_once('db/drivers/mysql/MySqlStatement.class.php'); \n }\n \n return new MySqlStatement($this, $sql);\n }\n }", "function db_raw_exec( $sql )\n{\n return Chev_PDO::instance()->raw_exec( $sql );\n}", "public function EXECUTE_STATEMENT($PREPARED_STATEMENT)\r\n {\r\n return $PREPARED_STATEMENT->execute($this->data);\r\n }", "public function statement($query, $bindings = [], $rawResults = false)\n {\n return $this->run($query, $bindings, function (self $me, $query, array $bindings) use ($rawResults) {\n if ($me->pretending()) {\n return true;\n }\n\n $statement = $me->getCypherQuery($query, $bindings);\n\n $result = $statement->getResultSet();\n\n return ($rawResults === true) ? $result : $result instanceof ResultSetInterface;\n });\n }", "protected abstract function executeQuery($query);" ]
[ "0.77548254", "0.71643996", "0.71643996", "0.7161236", "0.715113", "0.704864", "0.704864", "0.704864", "0.704864", "0.69907415", "0.6983075", "0.6862801", "0.6862801", "0.6862801", "0.68237346", "0.6823022", "0.6741741", "0.6733903", "0.66284335", "0.66284335", "0.66284335", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.6614213", "0.65725064", "0.65648174", "0.65648174", "0.6513958", "0.64769775", "0.64475495", "0.63944006", "0.63817626", "0.6327879", "0.6312646", "0.6278363", "0.62770987", "0.6265319", "0.62616867", "0.6237935", "0.62197834", "0.62197834", "0.62095684", "0.6198662", "0.61964214", "0.61768085", "0.616745", "0.6087458", "0.60841537", "0.60841537", "0.60841537", "0.60841537", "0.60841537", "0.60841537", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6083453", "0.6081523", "0.6081523", "0.60451496", "0.60366976", "0.6033052", "0.6033052", "0.6030535", "0.60222435", "0.60030454", "0.5996469", "0.5970389", "0.5968514", "0.59664243", "0.5962174", "0.5949622", "0.5901746", "0.5900735", "0.58952016", "0.589186", "0.58888286", "0.5878712", "0.58778536", "0.587776" ]
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.74863917", "0.7381951", "0.7153684", "0.7140428", "0.7063169", "0.7032298", "0.6928659", "0.6928659", "0.6925709", "0.6902765", "0.6895105", "0.6895105", "0.6890083", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014", "0.68699014" ]
0.0
-1
Check for users having this device details
public function doesUserAssociationExist(){ if($this->userDevices){ 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 hasUserLoginToTwoDevices($user_id){\n $user = User::where(['name'=>$user_id])->withCount('devices')->first();\n if($user){\n //user found check number of devices\n if($user->devices_count == 2){\n return true;\n }else{\n return false;\n }\n }else {\n //user not found insert to device to database\n return false;\n }\n }", "public function hasUsershow(){\n return $this->_has(32);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "abstract public function deviceExists($devId, $user = null);", "public function checkUsersSession(){\n\t}", "public function providerHasDevices(): bool;", "public function hasUser();", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "public static function exists()\n {\n return Session::get('UserID') != null;\n }", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user information because \".pdoError($e));\n }\n if($this->spdo->query(\"SELECT FOUND_ROWS()\")->fetchColumn() != 1)\n return false;\n return true;\n }", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "private function userExist(){\n $result = $this->facebookModel->project(array(\"User_id\" => true, \"Current_city\" => true, \"_id\" => false))->get()->count();\n return $result;\n }", "public function hasUserData(){\n return $this->_has(3);\n }", "public function check(HasDeviceIdRequest $request)\n {\n $device = $request->getDevice();\n return response()->json(['success' => $device && $device->user_id]);\n }", "public function exists() {\n\t\treturn !isset($userData);\n\t}", "public function hasuser()\n {\n return is_object($this->luser);\n }", "private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }", "public function any_user_exists(){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` \";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }", "public function isUsersAllowedDevicesExceeded($userid)\n {\n $users_active_dev_count = $this->checkUserDevicesCount($userid);\n $devices_allowed_count = $this->devicesAllowedCount();\n $user_waiting_count = 1;\n if (($users_active_dev_count + $user_waiting_count) > $devices_allowed_count)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function authCheck($authToken, $device_id) {\n $dbCon = getConnection();\n // $auth_query = \"select id from user_appdata where user_name=$device_id and auth_token='\" . $authToken . \"'\";\n $auth_query = \"select u.id from users u left join user_appdata uad on u.id=uad.user_id where uad.auth_token='\" . $authToken . \"' and u.device_id='\" . $device_id . \"'\";\n $auth_queryExecution = $dbCon->query($auth_query);\n $result_auth = $auth_queryExecution->rowCount(PDO::FETCH_NUM);\n return $result_auth;\n}", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function is_watched_by_auth_user() {\n $id = Auth::id();\n\n\n $watcher_user_ids = [];\n\n foreach($this->watchers as $watcher) {\n\n //ja polnime nizata so user_id-s od konkretniot watcher\n $watcher_user_ids[] = $watcher->user_id;\n\n }\n\n // go sporeduvame sekoj user_id od watchers so id-to na logiraniot user\n if(in_array($id, $watcher_user_ids)){\n\n return true;\n }else{\n\n return false;\n }\n\n\n }", "public function checkIOSCustomers(){\n $user = Customer::where('id', $this->authUser->id)->first();\n if (!empty($user) && count($user->toArray()) > 0) {\n $user->device_token = '';\n $user->acesstype = \"mobile\";\n $user->device_type = $this->request->device_type;\n return ($user->save()) ? $user->makeHidden([ 'id','access_token' ]) : 0;\n }else{\n return false;\n }\n }", "public function hasdeveloper()\n {\n return $this->hasuser() && $this->user()->isdeveloper();\n }", "public function existUser($params)\r\n {\r\n if (!empty($this->getAll($params))) {\r\n return True;\r\n } else {\r\n return False;\r\n }\r\n }", "function isUserExist($con,$androidId,$username,$email){\n\t$sql = \"SELECT * FROM `access`,`owner` WHERE owner.email = access.email AND owner.android_id = '\".$androidId.\"' AND owner.email='\".$email.\"' AND access.username='\".$username.\"' AND access.enable = 'Y'\";\n\n\t$result = mysqli_query($con,$sql);\n\t$value = @mysqli_num_rows($result);\n\n\tif ($value){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "function user_verify(){\n \n $verify = false;\n \n if( isset($_SESSION['user_id']) ){\n \n if( isset($_SESSION['user_ip']) && $_SERVER['REMOTE_ADDR'] == $_SESSION['user_ip'] ){\n \n if( isset($_SESSION['user_agent']) && $_SERVER['HTTP_USER_AGENT'] == $_SESSION['user_agent'] ){\n \n $verify = true;\n\n }\n \n }\n \n }\n \n return $verify;\n \n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function providerHasDevices(): bool\n {\n return $this->providerHasDevices;\n }", "function is_mobile_exists($mobile){\n\t\t\t\n\t\t\t$select_data = \"*\"; \n\t\t\t\n\t\t\t$where_data = array(\t// ----------------Array for check data exist ot not\n\t\t\t\t'mobile' => $mobile\n\t\t\t);\n\t\t\t\n\t\t\t$table = \"userdetails\"; //------------ Select table\n\t\t\t$result = $this->get_table_where( $select_data, $where_data, $table );\n\t\t\t\n\t\t\tif( count($result) > 0 ){ // check if user exist or not\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t }", "public function hasUserMapList()\n {\n return $this->user_map !== null;\n }", "public function getUserExiste(){\n return $this->userExist;\n }", "public function userExists()\r\n {\r\n $sql = \"SELECT COUNT(*) FROM (SELECT * FROM doctors WHERE email = :email) AS subquery\";\r\n\r\n $query = $this->db_connection->prepare($sql);\r\n $query->bindValue(':email', $this->email);\r\n $query->execute();\r\n\r\n while($result_row = $query->fetch() ){\r\n if($result_row[0] == 1) return true;\r\n else return false;\r\n }\r\n\r\n return false; \r\n }", "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM users WHERE id='\". $this->id .\"'\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested user (\". $this->id .\") does not exist - possibly the user has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "public function hasWpUserId(){\n return $this->_has(7);\n }", "function userExists(){\n\t\t//assume user is not in system\n\t\t$exists = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\tif($run){//if not error in query \n\t\t\twhile($row = $run->fetchArray()){//while there are still rows to parse\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided user name matches one in db\n\t\t\t\t\t//user exists\n\t\t\t\t\t$exists = true;\n\t\t\t\t\t//break out of loop\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t//close connection to db\n\t\t$user_db->close(); \n\t\treturn $exists;\n\t}", "function loaded_user(string $id): bool { return isset($this->users[$id]); }", "public function checkUser(){\n \n $user = $this->request->data[\"user\"];\n \n $result = $this->User->find(\"first\",array(\n 'conditions' => array(\n 'user' => $user\n )\n ));\n \n $result = array_filter($result);\n \n echo !empty($result) ? true : false;\n \n $this->autoRender = false;\n \n \n }", "function is_user_exists($cellphone,$password)\n {\n\n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND password='{$password}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "public function check()\n {\n $user = $this->user();\n return !empty($user);\n }", "public function hasUid(){\n return $this->_has(2);\n }", "public function deviceExists()\n\t{\n $this->load->database();\n $device_id = $this->input->get_post('device_id');\n $query = $this->db->get_where('devices', array('device_id'=>$device_id));\n\t\t$exists = ($query->num_rows()>0);\n\n\t\t$this->output\n ->set_content_type('application/json')\n ->set_output(json_encode($exists));\n\t}", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function checkAccess()\n {\n $orders = $this->getOrders();\n\n return parent::checkAccess()\n && $orders\n && $orders[0]\n && $orders[0]->getProfile();\n }", "public function hasUserCount()\n {\n return $this->user_count !== null;\n }", "public static function is_available () {\n\t\t$auth = op5Auth::instance();\n\t\tforeach (AuthModulePool_Model::all() as $module) {\n\t\t\t$driver = $auth->get_auth_driver($module->get_modulename());\n\t\t\tif (\n\t\t\t\t$driver->get_metadata('require_user_configuration') &&\n\t\t\t\t$driver->get_user_count() > 0\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function check()\n {\n if(!empty($this->user)) {\n // If you need to check users online list in every page load, check this TRUE in config file\n if($this->config->item('check_users_on_page_load', 'online')) {\n $this->checkOnlineList();\n }\n\n $this->addUser();\n }\n }", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "public function checkIfAvailable(){\n $user_check_query = self::$connection->db->prepare(\"SELECT * FROM users WHERE name = ? OR email = ?\");\n $user_check_query->bind_param(\"ss\", self::$signUpName, self::$signUpEmail);\n $user_check_query->execute();\n $users = $user_check_query->get_result()->fetch_assoc();\n $user_check_query->close();\n $nameError = false;\n $emailError = false;\n $_POST = array();\n if (isset($users)) {\n foreach($users as $key=>$value) {\n if (strtolower($users['name']) === strtolower(self::$signUpName) && !$nameError) {\n self::addError(\"signUp\", \"Name already exists.\");\n $nameError = true;\n Auth::CreateView('Auth');\n };\n if ($users['email'] === self::$signUpEmail && !$emailError) {\n self::addError(\"signUp\", \"Email already exists.\");\n $emailError = true;\n Auth::CreateView('Auth');\n };\n }\n } else if(count(self::$signUpErrors) === 0){\n $this->registering();\n return true;\n }\n }", "public function hasMultipleDevices()\n {\n return false;\n }", "function d4os_io_db_070_os_users_is_alive() {\n return array(\n 'success' => d4os_io_db_070_mysql_is_alive('os_robust', 'os robust'),\n );\n}", "public function verify_user_data()\n {\n\n if(isset($_SESSION['id']) AND $_SESSION['id'] == $_GET['id'])\n {\n\n $this->user_data_check = true;\n\n }else{\n\n $this->user_data_check = false;\n\n }\n\n return $this->user_data_check;\n\n }", "function is_user_registered($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=0\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "public function checkData()\n\t{\n\t\t$result = parent::checkData();\n\t\t$query = (new \\App\\Db\\Query())->from($this->baseTable)->where(['server_id' => $this->get('server_id'), 'user_name' => $this->get('user_name')]);\n\t\tif ($this->getId()) {\n\t\t\t$query->andWhere(['<>', 'id', $this->getId()]);\n\t\t}\n\t\treturn !$result && $query->exists() ? 'LBL_DUPLICATE_LOGIN' : $result;\n\t}", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function loginUserConditionMatchesMultipleLoggedInUsers() {}", "public function loginUserConditionMatchesMultipleLoggedInUsers() {}", "function userExists($uid)\r\n {\r\n return $this->UD->userExists($uid);\r\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function checkProfil()\n\t{\n\t\t$query = 'SELECT * FROM users WHERE id_users='.$_SESSION['id_users'].';';\n\t\t$resultat = $this->db->get($query);\n\t\treturn $resultat;\n\t}", "public function loginUserConditionMatchesAnyLoggedInUser() {}", "public function loginUserConditionMatchesAnyLoggedInUser() {}", "public function check_user()\n {\n $res = $this->CustomModel->checkUser(\n $this->input->get('index_no')\n );\n\n if (!$res) {\n echo 'not exists';\n }\n }", "public function exists() {\n\t\tglobal $config;\n\t\t\n\t\tif(!empty($this->data['id']))\n\t\t\t$where = 'id = '.$this->data['id'];\n\t\telseif(!empty($this->data['fbid']))\n\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\treturn $result->num_rows;\n\t}", "protected function detectUserDeviceDetails()\n {\n $userAgent = $_SERVER['HTTP_USER_AGENT']; \n \n if($userAgent) \n { \n\n \n /*\n * I have uncommented this to add new detection engine this is old code.. so In case any error comment the new detection code and uncomment the old one.\n * start\n *\n */\n \n //Iniate device detection using Device detection adapter\n //$deviceDetector = Nexva_DeviceDetection_Adapter_TeraWurfl::getInstance();\n \n //Detect the device\n //$exactMatch = $deviceDetector->detectDeviceByUserAgent($userAgent);\n \n //Device barand name\n //$this->_deviceDetails = $deviceDetector->getDeviceAttribute('product_info');\n \n \n /*\n * I have uncommented this to add new detection engine this is old code.. so In case any error comment the new detection code and uncomment the old one.\n * end\n *\n */\n \n \n \n \n /*\n * Detection Script Start we need to find a better way to implemnt this as i am doing this in hurry bcos shaun need to put this live up\n *\n *\n */\n \n $session = new Zend_Session_Namespace(\"devices_partner_web\");\n $deviceId = $session->deviceId;\n\n \n \n if(!isset($deviceId) and $session->is_check == false) {\n \n \t$deviceDetection = Nexva_DeviceDetection_Adapter_HandsetDetection::getInstance();\n \t$deviceInfo = $deviceDetection->getNexvaDeviceId($_SERVER['HTTP_USER_AGENT']);\n \t//If this is not a wireless device redirect to the main site\n \n \n \t// get properties from the Wurfl\n \t$brandName = $deviceInfo->brand;\n \t$modelName = $deviceInfo->model;\n \t$marketing_name = $deviceInfo->marketing_name;\n \t$inputMethod = $deviceInfo->pointing_method;\n \t$osVersion = $deviceInfo->device_os_version;\n \t$exactMatch = $deviceInfo;\n \t$deviceOs = $deviceInfo->platform;\n \t//get nexva device Id\n \t$deviceId = $deviceInfo->id;\n \t$isWireless = $deviceInfo->is_mobile_device;\n \t\n \t$session->deviceId = $deviceId;\n \t$session->is_mobile_device = $isWireless;\n \t$session->device_os_version =\n \t$session->platform = $deviceOs;\n \t$session->device_os_version = $osVersion;\n \t$session->pointing_method = $inputMethod;\n \t$session->marketing_name = $marketing_name;\n \t$session->model = $modelName;\n \t$session->brand = $brandName;\n \t$session->is_check = true;\n \t\n } else {\n // get properties from the Wurfl\n\n $deviceOs = $session->platform;\n $deviceId = $session->deviceId;\n $isWireless = $session->is_mobile_device;\n $deviceOs = $session->platform;\n $osVersion = $session->device_os_version;\n $inputMethod = $session->pointing_method;\n $marketing_name = $session->marketing_name;\n $brandName = $session->brand;\n $modelName = $session->model;\n }\n \n \t\n\n \t\n \n $this->_deviceDetails['brand_name'] = $brandName;\n $this->_deviceDetails['device_os_version'] = $osVersion;\n $this->_deviceDetails['device_os'] = $deviceOs;//($deviceOs == 'BlackBerry' ? 'RIM OS' : $deviceOs);\n $this->_deviceDetails['model_name'] = $modelName;\n $this->_deviceDetails['brand_name'] = $brandName;\n $this->_deviceDetails['pointing_method'] = $inputMethod;\n $this->_deviceDetails['is_wireless_device'] = $isWireless;\n \n \n \n // $this->_deviceDetails =\n \n \n /*\n * Detection Script End\n *\n *\n */\n \n\n /*\n if( $deviceOs == 'BlackBerry' && $osVersion == '10.0'){\n \n \n $skip_action_names = array('index');\n \n if (in_array( $this->getRequest ()->getActionName (), $skip_action_names ))\n {\n $this->_redirect('http://'. $_SERVER ['HTTP_HOST'].'/index/device-not-found'); \n }\n \n \n\n \n }\n \n \n */\n \n \n \n \n \n \n \n\n }\n else\n {\n $this->_deviceDetails = null;\n }\n \n }", "public function userExists( $user_name ) { return true;}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "private function getUidZerroIsPresent() {\n $count = db_query(\"SELECT uid FROM {users} WHERE uid = 0\")->fetchAll();\n return (boolean) $count;\n }", "public function hasUsername(){\n return $this->_has(4);\n }", "public function me()\n {\n $this->user = auth()->user();\n if (empty($this->user))\n abort(401);\n \n $userInSystem = User::where('is_email_verified', 1)->where('id', $this->user->id)->exists();\n if (empty($userInSystem))\n abort(404, 'user not found');\n \n unset($userInSystem);\n }", "public function hasUserCharacters(){\n $this->filter('userCharacters', ['active = ?', 1]);\n return is_object($this->userCharacters);\n }", "function canViewUsers( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "function areAllUsersDone(){\n\t\t$connection = new Connection();\n\t\t$pdo = $connection->getConnection();\n\t\tunset($connection);\n\t\t\n\t\t$status =\n\t\t$pdo->prepare('SELECT FirstName FROM hhm_users \n\t\t\t\tWHERE UserStatus = \"not done\" AND HouseholdID = :id');\n\t\t$status->execute(array(':id'=>$this->householdId));\n\t\t$info = $status->fetchAll(PDO::FETCH_COLUMN);\n\t\tif (empty($info)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function equipeer_check_user_datas() {\n\t\tif (is_user_logged_in()) {\n\t\t\t\n\t\t\t// Check if option datas required activated\n\t\t\tif ( get_option('equine_profil_redirect_if_datas_required') == 1 ) {\n\t\t\t\n\t\t\t\t// Debug\n\t\t\t\t$debug_init = false;\n\t\t\t\tif ($debug_init) equipeer_log_start();\n\t\t\t\tif ($debug_init) equipeer_log('Check user datas');\n\t\t\t\t// --- Get required datas\n\t\t\t\t$user_info = get_userdata( get_current_user_id() );\n\t\t\t\t$firstname = $user_info->first_name;\n\t\t\t\t$lastname = $user_info->last_name;\n\t\t\t\t$phone = $user_info->equipeer_user_telephone;\n\t\t\t\t$address = $user_info->equipeer_user_address_1;\n\t\t\t\t$zip = $user_info->equipeer_user_zip;\n\t\t\t\t$city = $user_info->equipeer_user_city;\n\t\t\t\t$country = $user_info->equipeer_user_country;\n\t\t\t\t// Check if missing infos\n\t\t\t\tif ($firstname == '' || $lastname == '' || $phone == '' || $address == '' || $zip == '' || $city == '' || $country == '') {\n\t\n\t\t\t\t\t// Get url\n\t\t\t\t\t$mystring = equipeer_current_url();\n\t\t\t\t\t$findme = '/account';\n\t\t\t\t\t$pos = strpos($mystring, $findme);\n\t\t\t\t\tif ($pos === false) {\n\t\t\t\t\t\t// Chaine non trouve - Redirection demandee\n\t\t\t\t\t\tif ($debug_init) equipeer_log('Redirect demandé - User id: '.get_current_user_id() . ' - Current URL: '.equipeer_current_url());\n\t\t\t\t\t\twp_redirect( get_permalink( wpum_get_core_page_id( 'account' ) ) . 'settings' );\n\t\t\t\t\t\texit;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Chaine trouvee - Pas de redirection\n\t\t\t\t\t\tif ($debug_init) equipeer_log('Pas de redirection ('.$mystring.')');\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\t\t\t\tif ($debug_init) equipeer_log('Tous les champs requis sont présents');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\tif ($debug_init) equipeer_log_start();\n\t\t\tif ($debug_init) equipeer_log('--- User not logged in ---');\n\t\t}\n\t}", "public function check_user_installed()\n {\n if ($this->uid == 0) {\n return true;\n }\n\n $exists = $this->STOR->get_folder_id_from_path('waste');\n if (empty($exists)) {\n $this->create_user();\n }\n }", "function exist_user($conn,$column_name,$column_value,$table_name)\r\n\t{\r\n\t\t$qry=\"select count(*) as count from $table_name where $column_name='$column_value'\";\r\n\t\t$res=mysql_query($qry);\r\n\t $result=mysql_fetch_array($res);\r\n\t $email_count=$result['count'];\r\n\t\t\tif($email_count>0)\r\n\t\t\t\treturn TRUE;\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\t}", "function forum_user_check() {\n\t global $vbulletin;\n\n\t // SEARCH VB DATABASE FOR LOGGED-IN SE USER\n\t $vb_user_query = $vbulletin->db->query_write(\"SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM \" . TABLE_PREFIX . \"user WHERE username='\".$this->user_info[user_username].\"' LIMIT 1\");\n\n\t // RETURN TRUE/FALSE IF VB USER EXISTS\n\t if($vbulletin->db->num_rows($vb_user_query) == 1) {\n\t $this->forum_user = $vbulletin->db->fetch_array($vb_user_query);\n\t return true;\n\t } else {\n\t return false;\n\t }\n\n\t}", "function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }", "private function checkinstallrequirement()\r\n\t{\r\n\t\t$userCount = Core_User::getUsers(array(), '', '', '', true);\r\n\t\t\r\n\r\n\t\t\r\n\t\tif($userCount > 0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public function test_get_users_in_context() {\n $component = 'core_tag';\n\n $user1 = $this->set_up_tags()[0];\n $systemcontext = context_system::instance();\n\n $userlist1 = new \\core_privacy\\local\\request\\userlist($systemcontext, $component);\n provider::get_users_in_context($userlist1);\n $this->assertCount(1, $userlist1);\n $expected = [$user1->id];\n $actual = $userlist1->get_userids();\n $this->assertEquals($expected, $actual);\n\n // The list of users within the a context other than system context should be empty.\n $usercontext1 = context_user::instance($user1->id);\n $userlist2 = new \\core_privacy\\local\\request\\userlist($usercontext1, $component);\n provider::get_users_in_context($userlist2);\n $this->assertCount(0, $userlist2);\n }", "function is_user_register($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "public static function user_exists($lookup)\n {\n if (Token::verify($lookup)) {\n $query = Database::generate_query(\"user_lookup_id\", [$lookup]);\n // Else assume a display name\n } else {\n $query = Database::generate_query(\"user_lookup_name\", [$lookup]);\n }\n\n $result = $query->execute();\n $count = $result->count();\n $result->close();\n\n return $count >= 1;\n }", "public function isLoginValid2($user_id,$device_id){\n\n $deviceLimit = 2;\n\n //retrive device or create new one if doesnt exist\n $params = [\n 'user_id' => $user_id,\n 'device_id' => $device_id\n ];\n \n $device = Device::where($params)->first();\n\n if (!$device) {\n\n // check if not exceed limit \n if (Device::where(['user_id'=>$user_id, 'is_banned'=>false])->count() <= $deviceLimit) {\n return true;\n }else{\n // the device is above llmit\n return false;\n }\n\n }else {\n // check if banned\n if ($device->is_banned) {\n // the device is banned user is not pemmitted to login\n return false;\n }else{\n return true;\n }\n }\n\n }", "function getDeviceDetailsfunction($userId){\r\n global $pdo;\t\r\n\t\t$select = $pdo->prepare(\"SELECT device_registry.* \r\n FROM users \r\n LEFT JOIN device_registry ON users.device=device_registry.id \r\n\t\t\t\t WHERE users.id = ?\");\r\n\t\t$select->execute(array($userId));\r\n\t\t$result_array = $select->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $result_array;\r\n\t}", "public function getUser(CakeRequest $request) {\n return false;\n }", "private function doesUserExists($id,$log=false){\n\t\treturn (\n\t\t\tNewDao::getInstance()\n\t\t\t->countFields('users',array('id'=>$id),$log)>0\n\t\t);\n\t}", "public static function checkOwnerExisting()\n {\n global $mainframe;\n $db = JFactory::getDbo();\n $db->setQuery(\"Select count(id) from #__osrs_agents where agent_type <> '0' and published = '1'\");\n $count = $db->loadResult();\n if ($count > 0) {\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.6675979", "0.6650434", "0.6546391", "0.63526356", "0.63526356", "0.63526356", "0.63526356", "0.63526356", "0.625714", "0.6237972", "0.61914885", "0.6185924", "0.61646736", "0.61632717", "0.61224455", "0.6117623", "0.60931563", "0.60931563", "0.60931563", "0.60931563", "0.60733545", "0.60314524", "0.60310715", "0.60193425", "0.5995209", "0.59925145", "0.5986054", "0.59772426", "0.59299654", "0.59298944", "0.5915254", "0.58933955", "0.5892599", "0.58615303", "0.58602947", "0.58483815", "0.58462", "0.58428293", "0.5825262", "0.5822643", "0.5819082", "0.58177626", "0.58083755", "0.58017486", "0.57998466", "0.579933", "0.579538", "0.5794393", "0.5778958", "0.57764155", "0.5771279", "0.5770741", "0.57656705", "0.5758181", "0.5746572", "0.57419205", "0.5741614", "0.5729063", "0.57288384", "0.57257044", "0.5722481", "0.5719565", "0.5718999", "0.5717193", "0.5711459", "0.5698737", "0.56980664", "0.56939787", "0.5693728", "0.5668528", "0.56571865", "0.56571865", "0.5654144", "0.5650244", "0.5649937", "0.56449896", "0.56401694", "0.56337297", "0.5629472", "0.5628854", "0.562413", "0.5622825", "0.5620605", "0.56201607", "0.56156605", "0.56144625", "0.561242", "0.5607512", "0.560047", "0.55999935", "0.5595188", "0.5594862", "0.55841285", "0.55818576", "0.55774385", "0.5575397", "0.5572166", "0.5568827", "0.55664283", "0.5565238" ]
0.68041396
0
Method returning the result content
public function getResult() { return parent::getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_output_content();", "public function returnResult() {\r\n\t\treturn $this->_html;\r\n\t}", "public function getResultBody();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function fetch()\n\t{\t\t\n\t\tob_start();\t\t\n\t\t$this->display();\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}", "function getContent() ;", "public function result();", "public function result();", "public function getRawResult();", "public function output() {\n\t\treturn $this->content;\n\t}", "public function getResult()\n {\n $content = file_get_contents($this->directory.DS.$this->entities[0]->getFilename().'.'.$this->file_extension);\n $this->entities[0]->setContent($content); \n \n return $this->entities[0];\n }", "public function getContentAction()\n {\n //get input\n $inputs = $this->getAllUrlParam();\n\n //get field repository\n $contentRepo = $this->getContentRepository();\n\n //get content data by input\n $result = $contentRepo->getContent($inputs);\n\n //Check response error\n if (!$result['success'])\n {\n return $this->validateBussinessError($result['message']);\n }\n\n if (isset($result['totalRecord'])) {\n $inputs['totalRecord'] = $result['totalRecord'];\n }\n\n return $this->outputgraph($result, $inputs);\n }", "public function getContent() {}", "public function getContent() {}", "protected function getContents() {\n return file_get_contents($this->query);\n }", "public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent()\n\t{\n\t\treturn $this->output;\n\t}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "public function __toString() {\n\n return $this->result->body;\n }", "private function getResult() {\n return $this->result;\n }", "public function getResult()\n {\n return $this->getBody()->getResult();\n }", "function get_contents(){\n return $this->input_content;\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "public function getResult()\n {\n return $this->get(self::_RESULT);\n }" ]
[ "0.7461774", "0.73875505", "0.72915155", "0.70992386", "0.70992386", "0.70992386", "0.70992386", "0.70992386", "0.70992386", "0.70992386", "0.70992386", "0.7002258", "0.6876531", "0.6862674", "0.6862674", "0.6844225", "0.6832251", "0.6818366", "0.68154687", "0.6812136", "0.6812136", "0.67991394", "0.6796722", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67894405", "0.67853254", "0.67584753", "0.67576045", "0.67576045", "0.67576045", "0.67576045", "0.67551434", "0.67551434", "0.67551434", "0.67551434", "0.67551434", "0.67526156", "0.67519635", "0.67344517", "0.67066276", "0.67006487", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912", "0.6692912" ]
0.0
-1
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return __CLASS__;;\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName() { return __CLASS__; }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function className() : string {\n return get_called_class();\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getClassName()\n {\n return $this->class_name;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string;", "public function getClassName() : string;", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass()\n {\n return $this->_className;\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getClass(): string\n {\n return $this->class;\n }", "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "function getName()\n {\n return get_class($this);\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function toString()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}", "public function __toString() {\n\t\treturn $this->className();\n\t}", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }" ]
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529981", "0.85237026", "0.8502733", "0.8493115", "0.8491238", "0.8488943", "0.8484194", "0.847459", "0.8441478", "0.8418852", "0.8399611", "0.83950585", "0.83949184", "0.83853173", "0.8378261", "0.837777", "0.8372544", "0.8355432", "0.8355432", "0.83479965", "0.8325877", "0.8325877", "0.8312873", "0.83027107", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.82474744", "0.8242934", "0.8202995", "0.8185409", "0.8184752", "0.81829107", "0.81829107", "0.8176191", "0.81761754", "0.8162896", "0.8142928", "0.81323636", "0.8062757", "0.80528253", "0.8045769", "0.8033823", "0.8026215", "0.8001116", "0.79949147", "0.79779136", "0.79672754", "0.7957633", "0.790449", "0.78617185", "0.7860126", "0.7847096", "0.78195953", "0.7817044", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.77821547", "0.7761565", "0.77588034", "0.7747239", "0.77409905", "0.77409905", "0.7710985", "0.76808393", "0.7670475", "0.76640886", "0.76514393", "0.76499707", "0.76323646", "0.76005036", "0.75937456" ]
0.0
-1
enable gift message or not
public function canShow() { return count($this->getTermAndConditions()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allowMessage()\n {\n $this->_data['Mensaje'] = 1;\n }", "public function comment_flag_enable() {\n\t\t\t$enabled = $this->is_enabled();\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $this->_plugin_prefix ); ?>_enabled\">\n\t\t\t\t<input name=\"<?php echo esc_attr( $this->_plugin_prefix ); ?>_enabled\" id=\"<?php echo esc_attr( $this->_plugin_prefix ); ?>_enabled\" type=\"checkbox\" value=\"1\" <?php checked( $enabled ); ?> />\n\t\t\t\t<?php esc_html_e( \"Allow your visitors to flag a comment as inappropriate.\" ); ?>\n\t\t\t</label>\n\t\t\t<?php\n\t\t}", "function the_champ_social_sharing_enabled(){\r\n\tglobal $theChampSharingOptions;\r\n\tif(isset($theChampSharingOptions['enable']) && $theChampSharingOptions['enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function isNewsletterPopUpEnable() \n {\n return (bool) Mage::getStoreConfig(self::XML_PATH_ENABLE);\n }", "public function editionMode() {\n\t\tif (isset($_SESSION[\"FINE_MESSAGE_EDITION_MODE\"])) {\n\t\t\t$this->isMessageEditionMode = true;\n\t\t}\n\t\t$this->content->addFile('../utils.i18n.fine/src/views/enableDisableEdition.php', $this);\n\t\t$this->template->toHtml();\n\t}", "public function areRegisterMessagesEnabled() : bool{\n \treturn $this->register_message;\n }", "public function enable();", "public function enable();", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "function notificationEnabled(){\n\t\treturn false;\n\t}", "function ppmess_shortcode_disabled(){\n\techo '<div class=\"ppmess-information\">';\n\t\techo __('Private messages are disabled', 'ppmess');\n\t\techo '<br/>';\n\t\techo __( 'To see private messages you must enable on the admin settings', 'ppmess');\t\t\n\t\t\n\t\tif( ! is_user_logged_in)\n\t\t\techo sprintf( '<a class=\"post-link-ppmess \" href=\"%s\">' . __('Login in', 'ppmess') . '</a>', wp_login_url(apply_filters('the_permalink', get_permalink())) );\n\techo '</div>';\n}", "public function show_message() {\n\t\tif ( ! $this->is_activated || ! $this->purchase_code ) {\n\t\t\t$url = esc_url( 'admin.php?page=lievo-activation' );\n\t\t\t$link = sprintf( '<a href=\"%s\">%s</a>', $url, 'Product Activation' );\n\t\t\techo sprintf( ' To receive automatic updates a license activation is required. Please visit %s to activate your copy of LivIcons Evolution.', $link );\n\t\t}\n\t}", "function message()\r\n\t{\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$this->common_header('domessage', 'Board Message', 'You may change the configuration below. HTML is enabled, and BBCode will be enabled in later versions.');\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>Turn the message system off?</b>\",\r\n\t\t $SKIN->form_yes_no(\"global_message_on\", $INFO['global_message_on'])\r\n\t\t ));\r\n\r\n\t\t$ADMIN->html .= $SKIN->add_td_row(array(\r\n\t\t \"<b>The message to display</b>\",\r\n\t\t $SKIN->form_textarea(\"global_message\", $INFO['global_message'])\r\n\t\t ));\r\n\r\n\t\t$this->common_footer();\r\n\r\n\t}", "public function enable()\n {\n add_settings_field(\n 'enable',\n apply_filters($this->plugin_name . 'label-enable', esc_html__('Enable', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-general',\n [\n 'description' => 'Serve ' . get_site_url() . '/.well-known/security.txt on your WordPress site.',\n 'id' => 'enable',\n 'value' => isset($this->options['enable']) ? $this->options['enable'] : false,\n ]\n );\n }", "protected function enabled()\n {\n }", "function the_champ_social_counter_enabled(){\r\n\tglobal $theChampCounterOptions;\r\n\tif(isset($theChampCounterOptions['enable'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public static function is_enable() {\n\t\treturn true;\n\t}", "public function enable(): bool {}", "function setFeedback($mode){\n\n\t\tif( @in_array($mode, array(\"line\",\"box\",\"both\")) ){\n\t\t\t$this->feedback = $mode;\n\t\t\treturn true;\n\t\t} else return false;\n\n\t}", "function mmf_activation_message() {\n\t\tif (get_option('mmf_show_admin_authorize') == true) {\n\t\t\t?>\n\t\t\t\t<div class=\"updated\">\n\t\t\t\t\t<p>The MapMyFitness plugin is now activated, but you must visit the settings page to authorize your account and enter an API key.</p>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t\tupdate_option('mmf_show_admin_authorize', false);\n\t\t}\n\t\t?>\n\t\t<script>\n\t\t\twindow.mmf_plugin_url = '<?php echo trim(plugins_url(\" \", __FILE__)); ?>';\n\t\t\twindow.wp_site_url = '<?php echo trim(site_url()); ?>';\n\t\t</script>\n\t\t<?php\n\t}", "function messages_can_edit($hook_name, $entity_type, $return_value, $parameters) {\n\n\tglobal $messagesendflag;\n\n\tif ($messagesendflag == 1) {\n\t\t$entity = $parameters['entity'];\n\t\tif ($entity->getSubtype() == \"messages\") {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn $return_value;\n}", "function the_champ_social_commenting_enabled(){\r\n\tglobal $theChampFacebookOptions;\r\n\tif(isset($theChampFacebookOptions['enable_commenting'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function enable() {}", "function the_champ_notify(){\r\n\tif(isset($_GET['message'])){\r\n\t\t?>\r\n\t\t<div><?php echo esc_attr($_GET['message']) ?></div>\r\n\t\t<?php\r\n\t}\r\n\tdie;\r\n}", "function wpvideocoach_hide_introduction_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_introduction;\r\n\tif($wpvideocoach_introduction == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "function tp_comm_comments_enable() {\r\n\tglobal $tp_comm_comments_form;\r\n\t$tp_comm_comments_form = true;\r\n}", "function the_champ_social_login_enabled(){\r\n\tglobal $theChampLoginOptions;\r\n\tif(isset($theChampLoginOptions['enable']) && $theChampLoginOptions['enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function canSend()\n {\n $flag = intval(setting(\"mail_notify_{$this->getTemplateTag()}\"));\n\n return !!$flag;\n }", "public static function add_notice_if_killswitch_enabled() {\n\t\tif ( ! Settings::is_killswitch_enabled() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\n\t\t\t'<div id=\"message\" class=\"notice notice-warning\"><p>%s</p></div>' . \"\\n\",\n\t\t\t/* translators: %s: URL to settings page for enabling/disabling photo uploads. */\n\t\t\tsprintf(\n\t\t\t\t__( '<strong>Photo uploads are currently disabled for all users!</strong> Uncheck <a href=\"%s\">the setting</a> to re-enable uploading.', 'wporg-photos' ),\n\t\t\t\tesc_url( admin_url( 'options-media.php' ) . '#' . Settings::KILLSWITCH_OPTION_NAME )\n\t\t\t)\n\t\t);\n\t}", "public static function enable()\n {\n self::$_enabled = TRUE;\n }", "public function areLoginMessagesEnabled() : bool{\n \treturn $this->login_message;\n }", "public function enable() {\n\t\t$this->update(FALSE);\n\t}", "function the_champ_horizontal_sharing_enabled(){\r\n\tglobal $theChampSharingOptions;\r\n\tif(isset($theChampSharingOptions['hor_enable']) && $theChampSharingOptions['hor_enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "function isEnabled();", "function isEnabled();", "public function disabled_message() {\n echo '<!-- ' . Yfp_Ganalytics_Basic_Common::COMMON_PLUGIN_NAME . ' is disabled in the admin panel. -->' . \"\\n\";\n }", "public function is_enabled()\n {\n }", "public static function renderNoticeWPFCMNotActive() {\n\t\t\tself::renderNotice( true );\n\t\t}", "public function getPersonalMessageTurnedOff() {\r\n return Mage::getStoreConfig(\r\n 'giftwrap/message/personal_message_disable_msg');\r\n }", "function the_champ_facebook_plugin_enabled(){\r\n\tglobal $theChampFacebookOptions, $theChampCounterOptions;\r\n\tif((the_champ_social_commenting_enabled() && the_champ_facebook_commenting_enabled()) || the_champ_facebook_like_rec_enabled()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function toggleDoSpamFlag()\n {\n $response = $this->sendCommand(static::RCMD_DOSPAM);\n return $response->getData() === 'Spamming is now: On';\n }", "function statusMessagesOn()\n\t{\n\t\t$this->bStatusMessages = true;\n\t}", "public function enable_2fa_pgp()\n {\n $this->db->where('id', $this->current_user->user_id);\n $update = array('pgp_two_factor' => '1',\n 'totp_two_factor' => '0',\n 'totp_secret' => ''\n );\n return $this->db->update('users', $update) == TRUE;\n }", "function isEnabled ();", "public function enable()\n {\n $this->enabled = true;\n }", "public function isEnabled(): bool\n\t{\n\t\tif (!Loader::includeModule('messageservice'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$sender = SmsManager::getSenderById(self::MESSAGESERVICE_SENDER_ID);\n\t\tif (is_null($sender))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $sender->isAvailable();\n\t}", "public static function enable_google_notification() {\n\t\tself::$google_notification_enabled = true;\n\t}", "public static function enable_google_notification() {\n\t\tself::$google_notification_enabled = true;\n\t}", "function the_champ_vertical_sharing_enabled(){\r\n\tglobal $theChampSharingOptions;\r\n\tif(isset($theChampSharingOptions['vertical_enable']) && $theChampSharingOptions['vertical_enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public static function maybe_push_optin_notice() {\n\t\tif ( self::get_optIn_state() == false && apply_filters( 'xl_optin_notif_show', self::$should_show_optin ) ) {\n\t\t\tdo_action( 'maybe_push_optin_notice_state_action' );\n\t\t}\n\t}", "function give_test_mode_frontend_warning() {\n\n\tif ( give_is_test_mode() ) {\n\t\techo '<div class=\"give_error give_warning\" id=\"give_error_test_mode\"><p><strong>' . esc_html__( 'Notice:', 'give' ) . '</strong> ' . esc_html__( 'Test mode is enabled. While in test mode no live donations are processed.', 'give' ) . '</p></div>';\n\t}\n}", "public function noticeWPFCMNotActive() {\n\t\t\tadd_action( 'admin_notices', array( get_class(), 'renderNoticeWPFCMNotActive' ) );\n\t\t}", "public function is_enabled()\n {\n }", "private function setMessageToPlayer()\n {\n if ($this->isUserMode()) {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng. Vill du vara med i tävlingen, spara poängen med den gröna knappen!\";\n } else {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng!\";\n }\n }", "function the_champ_facebook_commenting_enabled(){\r\n\tglobal $theChampFacebookOptions;\r\n\tif(isset($theChampFacebookOptions['enable_fbcomments'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function set_alt_message($message);", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "public function canShow(){\n\t\tif (Mage::getStoreConfig('logicbroker_edi_section/logicbroker_edi_group1/notificationstatus') == 0) {\n\t\t\t$this->setConfigValue(array(\n\t\t\t\t'scope' => 'default',\n\t\t\t\t'scope_id' => '0',\n\t\t\t\t'path' => 'logicbroker_edi_section/logicbroker_edi_group1/notificationstatus',\n\t\t\t\t'value' => '1',\n\t\t\n\t\t\t\t));\n\t\t\treturn true;\n }else{\n \treturn false;\n }\n\t}", "protected function getSendNotificationFlag()\n {\n return (bool) \\XLite\\Core\\Request::getInstance()->sendNotification;\n }", "public static function enable() {\n\t\tself::$enabled = true;\n\t}", "public function isIntegranteInactivo(){ return false; }", "public function isEnabled()\n {\n return (bool)Mage::helper('mobweb_captcha/config')->isEnabled();\n }", "public static function activation_notice() {\n\t\tif ( false === get_transient( 'sgdg_activation_notice' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo '<div class=\"notice notice-info is-dismissible\"><p>';\n\t\t$help_link = 'https://napoveda.skaut.cz/dobryweb/' .\n\t\t\tsubstr( get_locale(), 0, 2 ) .\n\t\t\t'-skaut-google-drive-gallery';\n\t\tprintf(\n\t\t\t/* translators: 1: Start of a link to the settings 2: End of the link to the settings 3: Start of a help link 4: End of the help link */\n\t\t\tesc_html__(\n\t\t\t\t// phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong\n\t\t\t\t'Google Drive gallery needs to be %1$sconfigured%2$s before it can be used. See the %3$sdocumentation%4$s for more information.',\n\t\t\t\t'skaut-google-drive-gallery'\n\t\t\t),\n\t\t\t'<a href=\"' . esc_url( admin_url( 'admin.php?page=sgdg_basic' ) ) . '\">',\n\t\t\t'</a>',\n\t\t\t'<a href=\"' . esc_url( $help_link ) . '\" target=\"_blank\">',\n\t\t\t'</a>'\n\t\t);\n\t\techo '</p></div>';\n\t\tdelete_transient( 'sgdg_activation_notice' );\n\t}", "function wp_link_manager_disabled_message()\n {\n }", "public function isSpam();", "function inspiry_guest_submission_enabled() {\n\t\tif ( 'true' === get_option( 'inspiry_guest_submission', 'false' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function turn()\n {\n $this->setError('The SMTP TURN command is not implemented');\n $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);\n return false;\n }", "function isEnabled()\n {\n return false;\n }", "protected function _maybe_show_notice() {\n\t\tif ( false === $this->is_valid && ! SermonManager::getOption( 'license_key' ) ) {\n\t\t\tPlugin::instance()->notice_manager->add_info( 'licensing_activate', 'Please <a href=\"' . admin_url( 'edit.php?post_type=wpfc_sermon&page=sm-settings&tab=licensing' ) . '\" target=\"_self\">enter and activate</a> your license key to enable automatic updates.', 10, 'licensing', true );\n\t\t} else {\n\t\t\tPlugin::instance()->notice_manager->set_seen( 'licensing_activate', true );\n\t\t}\n\t}", "protected function maybe_show_donation_message() {\n\t\t// Only show the message to plugin admins\n\t\tif ( ! current_user_can( 'iggogrid_edit_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! IggoGrid::$model_options->get( 'message_donation_nag' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// How long has the plugin been installed?\n\t\t$seconds_installed = time() - IggoGrid::$model_options->get( 'first_activation' );\n\t\treturn ( $seconds_installed > 30*DAY_IN_SECONDS );\n\t}", "public function enablePlaques()\n\t{\n\t\t$this->_plaques = true;\n\t}", "public function enable_powered_by() {\n\t\tupdate_option( 'algolia_powered_by_enabled', 'yes' );\n\t}", "function setSharingEnabled($value);", "private function SetRequestEnableSettings() { \n if($_GET[\"enable\"] == '1') {\n $query = \"update [|PREFIX|]order_review_config set `sendrequest`= '1' where id = '1' \";\n $GLOBALS['ISC_CLASS_DB']->Query($query);\n echo \"1\";\n exit;\n }\n else {\n $query = \"update [|PREFIX|]order_review_config set `sendrequest`= '0' where id = '1' \";\n $GLOBALS['ISC_CLASS_DB']->Query($query);\n echo \"0\";\n exit;\n }\n }", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function propegate() : void\n {\n $this->event->sender->enabledForSite = in_array(\n $this->event->sender->siteId,\n $this->event->sender->getFieldValue('sites')\n );\n }", "public function is_enableable();", "protected function addComposerModeNotification() {}", "function validate_plugin_accessibility(){\n\n $final_response=new stdClass();\n if( $GLOBALS['glbstg_plugenabled']==0 or $GLOBALS['glbstg_plugenabled']==\"0\" or $GLOBALS['glbstg_plugenabled']==\"\"){\n\n $final_response->response_notice=\"X5GON plugin is not enabled. Check with admin.\";\n }else{\n $final_response->response_notice=1;\n }\n\n return $final_response;\n }", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "function updateMessage($message,$mode='normal'){\n\t\t\t\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\tif($mode == 'moderation'){\n\t\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getModerationMessageFileName();\n\t\t\t\t}else{\n\t\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getMessageFileName();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setMessageFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t/* Input processing *************************************************/\n\t\t\t// This block modify input data\t\n\t\t\t\n\t\t\t//create input processor object\n\t\t\t$inputProcessor = new St_InputProcessor();\n\t\t\t$inputProcessor->setData($message);\n\t\t\t\n\t\t\t// 1 ----------------------------------------------\n\t\t\t//filter user input, for safe html\n\t\t\t//no input processing function should be called before this function!\n\t\t\t$inputProcessor->filterForInput();\n\t\t\t\n\t\t\t// 2 ----------------------------------------------\n\t\t\t//translate smiley code into image, if this option is enabled\n\t\t\tif($this->configManager->isSmileyEnabled()){\n\t\t\t\t$inputProcessor->translateSmiley($this->configManager->getSmileyPattern());\n\t\t\t}\n\t\t\t\n\t\t\t// 3 ----------------------------------------------\n\t\t\t//translate bold,italic,underline ([b][i][u]) tag, if this option is enabled\n\t\t\tif($this->configManager->isFormattingEnabled()){\n\t\t\t\t$inputProcessor->translateSimpleTag();\n\t\t\t}\n\t\t\t\n\t\t\t// 4 ----------------------------------------------\n\t\t\t//translate URL found in message into link, if this option is enabled\n\t\t\tif($this->configManager->isParseMessageUrlEnabled()){\n\t\t\t\t$inputProcessor->parseMessageUrl($this->configManager->getUrlText());\n\t\t\t}\n\t\t\t\n\t\t\t// 5 ----------------------------------------------\n\t\t\t//filter bad words if this option is enabled\n\t\t\tif($this->configManager->isBadwordFilterEnabled()){\n\t\t\t\t$inputProcessor->translateBadword($this->configManager->getBadwordPattern());\n\t\t\t}\n\t\t\t\n\t\t\t// 6 ----------------------------------------------\n\t\t\t//parse URL/Email for nickname link\n\t\t\t$inputProcessor->parseNicknameLink();\n\t\t\t\n\t\t\t/*******************************************************************/\n\t\t\t\n\t\t\t\n\t\t\t$message = $inputProcessor->getResult();\n\t\t\t\n\t\t\t$this->persistenceManager->updateMessage($message);\n\t\t\t\n\t\t}", "function isMessage(){\r\n return isset($_SESSION['message'])?true:false;\r\n}", "function mensagem($message_type = false)\n\t{\n\t\tif ($this->museuUserLogged)\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\n\t\t$this->set(compact('message_type'));\n\t}", "function enable ($enabled = true);", "function enableclient()\n {\n exec('ifconfig ' . escapeshellarg($this->interface) . ' up');\n exec($this->arfilelocation['iwpriv'] . ' ' . escapeshellarg($this->interface) . ' set SiteSurvey=1');\n }", "public function isIntegranteActivo(){ return false; }", "function ajan_use_embed_in_private_messages() {\n\treturn apply_filters( 'ajan_use_embed_in_private_messages', !defined( 'AJAN_EMBED_DISABLE_PRIVATE_MESSAGES' ) || !AJAN_EMBED_DISABLE_PRIVATE_MESSAGES );\n}", "function wpg_admin_sec()\n{\n\tglobal $wpg_options;\n\n\t// wp-greet optionen aus datenbank lesen\n\t$wpg_options = wpgreet_get_options();\n\n\t// get translation\n\tload_plugin_textdomain('wp-greet',false,dirname( plugin_basename( __FILE__ ) ) . \"/lang/\");\n \n\n\t// if this is a POST call, save new values\n\tif (isset($_POST['info_update'])) {\n\t\t$upflag=false;\n\n\n\t\t// build mandatory fields string\n\t\t$_POST['wp-greet-fields'] =\n\t\t(!isset($_POST[\"wp-greet-field-sendername\"]) ? \"0\" : \"1\") .\n\t\t\"1\" .\n\t\t(!isset($_POST[\"wp-greet-field-receivername\"]) ? \"0\" : \"1\") .\n\t\t\"1\" .\n\t\t(!isset($_POST[\"wp-greet-field-subject\"]) ? \"0\" : \"1\") .\n\t\t(!isset($_POST[\"wp-greet-field-message\"]) ? \"0\" : \"1\");\n\t\t(!isset($_POST[\"wp-greet-enable-confirm\"]) ? \"0\" : \"1\");\n\n\t\treset($wpg_options);\n\t\t$thispageoptions = array(\"wp-greet-minseclevel\", \"wp-greet-captcha\",\n\t\t\t\t\"wp-greet-mailconfirm\", \"wp-greet-mcduration\",\n\t\t\t\t\"wp-greet-mctext\", \"wp-greet-touswitch\",\n\t\t\t\t\"wp-greet-termsofusage\",\"wp-greet-fields\",\n\t\t\t\t\"wp-greet-enable-confirm\", 'wp-greet-ectext');\n\t\twhile (list($key, $val) = each($wpg_options)) {\n\t\t\tif (!isset($_POST[$key])) \n\t\t\t\t\t$_POST[$key]=\"\";\n\t\t\tif (in_array($key,$thispageoptions) and $wpg_options[$key] != $_POST[$key] ) {\n\t\t\t\t$wpg_options[$key] = stripslashes(trim($_POST[$key]));\n\t\t\t\t$upflag=true;\n\n\t\t\t\t// add capabiliities if necessary\n\t\t\t\tif ($key==\"wp-greet-minseclevel\")\n\t\t\t\t\tset_permissions($wpg_options[$key]);\n\t\t\t}\n\t\t}\n\n\t\t// save options and put message after update\n\t\techo\"<div class='updated'><p><strong>\";\n\n\t\t// check for captcha plugin if captcha was set\n\t\t$plugin_exists=true;\n\t\tif ( $wpg_options['wp-greet-captcha'] >0 ) {\n\t\t\t$plugin_exists=false;\n\t\t\t$parr=get_plugins();\n\t\t\tforeach($parr as $key => $plugin) {\n\t\t\t\t//echo $plugin['Name'].\" \".ABSPATH.PLUGINDIR.\"/\".$key.\"<br />\";\n\n\t\t\t\tif (($plugin['Name'] == \"CaptCha!\" or $plugin['Name'] == \"Captcha\") and\n\t\t\t\t\t\tfile_exists(ABSPATH. PLUGINDIR . \"/\". $key) )\n\t\t\t\t\t$plugin_exists=true;\n\n\t\t\t\tif ($plugin['Name'] == \"Math Comment Spam Protection\" and\n\t\t\t\t\t\tfile_exists(ABSPATH. PLUGINDIR . \"/\". $key) )\n\t\t\t\t\t$plugin_exists=true;\n\t\t\t\n\t\t\t\tif ($plugin['Name'] == \"WP-reCAPTCHA\" and\r\n\t\t\t\t\tfile_exists(ABSPATH. PLUGINDIR . \"/\". $key) )\r\n\t\t\t\t\t$plugin_exists=true;\n\t\t\t}\r\n\t\t}\n\t\tif (! $plugin_exists) {\n\t\t\techo __('Captcha plugin not found.',\"wp-greet\"). \"<br />\";\n\t\t\t$upflag=false;\n\t\t}\n\t\n\n\tif ($upflag) {\n\t\twpgreet_set_options();\n\t\techo __('Settings successfully updated',\"wp-greet\");\n\t} else\n\t\techo __('You have to change a field to update settings.',\"wp-greet\");\n\n\techo \"</strong></p></div>\";\n}\n\n?>\n<script type=\"text/javascript\">\n function wechsle_felder () {\n swa=document.getElementById('wp-greet-touswitch');\n swb=document.getElementById('wp-greet-termsofusage');\n if (swa.checked == false) { \n\t\tswb.readOnly = true;\n\t\tswb.style.backgroundColor = \"#EEEEEE\"; \n \t} else {\n\t\tswb.readOnly = false;\n swb.style.backgroundColor = \"#FFFFFF\";\n }\n swa=document.getElementById('wp-greet-mailconfirm');\n swb=document.getElementById('wp-greet-mcduration');\n swc=document.getElementById('wp-greet-mctext');\n\n if (swa.checked == false) { \n swb.readOnly = true;\n \t swc.readOnly = true;\n \t swc.style.backgroundColor = \"#EEEEEE\"; \n } else {\n\t swb.readOnly = false;\n\t swc.readOnly = false;\n\t swc.style.backgroundColor = \"#FFFFFF\";\n }\n\n swa=document.getElementById('wp-greet-enable-confirm');\n swb=document.getElementById('wp-greet-ectext');\n if (swa.checked == false) {\n\t swb.readOnly = true;\n\t swb.style.backgroundColor = \"#EEEEEE\"; \n } else {\n\t swb.readOnly = false; \n\t swb.style.backgroundColor = \"#FFFFFF\";\n }\n} \n</script>\n\n\n<div class=\"wrap\">\n <?php tl_add_supp(true); ?>\n\t<h2>\n\t\t<?php echo __(\"wp-greet Security - Setup\",\"wp-greet\") ?>\n\t</h2>\n\t<form name=\"wpgreetsec\" method=\"post\" action='#'>\n\t<table class=\"optiontable\">\n\n\t<tr class=\"tr-admin\">\n\t<th scope=\"row\"><?php echo __('Spam protection',\"wp-greet\")?>:</th>\n\t<td><select name=\"wp-greet-captcha\" size=\"1\">\n\t<option value=\"0\"\n\t\t<?php if ($wpg_options['wp-greet-captcha']==\"0\") echo \"selected=\\\"selected\\\"\"?>>\n\t\t<?php echo __(\"none\",\"wp-greet\"); ?>\n\t\t</option>\n\t\t<option value=\"1\"\n\t\t<?php if ($wpg_options['wp-greet-captcha']==\"1\") echo \"selected=\\\"selected\\\"\"?>>\n\t\t\tCaptCha!</option>\n\t\t<option value=\"2\"\n\t\t<?php if ($wpg_options['wp-greet-captcha']==\"2\") echo \"selected=\\\"selected\\\"\"?>>\n\t\t\tMath Comment Spam Protection</option>\n\t\t<option value=\"3\"\n\t\t<?php if ($wpg_options['wp-greet-captcha']==\"3\") echo \"selected=\\\"selected\\\"\"?>>\n\t\t\tWP-reCAPTCHA</option>\n\t</select>\n\t</td>\n\t</tr>\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\"><?php echo __('Minimum role to send card',\"wp-greet\")?>:\n\t\t\t\t</th>\n\t\t\t\t<td><select name=\"wp-greet-minseclevel\" size=\"1\">\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t$r = '';\n\t\t\t\t\t\tglobal $wp_roles;\n\t\t\t\t\t\t$roles = $wp_roles->role_names;\n\t\t\t\t\t\tforeach( $roles as $role => $name ) {\n\t\t\t\t\t\t\tif ( $wpg_options['wp-greet-minseclevel'] == $role )\n\t\t\t\t\t\t\t\t$r .= \"\\n\\t<option selected='selected' value='$role'>$name</option>\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$r .= \"\\n\\t<option value='$role'>$name</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo $r.\"\\n\";\n\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<option value=\"everyone\"\n\t\t\t\t\t\t<?php if ($wpg_options['wp-greet-minseclevel']==\"everyone\") echo \"selected='selected'\";?>>\n\t\t\t\t\t\t\t<?php echo __('Everyone',\"wp-greet\")?>\n\t\t\t\t\t\t</option>\n\t\t\t\t</select></td>\n\t\t\t</tr>\n\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\">&nbsp;</th>\n\t\t\t\t<td><input type=\"checkbox\" id=\"wp-greet-touswitch\"\n\t\t\t\t\tname=\"wp-greet-touswitch\" value=\"1\"\n\t\t\t\t\t<?php if ($wpg_options['wp-greet-touswitch']==\"1\") echo \"checked=\\\"checked\\\"\"?>\n\t\t\t\t\tonclick=\"wechsle_felder();\" /> <b><?php echo __('Enable Terms of Usage display and check',\"wp-greet\")?>\n\t\t\t\t</b></td>\n\t\t\t</tr>\n\n\t<tr class=\"tr-admin\">\n\t<th scope=\"row\"><?php echo __('Terms of usage','wp-greet'); ?>:</th>\n\t<td><textarea id='wp-greet-termsofusage' name='wp-greet-termsofusage' cols='50' rows='6'><?php echo $wpg_options['wp-greet-termsofusage']; ?></textarea><img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\"\n\t\t\t\talt=\"tooltip\" title='<?php _e(\"HTML is allowed\",\"wp-greet\");?>' />\n\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\">&nbsp;</th>\n\t\t\t\t<td><input type=\"checkbox\" id=\"wp-greet-mailconfirm\"\n\t\t\t\t\tname=\"wp-greet-mailconfirm\" value=\"1\"\n\t\t\t\t\t<?php if ($wpg_options['wp-greet-mailconfirm']==\"1\") echo \"checked=\\\"checked\\\"\"?>\n\t\t\t\t\tonclick=\"wechsle_felder();\" /> <b><?php echo __('Use mail to verify sender address',\"wp-greet\")?>\n\t\t\t\t</b></td>\n\t\t\t</tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php _e('Verification mail text',\"wp-greet\");?>:</th>\n <td><textarea id='wp-greet-mctext' name='wp-greet-mctext' cols='50' rows='6'><?php echo $wpg_options['wp-greet-mctext']; ?></textarea> \n <img src=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\" alt=\"tooltip\"\n\t\t\t\t\ttitle='<?php _e(\"HTML allowed, use %sender% for sendername, %sendermail% for sender email-address, %receiver% for receiver name, %link% for generated link, %duration% for time the link is valid\",\"wp-greet\");?>' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\"><?php echo __('Link valid time (hours)',\"wp-greet\")?>:</th>\n\t\t\t\t<td><input id=\"wp-greet-mcduration\" name=\"wp-greet-mcduration\"\n\t\t\t\t\ttype=\"text\" size=\"5\" maxlength=\"4\"\n\t\t\t\t\tvalue=\"<?php echo $wpg_options['wp-greet-mcduration'] ?>\" /> <img\n\t\t\t\t\tsrc=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\"\n\t\t\t\t\talt=\"tooltip\"\n\t\t\t\t\ttitle='<?php _e(\"0 means confirmation-link will never expire\",\"wp-greet\");?>' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\"><?php echo __('Confirmation mail to sender','wp-greet').\":\";?>\n\t\t\t\t</th>\n\t\t\t\t<td><input type=\"checkbox\" id=\"wp-greet-enable-confirm\"\n\t\t\t\t\tname=\"wp-greet-enable-confirm\" value=\"1\"\n\t\t\t\t\t<?php if ($wpg_options['wp-greet-enable-confirm']==\"1\") echo 'checked=\"checked\"'?>\n\t\t\t\t\tonclick=\"wechsle_felder();\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n <tr class=\"tr-admin\">\n <th scope=\"row\"><?php _e('Confirmation mail text',\"wp-greet\");?>:</th>\n <td><textarea id='wp-greet-ectext' name='wp-greet-ectext' cols='50' rows='6'><?php echo $wpg_options['wp-greet-ectext']; ?></textarea> <img\n\t\t\t\t\tsrc=\"<?php echo site_url(PLUGINDIR . \"/wp-greet/tooltip_icon.png\");?>\"\n\t\t\t\t\talt=\"tooltip\"\n\t\t\t\t\ttitle='<?php _e(\"HTML allowed, use %sender% for sendername, %sendermail% for sender email-address, %receiver% for receiver name, %link% for generated link, %duration% for time the link is valid\",\"wp-greet\");?>' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\n\n\t\t\t<tr class=\"tr-admin\">\n\t\t\t\t<th scope=\"row\"><?php echo __('Mandatory fields','wp-greet').\":\";?>\n\t\t\t\t</th>\n\t\t\t\t<td><b><?php echo __('Sendername',\"wp-greet\")?>:</b> <input\n\t\t\t\t\ttype=\"checkbox\" id=\"wp-greet-field-sendername\"\n\t\t\t\t\tname=\"wp-greet-field-sendername\" value=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],0,1)==\"1\") echo 'checked=\"checked\"'?> />\n\t\t\t\t\t<b><?php echo __('Sender',\"wp-greet\")?>:</b> <input type=\"checkbox\"\n\t\t\t\t\tid=\"wp-greet-field-sendermail\" name=\"wp-greet-field-sendermail\"\n\t\t\t\t\tvalue=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],1,1)==\"1\") echo 'checked=\"checked\"'?>\n\t\t\t\t\tdisabled=\"disabled\" /> <b><?php echo __('Recipientname',\"wp-greet\")?>:</b>\n\t\t\t\t\t<input type=\"checkbox\" id=\"wp-greet-field-receivername\"\n\t\t\t\t\tname=\"wp-greet-field-receivername\" value=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],2,1)==\"1\") echo 'checked=\"checked\"'?> />\n\t\t\t\t\t<b><?php echo __('Recipient',\"wp-greet\")?>:</b> <input\n\t\t\t\t\ttype=\"checkbox\" id=\"wp-greet-field-receivermail\"\n\t\t\t\t\tname=\"wp-greet-fieldreceivermail\" value=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],3,1)==\"1\") echo 'checked=\"checked\"'?>\n\t\t\t\t\tdisabled=\"disabled\" /> <b><?php echo __('Subject',\"wp-greet\")?>:</b>\n\t\t\t\t\t<input type=\"checkbox\" id=\"wp-greet-field-subject\"\n\t\t\t\t\tname=\"wp-greet-field-subject\" value=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],4,1)==\"1\") echo 'checked=\"checked\"'?> />\n\t\t\t\t\t<b><?php echo __('Message',\"wp-greet\")?>:</b> <input\n\t\t\t\t\ttype=\"checkbox\" id=\"wp-greet-field-message\"\n\t\t\t\t\tname=\"wp-greet-field-message\" value=\"1\"\n\t\t\t\t\t<?php if (substr($wpg_options['wp-greet-fields'],5,1)==\"1\") echo 'checked=\"checked\"'?> />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t</table>\n\n\t\t<div class='submit'>\n\t\t\t<input type='submit' name='info_update'\n\t\t\t\tvalue='<?php _e('Update options',\"wp-greet\")?> »' />\n\t\t</div>\n\t</form>\n\t<script type=\"text/javascript\">wechsle_felder();</script>\n</div>\n<?php\n}", "public function adminNotices() {\n\t\tif ( ! empty( $this->admin_error ) ) {\n\t\t\tprintf( '<div class=\"error\"><p>%s</p></div>', implode( '<br />', $this->admin_error ) );\n\t\t}\n\t\tif ( ! empty( $this->admin_message ) ) {\n\t\t\tprintf( '<div class=\"updated\"><p>%s</p></div>', implode( '<br />', $this->admin_message ) );\n\t\t}\n\t\tif ( current_user_can( 'manage_options' ) && ! $this->option['enable'] ) {\n\t\t\tprintf(\n\t\t\t\t'<div class=\"error\"><p>%s</p></div>',\n\t\t\t\tsprintf(\n\t\t\t\t\t__( '<strong>[Never Let Me Go] Plugin is active but features are not enabled. Please go to <a href=\"%s\">setting page</a>.</strong>', 'never-let-me-go' ),\n\t\t\t\t\tadmin_url( 'options-general.php?page=nlmg' )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function the_champ_vertical_social_counter_enabled(){\r\n\tglobal $theChampCounterOptions;\r\n\tif(isset($theChampCounterOptions['vertical_enable']) && $theChampCounterOptions['vertical_enable'] == 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "function ajan_core_setup_message() {\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\tif ( empty( $ajan->template_message ) && isset( $_COOKIE['ajan-message'] ) ) {\n\t\t$ajan->template_message = stripslashes( $_COOKIE['ajan-message'] );\n\t}\n\n\tif ( empty( $ajan->template_message_type ) && isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t$ajan->template_message_type = stripslashes( $_COOKIE['ajan-message-type'] );\n\t}\n\n\tadd_action( 'template_notices', 'ajan_core_render_message' );\n\n\tif ( isset( $_COOKIE['ajan-message'] ) ) {\n\t\t@setcookie( 'ajan-message', false, time() - 1000, COOKIEPATH );\n\t}\n\n\tif ( isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t@setcookie( 'ajan-message-type', false, time() - 1000, COOKIEPATH );\n\t}\n}", "function ju_module_enabled(string $m):bool {return ju_module_m()->isEnabled($m);}", "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "function wputh_disable_comments_send_spam($approved, $commentdata) {\n return 'spam';\n}", "public function isEnabled() {}", "public function isEnabled()\n {\n return true;\n\n }", "static public function setSendAsNewsletter()\n\t{\n\t\tself::$_sendAsNewsletter = true;\n\t}", "public function genc()\n {\n $this->genc = true;\n }" ]
[ "0.6533267", "0.6066213", "0.5853907", "0.58293396", "0.5779336", "0.5769066", "0.572623", "0.572623", "0.56822586", "0.56822586", "0.56822586", "0.56822586", "0.5676695", "0.5675303", "0.56376076", "0.5601308", "0.55979466", "0.5595364", "0.557725", "0.5515393", "0.55052966", "0.5502917", "0.5500975", "0.5491765", "0.5485584", "0.5475956", "0.5469788", "0.54560894", "0.5436815", "0.54348147", "0.54294336", "0.5414843", "0.5410408", "0.5404058", "0.5403103", "0.5393981", "0.53931224", "0.53931224", "0.538779", "0.53860635", "0.53732175", "0.53688335", "0.5358003", "0.5355958", "0.5348149", "0.53392935", "0.5334019", "0.53277415", "0.53257805", "0.53224236", "0.53224236", "0.5321464", "0.53149354", "0.5302361", "0.5289261", "0.52676046", "0.52653855", "0.5260691", "0.525837", "0.52582157", "0.5255414", "0.5252714", "0.5252106", "0.5240277", "0.52390385", "0.5234094", "0.52335334", "0.52289766", "0.522794", "0.52163", "0.5212382", "0.52087694", "0.52085173", "0.5206822", "0.5200969", "0.51859605", "0.51837176", "0.51770383", "0.517333", "0.5168834", "0.5162648", "0.5145414", "0.5145187", "0.5142139", "0.5138685", "0.51190376", "0.511847", "0.5117273", "0.5114772", "0.5106093", "0.5104982", "0.51034504", "0.5101628", "0.51002526", "0.50974685", "0.5096786", "0.50943226", "0.5092774", "0.5092691", "0.5089143", "0.508693" ]
0.0
-1
Make sure to handle the host header and pass it before
public function __construct( $uri = null, string $method = null, StreamInterface $body = null, array $headers = null, string $protocolVersion = null ) { //we initialize the message-base $uri = $this->filterUri($uri); $headers = $headers ?: []; if (!isset($headers['Host']) && $uri->getHost()) $headers['Host'] = $uri->getHost(); parent::__construct($body, $headers, $protocolVersion); $this->uri = $uri; $this->method = $method !== null ? $this->filterMethod($method) : Verb::GET; $this->requestTarget = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function ResolveHost() {\n\n $Server= $this->GetOption('RequestContext')->SERVER;\n $DetectedHost= $Server['HTTP_HOST'];\n $this->Host= $DetectedHost;\n }", "public function testHostIsSetCorrectlyFromTheHeaders()\n {\n $server = ['HTTP_HOST' => 'joind.in'];\n $request = new Request($this->config, $server);\n\n $this->assertEquals('joind.in', $request->host);\n $this->assertEquals('joind.in', $request->getHost());\n }", "public function testGetHeader_headerNotSetAndHostSet_headerWithHost()\n {\n $sHost = 'someHost';\n $aExpectedHeader = array(\n 'POST /cgi-bin/webscr HTTP/1.1',\n 'Content-Type: application/x-www-form-urlencoded',\n 'Host: ' . $sHost,\n 'Connection: close'\n );\n $oCurl = oxNew('oxCurl');\n $oCurl->setHost($sHost);\n\n $this->assertEquals($aExpectedHeader, $oCurl->getHeader(), 'Header must be formed from set host.');\n }", "protected function detectHost()\n {\n if ($this->setHostFromProxy()) {\n return;\n }\n\n if (isset($_SERVER['HTTP_HOST']) && ! empty($_SERVER['HTTP_HOST'])) {\n // Detect if the port is set in SERVER_PORT and included in HTTP_HOST\n if (\n isset($_SERVER['SERVER_PORT'])\n && preg_match('/^(?P<host>.*?):(?P<port>\\d+)$/', $_SERVER['HTTP_HOST'], $matches)\n ) {\n // If they are the same, set the host to just the hostname\n // portion of the Host header.\n if ((int) $matches['port'] === (int) $_SERVER['SERVER_PORT']) {\n $this->setHost($matches['host']);\n return;\n }\n\n // At this point, we have a SERVER_PORT that differs from the\n // Host header, indicating we likely have a port-forwarding\n // situation. As such, we'll set the host and port from the\n // matched values.\n $this->setPort((int) $matches['port']);\n $this->setHost($matches['host']);\n return;\n }\n\n $this->setHost($_SERVER['HTTP_HOST']);\n\n return;\n }\n\n if (! isset($_SERVER['SERVER_NAME']) || ! isset($_SERVER['SERVER_PORT'])) {\n return;\n }\n\n $name = $_SERVER['SERVER_NAME'];\n $this->setHost($name);\n }", "protected function updateHostByUri(): void\n {\n $host = $this->uri->getHost();\n if ($host === '') {\n return;\n }\n\n if (($port = $this->uri->getPort()) !== null) {\n $host .= ':' . $port;\n }\n\n if ($this->hasHeader('host')) {\n $header = $this->getHeaderLine('host');\n } else {\n $header = 'host';\n // save name\n $this->headerNames['host'] = 'Host';\n }\n\n // Ensure Host is the first header.\n $this->headers = [$header => [$host]] + $this->headers;\n }", "public function getHost() {}", "public function getHost() {}", "protected function getHostFromUri() {}", "private function setHost()\n {\n $urlE = $this->explodedUrl;\n\n $this->host = $urlE[2];\n }", "public function withHost($host)\n {\n }", "final public function getHost(): string {}", "private function normaliseHost() {\n if (isset($this->parts['host'])) {\n $asciiHost = trim(strtolower(\\Etechnika\\IdnaConvert\\IdnaConvert::encodeString($this->parts['host']->get()))); \n $this->parts['host']->set($asciiHost);\n }\n }", "public function host($host);", "public function testGetHeader_headerNotSetAndHostNotSet_headerWithoutHost()\n {\n $aExpectedHeader = array(\n 'POST /cgi-bin/webscr HTTP/1.1',\n 'Content-Type: application/x-www-form-urlencoded',\n 'Connection: close'\n );\n $oCurl = oxNew('oxCurl');\n\n $this->assertEquals($aExpectedHeader, $oCurl->getHeader(), 'Header must be without host as host not set.');\n }", "public function getHost()\n {\n }", "public function host() {\n\t\treturn $this->getHeader('Host');\n\t}", "public function setHost($host);", "public function shouldCheckHttpHost()\n {\n return !Director::is_cli() && isset($_SERVER['HTTP_HOST']);\n }", "public function testHostCanBeSetWithSetHost()\n {\n $host = uniqid() . '.com';\n $request = new Request($this->config, []);\n $request->setHost($host);\n\n $this->assertEquals($host, $request->getHost());\n }", "public function getHost()\n\t{\n\t\t$host = null;\n\n\t\tif ($this->isUsingTrustedProxy() && $this->hasHeader(self::$trustedHeaderNames['client-host'])) {\n\t\t\t$hosts = explode(',', $this->getHeaderLine(self::$trustedHeaderNames['client-host']));\n\t\t\t$host = trim(end($hosts));\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getHeaderLine('HOST');\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getServerParam('SERVER_NAME');\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getServerParam('SERVER_ADDR');\n\t\t}\n\n\t\t// Remove the port number\n\t\t$host = strtolower(preg_replace(\"/:\\d+$/\", '', trim($host)));\n\t\t\n\t\t// Check for forbidden characters\n\t\t// Credit: Symfony HTTPFoundation\n\t\tif (!empty($host) && !empty(preg_replace(\"/(?:^\\[)?[a-zA-Z0-9-:\\]_]+\\.?/\", '', $host))) {\n\t\t\tthrow new InvalidArgumentException(\"Invalid host \\\"$host\\\"\");\n\t\t}\n\n\t\treturn $host;\n\t}", "public function testGetHeader_headerSetAndHostNotSet_headerWithoutHost()\n {\n $aHeader = array('Test header');\n $oCurl = oxNew('oxCurl');\n $oCurl->setHeader($aHeader);\n\n $this->assertEquals($aHeader, $oCurl->getHeader(), 'Header must be same as set header.');\n }", "protected function checkHost() {\n if (parse_url(Yii::$app->request->getHostInfo(), PHP_URL_HOST) !== Yii::$app->params['authserverHost']) {\n throw new NotFoundHttpException();\n }\n }", "private function loadHeaders()\n {\n foreach ($_SERVER as $key => $value) {\n $subset = substr($key, 0, 5);\n if ($subset <> 'HTTP_' && $subset <> 'CONTE') {\n continue;\n }\n $header = str_replace(\n ' ',\n '-',\n ucwords(\n str_replace(['http_', '_'], ['', ' '], strtolower($key))\n )\n );\n $this->headers[$this->headerKey($header)] = [$value];\n }\n }", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "protected function checkTrustedHostPattern() {}", "public function headerHandle()\n\t{\t\n\t\t$headers = array();\n\t\tif(is_array($this->server->all()))\n\t\t{\n\t\t\tforeach($this->server->all() as $key=>$val)\n\t\t\t{\n\t\t\t\tif('http_' == strtolower(substr($key,0,5)))\n\t\t\t\t{\n\t\t\t\t\t$headers[substr($key,5)] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}", "protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }", "public function populateHeaders(): void\n\t{\n\t\t$contentType = $_SERVER['CONTENT_TYPE'] ?? getenv('CONTENT_TYPE');\n\t\tif (! empty($contentType))\n\t\t{\n\t\t\t$this->setHeader('Content-Type', $contentType);\n\t\t}\n\t\tunset($contentType);\n\n\t\tforeach ($_SERVER as $key => $val)\n\t\t{\n\t\t\tif (sscanf($key, 'HTTP_%s', $header) === 1)\n\t\t\t{\n\t\t\t\t// take SOME_HEADER and turn it into Some-Header\n\t\t\t\t$header = str_replace('_', ' ', strtolower($header));\n\t\t\t\t$header = str_replace(' ', '-', ucwords($header));\n\n\t\t\t\t$this->setHeader($header, $_SERVER[$key]);\n\n\t\t\t\t// Add us to the header map so we can find them case-insensitively\n\t\t\t\t$this->headerMap[strtolower($header)] = $header;\n\t\t\t}\n\t\t}\n\t}", "public function getHost(): string;", "public static function getHttpHost() {\n\t\treturn self::$httpHost;\n\t}", "public function cleanHost() {\r\n\t\t$this->host = preg_replace('/^\\/+|\\/+$/', '', $this->host);\r\n\t}", "public function host();", "protected function _initHeaders()\n {\n $headers = new DataHolder();\n\n foreach ($_SERVER as $key => $value)\n {\n if (strpos($key, 'HTTP_') === 0)\n {\n $headers->set(substr($key, 5), $value);\n }\n elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_TYPE')))\n {\n $headers->set($key, $value);\n }\n }\n\n $this->set('_headers', $headers);\n }", "public function setHost(string $host): void\n {\n }", "public function getHost():? string;", "protected function _parseHeader() {}", "public function set_host($host)\n\t{\n\t\t$this->host = $host;\n\t}", "final public function setHost($host)\n {\n $this->_host = $host;\n }", "public function sendHttpHeaders() {}", "public function doResolveHost() {\r\n if (preg_match('|[a-zA-Z]|', $this->getTarget())) {\r\n return $this->resolveHost($this->getTarget());\r\n }\r\n return $this->resolveAddr($this->getTarget());\r\n }", "public function testGetHost() {\n static::$_server = array(\n 'SERVER_NAME' => 'nimbl.es'\n );\n $request = $this->createRequest();\n $this->assertEquals('nimbl.es', $request->getHost());\n }", "public function setHost($host) {\n\n $this->host = $host;\n }", "public function getHost(): string\n {\n }", "function setHost($inParamValue) {\n\t\treturn $this->setParam(self::PARAM_HOST, $inParamValue);\n\t}", "public function PingHeaders();", "public function testWithHost()\n {\n $uri = $this->getUriForTest();\n $uriWithHost = $uri->withHost('www.foo.bar');\n\n $this->assertEquals('www.example.com', $uri->getHost());\n $this->assertEquals('www.foo.bar', $uriWithHost->getHost());\n }", "public static function setHost(string $host): void {\r\n $_SERVER['HTTP_HOST'] = $host;\r\n }", "protected function _setHostname()\n {\n if(!$this->_hostname){\n $this->_hostname = php_uname('n');\n }\n }", "public function setHost($host)\n {\n // Store in encoded form.\n $this->host = $this->encode($host);\n }", "protected function getConfiguredHost() {}", "public function withHost($host)\n {\n // TODO: Implement withHost() method.\n }", "public function withHost($host)\n {\n // TODO: Implement withHost() method.\n }", "protected function getHost() {\n\t\treturn ($this->router->getParam('HTTPS') ? 'https' : 'http') . '://' . $this->router->getParam('HTTP_HOST');\n\t}", "protected function getHttpHost()\r\n {\r\n return isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'cli';\r\n }", "function set_host($value)\r\n\t\t{\r\n\t\t\treturn $this->host = $value;\r\n\t\t}", "public function enableSslHostCheck()\n {\n $this->sslHostCheckEnabled = true;\n }", "function getHeader() {\n\tglobal $server, $html, $hostname, $userpwd;\n\t$chopts = array(\n\t\tCURLOPT_URL=>$hostname,\n\t CURLOPT_PORT=>80,\n\t CURLOPT_TIMEOUT=>5,\n\t CURLOPT_RETURNTRANSFER=>true,\n\t CURLOPT_HEADER=>true,\n\t CURLOPT_USERPWD=>\"$userpwd\",\n\t CURLOPT_FOLLOWLOCATION=>true);\n\n\t$ch = curl_init();\n\tcurl_setopt_array($ch, $chopts);\n\t$return = curl_exec($ch);\n\n\t// check for authentication failures using http codes *EXPERIMENTAL*\n\t/*\n\t$hCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\tif(isset($hCode)) {\n\t\tswitch($hCode) {\n\t\t\tcase \"401\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tcase \"501\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tdefault: break;\n\t\t}\n\t}\n\t*/\n\n\t// check for connection timeout using curl error codes\n\tif(curl_errno($ch)) {\n\t\tif(curl_errno($ch) == 28) {\n\t\t\tlogIT('e',\"[!] connection timed out to: $hostname, skipping...\");\n\t\t\techo \"[!] connection timed out to: $hostname, skipping...\\n\";\n\t\t\texit(0);\n\t\t}\n\t}\n\tcurl_close($ch);\n\n\t$headers = http_response_headers($return);\n\tforeach ($headers as $header) {\n\t\t$hdr_arr = http_response_header_lines($header);\n\t if(isset($hdr_arr['Location'])) {\n\t $str = $hdr_arr['Location'];\n\t $html = file_get_contents_curl(\"$str\", \"$userpwd\");\n\t } else {\n\t $html = file_get_contents_curl(\"$hostname\", \"$userpwd\");\n\t }\n\t if(isset($hdr_arr['Server'])) {\n\t\t\t$server = $hdr_arr['Server'];\n\t\t}\n\t}\n}", "public function testGetHeader_headerSetAndHostSet_headerFromSet()\n {\n $sHost = 'someHost';\n $aHeader = array('Test header');\n $oCurl = oxNew('oxCurl');\n $oCurl->setHost($sHost);\n $oCurl->setHeader($aHeader);\n\n $this->assertEquals($aHeader, $oCurl->getHeader(), 'Header must be same as set header.');\n }", "public function setHost($host)\n {\n $this->host = (string) $host;\n }", "private function setHostStatus(): void\n {\n $this->host_status = $this->getHostStatus();\n }", "static private function CheckCorrectHost() {\n\t\tif (count($_POST) > 0) {\n\t\t\treturn;\n\t\t}\n\t\t$correct_host = str_replace('https://', '', self::getURL());\n\n\t\tif ($_SERVER[\"SERVER_NAME\"] !== $correct_host) {\n\t\t\tself::redirect(self::getCurrentURL() . $_SERVER[\"REQUEST_URI\"]);\n\t\t}\n\t}", "public function setHost($host)\n {\n $this->host = $host;\n }", "public function getHost()\n {\n return $this->_host;\n }", "public function process_default_headers()\n {\n }", "public function setHost($host) {\r\n $this->debug('setHost() called with ' . $host);\r\n $host = trim($host);\r\n \r\n /* target is a cached copy of whatever we were passed, for display purposes */\r\n $this->setTarget($host);\r\n \r\n if (preg_match('/[^0-9\\.]/', $host)) {\r\n $this->debug('setHost() has a hostname.');\r\n /* We have a hostname. */\r\n if (!$this->isValidHostName($host)) {\r\n $this->debug('setHost() has an invalid hostname.');\r\n return false;\r\n }\r\n if (($this->ipAddr = $this->resolveHost($host)) === false) {\r\n /* Can't resolve hostname */\r\n $this->debug('Unable to resolve hostname in setHost().');\r\n return false;\r\n }\r\n $this->host = $host;\r\n }\r\n else {\r\n /* We have an IP address */\r\n $this->debug('setHost() has an IP address.');\r\n if (!$this->isValidHostAddr($host)) {\r\n $this->debug('setHost() has an invalid IP address.');\r\n return false;\r\n }\r\n if (($this->host = $this->resolveAddr($host)) === false) {\r\n /* Can't resolve IP */\r\n return false;\r\n }\r\n $this->ipAddr = $host;\r\n }\r\n return true;\r\n }", "public function getHost() {\n \n\n\t\treturn $_SERVER[\"HTTP_HOST\"];\n }", "public function getHost() {\n\t\t\t# Default StyleSheet\n\t\t\tif (! $_REQUEST[\"stylesheet\"]) $_REQUEST[\"stylesheet\"] = 'network.host.xsl';\n\t\t\t$response = new \\HTTP\\Response();\n\t\n\t\t\t# Initiate Host Object\n\t\t\t$host = new \\Network\\Host();\n\t\n\t\t\tif (preg_match('/^([\\w\\-]+)\\.(.*)$/',$_REQUEST['name'],$matches)) {\n\t\t\t\t$_REQUEST['name'] = $matches[1];\n\t\t\t\t$_REQUEST['domain_name'] = $matches[2];\n\t\t\t}\n\t\t\tif (! isset($_REQUEST['domain_name'])) $this->error('domain name or fully qualified host name required');\n\t\t\tif (! isset($_REQUEST['name'])) $this->error('name required');\n\t\t\t$domain = new \\Network\\Domain();\n\t\t\t$domain->get($_REQUEST['domain_name']);\n\t\t\tif (! $domain->id) $this->error('Domain not found');\n\t\n\t\t\t# Get Host\n\t\t\t$host->get($domain->id,$_REQUEST['name']);\n\t\n\t\t\t# Error Handling\n\t\t\tif ($host->error()) $this->error($host->error());\n\t\t\telseif ($host->id) {\n\t\t\t\t$response->host = $host;\n\t\t\t\t$response->success = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response->success = 0;\n\t\t\t\t$response->error = \"Host not found\";\n\t\t\t}\n\t\n\t\t\tapi_log('network',$_REQUEST,$response);\n\t\n\t\t\t# Send Response\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost()\n {\n return $this->host;\n }", "public function getHost() {\r\n return (is_null($this->host)) ? null : $this->host;\r\n }", "public function setHost( $host )\n\t{\n\t\t$this->host = $host;\n\t\t$this->modified = true;\n\t}", "public function host()\n {\n }", "public function verifyHost() {\n $this->_do_not_verify_host = FALSE;\n return $this;\n }", "function send_origin_headers()\n {\n }", "public function send_headers()\n {\n }", "public static function isValidHost($host)\n {\n }", "public function getHost(): string\r\n {\r\n return $this->host;\r\n }", "function nocache_headers()\n {\n }", "private function assertValidHost() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->host,\n '#[Route.host] must contain a non-empty string or null.'\n );\n }", "public function run()\r\n\t\t\t {\r\n $ch = curl_init();\r\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt ($ch, CURLOPT_URL, $this->url);\r\n curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);\r\n curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11');\r\n curl_setopt($ch, CURLOPT_HEADER, true); // header will be at output\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD'\r\n $this->headers = curl_exec ($ch);\r\n curl_close ($ch);\r\n\t\t\t }", "public static function setHttpHost($httpHost) {\n\t\tself::$httpHost = $httpHost;\n\t}", "public function testGetHost_setHost_host()\n {\n $sHost = 'someHost';\n\n $oCurl = oxNew('oxCurl');\n $oCurl->setHost($sHost);\n\n $this->assertEquals($sHost, $oCurl->getHost(), 'Check if getter returns what is set in setter.');\n }", "public function __construct($host)\n {\n $this->setHost($host);\n }", "public function fsockopen_header(&$out)\n {\n }", "public function fsockopen_header(&$out)\n {\n }", "public static function setHost(string $host)\n { \n self::$__host = $host;\n }", "protected function set_host($ihost)\n {\n }", "public function getHost(): ?string;" ]
[ "0.71368784", "0.70161605", "0.6876686", "0.6760379", "0.6750802", "0.65729517", "0.65729517", "0.64763945", "0.647521", "0.6434559", "0.64282435", "0.64119095", "0.64003664", "0.63293165", "0.6327191", "0.63236237", "0.6309782", "0.6292155", "0.6279923", "0.6266226", "0.6231159", "0.6215596", "0.62128264", "0.61897755", "0.61897755", "0.61897755", "0.61897755", "0.61897755", "0.61897755", "0.61827606", "0.6123958", "0.61085176", "0.61044097", "0.61010444", "0.6082341", "0.60289305", "0.6026948", "0.60249925", "0.60077953", "0.60029966", "0.5995135", "0.5981841", "0.59695137", "0.59337723", "0.59321946", "0.59303975", "0.59298563", "0.59298295", "0.5928629", "0.59281456", "0.5909411", "0.5907722", "0.5904117", "0.590173", "0.59012526", "0.59010434", "0.59010434", "0.58930945", "0.5890708", "0.5890603", "0.58886254", "0.5886776", "0.5874694", "0.5843193", "0.58407164", "0.5832364", "0.5827454", "0.5819444", "0.58175033", "0.58166337", "0.58018607", "0.5765667", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5765176", "0.5763464", "0.57536525", "0.5747627", "0.5741435", "0.5739467", "0.57381946", "0.5733218", "0.5716023", "0.57131743", "0.57070535", "0.57010716", "0.5698454", "0.5695948", "0.56943357", "0.56905735", "0.5690498", "0.5684288", "0.5661536", "0.5660929" ]
0.0
-1
Validar Abertura de movimento
public function valInsert($model) { $areasid = $model->getAreasid(); $sql = " declare @areasid int = :areasid, @releasestype char(1) = :releasestype; select count(id) as releasesitem from armorymovement where areasid = @areasid and releasestype = @releasestype"; $pdo = $this->getProxy()->prepare($sql); $pdo->bindValue(":areasid", $areasid, \PDO::PARAM_INT); $pdo->bindValue(":releasestype", "A", \PDO::PARAM_STR); $pdo->execute(); $rows = $pdo->fetchAll(); $releasesitem = $rows[0]['releasesitem']; if( intval($releasesitem) >= 11 ) { throw new \PDOException("Este movimento não pode ser criado pois existem {$releasesitem} abertos!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validarDados(IExportacaoCenso $oExportacaoCenso) {\n\n $lTodosDadosValidos = true;\n $oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();\n $sMensagem = \"\";\n\n /**\n * Início da validação dos campos obrigatórios\n */\n if( trim( $oDadosEscola->registro00->codigo_escola_inep ) == '' ) {\n\n $sMensagem = \"É necessário informar o código INEP da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( trim( $oDadosEscola->registro00->codigo_escola_inep ) != '' ) {\n\n if( !DBNumber::isInteger( $oDadosEscola->registro00->codigo_escola_inep ) ) {\n\n $sMensagem = \"Código INEP da escola inválido. O código INEP deve conter apenas números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( strlen( trim( $oDadosEscola->registro00->codigo_escola_inep ) ) != 8 ) {\n\n $sMensagem = \"Código INEP da escola inválido. O código INEP deve conter 8 dígitos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if (trim($oDadosEscola->registro00->nome_escola) == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome da Escola não pode ser vazio\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ( trim( $oDadosEscola->registro00->nome_escola ) != ''\n && strlen( $oDadosEscola->registro00->nome_escola ) < 4\n ) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome da Escola deve conter no mínimo 4 dígitos\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->cep == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo CEP é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( !empty( $oDadosEscola->registro00->cep ) ) {\n\n if( !DBNumber::isInteger( $oDadosEscola->registro00->cep ) ) {\n\n $sMensagem = \"CEP inválido. Deve conter somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if (strlen($oDadosEscola->registro00->cep) < 8) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"CEP da escola deve conter 8 dígitos.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if ($oDadosEscola->registro00->endereco == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Endereço da escola é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->uf == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"UF da escolas é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->municipio == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Munícipio da escola é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->distrito == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Distrito é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n */\n if ($oDadosEscola->registro00->situacao_funcionamento == 1) {\n\n\n if (trim($oDadosEscola->registro00->codigo_orgao_regional_ensino) == '' && $oDadosEscola->registro00->lOrgaoEnsinoObrigatorio) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Orgão Regional de Ensino obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->data_inicio_ano_letivo == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Data de Início do Ano Letivo é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->data_termino_ano_letivo == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Data de Término do Ano Letivo é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( !empty( $oDadosEscola->registro00->data_inicio_ano_letivo )\n && !empty( $oDadosEscola->registro00->data_termino_ano_letivo ) ) {\n\n $oDataInicio = new DBDate( $oDadosEscola->registro00->data_inicio_ano_letivo );\n $oDataTermino = new DBDate( $oDadosEscola->registro00->data_termino_ano_letivo );\n\n if( DBDate::calculaIntervaloEntreDatas( $oDataInicio, $oDataTermino, 'd' ) > 0 ) {\n\n $sMensagem = \"A data de início do ano letivo não pode ser maior que a data de término.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oExportacaoCenso->getDataCenso() != '' ) {\n\n $oDataCenso = new DBDate( $oExportacaoCenso->getDataCenso() );\n $iAnoAnterior = $oDataCenso->getAno() - 1;\n if( $oDataInicio->getAno() != $oDataCenso->getAno()\n && $oDataInicio->getAno() != $iAnoAnterior\n ) {\n\n $sMensagem = \"Data de início do ano letivo inválido. Ano informado: {$oDataInicio->getAno()}\";\n $sMensagem .= \" - Anos válidos: {$iAnoAnterior} ou {$oDataCenso->getAno()}\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( DBDate::calculaIntervaloEntreDatas( $oDataCenso, $oDataTermino, 'd' ) > 0\n || $oDataTermino->getAno() != $oDataCenso->getAno()\n ) {\n\n $sMensagem = \"Data de término do ano letivo inválido. O ano deve ser o mesmo do censo\";\n $sMensagem .= \" ( {$oDataCenso->getAno()} ), e a data não pode ser inferior a data de referência\";\n $sMensagem .= \" ( {$oDataCenso->getDate( DBDate::DATA_PTBR )} ).\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n /**\n * Validações referentes aos telefones\n */\n for( $iContador = 0; $iContador <= 2; $iContador++ ) {\n\n $sPropriedadeTelefone = \"telefone\";\n $sMensagemTelefone = \"Telefone\";\n\n if( $iContador > 0 ) {\n\n $sPropriedadeTelefone = \"telefone_publico_{$iContador}\";\n $sMensagemTelefone = \"Telefone Público {$iContador}\";\n }\n\n if( $oDadosEscola->registro00->{$sPropriedadeTelefone} != '' ) {\n\n if( strlen( $oDadosEscola->registro00->{$sPropriedadeTelefone} ) < 8 ) {\n\n $sMensagem = \"Campo {$sMensagemTelefone} deve conter 8 dígitos\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( substr($oDadosEscola->registro00->{$sPropriedadeTelefone}, 0, 1) != 9\n && strlen($oDadosEscola->registro00->{$sPropriedadeTelefone}) == 9\n ) {\n\n $sMensagem = \"Campo {$sMensagemTelefone}, ao conter 9 dígitos, o primeiro algarismo deve ser 9.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n if ($oDadosEscola->registro00->fax != '') {\n\n if (strlen($oDadosEscola->registro00->fax) < 8) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Fax deve conter 8 dígitos\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n * e caso a opção Dependência Administrativa selecionada seja igual a 4\n * 4 - privada\n */\n if ($oDadosEscola->registro00->dependencia_administrativa == 4) {\n\n if ( empty( $oDadosEscola->registro00->categoria_escola_privada ) ) {\n\n $lTodosDadosValidos = false;\n $sErroMsg = \"Escola de Categoria Privada.\\n\";\n $sErroMsg .= \"Deve ser selecionada uma opção no campo Categoria da Escola Privada\";\n $oExportacaoCenso->logErro($sErroMsg, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->conveniada_poder_publico == '') {\n\n $sMensagem = \"Deve ser selecionada uma opção no campo Conveniada Com o Poder Público\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $oDadosEscola->registro00->mant_esc_privada_empresa_grupo_empresarial_pes_fis == 0\n && $oDadosEscola->registro00->mant_esc_privada_sidicatos_associacoes_cooperativa == 0\n && $oDadosEscola->registro00->mant_esc_privada_ong_internacional_nacional_oscip == 0\n && $oDadosEscola->registro00->mant_esc_privada_instituicoes_sem_fins_lucrativos == 0\n && $oDadosEscola->registro00->sistema_s_sesi_senai_sesc_outros == 0\n ) {\n\n $sMensagem = \"Deve ser selecionado pelo menos um campo de Mantenedora da Escola Privada\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"O CNPJ da mantenedora principal da escola deve ser informado\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( $oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada != ''\n && !DBNumber::isInteger( $oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada )\n ) {\n\n $sMensagem = \"O CNPJ da mantenedora principal deve conter somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro00->cnpj_escola_privada == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"O CNPJ da escola deve ser informado quando escola for privada.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro00->regulamentacao_autorizacao_conselho_orgao == '' ) {\n\n $sMensagem = \"Deve ser informada uma opção referente ao Credenciamento da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n $lDadosInfraEstrutura = DadosCensoEscola::validarDadosInfraEstrutura($oExportacaoCenso);\n if (!$lDadosInfraEstrutura) {\n $lTodosDadosValidos = $lDadosInfraEstrutura;\n }\n\n return $lTodosDadosValidos;\n }", "public function test_validar_archivo_vacio_en_entrega_de_actividad()\n {\n $entrega=new EntregaActividad();\n $entrega->setArchivo(null);\n $this->assertTrue($entrega->validarArchivo()->fails());\n }", "public function validarProcessamento() {\n\n $sWhere = \"q145_issarquivoretencao = {$this->oIssArquivoRetencao->getSequencial()}\";\n $oDaoIssArquivoRetencaoDisArq = new cl_issarquivoretencaodisarq;\n $sSqlIssArquivoRetencaoDisArq = $oDaoIssArquivoRetencaoDisArq->sql_query_file(null, \"*\", null, $sWhere);\n $rsIssArquivoRetencaoDisArq = $oDaoIssArquivoRetencaoDisArq->sql_record($sSqlIssArquivoRetencaoDisArq);\n\n if ($oDaoIssArquivoRetencaoDisArq->numrows > 0) {\n throw new BusinessException( _M( self::MENSAGENS . \"erro_arquivo_processado\") );\n }\n }", "function validaCamposArchivo($Archivo)\n{\n\t$ValRegreso=FALLA;\n\tif (!copy($Archivo, $Archivo.\".bak\")) {\n \techo \"Error al copiar $Archivo <br>\";\n\t\t$ValRegreso=FALLA;\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Archivo.\".bak\", \"r\");\n\t\tif ($GestorArchivo){\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t// 83 echo \" validaCamposArchivo >\" .substr_count($Registro, '|') .\"< <br>\";\n\t\t \tif( substr_count($Registro, '|') > 70)\n\t\t \t\t$ValRegreso=DATA_NOMINA;\n\t\t \telseif(substr_count($Registro, '|') < 70)\n\t\t \t\t$ValRegreso=DATA_NOMINA_TRAILER;\n\t\t \telse\n\t\t \t\t$ValRegreso=FALLA;\n\t \t\tbreak;\n\t\t }// fin del while\t\n\t\t fclose($GestorArchivo);\n\t\t } \n\t\t else\n\t\t \treturn FALLA;\n\t}// fin copy\n\treturn $ValRegreso;\n}", "public function validarEquipamentosGeral (IExportacaoCenso $oExportacaoCenso, $iSequencial, $sEquipamento) {\n\n $sMensagem = \"\";\n switch ($iSequencial) {\n\n case 3000002:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores: \";\n break;\n\n case 3000003:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores de Uso Administrativo: \";\n break;\n\n case 3000024:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores de Uso dos Alunos: \";\n break;\n\n case 3000019:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Número de Salas de Aula Existentes na Escola: \";\n break;\n\n case 3000020:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Número de Salas Utilizadas Como Sala de Aula - \";\n $sMensagem .= \"Dentro e Fora do Prédio: \";\n break;\n }\n\n $lTodosDadosValidos = true;\n\n if (strlen($sEquipamento) > 4) {\n\n $lTodosDadosValidos = false;\n $sMensagemTamanho = \"Quantidade de dígitos informado inválido. É permitido no máximo 4 dígitos.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemTamanho, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $sEquipamento != null ) {\n\n if( !DBNumber::isInteger( $sEquipamento ) ) {\n\n $lTodosDadosValidos = false;\n $sMensagemInteiro = \"Valor informado para quantidade inválido. Informe apenas números no campo de quantidade.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemInteiro, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( DBNumber::isInteger($sEquipamento) && $sEquipamento == 0 ) {\n\n $lTodosDadosValidos = false;\n $sMensagemInvalido = \"Valor informado para quantidade inválido. Deixar o campo vazio, ao invés de informar 0.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemInvalido, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n return $lTodosDadosValidos;\n }", "protected function validarDadosInfraEstrutura(IExportacaoCenso $oExportacaoCenso) {\n\n $lTodosDadosValidos = true;\n $oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();\n $aDadosTurma = $oExportacaoCenso->getDadosProcessadosTurma();\n\n $aEquipamentosValidacao = array(\n 0 => \"equipamentos_existentes_escola_televisao\",\n 1 => \"equipamentos_existentes_escola_videocassete\",\n 2 => \"equipamentos_existentes_escola_dvd\",\n 3 => \"equipamentos_existentes_escola_antena_parabolica\",\n 4 => \"equipamentos_existentes_escola_copiadora\",\n 5 => \"equipamentos_existentes_escola_retroprojetor\",\n 6 => \"equipamentos_existentes_escola_impressora\",\n 7 => \"equipamentos_existentes_escola_aparelho_som\",\n 8 => \"equipamentos_existentes_escola_projetor_datashow\",\n 9 => \"equipamentos_existentes_escola_fax\",\n 10 => \"equipamentos_existentes_escola_maquina_fotografica\"\n );\n\n $aEstruturaValidacao = array(\n 3000032 => \"equipamentos_existentes_escola_computador\",\n 3000003 => \"quantidade_computadores_uso_administrativo\",\n 3000024 => \"quantidade_computadores_uso_alunos\",\n 3000019 => \"numero_salas_aula_existentes_escola\",\n 3000020 => \"numero_salas_usadas_como_salas_aula\"\n );\n\n $aDependenciasEscola = array(\n \"dependencias_existentes_escola_sala_professores\",\n \"dependencias_existentes_escola_bercario\",\n \"dependencias_existentes_escola_despensa\",\n \"dependencias_existentes_escola_area_verde\",\n \"dependencias_existentes_escola_almoxarifado\",\n \"dependencias_existentes_escola_auditorio\",\n \"dependencias_existentes_escola_banheiro_alunos_def\",\n \"dependencias_existentes_escola_banheiro_chuveiro\",\n \"dependencias_existentes_escola_sala_leitura\",\n \"dependencias_existentes_escola_sala_recursos_multi\",\n \"dependencias_existentes_escola_banheiro_educ_infan\",\n \"dependencias_existentes_escola_cozinha\",\n \"dependencias_existentes_escola_alojamento_professo\",\n \"dependencias_existentes_escola_laboratorio_ciencia\",\n \"dependencias_existentes_escola_patio_coberto\",\n \"dependencias_existentes_escola_alojamento_aluno\",\n \"dependencias_existentes_escola_laboratorio_informa\",\n \"dependencias_existentes_escola_refeitorio\",\n \"dependencias_existentes_escola_parque_infantil\",\n \"dependencias_existentes_escola_banheiro_fora_predi\",\n \"dependencias_existentes_escola_quadra_esporte_desc\",\n \"dependencias_existentes_escola_sala_secretaria\",\n \"dependencias_existentes_escola_dep_vias_alunos_def\",\n \"dependencias_existentes_escola_banheiro_dentro_pre\",\n \"dependencias_existentes_escola_lavanderia\",\n \"dependencias_existentes_escola_quadra_esporte_cobe\",\n \"dependencias_existentes_escola_biblioteca\",\n \"dependencias_existentes_escola_sala_diretoria\",\n \"dependencias_existentes_escola_patio_descoberto\",\n \"dependencias_existentes_escola_nenhuma_relacionada\"\n );\n\n $aModalidadesEtapas = array(\n \"modalidade_ensino_regular\",\n \"modalidade_educacao_especial_modalidade_substutiva\",\n \"modalidade_educacao_jovens_adultos\",\n \"etapas_ensino_regular_creche\",\n \"etapas_ensino_regular_pre_escola\",\n \"etapas_ensino_regular_ensino_fundamental_8_anos\",\n \"etapas_ensino_regular_ensino_fundamental_9_anos\",\n \"etapas_ensino_regular_ensino_medio_medio\",\n \"etapas_ensino_regular_ensino_medio_integrado\",\n \"etapas_ensino_regular_ensino_medio_normal_magister\",\n \"etapas_ensino_regular_ensino_medio_profissional\",\n \"etapa_educacao_especial_creche\",\n \"etapa_educacao_especial_pre_escola\",\n \"etapa_educacao_especial_ensino_fundamental_8_anos\",\n \"etapa_educacao_especial_ensino_fundamental_9_anos\",\n \"etapa_educacao_especial_ensino_medio_medio\",\n \"etapa_educacao_especial_ensino_medio_integrado\",\n \"etapa_educacao_especial_ensino_medio_normal_magist\",\n \"etapa_educacao_especial_ensino_medio_educ_profis\",\n \"etapa_educacao_especial_eja_ensino_fundamental\",\n \"etapa_educacao_especial_eja_ensino_medio\",\n \"etapa_eja_ensino_fundamental\",\n \"etapa_eja_ensino_fundamental_projovem_urbano\",\n \"etapa_eja_ensino_medio\"\n );\n\n foreach ($aEquipamentosValidacao as $sEquipamentoValidacao) {\n\n if (!DadosCensoEscola::validarEquipamentosExistentes($oExportacaoCenso, $oDadosEscola->registro10->$sEquipamentoValidacao)) {\n $lTodosDadosValidos = false;\n }\n break;\n }\n\n $iComputadorExistentes = 0;\n foreach ($aEstruturaValidacao as $iSequencial => $sEstruturaValidacao) {\n\n if( $iSequencial == 3000032 ) {\n\n if( !empty( $oDadosEscola->registro10->$sEstruturaValidacao ) ) {\n $iComputadorExistentes = $oDadosEscola->registro10->$sEstruturaValidacao;\n }\n }\n\n if( $iSequencial == 3000003\n && $oDadosEscola->registro10->$sEstruturaValidacao != ''\n && ( $iComputadorExistentes == 0 || $iComputadorExistentes < $oDadosEscola->registro10->$sEstruturaValidacao )\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Quantidade de computadores informados para uso administrativo\";\n $sMensagem .= \" ({$oDadosEscola->registro10->$sEstruturaValidacao}), é maior que a quantidade de\";\n $sMensagem .= \" computadores existentes na escola ({$iComputadorExistentes}).\";\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iSequencial == 3000024\n && $oDadosEscola->registro10->$sEstruturaValidacao != ''\n && ( $iComputadorExistentes == 0 || $iComputadorExistentes < $oDadosEscola->registro10->$sEstruturaValidacao )\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Quantidade de computadores informados para uso dos alunos\";\n $sMensagem .= \" ({$oDadosEscola->registro10->$sEstruturaValidacao}), é maior que a quantidade de\";\n $sMensagem .= \" computadores existentes na escola ({$iComputadorExistentes}).\";\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if (!DadosCensoEscola::validarEquipamentosGeral($oExportacaoCenso, $iSequencial, $oDadosEscola->registro10->$sEstruturaValidacao)) {\n $lTodosDadosValidos = false;\n }\n }\n\n if( $iComputadorExistentes > 0 ) {\n\n if( $oDadosEscola->registro10->acesso_internet === '' ) {\n\n $sMensagem = \"Deve ser informado se a escola possui acesso a internet ou não, pois foi informada a\";\n $sMensagem .= \" quantidade de computadores que a mesma possui.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->acesso_internet == 1 && $oDadosEscola->registro10->banda_larga == '' ) {\n\n $sMensagem = \"Deve ser informado se a escola possui banda larga, pois foi informado que a mesma\";\n $sMensagem .= \" possui acesso a internet.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if ($oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Número do CPF do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if (trim($oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel) == \"00000000191\") {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Número do CPF ({$oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel}) do\";\n $sMensagem .= \" gestor informado é inválido.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro10->nome_gestor == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n $sExpressao = '/([a-zA-Z])\\1{3}/';\n $lValidacaoExpressao = preg_match($sExpressao, $oDadosEscola->registro10->nome_gestor) ? true : false;\n\n if ($lValidacaoExpressao) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome do gestor inválido. Não é possível informar mais de 4 letras repetidas em sequência.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro10->cargo_gestor_responsavel == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Cargo do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n */\n if ($oDadosEscola->registro00->situacao_funcionamento == 1) {\n\n if ($oDadosEscola->registro10->local_funcionamento_escola_predio_escolar == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_templo_igreja == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_salas_empresas == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_casa_professor == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_salas_outras_escolas == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_galpao_rancho_paiol_bar == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_un_internacao_prisional == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_outros == 0) {\n\n $sMensagem = \"Deve ser selecionado pelo menos um local de funcionamento da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n * e o local de funcionamento seja igual a 7\n * 7 - Prédio escolar\n */\n if ($oDadosEscola->registro10->local_funcionamento_escola_predio_escolar == 1) {\n\n if ( empty( $oDadosEscola->registro10->forma_ocupacao_predio ) ) {\n\n $sMensagem = \"Escola Ativa. Deve ser selecionada uma forma de ocupação do prédio.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->predio_compartilhado_outra_escola == '') {\n\n $sMensagem = \"Escola Ativa. Deve ser informado se o prédio é compartilhado ou não com outra escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->predio_compartilhado_outra_escola == 1 ) {\n\n $iTotalCodigoVazio = 0;\n $lErroCodigoVazio = false;\n $lErroCodigoInvalido = false;\n\n for( $iContador = 1; $iContador <= 6; $iContador++ ) {\n\n $sCodigoEscolaCompartilhada = \"codigo_escola_compartilha_\" . $iContador;\n if( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) == '' ) {\n $iTotalCodigoVazio++;\n }\n\n if( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) != ''\n && strlen( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) ) != 8 ) {\n $lErroCodigoInvalido = true;\n }\n }\n\n if( $iTotalCodigoVazio == 6 ) {\n $lErroCodigoVazio = true;\n }\n\n if( $lErroCodigoVazio ) {\n\n $sMensagem = \"Escola com prédio compartilhado. É necessário informar ao menos o código INEP de uma\";\n $sMensagem .= \" escola que compartilhe o prédio.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $lErroCodigoInvalido ) {\n\n $sMensagem = \"Código INEP de uma das escolas que compartilham o prédio, com tamanho inválido.\";\n $sMensagem .= \" Tamanho válido: 8 dígitos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n if ($oDadosEscola->registro10->agua_consumida_alunos == '') {\n\n $sMensagem = \"Deve ser selecionada um tipo de água consumida pelos alunos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->destinacao_lixo_coleta_periodica == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_queima == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_joga_outra_area == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_recicla == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_enterra == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_outros == 0) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Destinação do lixo da escola não informado.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n $lNumeroSalasExistentesValido = true;\n if( !DBNumber::isInteger( trim( $oDadosEscola->registro10->numero_salas_aula_existentes_escola ) ) ) {\n\n $lNumeroSalasExistentesValido = false;\n $sMensagem = \"Valor do 'N° de Salas de Aula Existentes na Escola' inválido. Deve ser\";\n $sMensagem .= \" informado somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $lNumeroSalasExistentesValido\n && trim( $oDadosEscola->registro10->numero_salas_aula_existentes_escola == 0 )\n ) {\n\n $sMensagem = \"O valor do campo 'N° de Salas de Aula Existentes na Escola' deve ser maior que 0.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n $lNumeroSalasUsadasValido = true;\n if( !DBNumber::isInteger( trim( $oDadosEscola->registro10->numero_salas_usadas_como_salas_aula ) ) ) {\n\n $lNumeroSalasUsadasValido = false;\n $sMensagem = \"Valor do 'N° de Salas Utilizadas como Sala de Aula' inválido. Deve ser\";\n $sMensagem .= \" informado somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $lNumeroSalasUsadasValido && trim( $oDadosEscola->registro10->numero_salas_usadas_como_salas_aula == 0 ) ) {\n\n $sMensagem = \"O valor do campo 'N° de Salas Utilizadas como Sala de Aula' deve ser maior de 0.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_cede_espaco_turma_brasil_alfabetizado == '') {\n\n $sMensagem = \"Informe se a escola cede espaço para turmas do Brasil Alfabetizado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_abre_finais_semanas_comunidade == '') {\n\n $sMensagem = \"Informe se a escola abre aos finais de semana para a comunidade.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_formacao_alternancia == '') {\n\n $sMensagem = \"Informe se a escola possui proposta pedagógica de formação por alternância.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $oDadosEscola->registro00->dependencia_administrativa != 3\n && trim( $oDadosEscola->registro10->alimentacao_escolar_aluno ) != 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Campo Alimentação na aba Infra estrutura do cadastro dados da escola deve ser \";\n $sMensagem .= \"informado como Oferece, pois dependência administrativa é Municipal.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( $oDadosEscola->registro10->abastecimento_agua_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->abastecimento_agua_fonte_rio_igarape_riacho_correg == 1\n || $oDadosEscola->registro10->abastecimento_agua_poco_artesiano == 1\n || $oDadosEscola->registro10->abastecimento_agua_cacimba_cisterna_poco == 1\n || $oDadosEscola->registro10->abastecimento_agua_rede_publica == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de abastecimento de água inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->abastecimento_energia_eletrica_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->abastecimento_energia_eletrica_gerador == 1\n || $oDadosEscola->registro10->abastecimento_energia_eletrica_outros_alternativa == 1\n || $oDadosEscola->registro10->abastecimento_energia_eletrica_rede_publica == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de abastecimento de energia inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->esgoto_sanitario_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->esgoto_sanitario_rede_publica == 1\n || $oDadosEscola->registro10->esgoto_sanitario_fossa == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de esgoto sanitário inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->dependencias_existentes_escola_nenhuma_relacionada == 1 ) {\n\n $lSelecionouDependencia = false;\n foreach( $aDependenciasEscola as $sDependencia ) {\n\n if( $oDadosEscola->registro10->{$sDependencia} != \"dependencias_existentes_escola_nenhuma_relacionada\"\n && $oDadosEscola->registro10->{$sDependencia} == 1\n ) {\n\n $lSelecionouDependencia = true;\n break;\n }\n }\n\n if( $lSelecionouDependencia ) {\n\n $sMensagem = \"Informação das dependências da escola inválida. Ao selecionar 'Nenhuma das dependências\";\n $sMensagem .= \" relacionadas', nenhuma das outras dependências pode ser selecionada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n\n /**\n * Variáveis para controlar o total de turmas existentes\n * 0 - Normal\n * 4 - AEE\n * 5 - AC\n */\n $iTotalTurmaNormal = 0;\n $iTotalTurmaAC = 0;\n $iTotalTurmaAEE = 0;\n\n foreach( $aDadosTurma as $oDadosTurma ) {\n\n switch( $oDadosTurma->tipo_atendimento ) {\n\n case 0:\n\n $iTotalTurmaNormal++;\n break;\n\n case 4:\n\n $iTotalTurmaAC++;\n break;\n\n case 5:\n\n $iTotalTurmaAEE++;\n break;\n }\n }\n\n /**\n * Validações referentes as opções selecionadas em relação a Atividade Complementar( AC ) e Atendimento\n * Educacional Especializado( AEE )\n * - atendimento_educacional_especializado\n * - atividade_complementar\n */\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == ''\n || $oDadosEscola->registro10->atividade_complementar == ''\n ) {\n\n $sMensagem = \"É necessário marcar uma das opções referentes a Atendimento Educacional Especializado\";\n $sMensagem .= \" e Atividade Complementar( Cadastros -> Dados da Escola -> Aba Infra Estrutura ).\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 2 ) {\n\n if( $oDadosEscola->registro10->atividade_complementar == 2 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado e Atividade Complementar foram marcados como\";\n $sMensagem .= \" 'Exclusivamente'. Ao marcar uma das opções como 'Exclusivamente', a outra deve\";\n $sMensagem .= \" ser marcada como 'Não Oferece'.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaNormal > 0 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado marcado como 'Exclusivamente'. Ao marcar esta\";\n $sMensagem .= \" opção, a escola não deve turmas de Ensino Regular, EJA e/ou Educação Especial, ou\";\n $sMensagem .= \" deve ser alterada a opção marcada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaAEE == 0 ) {\n\n $sMensagem = \"Ao selecionar Atendimento Educacional Especializado como 'Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 2 ) {\n\n if( $iTotalTurmaNormal > 0 ) {\n\n $sMensagem = \"Atividade Complementar marcada como 'Exclusivamente'. Ao marcar esta opção, a escola\";\n $sMensagem .= \" não deve turmas de Ensino Regular, EJA e/ou Educação Especial, ou deve ser alterada\";\n $sMensagem .= \" a opção marcada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaAC == 0 ) {\n\n $sMensagem = \"Ao selecionar Atividade Complementar como 'Exclusivamente', deve existir na escola\";\n $sMensagem .= \" uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( ( $oDadosEscola->registro10->atendimento_educacional_especializado == 1\n && $oDadosEscola->registro10->atividade_complementar == 2 )\n || ( $oDadosEscola->registro10->atividade_complementar == 1\n && $oDadosEscola->registro10->atendimento_educacional_especializado == 2 )\n ) {\n\n $sMensagem = \"Ao selecionar, ou Atendimento Educacional Especializado ou Atividade Complementar, como\";\n $sMensagem .= \" 'Não Exclusivamente', obrigatoriamente a outra opção não poderá ser marcada como\";\n $sMensagem .= \" 'Exclusivamente'.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 1 && $iTotalTurmaAEE == 0 ) {\n\n $sMensagem = \"Ao selecionar Atendimento Educacional Especializado como 'Não Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 1 && $iTotalTurmaAC == 0 ) {\n\n $sMensagem = \"Ao selecionar Atividade Complementar como 'Não Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 0 && $iTotalTurmaAEE > 0 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado marcado como 'Não Oferece', porém a escola possui\";\n $sMensagem .= \" turmas cadastradas para este tipo de atendimento.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 0 && $iTotalTurmaAC > 0 ) {\n\n $sMensagem = \"Atividade Complementa marcado como 'Não Oferece', porém a escola possui turmas\";\n $sMensagem .= \" cadastradas para este tipo de atendimento.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n return $lTodosDadosValidos;\n }", "public function validarArquivo(){\n\n if (empty($this->aRegistrosRetencao)) {\n throw new Exception( _M( self::MENSAGENS . 'erro_validar_arquivo') );\n }\n\n /**\n * Verificamos os registros e caso ocorra inconsistencia populamos o array de Registros inconsistentes\n */\n foreach ($this->aRegistrosRetencao as $oRegistroRetencao) {\n\n /**\n * Validamos se existe CGM cadastrado para o cnpj TOMADOR\n */\n if (CgmFactory::getInstanceByCnpjCpf($oRegistroRetencao->q91_cnpjtomador) == false) {\n\n $this->aRegistrosInconsistentes[] = array( \"sequencial_registro\" => $oRegistroRetencao->q91_sequencialregistro,\n \"registro\" => $oRegistroRetencao->q91_cnpjtomador,\n \"erro\" => self::TOMADOR_SEM_CGM );\n }\n }\n }", "public function testTiempoInvalido()\n {\n $tiempo = new TiempoFalso;\n $recargable = new Recargable();\n $medio = new Medio(0, $tiempo,$recargable);\n\t\t$saldoEsperado =0;\n\n $this->assertTrue($medio->recargar(1119.90));\t//Carga 1300.00\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado =$saldoEsperado+1300.00;\n\n $tiempo->avanzar(300);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado =$saldoEsperado-(32.50/2);\n\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado=$saldoEsperado-(32.50/2);\n\n $tiempo->avanzar(265);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(584);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n }", "public function testCargaSaldoInvalido()\n {\n $tiempo = new Tiempo;\n $recargable = new Recargable();\n $medio = new Medio(0, $tiempo,$recargable);\n $this->assertFalse($medio->recargar(15));\n $this->assertEquals($medio->obtenerSaldo(), 0);\n }", "function comprobar_FechaNacimiento()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->FechaNacimiento) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"FechaNacimiento\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"FechaNacimiento vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "public function validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }", "public function isValid()\n\t{\n\t\tif (empty($this->titre)) $this->titre = \"TITRE A REMPLACER\";\n\t\telse $this->titre = trim (preg_replace('/\\s+/', ' ', $this->titre) ); // Suppression des espaces\n\t\tif (!empty($this->contenu)) $this->contenu = trim (preg_replace('/\\s+/', ' ', $this->contenu) ); // Suppression des espaces\n\t\tif (empty($this->statut)) $this->statut = 0;\n\t\tif (empty($this->id_type)) $this->id_type = 1;\n\t\tif (empty($this->id_membre)) $this->id_membre = 0;\n\t}", "function validar_Validado()\n {\n\n $this->resource = 'Actividades';\n\n if ($this->no_vacio($this->validado) === false) {\n $this->code = '70032';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->es_validado($this->validado) === false) {\n $this->code = '70033';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "function comprobar_NUMINVENTARIOESPACIO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->NUMINVENTARIOESPACIO == null) || (strlen($this->NUMINVENTARIOESPACIO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"NUMINVENTARIOESPACIO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif((int)$this->NUMINVENTARIOESPACIO<=0){\n\t $mensajeError = array (\n \"nombreatributo\" => \"NUMINVENTARIOESPACIO\",\n \"codigoincidencia\" => \"00004\",\n \"mensajeerror\" => \"Valor de atributo numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif((int)$this->NUMINVENTARIOESPACIO>=99999999){\n\t $mensajeError = array (\n \"nombreatributo\" => 'NUMINVENTARIOESPACIO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[\\d]+$/\",$this->NUMINVENTARIOESPACIO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'NUMINVENTARIOESPACIO',\n \"codigoincidencia\" => \"00070\",\n \"mensajeerror\" => \"Solo se permiten números\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "function validar($reservah, $reservaf) {\n list($añor, $mesr, $diar) = split('[/.-]', $reservaf);\n list($horar, $minr) = split('[:]', $reservah);\n list($dia, $mes, $año) = $this->fecha();\n list($hora, $min, $mer) = $this->horario();\n\n $result = false;\n $hoy = false;\n\n //es una fecha valida?\n if (($añor >= $año) && ($mesr >= $mes) && ($diar >= $dia)) {\n //es hoy?\n if (($añor == $año) && ($mesr == $mes) && ($diar == $dia)) {\n $hoy = true;\n }\n if ($hoy) {\n //es hoy\n //verifico que sea una hora valida, y no una que ya pasó.\n if (($horar >= $hora) || ($horar == $hora && $minr > $min)) {\n $result = true;\n }\n } else {\n //es otro dia\n $result = true;\n }\n }\n return $result;\n }", "public function validar_reserva($a){\n\t\t$this->error = \"false\";\n\t\tswitch (true) {\n\t\t\tcase ( (strlen($a['estacionamiento']) == 0)):\n\t\t\t\t$this->msj = \"Ingrese estacionamiento.\";\n\t\t\t\tbreak;\n\t\t\tcase ( (strlen($a['fecha']) == 0)):\n\t\t\t\t$this->msj = \"Ingrese fecha.\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ModificarReserva($a);\n\n\t\t\t\t$this->error = \"true\";\n\t\t\t\t$this->msj = \"Reserva editado con exito.\";\n\t\t}\n\t\treturn $this->res;\n\t}", "function validar_Fecha()\n {\n $this->resource = 'Actividades';\n $fecha_menor = strtotime(\"2021-01-01 00:00:00\");\n $fecha_mayor = strtotime(\"2050-01-01 00:00:00\");\n $fecha_entrada = strtotime($this->fecha);\n\n if ($this->no_vacio($this->fecha) === false) {\n $this->code = '70027';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->formato_fecha($this->fecha) === false) {\n $this->code = '70028';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada > $fecha_mayor) {\n $this->code = '70029';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada < $fecha_menor) {\n $this->code = '70030';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "public static function validarDados( IExportacaoCenso $oExportacaoCenso ) {\n\n $lDadosValidos = true;\n $oExportacaoCenso = $oExportacaoCenso;\n $aDadosDocente = $oExportacaoCenso->getDadosProcessadosDocente();\n\n DadosCensoDocente2015::getGrauCurso();\n\n foreach( $aDadosDocente as $oDadosCensoDocente ) {\n\n $sDadosDocente = $oDadosCensoDocente->registro30->numcgm . \" - \" . $oDadosCensoDocente->registro30->nome_completo;\n $sDadosDocente .= \" - Data de Nascimento: \" . $oDadosCensoDocente->registro30->data_nascimento;\n\n $oRegistro30 = $oDadosCensoDocente->registro30;\n $oRegistro40 = $oDadosCensoDocente->registro40;\n $oRegistro50 = $oDadosCensoDocente->registro50;\n $aRegistro51 = $oDadosCensoDocente->registro51;\n\n if( !DadosCensoDocente2015::validacoesRegistro30( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $oRegistro40 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro40( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $oRegistro40 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro50( $sDadosDocente, $oExportacaoCenso, $oRegistro50, $oRegistro30 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro51( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $aRegistro51 ) ) {\n $lDadosValidos = false;\n }\n }\n\n return $lDadosValidos;\n }", "function ValidarFormularioNuevaReserva($DatosFotmulario = array()){\n\t\t$resultado = array();\n\n\t\t//Creaar un objeto de validacion\n\t\t$campo1 = new stdClass();\n\t\t$campo1->estado = false;\n\t\t$campo1->valor = '';\n\n\t\t$campo2 = new stdClass();\n\t\t$campo2->estado = false;\n\t\t$campo2->valor = '';\n\n\t\t$campo3 = new stdClass();\n\t\t$campo3->estado = false;\n\t\t$campo3->valor = '';\n\n\t\t$campo4 = new stdClass();\n\t\t$campo4->estado = false;\n\t\t$campo4->valor = '';\n\n\t\t$campo5 = new stdClass();\n\t\t$campo5->estado = false;\n\t\t$campo5->valor = '';\n\n\t\t$campo6 = new stdClass();\n\t\t$campo6->estado = false;\n\t\t$campo6->valor = '';\n\n\t\t$campo7 = new stdClass();\n\t\t$campo7->estado = false;\n\t\t$campo7->valor = '';\n\t\n\n\t\t//fechaInicio\n\t\tif($DatosFotmulario['fechaInicio'] != '')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$campo1->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio'];\n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo1->estado = false; //ok\n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\n\n\n\t\t//fechaFin\n\t\tif($DatosFotmulario['fechaFin'] != '')\n\t\t\t{\n\t\t\t\t$campo2->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin'];\n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo2->estado = false; //ok\n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\n\t\t\t \n\n\t\t//cantPersonas\n\t\tif($DatosFotmulario['cantPersonas'] != '')\n\t\t\t{\n\t\t\t\t$campo3->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas'];\n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo3->estado = false; //ok\n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas']; //guarda el valor vacio \n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\n\n\t\t//nombreT\n\t\tif($DatosFotmulario['nombreT'] != '')\n\t\t\t{\n\t\t\t\t$campo4->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT'];\n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo4->estado = false; //ok\n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT']; //guarda el valor vacio \n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\n\n\t\t//numHab\n\t\tif($DatosFotmulario['numHab'] != '')\n\t\t\t{\n\t\t\t\t$campo5->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab'];\n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo5->estado = false; //ok\n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab']; //guarda el valor vacio \n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\n\n\t\t//precioPorNoche\n\n\t\t\t\n\t\tif($DatosFotmulario['precioPorNoche'] != '' )\n\t\t\t{\n\t\t\t\t$campo6->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo6->valor = $DatosFotmulario['precioPorNoche'];\n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \t\t\t\t\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo6->estado6 = false; //ok\n\t\t\t\t$campo6->valor6 = $DatosFotmulario['precioPorNoche']; //guarda el valor vacio \n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \n\t\t\t}\n\n\t\t//documento\n\t\tif($DatosFotmulario['documento'] != '')\n\t\t\t{\n\t\t\t\t$campo7->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo7->valor = $DatosFotmulario['documento'];\n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo7->estado = false; //ok\n\t\t\t\t$campo7->valor = $DatosFotmulario['documento']; //guarda el valor vacio \n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\n\t\t\t\n $cont = 0;\n foreach ($resultado as $e){ \n if ($e->estado == false)\n $cont++;\n }\n\n if ($cont > 0) //Faltan campos\n return $resultado;\n else\n return array(); // Formulario OK \t\t\t\n\t}", "function fncValidaDI_46($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_46 = \"(46)Periodo de Pago Final\";\n\t$DI_46_ErrTam = \"Periodo de Pago Final ser de 8 Caracteres AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_46_noDI \t = \"Periodo de Pago Final no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_46_PerFinal = \"El perido final no puede ser menor al Periodo Inicial\";\t\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . $DI_46_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($LocCampo);\n\t\t\t$Fecha2 = date_create($Campo2);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a') )> CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . \n\t\t\t\t\t$DI_46_PerFinal.\"(\". $LocCampo . \")(\". $Campo2 .\")|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . $DI_46_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function fncValidaArchivo($IdEstado, $Path,$Archivo)\n{\n\t$TotalRegErr = CERO;\n \t$ContadorRegistros=UNO;\n \t\n \t$ContadorErrorDI = InicializaArray(80);\n\n \t$GestorArchivoErr = fopen($Path.$Archivo.\".err\", \"w\");\n \tif (!$GestorArchivoErr) \n\t{\n\t\techo \"Error al abrir archivo Error >>\".$Path.$Archivo.\".err\" .\"<<\";\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Path.$Archivo, \"r\");\n\t\tif ($GestorArchivo) \n\t\t{\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t$BanderaRegistr=0;\n\t\t // echo \"Resgistro >>\" . $Registro .\"<<\";\n\t\t $ArrRegistro = explode(\"|\",$Registro);\n\t\t $NumEmpl= $ArrRegistro[0];\n\t\t $NumFili= $ArrRegistro[1];\n\t\t $CURP= $ArrRegistro[2];\n\n\t\t $NombreEmpleado = $ArrRegistro[3];\n\t\t $BancoNvo= $ArrRegistro[SEIS];\n\t\t $NumCta = $ArrRegistro[SIETE];\n\t\t $CLABE= $ArrRegistro[OCHO];\n\t\t $CveSPC= $ArrRegistro[NUEVE];\n\t\t $UR= $ArrRegistro[14];\n\t\t $GF= $ArrRegistro[15];\n\t\t $Fun= $ArrRegistro[16];\n\t\t $SFun= $ArrRegistro[17];\n\t\t $PG= $ArrRegistro[18];\n\t\t $AI= $ArrRegistro[19];\n\t\t $PP= $ArrRegistro[20];\n\t\t $Ptda= $ArrRegistro[21];\n\t\t $Pto= $ArrRegistro[22];\n\t\t $NumPto= $ArrRegistro[23];\n\t\t $Edo= $ArrRegistro[24];\n\t\t $Mpio= $ArrRegistro[25];\n\t\t $CenRes= $ArrRegistro[26];\n\t\t $NSS= $ArrRegistro[27];\n\t\t $Pagdria= $ArrRegistro[28];\n\t\t $FteFin = $ArrRegistro[29];\n\t\t $TabPto = $ArrRegistro[30];\n\t\t $NIVEL = $ArrRegistro[31];\n\t\t $Rango = $ArrRegistro[32];\n\t\t $IndMando = $ArrRegistro[33];\n\t\t $Horario = $ArrRegistro[34];\n\t\t // el campo 36 queda libre\n\t\t $TipTra = $ArrRegistro[36];\n\t\t $NivSPC= $ArrRegistro[37];\n\t\t $IndStat= $ArrRegistro[38];\n\t\t $FecIng= $ArrRegistro[39];\n\t\t $FecIngSS= $ArrRegistro[40];\n\t\t $FecReIng= $ArrRegistro[41];\n\t\t\t\t$FecPag= $ArrRegistro[43];\n\n\t\t\t\t$PerPagIni= $ArrRegistro[44];\n\t\t\t\t$PerPagFin= $ArrRegistro[45];\n\t\t\t\t$PerAppIni= $ArrRegistro[46];\n\t\t\t\t$PerAppFin= $ArrRegistro[47];\n\n\t\t\t\t\n\n\t\t\t\t$QnaProReal= $ArrRegistro[48];\n\t\t\t\t$AnioProReal= $ArrRegistro[49];\n\n\t\t\t\t$TipoPago = $ArrRegistro[50];\n\t\t\t\t// no va (52) Instrumento de Pago Anterior (Libre) \n\t\t\t\t$IntrPagoNvo = $ArrRegistro[52];\n\t\t\t\t$Prpcns = $ArrRegistro[53];\n\t\t\t\t$Dedcns = $ArrRegistro[54];\n\t\t\t\t$Neto = $ArrRegistro[55];\n\t\t\t\t$NumTrail = $ArrRegistro[56];\n\t\t\t\t$NomProd = $ArrRegistro[58];\n\t\t\t\t$NumCtrl = $ArrRegistro[59];\n\t\t\t\t$NumCque = $ArrRegistro[60];\n\t\t\t\t// no hay regla 61\n\t\t\t\t$Jnda = $ArrRegistro[62];\n\t\t\t\t// no hay 63 Número de Días de Prima Dominical (Libre)\n\t\t\t\t$CicloFONAC = $ArrRegistro[64];\n\t\t\t\t$NumAportFONAC= $ArrRegistro[65];\n\t\t\t\t$AcumuladoFONAC= $ArrRegistro[66];\n\t\t\t\t// no hay 67 Número de faltas en la quincena (Libre)\n\t\t\t\t$LicCLUES = $ArrRegistro[68];\n\n\t\t\t\t$PorcPen1 = $ArrRegistro[69];\n\t\t\t\t$PorcPen2 = $ArrRegistro[70];\n\t\t\t\t$PorcPen3 = $ArrRegistro[71];\n\t\t\t\t$PorcPen4 = $ArrRegistro[72];\n\t\t\t\t$PorcPen5 = $ArrRegistro[73];\n\n\t\t\t\t$ElecTipRtro = $ArrRegistro[74];\t\t\t\t\n\t\t\t\t$TipUni = $ArrRegistro[75];\t\t\t\t\n\t\t\t\t$DescCR = $ArrRegistro[76];\t\t\t\t\n\n\t\t $ValidaError = fncValidaDI_1($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumEmpl);\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[UNO]++;\t\t \t\n\t\t\t\t}\n//break;\n\t\t\t\t$ValidaError = fncValidaDI_2($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumFili, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DOS]++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ValidaError = fncValidaDI_3($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CURP, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[TRES]++;\t\t \t\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_4($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_7($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $BancoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_8($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumCta);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[OCHO]++; \t\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_9($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CLABE);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_10($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CveSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_15($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $UR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_16($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $GF);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_17($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Fun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_18($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $SFun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_19($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PG);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_20($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $AI);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_21($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PP);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_22($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Ptda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_23($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_24($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_25($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Edo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_26($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Mpio);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_27($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CenRes);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_28($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_29($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pagdria);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_30($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FteFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_31($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TabPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_32($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NIVEL);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_33($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Rango);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_34($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndMando);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_35($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Horario);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t// campo 36 queda libre\n\n\t\t\t\t$ValidaError = fncValidaDI_37($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TipTra);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_38($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NivSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_39($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndStat);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_40($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_41($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIngSS, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_42($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecReIng,$FecIngSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_44($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecPag);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_45($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_46($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagFin, $PerPagIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_47($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppIni, $PerAppFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SIETE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_48($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppFin, $PerAppIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_49($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $QnaProReal);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_50($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AnioProReal,$PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_51($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipoPago);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_53($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $IntrPagoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_54($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Prpcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_55($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Dedcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_56($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Neto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_57($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumTrail);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_59($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NomProd);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_60($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCtrl);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_61($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCque);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + UNO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_63($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Jnda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_65($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $CicloFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_66($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumAportFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_67($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AcumuladoFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_69($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $LicCLUES );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_70($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen1 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_71($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen2 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_72($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen3);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_73($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen4);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_74($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen5);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_75($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $ElecTipRtro);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_76($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipUni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_77($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $DescCR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SIETE]++;\n\t\t\t\t}\n\t\t\n\t\t $ContadorRegistros++;\n\t\t }\n\n\t\t foreach ($ContadorErrorDI as &$valor) {\n \t\t\t\t \t\t$TotalRegErr = $TotalRegErr + $valor ;\n\t\t\t}\n /**\n\t\t if (!feof($GestorArchivo)) {\n\t\t echo \"Error: fallo inesperado de fgets()\\n\";\n\t\t $TotalRegErr=FALLA;\n\t\t }\n\t\t **/\n\t\t fclose($GestorArchivo);\n\t\t} // fin Gestor archivo de datos\n\t} //Fin if (!$GestorArchivoErr) \n\treturn $TotalRegErr;\n}", "function fncValidaDI_45($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_45 = \"(45)Periodo de Pago Inicial\";\n\t$DI_45_ErrTam = \"Periodo de Pago Inicial ser de 8 Caracteres AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_45_noDI \t = \"Periodo de Pago Inicial no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_45_PerFinal \t = \"Periodo de Pago Inicial no puede ser posterior a Periodo de Pago Final\";\t\t\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . $DI_45_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($LocCampo);\n\t\t\t$Fecha2 = date_create($Campo2);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a') )< CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . \n\t\t\t\t\t$DI_45_PerFinal .\"(\" .$LocCampo.\" )(\". $Campo2.\")|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . $DI_45_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function evt__validar_datos()\r\n\t{}", "public function testValidationFailsWithCorruptedBankAccount() {\n\t\t$bankAccount = $this->transaction->getDestinationBankAccount();\n\t\t$bankAccount->setNumber(null);\n\t\t$violations = Validator::validateMoneyTransferTransaction($this->transaction);\n\t\t$this->assertTrue(count($violations) === 1);\n\t\t$this->assertTrue(count($violations->get('destinationBankAccount')) === 1);\n\t}", "public function testCrearPrestamoEfectivo() {\n\n $value = [\n \t'tipo'=> ' Nueva Modena de Cambio _}'.date(\"Y-m-d H:i:s\"),\n\t\t'simbolo'=> 'SIMBOLO',\n\t\t'tasa'=> 7500,\n\t\t'divisa'=> true,\n ];\n $valid = Tipo::validador($value);\n $this->validarformulario($valid);\n $prestamo = Tipo::create($value);\n $this->assertNotEmpty($prestamo->id);\n\n $value = [\n \t'tipo'=> ' Nueva Modena de Cambio2'. date(\"Y-m-d H:i:s\"),\n\t\t\t'simbolo'=> 'SIMBOLO2',\n\t\t\t'tasa'=> 7500,\n\t\t\t'divisa'=> false,\n ];\n $valid = Tipo::validador($value);\n $this->validarformulario($valid);\n $prestamo = Tipo::create($value);\n $this->assertNotEmpty($prestamo->id);\n\n\n $value = [\n \t'tipo'=> null,\n\t\t\t'simbolo'=> null,\n\t\t\t'tasa'=> null,\n\t\t\t'divisa'=> null,\n ];\n $valid = Tipo::validador($value);\n $this->validarformularioError($valid);\n\n $this->assertSame(['Introduzca una nombre valido !'],$valid->errors()->get('tipo'));\n $this->assertSame(['Introduzca una nombre valido !'],$valid->errors()->get('simbolo'));\n $this->assertSame(['Ingrese la tasa'],$valid->errors()->get('tasa'));\n $this->assertSame(['seleccione si es o no divisa'],$valid->errors()->get('divisa'));\n\n }", "public function rangoValido()\r\n\t {\r\n\t \tif ( trim($this->fecha_desde) !== '' && trim($this->fecha_hasta) !== '' ) {\r\n\r\n\t \t\t$fDesde = date('Y-m-d', strtotime($this->fecha_desde));\r\n\t \t\t$fHasta = date('Y-m-d', strtotime($this->fecha_hasta));\r\n\r\n\t \t\tif ( (int)date('Y', strtotime($fDesde)) == (int)date('Y', strtotime($fHasta)) ) {\r\n\t \t\t\tif ( (int)date('m', strtotime($fDesde)) == (int)date('m', strtotime($fHasta)) ) {\r\n\t \t\t\t\tif ( (int)date('d', strtotime($fDesde)) > (int)date('d', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t} elseif ( (int)date('m', strtotime($fDesde)) > (int)date('m', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t}\r\n\r\n\t \t\t} elseif ( (int)date('Y', strtotime($fDesde)) < (int)date('Y', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\t \t\t}\r\n\t \t}\r\n\t }", "function validaNascimento($ano, $mes, $dia)\n{\n\n $dataCheck = $ano.'-'.$mes.'-'.$dia;\n if (checkdate($mes, $dia, $ano) && $dataCheck<=date('Y-m-d'))\n return true;\n else return false;\n}", "function fncValidaDI_29($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_29 = \"(29)Pagaduria\";\n\t$DI_29_ErrTam = \"Tamaño de campo Pagaduria debe ser a 5 Caracters\";\n\t$DI_29_Pgria \t = \"Pagaduria no corresponde las reglas de negocio establecidas por DGRH\";\n\t\n\t\n\t// agregar catalogo de Municpios\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == CINCO)\n\t{\n\t\tif(!preg_match(\"/[A-Za-z0-9]{5}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_29.\"|\".$LocCampo.\"|\" . $DI_29_Pgria.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_29.\"|\".$LocCampo.\"|\" . $DI_29_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function valid_codigo_barras_boletos($codigobarras, $tipo){\r\n\t$codigobarras = removeformat($codigobarras);\r\n\tif($tipo == \"B\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 10);\r\n\t\t$bloco2 = substr($codigobarras, 10, 11);\r\n\t\t$bloco3 = substr($codigobarras, 21, 11);\r\n\t\tif(strlen($bloco1) == 10){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 9));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 9, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($codigobarras) == 47){\r\n\t\t\t$bancofavorecido = substr($codigobarras, 0, 3);\r\n\t\t\t$moeda = substr($codigobarras, 3, 1);\r\n\t\t\t$fatorvencimento = substr($codigobarras, 33, 4);\r\n\t\t\t$valortitulo = substr($codigobarras, 37, 10);\r\n\t\t\t$campolivre = substr($codigobarras, 4, 5).substr($codigobarras, 10, 10).substr($codigobarras, 21, 10);\r\n\t\t\t$digitogeral = substr($codigobarras, 32, 1);\r\n\t\t\t$digitogeralcalculado = calcula_digito_mod11($bancofavorecido.$moeda.$fatorvencimento.$valortitulo.$campolivre);\r\n\t\t\t$valido = ($digitogeral == $digitogeralcalculado);\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}elseif($tipo == \"C\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 12);\r\n\t\t$bloco2 = substr($codigobarras, 12, 12);\r\n\t\t$bloco3 = substr($codigobarras, 24, 12);\r\n\t\t$bloco4 = substr($codigobarras, 36, 12);\r\n\t\tif(strlen($bloco1) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco1, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco2, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco3, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco4) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco4, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco4, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}else{\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function fncValidaDI_42($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_42 = \"(42)Fecha de Reingreso\";\n\t$DI_42_ErrTam = \"Fecha de Reingreso debe ser de 8 Digíto(AAAAMMDD (AAAA=año, MM=mes, DD=día))\";\n\t$DI_42_noDI \t = \"Fecha de Reingreso no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día))\";\n\t$DI_42_FecIng \t = \"Fecha de Reingreso no puede ser menor a Fecha de Ingreso al Gobierno Federal\";\n\t\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($Campo2);\n\t\t\t$Fecha2 = date_create($LocCampo);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a')) < CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_FecIng.\"|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function validaDatos(){\n\t\t\t\t\n\t\t\t\tif( $this->nombre == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su nombre por favor.</strong><br />\";\n\t\t\t\t\t}else if( strlen($this->nombre) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un nombre con menos caracteres. (20 caracteres maximo - sin espacios)</strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif( $this->email == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su email por favor.</strong><br />\";\n\t\t\t\t\t}else if( !preg_match($this->sintax,$this->email)){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese formato correcto de email</strong><br /> 'ej: nombre@dominio.com' .<br />\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->asunto == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su asunto por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->asunto) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un asunto con menos caracteres. (20 caracteres maximo - sin espacios) </strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\tif( $this->msj == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su mensaje por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->msj) > 200 ){\n\t\t\t\t\t$this->errores.= \"<strong>* Maximo permitido 200 caracteres. </strong><br />\";\n\t\t\t\t\t}\n\t\t\t}", "function comprobar_CODCENTRO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->CODCENTRO == null) || (strlen($this->CODCENTRO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->CODCENTRO)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->CODCENTRO)>10){\n\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\d-]+$/\",$this->CODCENTRO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00040\",\n \"mensajeerror\" => \"Solo están permitidas alfabéticos, números y el “-”\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "function fncValidaDI_51($IdEstado, $GestorErr, $NumReg, $Campo){\n\t \n\t$Bandera = CERO;\n\t$DI_51 = \"(51)Tipo de Pago\";\n\t$DI_51_ErrTam = \"Tipo de Pago ser de 1 digitos\";\n\t$DI_51_Catalogo = \"El valor no coincide con la directiva de calidad de la DGRH\";\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == UNO){\n\t\tif(!preg_match(\"/[0-8]{1}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_51.\"|\".$LocCampo.\"|\" . $DI_51_Catalogo.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse{\n\t\t$Error = $NumReg .\"|\".$DI_51.\"|\".$LocCampo.\"|\" . $DI_51_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function validar(){\n\t\tif($this->rest->_getRequestMethod()!= 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\n\t\t$request = json_decode(file_get_contents('php://input'), true);\n\t\t$facPgPedido = $request['factura_pagos_pedido'];\n\t\t#verificamos que el registro existe\n\t\t$this->db->where('nro_pedido', $facPgPedido['nro_pedido']);\n\t\t$this->db->where('id_factura_pagos', $facPgPedido['id_factura_pagos']);\n\t\t$this->db->where('concepto', $facPgPedido['concepto']);\n\n\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\tif($this->resultDb->num_rows() != null && \n\t\t\t\t\t\t\t\t\t\t\t\t$request['accion'] == 'create'){\n\t\t\t$this->responseHTTP['message'] =\n\t\t\t\t\t\t\t 'Ya existe un registro con el mismo identificador';\n\t\t\t$this->responseHTTP[\"appst\"] = 2300;\n\t\t\t$this->responseHTTP['data'] = $this->resultDb->result_array();\n\t\t\t$this->responseHTTP['lastInfo'] = $this->mymodel->lastInfo();\n\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t}else{\n\t\t#validamos la informacion\n\t\t\t$status = $this->_validData( $facPgPedido );\n\t\t\tif ($status['status']){\n\n\t\t\t\t#anulamos las fechas en blanco\n\t\t\t\t$facPgPedido['fecha_inicio'] = \n\t\t\t\t(empty($facPgPedido['fecha_inicio'])) ?\tnull : \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $facPgPedido['fecha_inicio'];\n\n\t\t\t\t$facPgPedido['fecha_fin'] = (empty($facPgPedido['fecha_fin'])) ? \n\t\t\t\t\t\t\t\t\t\t\tnull : $facPgPedido['fecha_fin'];\n\n\t\t\t\tif ($request['accion'] == 'create'){\n\t\t\t\t\t$this->db->insert($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['message'] = \n\t\t\t\t\t\t\t\t\t\t\t\t'Registro creado existosamente';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1200;\n\t\t\t\t\t$this->responseHTTP['lastInfo'] = \n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->mymodel->lastInfo();\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}else{\n\t\t\t\t\t$facPgPedido['last_update'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$this->db->where('id_factura_pagos_pedido',\n\t\t\t\t\t\t\t\t\t\t $request['id_factura_pagos_pedido']);\n\t\t\t\t\t$this->db->update($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['appst'] = 'Registro actualizado';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1300;\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->responseHTTP['message'] = 'Uno de los registros'.\n\t\t\t\t \t\t\t\t'ingresados es incorrecto, vuelva a intentar';\n\t\t\t\t$this->responseHTTP[\"appst\"] = 1400;\n\t\t\t\t$this->responseHTTP['data'] = $status;\n\t\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t\t}\n\t\t}\n\n\t}", "function comprobar_apellidos()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"apellidos vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) > 51)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"apellidos demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\tif (strlen($this->apellidos) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->apellidos))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"apellidos no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "private function valida_exedente(): bool|array\n {\n if (property_exists(object_or_class: 'calcula_imss', property: 'monto_uma')){\n return $this->error->error('Error no existe el campo monto_uma', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'sbc')){\n return $this->error->error('Error no existe el campo sbc', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'n_dias')){\n return $this->error->error('Error no existe el campo n_dias', $this);\n }\n\n if($this->monto_uma<=0){\n return $this->error->error('Error uma debe ser mayor a 0', $this->monto_uma);\n }\n if($this->sbc<=0){\n return $this->error->error('Error sbc debe ser mayor a 0', $this->sbc);\n }\n if($this->n_dias<=0){\n return $this->error->error('Error n_dias debe ser mayor a 0', $this->n_dias);\n }\n return true;\n }", "public function validarCargo() {\n if (!$this->getTexto('cargo')) {\n $this->_view->assign('_error', 'Debe introducir la descripcion del cargo');\n $this->_view->renderizar('nuevo_cargo', 'acl');\n exit;\n }\n }", "function valida_excel($archi){\n\nini_set(\"display_errors\",1);\nerror_reporting(E_ALL);\nrequire_once 'excel_reader2.php';\n$excel = new Spreadsheet_Excel_Reader($archi);\n //\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\n $cont = 0;\n $conta = 0;\n\t$no_conta = 0;\n\t$arre = \"\";\n\t$item_bueno=\"\";\n\t$item_malo=\"\";\n\t$cadena_buenos = \"\";\n\t$columnas =0;\n\n\t$formato = array(\"Hora de salida\",\"Numero de Grupo\",\"Fecha de incicio\",\"SAP ( Cliente)\",\"Pedido\",\"Kilos\",\"Economico\",\"Unidad Medida\",\"Fecha estimada\",\"Hora de Entrada\",\"Hora de Salida\",\"Comentarios\",\"Hora de Llegada\");\n\t$formato_actual = array();\t\n\t$bandera = true;\t\n\t$m = -1;\n\t\n\n for ($row=1;$row<2;$row++){\n \t for ($col=1;$col<=$excel->colcount();$col++) {\n \t\t $m = $m +1;\n \t\t if($excel->val($row,$col)!=\"\"){\n \t\t\t\t \t $formato_actual[$m] = strtoupper($excel->val($row,$col));\n \t\t\t\t\t $columnas = $columnas +1; \n \t\t\t\t}else{\n\t\t\t\t\t break;\n\t\t\t\t}\n \t\t }\n }\n\n\t \n if($columnas == count($formato)){\n // Echo \"formato completo\";\n \t for ($col=0;$col<count($formato_actual);$col++) {\n \t \n \t if(in_array($formato_actual[$col],$formato)){\n \t\t\t\t if( $formato_actual[$col] == $formato[$col]){\n\t\t\t\t\t // echo ' no estan en la misma posicion <b style=\"color:#00ff00;\">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />';\n\t\t\t\t\t\t\t $bandera = true;\n\t\t\t\t\t }else{\n\t\t\t\t\t // echo ' La posicion de las columnas no es correcta <b style=\"color:#993300;\">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />';\n\t\t\t\t\t\t\t $bandera = false;\n \t\t\t\t break;\n\t\t\t\t\t }\n \t\t\t }else{\n \t\t\t\t //echo \"segun este \".$formato_actual[$col].'<br />';\n \t\t\t\t\t $bandera = false;\n \t\t\t\t break;\n \t\t\t }\n \t\t}\n \t\n }else{\n \t$bandera = false;\n }\n\n\n\nreturn $bandera;\n}", "function ValidarFechas($fechaIngreso, $fechaInicio){\n\t// $fechaInicio = formatDateSeparador(\"d/m/Y\", $fechaInicio, '-' );\t\t\n\t\n\t// date_format($fechaInicio,\"d/m/Y\");\t\n\tif( !isFechaValida($fechaIngreso) ) return 'Fecha Ingreso Invalida '.$fechaIngreso;\n\tif( !isFechaValida($fechaInicio) ) return 'Fecha Inicio Invalida '.$fechaInicio;\n\t\n\t$dias = dateDiff($fechaIngreso, $fechaInicio);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser mayor/igual a la fecha de Ingreso a la empresa. ';\n\t\n\t$hoy = date(\"d/m/Y\");\n\t$dias = dateDiff($fechaInicio, $hoy);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser menor/igual a la fecha actual. ';\n\t\n\treturn '';\n\t\n}", "function __validFecha2($fecha){\n $test_arr = explode('-', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[2], $test_arr[0])) {//YEAR / MES / DIA\n return true;\n }\n return false;\n }\n return false;\n }", "public static function validarFecha($fecha, $fechaMaxima = '01/01/2200', $fechaMinima = \"01/01/1900\", $obligatorio = 0) { //REDISEÑO TOTAL Y AÑADIDOS PARAMETROS INICIALES\r\n $mensajeError = null;\r\n $fechaMaxima = strtotime($fechaMaxima); //PASAR A TIMESTAMP PARA PODER OPERAR\r\n $fechaMinima = strtotime($fechaMinima);\r\n if ($obligatorio == 1) {\r\n $mensajeError = self::comprobarNoVacio($fecha);\r\n }\r\n $fechaFormateada = strtotime($fecha); //CREAR FECHA PARA TRABAJAR CON LAS FUNCIONES DE PHP\r\n\r\n if (is_bool($fechaFormateada) && !empty($fecha)) {\r\n $mensajeError = \" Formato incorrecto de fecha (Año-Mes-dia) (2000-01-01).\";\r\n } else {\r\n if(!empty($fecha) && ($fechaFormateada < $fechaMinima) || ($fechaFormateada > $fechaMaxima)){\r\n $mensajeError = \" Por favor introduzca una fecha entre \" . date('d/m/Y', $fechaMinima) . \" y \" . date('d/m/Y', $fechaMaxima) . \".\";\r\n }\r\n }\r\n return $mensajeError;\r\n }", "function fncValidaDI_44($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_44 = \"(44)Fecha de Pago\";\n\t$DI_44_ErrTam = \"Fecha de Pago debe ser de 9 Caracteres(DDMMMAAAA (AAAA=año, MM=mes(primeras 3 letras), DD=día))\";\n\t$DI_44_noDI \t = \"Fecha de Pago no corresponde al formato establecido por DGRH(DDMMMAAAA DD=día, MM=mes(primeras 3 letras), AAAA=año)\";\n\t$DI_44_FecIng \t = \"Fecha de Pago no puede ser menor a Fecha de Ingreso al Gobierno Federal\";\n\t$MesValido=array(\"ENE\",\"FEB\",\"MAR\",\"ABR\",\"MAY\",\"JUN\",\"JUL\",\"AGO\",\"SEP\", \"OCT\",\"NOV\",\"DIC\");\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == NUEVE)\n\t{\n\t\t$Dia =substr($LocCampo,0,2);\n\t\t$Mes =substr($LocCampo,2,3);\n\t\t$Anio=substr($LocCampo,5,4);\n\t\t$Resultado = array_search(strtoupper($Mes), $MesValido);\t\t\n\t\tif (strlen($Resultado) <= 0)\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_44.\"|\".$LocCampo.\"|\" . $DI_44_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\n\t\t}\t\n\t\t$Fecha =$Anio.str_pad(((int) $Resultado) +1,2,\"0\",STR_PAD_LEFT).$Dia;\n\n\t\tif(!validateDate($Fecha))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_44.\"|\".$LocCampo.\"|\" . $DI_44_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_44.\"|\".$LocCampo.\"|\" . $DI_44_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function fncValidaDI_9($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = 0;\n\n\t$DI_9 = \"(9)Clave del Banco (CLABE)\";\n\t$DI_9_ErrTam = \"Tamaño de Clave del Banco (CLABE) debe ser 18 dígitos\";\n\t$DI_9_NumCta = \"No cumple con Directiva debe ser 18 digitos\";\n\n\t\n\n /** Quita caracteres especiales **/\n\t//$LocCampo =preg_replace('/[^A-Za-z0-9\\-]/', '', $Campo);\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == 18)\n\t{\n\t\tif(!preg_match (\"/\\d{18}/\" ,$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_8.\"|\".$LocCampo.\"|\" . $DI_8_NumCta.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_9.\"|\".$LocCampo.\"|\" . $DI_9_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = 1;\n\t}\n\treturn $Bandera;\n}", "function ValidarExpedienteNroYearSecretaria($nroInstancia, $NroExpediente, $AnioExpediente, $Secretaria){\n try{\n\t\tglobal $conn; \n\t\tif(!isset($NroExpediente)){$NroExpediente = '';} \n\t\tif(!isset($AnioExpediente)){$AnioExpediente = '';}\n\t\t\n\t\t$sql = \"SELECT 1\n\t\t\t\t\tFROM legales.ljt_juicioentramite\n\t\t\t\t\tWHERE jt_estadomediacion = 'J'\n\t\t\t\t\tAND jt_idestado <> 3\n\t\t\t\t\tAND NVL2 (jt_anioexpediente,jt_nroexpediente || '/' || jt_anioexpediente,jt_nroexpediente) = \n\t\t\t\t\ttrim(:NroExpediente || '/' || :AnioExpediente)\n\t\t\t\t\tAND jt_idsecretaria = :Secretaria\n\t\t\t\t\tAND JT_ID <> :nroInstancia\n\t\t\t\t\tAND ROWNUM = 1\";\n\n\t\t$params = array(\n\t\t\t\t\t\":nroInstancia\" => $nroInstancia,\n\t\t\t\t\t\":Secretaria\" => $Secretaria,\n\t\t\t\t\t\":NroExpediente\" => $NroExpediente,\n\t\t\t\t\t\":AnioExpediente\" => $AnioExpediente);\n\t\t\n\t\t$result = ValorSql($sql, \"\", $params);\n\t\t//$result = 1;\n\t\t\n\t\tif($result == 1){\n\t\t\t//throw new Exception(\"Nro Expediente \".$NroExpediente.\"/\".$AnioExpediente.\", ya existe en la Secretaria \".$Secretaria.\".\");\n\t\t\tthrow new Exception(\"Expediente ya existente. \".$nroInstancia);\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n }catch (Exception $e) {\n DBRollback($conn); \n\t\tErrorConeccionDatos($e->getMessage());\n\t\treturn false;\n } \t\t\t\t\n}", "public function testarCarregamentoArquivo() {\n\n\n $this->oLog->escreverLog(\"#######################################\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"Testando Registro importados do Arquivo\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"#######################################\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"\", DBLog::LOG_INFO);\n\n $oHeader = $this->oCabecalhoArquivo;\n\n $lAnoVazio = empty($oHeader->iAnoArquivo);\n $lMesVazio = empty($oHeader->iMesArquivo);\n $lDiaVazio = empty($oHeader->iDiaArquivo);\n $lNomeValido = empty($oHeader->sNomeArquivo);\n\n\n if ( $lAnoVazio || $lMesVazio || $lDiaVazio || $lNomeValido ) {\n\n $sErro = \"CABECALHO DO ARQUIVO INCONSISTENTE\";\n $this->oLog->escreverLog($sErro, DBLog::LOG_ERROR);\n\n if ( $lAnoVazio ) {\n $this->oLog->escreverLog(\" ANO VAZIO\", DBLog::LOG_ERROR);\n }\n if ( $lMesVazio ) {\n $this->oLog->escreverLog(\" MES VAZIO\", DBLog::LOG_ERROR);\n }\n if ( $lDiaVazio ) {\n $this->oLog->escreverLog(\" DIA VAZIO\", DBLog::LOG_ERROR);\n }\n if ( $lNomeValido ) {\n $this->oLog->escreverLog(\" NOME DO LOTE VAZIO OU DIFERENTE DO NOME DO ARQUIVO\", DBLog::LOG_ERROR);\n }\n return false;\n }\n\n $this->oLog->escreverLog(\"CABECALHO DO ARQUIVO SEM PROBLEMAS\", DBLog::LOG_INFO);\n\n\n /**\n * Testando Registros\n */\n $iTotalRegistros = $this->iRegistrosArquivo;\n\n if ( $this->oRodapeArquivo->iQuantidadeRegistros <> $iTotalRegistros ) {\n\n $this->oLog->escreverLog(\"Quantidade de Registros do Arquivo: {$iTotalRegistros}, Diferente da Quantidade Informada: {$this->oRodapeArquivo->iQuantidadeRegistros}\", DBLog::LOG_ERROR);\n return false;\n }\n \n \n $this->oLog->escreverLog(\"\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"Total de Registros: {$iTotalRegistros}\", DBLog::LOG_INFO);\n\n /**\n * Percorrendo registros e os validando\n */\n foreach ( $this->aRegistrosArquivo as $iCodigoRegistro => $oRegistro ) {\n\n $iLinha = $iCodigoRegistro + 2;//Linha + Linha Cabecalho + Array que começa em 0(zero)\n $sSequencial = trim( $oRegistro->sSequencial );\n $sCodigoLogradouro = trim( $oRegistro->iCodigoLogradouro );\n $sNomeLogradouro = trim( $oRegistro->sNomeLogradouro );\n\n $lSequencialVazio = empty( $sSequencial ); \n $lCodigoLogradouroVazio = empty( $sCodigoLogradouro );\n $lNomeLogradouroVazio = empty( $sNomeLogradouro );\n\n if ( $lSequencialVazio || $lCodigoLogradouroVazio || $lNomeLogradouroVazio ) {\n\n $this->oLog->escreverLog(\"[{$oHeader->sNomeArquivo}:$iLinha] - Removendo registro inconsistente da Fila de Processamento\", DBLog::LOG_NOTICE);\n if ( $lSequencialVazio ) {\n $this->oLog->escreverLog(\" Sequencial do Registro Vazio\", DBLog::LOG_NOTICE);\n }\n\n if ( $lCodigoLogradouroVazio ) {\n $this->oLog->escreverLog(\" Codigo do Logradouro Vazio \", DBLog::LOG_NOTICE);\n }\n\n if ( $lNomeLogradouroVazio ) {\n $this->oLog->escreverLog(\" Nome do Logradouro Vazio\", DBLog::LOG_NOTICE);\n }\n\n unset( $this->aRegistrosArquivo[$iCodigoRegistro] );\n continue;\n }\n\n\n /**\n * Definindo o Tipo de Logradouro atraves da Sigla\n */\n $oRegistro->iTipoLogradouro = $this->getTipoLogradouro($oRegistro->iTipoLogradouro);\n }\n $this->oLog->escreverLog(\"#######################################\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\" Teste Finalizado com Sucesso. \", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"#######################################\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"\", DBLog::LOG_INFO);\n $this->oLog->escreverLog(\"\", DBLog::LOG_INFO);\n return true;\n }", "function fecha_entrega($fecha_entrega)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\tif($fecha_entrega < $fecha_valida)\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_entrega', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function validateDataInvoice(): void\n {\n $this->validarDatos($this->datos, $this->getRules('fe'));\n\n $this->validarDatosArray($this->datos->arrayOtrosTributos, 'tributos');\n\n /** @phpstan-ignore-next-line */\n if (property_exists($this->datos, 'arraySubtotalesIVA')) {\n $this->validarDatosArray((array) $this->datos->arraySubtotalesIVA, 'iva');\n }\n\n $this->validarDatosArray($this->datos->comprobantesAsociados, 'comprobantesAsociados');\n\n if ($this->ws === 'wsfe') {\n if (property_exists($this->datos, 'arrayOpcionales')) {\n $this->validarDatosArray((array) $this->datos->arrayOpcionales, 'opcionales');\n }\n } elseif ($this->ws === 'wsmtxca') {\n $this->validarDatosArray($this->datos->items, 'items');\n }\n }", "function validaAbrirCaptura(){\n return true;\n }", "function validacao($post, &$erro){\n $array = array('nome_autor','sobrenome_autor');\n //FOREACH PERCORRERÁ O ARRAY...\n foreach($array as $campo){\n //VERIFICARÁ SE CAMPOS EXISTEM...\n if(isset($post[$campo])){\n //E SE ESTÃO VAZIOS...\n if(!empty($post[$campo])){\n //DEPOIS VERIFICARÁ SE CAMPOS FORAM PREENCHIDOS DE FORMA CORRETA...\n switch($campo){\n case 'nome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n echo 'erro na validacao do campo ' . $campo;\n $erro[$campo] = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n case 'sobrenome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n $erro = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n default:\n break;\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }\n \n if(empty($erro)){\n return true;\n }else{\n return false;\n }\n \n\t}", "function validateProveidor() {\n $validation = new Validation(true, '');\n $patroLletres = \"/^[\\A-Za-z]+$/i\";\n\n if ($validation->getOk() && trim($this->getNom()) == '') {\n $validation->setMsg(\"El nom no pot està buit.\");\n $validation->setOK(false);\n }\n if ($validation->getOk() && !preg_match($patroLletres, trim($this->getNom()))) {\n $validation->setMsg(\"El nom només pot ser alfabètic.\");\n $validation->setOK(false);\n }\n\n if ($validation->getOk() && trim($this->getCodi()) == '') {\n $validation->setMsg(\"El codi no pot està buit.\");\n $validation->setOK(false);\n }\n\n return $validation;\n }", "function fncValidaDI_49($IdEstado, $GestorErr, $NumReg, $Campo){\n\t \n\t$Bandera = CERO;\n\n\t$DI_49 = \"(49)Quincena de Proceso Real\";\n\t$DI_49_ErrTam = \"Quincena de Proceso Real ser de 2 digitos\";\n\t$DI_49_Qna \t = \"La quincena no corresponde a la Directiva de Calidad deifinida por la DGRH(01-24)\";\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == DOS){\n\n\t\tif((int)$LocCampo <1 and (int)$LocCampo > 24){\n\t\t\t$Error = $NumReg .\"|\".$DI_49.\"|\".$LocCampo.\"|\" . $DI_49_Qna.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\n\t}\n\telse{\n\t\t$Error = $NumReg .\"|\".$DI_49.\"|\".$LocCampo.\"|\" . $DI_49_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function transfer_validation() {\n global $pesan_error; //memanggil global variabel penampungan pesan error\n $cek_saldo = info_rekening($_POST['nomor-rekening'])['saldo']; //mengecek saldo dengan memanggil fungsi info rekening dan diambil index saldo\n //jika ternyata berniai false, dipastikan rekening tidak valid, atau dianggap belum memilih\n if ($cek_saldo==false) $pesan_error['nomor-rekening'] = 'Anda belum memilih rekening';\n global $conn;//memanggil koneksi di global\n //melakukan select di tabel rekening berdasarkan rekening tujuan\n $q = $conn->prepare(\"SELECT * FROM rekening WHERE nomor_rekening='{$_POST['nomor-rekening-tujuan']}' AND aktif='1'\");\n $q->execute();\n @$tmp = $q->fetchAll();\n if ($tmp) { //mengecek jika tmp bernilai true/ada datanya\n //validasi jika melakukan transfer ke nomor rekeningnya sendiri\n if ($tmp[0]['nama_pengguna']==pengguna()['nama_pengguna']) $pesan_error['nomor-rekening-tujuan'] = 'Tidak dapat transfer ke rekening anda sendiri';\n //jika tmp bernilai false, berarti memang tidak ada data rekning tersebut/tidak valid\n } else $pesan_error['nomor-rekening-tujuan'] = 'Nomor rekening tidak valid';\n //pengecekan jika nominalnya dibawah 1 alias 0\n if ($_POST['nominal'] < 1) $pesan_error['nominal'] = 'Nominal harus lebih dari 0';\n validasi_masukan_numerik($pesan_error, 'nominal'); //validasi numerik untuk nominal\n validasi_masukan_wajib($pesan_error, 'nominal'); //nominal dengan validasi wajib dimasukkan\n //pengecekan jika sudah tidak ada pesan error untuk rekening dan nominal\n if (!isset($pesan_error['nominal']) & !isset($pesan_error['nomor-rekening'])) {\n //dicek lagi untuk saldi setelah dikurangi nominal transfer jika dibawah angka 0\n if ($cek_saldo-$_POST['nominal'] < 0) $pesan_error['nominal'] = 'Saldo tidak cukup';\n }\n validasi_masukan_wajib($pesan_error, 'nomor-rekening-tujuan'); //masukan wajib untuk rekening tujuan\n if (!empty($pesan_error)) return; //jika ada pesan error, return sampai disini, ke bawahnya tidak diproses\n if (!isset($_POST['konfirmasi-transfer'])) return; //sama\n $id = generate_id('transaksi', 'id'); //menanggil fungsi generate id pada tabel transaksi kolom id\n //menyimpan data transaksi ke tabel dengan waktu sekarang\n $q = $conn->prepare(\"INSERT INTO transaksi VALUES ('$id', CURRENT_TIMESTAMP, '1', '{$_POST['nomor-rekening']}', '{$_POST['nomor-rekening-tujuan']}', '{$_POST['nominal']}')\");\n $q->execute();\n}", "function _validarFecha($valor) {\n if (! ($tiempo = strtotime($valor))) return false; \n $d = date('Y-m-d H:i:s', $tiempo);\n $datetime = explode(' ', $d);\n if ('00:00:00' == $datetime[1]){\n return $datetime[0];\n } else {\n return $d;\n }\n }", "function fncValidaDI_31($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_31 = \"(31)Tabulador de Puesto\";\n\t$DI_31_ErrTam = \"Tamaño de campo Tabulador de Puesto debe ser de 3 Digítos\";\n\t$DI_31_noDI \t = \"Tabulador de Puesto no corresponde las Directivas Institucionales establecidas por DGRH\";\n\t\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == TRES)\n\t{\n\t\tif(!preg_match(\"/[0-9]{3}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_31.\"|\".$LocCampo.\"|\" . $DI_31_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_31.\"|\".$LocCampo.\"|\" . $DI_31_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "private function validarPUT(){\n parse_str(file_get_contents(\"php://input\"),$post_vars);\n $IO = ValidacaoIO::getInstance();\n $es = array();\n $ps = array();\n \n # Criando variáveis dinamicamente, e removendo possiveis tags HTML, espaços em branco e valores nulos:\n foreach ($post_vars as $atributo => $valor){\n \t $ps[$atributo] = trim(strip_tags($valor));\n \t$es = $IO->validarConsisten($es, $valor);\n }\n \n # Verificando a quantidade de parametros enviados:\n $es = $IO->validarQuantParam($es, $ps, 5);\n \n # Validar status fornecido:\n $es = $IO->validarStatusAnuncio($es, $ps['status']);\n \n # Validar codigo de anuncio fornecido:\n $prestadorBPO = unserialize($_SESSION['objetoUsuario']);\n // $es = $IO->validarAnuncio($es, $ps['codigoAnuncio']);\n \n $es = $IO->validarDonoAnuncio($es, $prestadorBPO->getCodigoUsuario(), $ps['codigoAnuncio']);\n \n # Se existir algum erro, mostra o erro\n $es ? $IO->retornar400($es) : $this->retornar200($ps);\n }", "public function validar($estado);", "function comprobar_CODEDIFICIO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->CODEDIFICIO == null) || (strlen($this->CODEDIFICIO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"CODEDIFICIO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->CODEDIFICIO)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"CODEDIFICIO\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->CODEDIFICIO)>10){\n\t $mensajeError = array (\n \"nombreatributo\" => 'CODEDIFICIO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\d-]+$/\",$this->CODEDIFICIO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'CODEDIFICIO',\n \"codigoincidencia\" => \"00040\",\n \"mensajeerror\" => \"Solo están permitidas alfabéticos, números y el “-”\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "public function validate()\n {\n // FUTURE FIXME: no se deberia retornar un simple true/false, sino que \n // si una condicion no se cumple deberia devolverse un mensaje \n // indicando qué no se ha cumplido, posiblemente usando una excepcion \n // para cada caso, para que el controlador la capture y muestre el \n // mensaje adecuado a la vista y no un simple mensaje de error \n // generico.\n\n // name solo puede tener letras, números y guiones\n if (!filter_var($this->name, FILTER_VALIDATE_REGEXP, [\"options\" => [\"regexp\" => \"/[a-zA-Z0-9\\-]+/\"]]))\n return false;\n\n // descrpicion debe limpiarse para prevenir ataques XSS\n $this->description = filter_var($this->description, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n // nombre debe tener como minimo 4 caracteres y como maximo 255\n if (strlen($this->name) <4 || strlen($this->name) > 255)\n return false;\n\n // estado debe ser \"pendiente\", \"subasta\" o \"venta\" exclusivamente\n if ($this ->state !== \"pendiente\" && $this->state !== \"subasta\" && $this->state !== \"venta\")\n return false;\n\n // el propietario debe existir como usuario en la BD\n $user = new User($this->owner);\n if (!$user->fill()) return false;\n\n // todas las condiciones se han cumplido, retorna true\n return true;\n }", "public function isValid() {\n\n foreach ($this->entity as $nameColumn => $column) {\n\n $validate = null;\n // Se for chave primaria e tiver valor, valida inteiro somente sem nenhuma outra validacao.\n if ($column['contraint'] == 'pk' && $column['value']) {\n $validate = new Zend_Validate_Digits();\n } else {\n\n//______________________________________________________________________________ VALIDANDO POR TIPO DA COLUNA NO BANCO\n // Se tiver valor comeca validacoes de acordo com o tipo.\n // Se nao pergunta se é obrigatorio, se for obrigatorio valida.\n if ($column['value']) {\n // Se for inteiro\n if ($column['type'] == 'integer' || $column['type'] == 'smallint') {\n $validate = new Zend_Validate_Digits();\n // Se for data\n } else if ($column['type'] == 'numeric') {\n $column['value'] = str_replace('.', '', $column['value']);\n $column['value'] = (float) str_replace(',', '.', $column['value']);\n $validate = new Zend_Validate_Float();\n } else if ($column['type'] == 'date') {\n\n\t\t\t\t\t\t$posBarra = strpos($column['value'], '/');\n\t\t\t\t\t\t$pos = strpos($column['value'], '-');\n\t\t\t\t\t\tif ($posBarra !== false) {\n\t\t\t\t\t\t\t$date = explode('/', $column['value']);\n\t\t\t\t\t\t\tif (!checkdate($date[1], $date[0], $date[2])) {\n\t\t\t\t\t\t\t\t$this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($pos !== false) {\n\t\t\t\t\t\t\t$date = explode('-', $column['value']);\n\t\t\t\t\t\t\tif (!checkdate($date[1], $date[2], $date[0])) {\n\t\t\t\t\t\t\t\t$this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n // Se for texto\n } else if ($column['type'] == 'character' || $column['type'] == 'character varying') {\n\n // Se for Bollean\n } else if ($column['type'] == 'boolean') {\n\n // Se for texto\n } else if ($column['type'] == 'text') {\n \n } else if ($column['type'] == 'timestamp without time zone') {\n if (strpos($column['value'], '/')) {\n\n if (strpos($column['value'], ' ')) {\n $arrDate = explode(' ', $column['value']);\n\n // Validando a data\n $date = explode('/', $arrDate[0]);\n if (!checkdate($date[1], $arrDate[0], $date[2])) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($arrDate[0] . self::MSG_DATA_INVALIDA));\n }\n\n // Validando a hora\n $validateTime = new Zend_Validate_Date('hh:mm');\n $validateTime->isValid($arrDate[1]);\n if ($validateTime->getErrors()) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($arrDate[1] . self::MSG_DATA_HORA_INVALIDA));\n }\n } else {\n // Validando a data\n $date = explode('/', trim($column['value']));\n if (!checkdate($date[1], $date[0], $date[2])) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n }\n }\n }\n }\n\n//______________________________________________________________________________ VALIDANDO POR LIMITE DA COLUNA NO BANCO\n // Validando quantidade de caracteres.\n if ($column['maximum']) {\n $validateMax = new Zend_Validate_StringLength(array('max' => $column['maximum']));\n $validateMax->isValid($column['value']);\n if ($validateMax->getErrors()) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => (reset($validateMax->getMessages())));\n }\n $validateMax = null;\n }\n } else {\n//______________________________________________________________________________ VALIDANDO POR NAO VAZIO DA COLUNA NO BANCO\n // Validando se nao tiver valor e ele for obrigatorio.\n if ($column['is_null'] == 'NO' && $column['contraint'] != 'pk') {\n $validate = new Zend_Validate_NotEmpty();\n }\n }\n\n//______________________________________________________________________________ VALIDANDO A CLOUNA E COLOCANDO A MENSAGEM\n if ($validate) {\n $validate->isValid($column['value']);\n if ($validate->getErrors()) {\n\t\t\t\t\t\t$msg = $validate->getMessages();\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ( reset($msg) ));\n }\n\n $validate = null;\n }\n }\n }\n\t\t\n if ($this->error)\n return false;\n else\n return true;\n }", "function check()\n {\n if (trim($this->monto) == '') {\n $this->setError(JText::_('Debe Ingresar Un Monto a Pagar'));\n return false;\n }\n\n return true;\n }", "public function guardaMovimiento($movimiento, $descripcion, $tabla, $idTabla, $nombre, $unidades, $costoUnidad, $ordenSalida )\r\n {\r\n\t$fecha=date(\"Y-m-d\");\r\n\t$hora=date(\"h:i:s\");\r\n\t$descripcion=\"$_SESSION[nombre] $_SESSION[apellido] siendo las $hora a escrito: \".$descripcion;\r\n\t$reg=mysql_query(\"select * from $this->tabla WHERE $this->ID=$idTabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\t$sql=\"INSERT INTO `$this->database`.`$this->tablaMovInv` ( `Movimiento`, `Fecha`, `Descripcion`, `TablaInv` , `idTablaInv`,`Nombre`, `Unidades`, `CostoUnidad`,`OrdenesSalida_idOrdenesSalida`) \r\n\tVALUES ('$movimiento', '$fecha', '$descripcion', '$tabla', '$idTabla', '$nombre', '$unidades', '$costoUnidad', '$ordenSalida')\";\r\n\t\r\n\tmysql_query($sql, $this->con) or die('no se pudo registrar el movimiento: ' . mysql_error());\t\r\n\treturn(1);\r\n\t\r\n\t}", "function fncValidaDI_37($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_37 = \"(37)Tipo de Trabajador\";\n\t$DI_37_ErrTam = \"Tipo de Trabajador debe ser de 2 Digítos\";\n\t$DI_37_noDI \t = \"Tipo de Trabajador no corresponde al catalogo establecidas por DGRH(01,11,20)\";\n\t\n\t\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == DOS)\n\t{\n\t\tif(!preg_match(\"/[0-9]{2}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_37.\"|\".$LocCampo.\"|\" . $DI_37_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_37.\"|\".$LocCampo.\"|\" . $DI_37_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function fncValidaDI_35($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_35 = \"(35)Horario Asignado\";\n\t$DI_35_ErrTam = \"Horario Asignado debe ser de 1 Digítos\";\n\t$DI_35_noDI \t = \"Horario Asignado no corresponde al catalogo establecidas por DGRH(1-8)\";\n\t\n\t\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == UNO)\n\t{\n\t\tif(!preg_match(\"/[1-8]{1}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_35.\"|\".$LocCampo.\"|\" . $DI_35_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_35.\"|\".$LocCampo.\"|\" . $DI_35_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function validar_datos() {\n\t\t\tglobal $nombre, $mail, $apellido, $psw, $psw1, $telefono, $desc;\n\n\t\t\t$errores = 0;\n $msj = \"\"; \n\t\t\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t\t{\t\t\t\t\n\t\t\t\t if ($nombre == null || trim($nombre)==\"\")\n\t\t\t\t {\n\t\t\t\t\t$msj .= \"Debe ingresar un nombre\" . '\\n';\n\t\t\t\t\t$errores++;\n\t\t\t\t }\n\t\t\t\t if ($errores == 0)\n \t\treturn true;\n \t\t else\n\t\t\t\t\techo \"<script language='javascript'>alert('$msj');window.location.href='abm_marcas.php'</script>\";\n\t\t\t\t\texit; \t\t\n\t\t\t}\t\t\n\t\t}", "public function alterar(){\r\n // recebe dados do formulario\r\n $post = DadosFormulario::formularioCadastroSicasEspecialidadeMedica(2);\r\n // valida dados do formulario\r\n $oValidador = new ValidadorFormulario();\r\n if(!$oValidador->validaFormularioCadastroSicasEspecialidadeMedica($post, 2)){\r\n $this->msg = $oValidador->msg;\r\n return false;\r\n }\r\n // cria variaveis para validacao com as chaves do array\r\n foreach($post as $i => $v) $$i = utf8_encode($v);\r\n \r\n // cria objeto para grava-lo no BD\r\n $oSicasEspecialidadeMedica = new SicasEspecialidadeMedica($cd_especialidade_medica, $nm_especialidade, $status);\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n if(!$oSicasEspecialidadeMedicaBD->alterar($oSicasEspecialidadeMedica)){\r\n $this->msg = $oSicasEspecialidadeMedicaBD->msg;\r\n return false;\r\n }\r\n return true;\r\n }", "public function DataIsValid()\n {\n $bDataIsValid = parent::DataIsValid();\n if ($this->HasContent() && $bDataIsValid) {\n if (intval($this->data) < 12 && intval($this->data) >= -11) {\n $bDataIsValid = true;\n } else {\n $bDataIsValid = false;\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sFieldTitle = $this->oDefinition->GetName();\n $oMessageManager->AddMessage($sConsumerName, 'TABLEEDITOR_FIELD_TIMEZONE_NOT_VALID', array('sFieldName' => $this->name, 'sFieldTitle' => $sFieldTitle));\n }\n }\n\n return $bDataIsValid;\n }", "public function retraitEspeceValidation()\n {\n $telephone = $this->utils->securite_xss($_POST['telephone']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $montant = $this->utils->securite_xss($_POST['montant']);\n $frais = $this->utils->securite_xss($_POST['frais']);\n $fkagence = $this->utils->securite_xss($_POST['fkagence']);\n $typeagence = $this->utils->securite_xss($_POST['typeagence']);\n $codevalidation = $this->utils->securite_xss($_POST['code']);\n $soldecarte = $this->utils->securite_xss($_POST['soldecarte']);\n $cni = $this->utils->securite_xss($_POST['cni']);\n $user_creation = $this->userConnecter->rowid;\n $service = ID_SERVICE_CASHOUT;\n $json = $this->compteModel->calculFraisab($service, $montant);\n $result = json_decode($json);\n if (is_object($result) && array_key_exists('frais', $result)) {\n $frais = $result->frais;\n }\n $numtransact = $this->utils->Generer_numtransaction();\n $statut = 0;\n $commentaire = 'Cashout';\n if ($typeagence == 3) {\n $montant_total = $montant + $frais;\n $montant_agence = $montant + ($frais * 0.65);\n $montant_commission = $frais * 0.35;\n $commentaire = 'Cashout Partenaire';\n $service = ID_SERVICE_CASHOUTPARTENAIRE;\n } else {\n $montant_total = $montant;\n $montant_agence = $montant;\n }\n if ($codevalidation != '' && $telephone != '' && $montant > 0 && $frais >= 0 && strlen($numtransact) == 15) {\n if ($soldecarte >= $montant_total) {\n $codeValidation = $this->utils->rechercherCodeRetrait($codevalidation, $montant);\n if ($codeValidation > 0) {\n $typecompte = $this->compteModel->getTypeCompte($telephone);\n if ($typecompte == 0) {\n $username = 'Numherit';\n $userId = 1;\n $token = $this->utils->getToken($userId);\n $soldeavant = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeavant);\n $soldeavant = $jjs->{'statusMessage'};\n $response = $this->api_numherit->debiterCompte($username, $token, $telephone, $montant_total, $service, $user_creation, $fkagence);\n $decode_response = json_decode($response);\n if ($decode_response->{'statusCode'} == 000) {\n $soldeapres = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeapres);\n $soldeapres = $jjs->{'statusMessage'};\n @$this->utils->addMouvementCompteClient($numtransact, $soldeavant, $soldeapres, $montant, $telephone, $operation = \"DEBIT\", $commentaire = \"RETRAITESPECE\");\n\n $statut = 1;\n $message = $decode_response->{'statusMessage'};\n $transactId = $decode_response->{'NumTransaction'};\n $this->utils->validerCodeRetrait($codeValidation, $cni);\n $this->agenceModel->crediter_soldeAgence($montant_agence, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n\n if ($typeagence == 3) {\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($montant_commission, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Retrait Espece';\n $this->utils->addCommission($montant_commission, $service, $fkcarte, $observation, $fkagence);\n } else {\n $observation = 'Commission Retrait Espece à faire';\n $this->utils->addCommission_afaire($montant_commission, $service, $fkcarte, $observation, $fkagence);\n }\n }\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n } else {\n $message = $decode_response->{'statusMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' - ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n } else if ($typecompte == 1) {\n $numcarte = $this->compteModel->getNumCarte($telephone);\n $numeroserie = $this->utils->returnCustomerId($numcarte);\n $last4digitclient = $this->utils->returnLast4Digits($numcarte);\n $statut = 0;\n $json = $this->api_gtp->UnLoadCard($numtransact, $numeroserie, $last4digitclient, $montant_total, 'XOF', 'RetraitEspece');\n $return = json_decode(\"$json\");\n $response = $return->{'ResponseData'};\n if ($response != NULL && is_object($response)) {\n if (array_key_exists('ErrorNumber', $response)) {\n $errorNumber = $response->{'ErrorNumber'};\n $message = $response->{'ErrorMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $errorNumber . '-' . $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n } else {\n $transactionId = $response->{'TransactionID'};\n $message = 'Succes';\n if ($transactionId > 0) {\n $statut = 1;\n $this->utils->validerCodeRetrait($codeValidation, $cni);\n $this->agenceModel->crediter_soldeAgence($montant_agence, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactionId);\n if ($typeagence == 3) {\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($montant_commission, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Retrait Espece';\n $this->utils->addCommission($montant_commission, $service, $fkcarte, $observation, $fkagence);\n } else {\n $observation = 'Commission Retrait Espece à faire';\n $this->utils->addCommission_afaire($montant_commission, $service, $fkcarte, $observation, $fkagence);\n }\n }\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n }\n }\n } else {\n $message = 'Response GTP not object';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n }\n } else {\n $message = 'Code de validation incorrect';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok2'));\n }\n } else {\n $message = 'Solde compte insuffisant';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok3'));\n }\n } else {\n $message = 'Paramétres renseignés incorrects';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok4') . '/' . base64_encode($telephone));\n }\n }", "function fncValidaDI_53($IdEstado, $GestorErr, $NumReg, $Campo){\n\t \n\t$Bandera = CERO;\n\t$DI_53 = \"(53)Instrumento de Pago Nuevo\";\n\t$DI_53_ErrTam = \"Instrumento de Pago Nuevo ser de 2 digitos\";\n\t$DI_53_Catalogo = \"El valor de Instrumento de Pago Nuevo no coincide con la directiva de calidad de la DGRH\";\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == DOS){\n\t\tif($LocCampo != \"02\" and $LocCampo != \"05\" )\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_53.\"|\".$LocCampo.\"|\" . $DI_53_Catalogo.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse{\n\t\t$Error = $NumReg .\"|\".$DI_53.\"|\".$LocCampo.\"|\" . $DI_53_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "private function mensagemPrazoEmissao() {\n\n $oContribuinte = $this->_session->contribuinte;\n $iInscricaoMunicipal = $oContribuinte->getInscricaoMunicipal();\n $iIdContribuinte = $oContribuinte->getIdUsuarioContribuinte();\n\n try {\n\n $iQuantidadeNotasEmissao = Contribuinte_Model_NotaAidof::getQuantidadeNotasPendentes(\n $iInscricaoMunicipal,\n NULL,\n Contribuinte_Model_Nota::GRUPO_NOTA_RPS);\n\n if ($iQuantidadeNotasEmissao == 0) {\n\n $sMensagem = 'Limite de notas para emissão atingido, faça uma nova requisição.';\n $this->view->bloqueado_msg = $this->translate->_($sMensagem);\n\n return FALSE;\n }\n\n $oParamContribuinte = Contribuinte_Model_ParametroContribuinte::getById($iIdContribuinte);\n $sMensagemErroEmissao = 'Você possui \"%s\" notas para emissão. É importante gerar uma nova requisição.';\n\n // Verifica a quantidade de notas pela configuracao do Contribuinte\n if (is_object($oParamContribuinte) && $oParamContribuinte->getAvisofimEmissaoNota() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamContribuinte->getAvisofimEmissaoNota()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n } else {\n\n $oParamPrefeitura = Administrativo_Model_Prefeitura::getDadosPrefeituraBase();\n\n if (is_object($oParamPrefeitura) && $oParamPrefeitura->getQuantidadeAvisoFimEmissao() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamPrefeitura->getQuantidadeAvisoFimEmissao()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n }\n }\n } catch (Exception $e) {\n\n echo $this->translate->_('Ocorreu um erro ao verificar a quantidade limite para emissão de notas.');\n\n return FALSE;\n }\n\n return TRUE;\n }", "function fncValidaDI_19($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_19 = \"(19)Programa General\";\n\t$DI_19_ErrTam = \"Tamaño de Programa General debe ser dígito a 2 posicion\";\n\t$DI_19_PG \t = \"La Programa General no es parte del catalogo de DGRH\";\n\n\t\n\n /** Quita caracteres especiales **/\n\t//$LocCampo =preg_replace('/[^A-Za-z0-9\\-]/', '', $Campo);\n $PG= array(\"04\",\"09\",\"15\");\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == DOS)\n\t{\n\t\tif(!in_array($LocCampo,$PG))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_19.\"|\".$LocCampo.\"|\" . $DI_19_PG.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_19.\"|\".$LocCampo.\"|\" . $DI_19_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = 1;\n\t}\n\treturn $Bandera;\n}", "public function valida ($codFila) {\n\t\tglobal $log;\n\t\t\n\t\t#################################################################################\n\t\t## Zera os contadores de quantidade de registros\n\t\t#################################################################################\n\t\t$linha\t\t\t= 0;\n\t\t$numDetalhes\t= 0;\n\t\t\n\t\t#################################################################################\n\t\t## Alterar o status para Validando\n\t\t#################################################################################\n\t\t\\Zage\\App\\Fila::alteraStatus($codFila, 'V');\n\t\t\n\t\tforeach ($this->registros as $reg) {\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Descobre o tipo de Registro\n\t\t\t#################################################################################\n\t\t\t\n\t\t\t$codTipoReg\t\t= $reg->getTipoRegistro();\n\t\t\tif ($codTipoReg == 3) {\n\t\t\t\t$codSegmento\t= $reg->getCodSegmento();\n\t\t\t}else{\n\t\t\t\t$codSegmento\t= \"\";\n\t\t\t}\n\t\t\t$tipoReg\t\t= $codTipoReg . $codSegmento;\n\t\t\t$linha++;\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Alterar a linha atual\n\t\t\t#################################################################################\n\t\t\t\\Zage\\App\\Fila::alteraLinhaAtual($codFila, $linha);\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Faz a validação do registro (tipo de dados, tamanho e etc ...)\n\t\t\t#################################################################################\n\t\t\t$valido\t= $reg->validar();\n\t\t\tif ($valido !== true)\t$this->adicionaErro(0, $reg->getLinha(), $reg->getTipoRegistro(), $valido);\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Verifica se a primeira linha é o header\n\t\t\t#################################################################################\n\t\t\tif (($linha == 1) && ($tipoReg !== '0')) {\n\t\t\t\t$this->adicionaErro(0, $reg->getLinha(), $reg->getTipoRegistro(), 'Header não encontrado');\n\t\t\t}\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Verifica o tipo de arquivo, para fazer a devida validação\n\t\t\t#################################################################################\n\t\t\tswitch ($tipoReg) {\n\t\t\t\t \n\t\t\t\t#################################################################################\n\t\t\t\t## Header\n\t\t\t\t#################################################################################\n\t\t\t\tcase '0':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os campos do header\n\t\t\t\t\t#################################################################################\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->header[$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Detalhes do Segmento T\n\t\t\t\t#################################################################################\n\t\t\t\tcase '3T':\n\t\t\t\t\t$numDetalhes++;\n\t\t\t\t\t\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os detalhes com as variáveis\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t$i\t= sizeof($this->detalhesSegT);\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->detalhesSegT[$i][$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Detalhes do Segmento U\n\t\t\t\t#################################################################################\n\t\t\t\tcase '3U':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os detalhes com as variáveis\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t$i\t= sizeof($this->detalhesSegU);\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->detalhesSegU[$i][$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Trailler\n\t\t\t\t#################################################################################\n\t\t\t\tcase '9':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os campos do trailler\n\t\t\t\t\t#################################################################################\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->trailler[$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Validação geral do arquivo\n\t\t#################################################################################\n\t\tif (empty($this->header))\t\t\t$this->adicionaErro(0, 0, \"0\", 'As informações do Header não foram encontradas');\n\t\tif (empty($this->trailler))\t\t\t$this->adicionaErro(0, 0, \"9\", 'As informações do trailler não foram encontradas');\n\n\t\t#################################################################################\n\t\t## Verifica a quantidade de registros\n\t\t#################################################################################\n\t\tif (sizeof($this->detalhesSegT)\t== 0)\t$this->adicionaErro(0, 0, \"1\", 'As informações dos registros de detalhes não foram encontradas');\n\t\t\n\t\t#################################################################################\n\t\t## Verifica as variáveis obrigatórias\n\t\t#################################################################################\n\t\tif (!isset($this->header[\"AGENCIA\"]) \t\t|| empty($this->header[\"AGENCIA\"]))\t\t\t$this->adicionaErro(0, 0, \"0\", 'Variável \"Agência\" não encontrada no Header');\n\t\t//if (!isset($this->header[\"CONTA_CORRENTE\"]) || empty($this->header[\"CONTA_CORRENTE\"]))\t$this->adicionaErro(0, 0, \"0\", 'Variável \"CONTA_CORRENTE\" não encontrada no Header');\n\t\n\t}", "public function validateBody()\n {\n\n if (v::identical($this->col)->validate(1)) {\n\n /** Cidade ou Região **/\n\n $regiao = Tools::clean($this->cell);\n\n if (!v::stringType()->notBlank()->validate($regiao)) {\n throw new \\InvalidArgumentException(\"Atenção: Informe na tabela a Cidade ou Região corretamente.\", E_USER_WARNING);\n }\n\n $this->array[$this->row]['regiao'] = $regiao;\n\n }\n\n if (v::identical($this->col)->validate(2)) {\n\n /** Faixa CEP Inicial **/\n\n $cep_inicio = Tools::clean($this->cell);\n\n if (!v::postalCode('BR')->validate($cep_inicio)) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, Informe na tabela as faixas de CEP no formato correto.\n\n Ex.: 09999-999\n\n Por favor, corrija o CEP Inicial \\\"{$cep_inicio}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n $this->array[$this->row]['cep_inicio'] = $cep_inicio;\n\n }\n\n if (v::identical($this->col)->validate(3)) {\n\n /** Faixa CEP Final **/\n\n $cep_fim = Tools::clean($this->cell);\n\n if (!v::postalCode('BR')->validate($cep_fim)) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, Informe na tabela as faixas de CEP no formato correto.\n\n Ex.: 09999-999\n\n Por favor, corrija o CEP Final \\\"{$cep_fim}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n $this->array[$this->row]['cep_fim'] = $cep_fim;\n\n }\n\n if (v::identical($this->col)->validate(4)) {\n\n /** Peso Inicial **/\n\n $peso_inicial = Tools::clean($this->cell);\n\n if (v::numeric()->negative()->validate(Tools::convertToDecimal($peso_inicial))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALORES do Peso Inicial não pode conter numeros negativos.\n\n Por favor, corrija o valor \\\"{$peso_inicial}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n $this->array[$this->row]['peso_inicial'] = $peso_inicial;\n\n }\n\n if (v::identical($this->col)->validate(5)) {\n\n /** Peso Final **/\n\n $peso_final = Tools::clean($this->cell);\n\n if (!v::numeric()->positive()->validate(Tools::convertToDecimal($peso_final))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALORES do Peso Final não pode ser menor ou igual a Zero.\n\n Por favor, corrija o valor \\\"{$peso_final}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n $this->array[$this->row]['peso_final'] = $peso_final;\n\n }\n\n if (v::identical($this->col)->validate(6)) {\n\n /** Valor **/\n\n $valor = Tools::clean($this->cell);\n\n if (!v::notEmpty()->validate(Tools::convertToDecimal($valor))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALOR do frete não pode ser vazio.\n\n Por favor, corrija o valor e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n if (!v::numeric()->positive()->validate(Tools::convertToDecimal($valor))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALORES do frete não pode ser menor ou igual a Zero.\n\n Por favor, corrija o valor \\\"{$valor}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n $this->array[$this->row]['valor'] = $valor;\n\n }\n\n if (v::identical($this->col)->validate(7)) {\n\n /** Prazo de Entrega **/\n\n $prazo_entrega = (int)Tools::clean($this->cell);\n\n /**\n * Verifica o prazo de entrega\n */\n if (!v::numeric()->positive()->validate($prazo_entrega)) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, Atenção: Informe na tabela os Prazos de Entrega corretamente.\n\n Exemplo: 7 para sete dias.\n\n Por favor, corrija o Prazo de Entrega \\\"{$prazo_entrega}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n if (!v::numeric()->notBlank()->validate($prazo_entrega)) {\n $prazo_entrega = null;\n }\n\n $this->array[$this->row]['prazo_entrega'] = $prazo_entrega;\n\n }\n\n if (v::identical($this->col)->validate(8)) {\n\n /** AD VALOREM **/\n\n $ad_valorem = Tools::clean($this->cell);\n\n if (!empty($ad_valorem) && !v::numeric()->positive()->validate(Tools::convertToDecimal($ad_valorem))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALORES do AD VALOREM não pode conter numeros negativos.\n\n Por favor, corrija o valor \\\"{$this->cell}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n if (!v::numeric()->notBlank()->validate(Tools::convertToDecimal($ad_valorem))) {\n $ad_valorem = null;\n }\n\n $this->array[$this->row]['ad_valorem'] = $ad_valorem;\n\n }\n\n if (v::identical($this->col)->validate(9)) {\n\n /** KG Adicional **/\n\n $kg_adicional = Tools::clean($this->cell);\n\n if (!empty($kg_adicional) && v::numeric()->negative()->validate(Tools::convertToDecimal($kg_adicional))) {\n\n throw new \\InvalidArgumentException(\"ATENÇÃO: Erro na linha {$this->row}, os VALORES do KG Adicional não pode conter numeros negativos.\n\n Por favor, corrija o valor \\\"{$kg_adicional}\\\" e envie o arquivo novamente.\", E_USER_WARNING);\n\n }\n\n if (!v::numeric()->notBlank()->validate(Tools::convertToDecimal($kg_adicional))) {\n $kg_adicional = null;\n }\n\n $this->array[$this->row]['kg_adicional'] = $kg_adicional;\n\n }\n\n return $this->array;\n\n }", "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "function validarRegistro()\n {\n $mensaje=\"\";\n $adicionado=\"\";\n $idSolicitud=(isset($_REQUEST['idSolicitud'])?$_REQUEST['idSolicitud']:'');\n \n if(is_numeric($idSolicitud) && $idSolicitud){\n $this->solicitud= $this->consultarDetalleSolicitud($idSolicitud);\n\n $datosRegistro=array('solicitante'=>$this->solicitud[0]['SOL_NRO_IDEN_SOLICITANTE'],\n 'identificacion'=>$this->solicitud[0]['SOL_CODIGO'],\n 'correo'=>$this->solicitud[0]['CORREO_ELECTRONICO'],\n 'tipo_documento'=>$this->solicitud[0]['UWD_TIPO_IDEN'],\n 'tipo_contrato'=>$this->solicitud[0]['SOL_TIPO_VINCULACION'],\n 'fecha_inicio'=>$this->solicitud[0]['SOL_FECHA_INICIO'],\n 'fecha_fin'=>(isset($this->solicitud[0]['SOL_FECHA_FIN'])?$this->solicitud[0]['SOL_FECHA_FIN']:''),\n 'tipo_cuenta'=> $this->solicitud[0]['SOL_USUWEBTIPO'],\n 'tipo_usuario'=> $this->solicitud[0]['TIPO_USUARIO'],\n 'estado_usuario'=> 'A',\n 'secuencia'=>1,\n 'anexo'=>''\n );\n //busca si existe registro ya de usuario para rescatar la clave \n $registro = $this->buscarRegistroUsuario($datosRegistro['identificacion']);\n if(is_array($registro)){\n $datosRegistro['clave']=$registro[0]['CLA_CLAVE'];\n \n }else{\n $datosRegistro['clave']=$this->asignarClave();\n $datosRegistro['asigna_clave']='ok';\n }\n \n $datosRegistro = $this->asignarDependencia($datosRegistro);\n if(is_array($datosRegistro)){\n $usuario_existe = $this->buscarRegistroUsuarioYaExiste($datosRegistro[0]);\n \n if(is_array($usuario_existe) && $usuario_existe){\n $adicionado=$this->actualizarUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->actualizarCuentaUsuarioMysql($datosRegistro[0]);\n \n }else{\n $adicionado=$this->adicionarCuentaUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->adicionarCuentaUsuarioMysql($datosRegistro[0]);\n }\n\n foreach ($datosRegistro as $key => $registroUsuario) {\n \n $usuarioWeb = $this->buscarRegistroUsuarioWeb($registroUsuario['identificacion'], $registroUsuario['tipo_cuenta'], $registroUsuario['dependencia']);\n \n if(is_array($usuarioWeb)){\n $actualizadoweb[$key]=$this->actualizarCuentaUsuarioWeb($registroUsuario);\n \n }else{\n $adicionadoweb[$key]=$this->adicionarCuentaUsuarioWeb($registroUsuario);\n \n }\n }\n }\n var_dump($adicionado);\n var_dump($adicionadoMysql);\n if($adicionado && $adicionadoMysql){\n $modificado=$this->actualizarEstadoSolicitud($idSolicitud,3);\n \n $mensaje='Usuario creado con exito';\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Registro de usuario '.$datosRegistro[0]['identificacion'],\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$datosRegistro[0]['identificacion'],\n 'afectado'=>$datosRegistro[0]['identificacion']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n if((isset($datosRegistro[0]['asigna_clave'])?$datosRegistro[0]['asigna_clave']:'')=='ok'){\n $variable=\"pagina=registro_aprobarSolicitudUsuario\";\n $variable.=\"&opcion=enlace\";\n $variable.=\"&mail=\".$datosRegistro[0]['correo'];\n $variable.=\"&usu=\".$datosRegistro[0]['identificacion'];\n $variable.=\"&tipoUsu=\".$datosRegistro[0]['tipo_usuario'];\n }else{\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n }\n \n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n \n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }else{\n $mensaje='Error al crear Usuario. '.$this->mensaje;\n\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Error al registrar usuario -'.$mensaje,\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$this->solicitud[0]['SOL_CODIGO'],\n 'afectado'=>$this->solicitud[0]['SOL_CODIGO']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n\n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }\n }\n }", "function fncValidaDI_4($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = 0;\n\n\t$DI_4 = \"(4)Nombre del Empleado\";\n\t$DI_4_ErrTam = \"Tamaño de registro debe ser 150 Caracteres\";\n\t$DI_4_ErrIdEdo = \"Identificador de estado Invalido\";\n\t$DI_4_ErrEstructura = \"EL campo no cumple con estructura definida PATERNO,MATERNO/NOMBRE(S)\";\n\n /** Quita caracteres especiales **/\n\t//$LocCampo =preg_replace('/[^A-Za-z0-9\\-]/', '', $Campo);\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) <= 150)\n\t{\n\t\tif(!preg_match (\"/[?,A-Z,a-z,\\s]{1,90},[?,A-Z,a-z,\\s]{1,90}\\/[?.A-Z,a-z,\\s]{1,90}/\" ,$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_4.\"|\".$LocCampo.\"|\" . $DI_4_ErrEstructura.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_4.\"|\".$LocCampo.\"|\" . $DI_4_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = 1;\n\t}\n\treturn $Bandera;\n}", "function Comprobar_codcentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "function fecha_instalacion($fecha_instalacion)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\t$fecha_maxima = date('Y-m-d',strtotime('+6 month',strtotime($hoy)));\n\t\tif(($fecha_instalacion < $fecha_valida) || ($fecha_instalacion > $fecha_maxima))\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_instalacion', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra y menor a 6 meses de la misma.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function validacion(){\n\t\t$this->inicializa();\n\t\t$client=Cliente::find(1);\n\t\t$id=$client->transaccion.\"\";\n\t\t// si en la transaccion aparece el id del cliente que esta en la base de datos entonces la transaccion le pertenece\n\t\t// y por tanto es valida\n\t\t$transaction = $this->pasarela->transaction()->find(\"{$id}\");\n\t\t\n\t\tif($client->token==$transaction->customer['id'])\n\t\t\treturn true;\n\t\treturn false;\n\t\t//return response()->json($transaction);\n\t}", "function Comprobar_nombrecentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->NOMBRECENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->NOMBRECENTRO)>50)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ ]+$/\",$this->NOMBRECENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00030\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto; //se devuelve el resultado\n}", "public function validar(){\n $respuesta = array();\n //verifica que el archivo no tenga ningun error\n if ($this->file[\"error\"] > 0) {\n $respuesta[\"mensaje\"] = \"El archivo contiene errores o es corrupto.\";\n $respuesta[\"resultado\"] = false;\n } else {\n //obtengo la informacion del archivo\n $info = new SplFileInfo($this->file[\"name\"]);\n //obtengo la extension del mismo\n $extencion = $info->getExtension();\n //verifico si esta dentro de los permitods\n if(in_array($extencion, $this->permitidos)) {\n //verifico si el tamanio del archivo es menor o igual al permitido\n if ($this->file[\"size\"] <= $this->maximo_kb) {\n //verifico que las dimensiones de la imagen sean las permitidas\n list($width, $height, $type) = getimagesize($this->file[\"tmp_name\"]);\n if($width == $this->height_perm && $height == $this->width_perm){\n $respuesta[\"resultado\"] = true;\n }else{\n $respuesta[\"mensaje\"] = \"Dimensiones de la imagen no permitidas, deben de ser de $this->height_perm por $this->width_perm.\";\n $respuesta[\"resultado\"] = false;\n }\n } else {\n $respuesta[\"mensaje\"] = \"El archivo sobrepasa el limite de tamaño, deben de ser $this->maximo_kb kb como máximo.\";\n $respuesta[\"resultado\"] = false;\n }\n } else {\n $respuesta[\"mensaje\"] = \"Extensión del archivo no permitida.\";\n $respuesta[\"resultado\"] = false;\n }\n }\n return $respuesta;\n }", "public function _validarHelado()\n {\n $listaHelados = Helado::_traerHelados();\n //Son distintos, pasa la validación.(Si y solo si se queda en este valor)\n $retorno = -1;\n if($this->_precio < 0 || $this->_tipo != \"agua\" && $this->_tipo != \"crema\" || $this->_cantidad < 0)\n {\n return 1;\n }\n foreach($listaHelados as $helado)\n { \n if($this->_sabor == $helado->_sabor && $this->_tipo == $helado->_tipo)\n {\n $helado->_cantidad = $this->_cantidad;\n $helado->_precio = $this->_precio;\n Helado::_actualizarHelado($listaHelados);\n $retorno = 0;\n break;\n }\n }\n return $retorno;\n }", "function isEditavel() {\n\t\t// a data limite de edição do jogo vem no formato DD/MM/YYYY, por exemplo, 01/03/2019\n\t\t$dg = DataGetter::getInstance();\n\t\t$dialimite = $this->jogo->limiteEdicaoAposta[0] . $this->jogo->limiteEdicaoAposta[1]; // dialimite = 01\n\t\t$meslimite = $this->jogo->limiteEdicaoAposta[3] . $this->jogo->limiteEdicaoAposta[4]; // meslimite = 03\n\t\t$anolimite = $this->jogo->limiteEdicaoAposta[6] . $this->jogo->limiteEdicaoAposta[7] . $this->jogo->limiteEdicaoAposta[8] . $this->jogo->limiteEdicaoAposta[9]; //anolimite = 2019\n\t\t$dialimite = intval($dialimite); // transformando as variáveis em inteiros\n\t\t$meslimite = intval($meslimite);\n\t\t$anolimite = intval($anolimite);\n\t\t$mes = date(\"m\"); //date(\"m\") retorna o mês atual, entre 1 e 12\n\t\t$mes = intval($mes);\n\t\tif((intval(date(\"Y\"))) > $anolimite){ // se ano atual tiver ultrapassado ano da data limite\n\t\t\treturn false; // não é possível editar \n\t\t}\n\t\telseif(($mes > $meslimite && (intval(date(\"Y\"))) == $anolimite)){ // se mês atual tiver ultrapassado o limite, estando no mesmo ano\n\t\t\treturn false; // não é possível editar\n\t\t}\n\t\telseif((intval(date(\"d\"))) > $dialimite && $mes >= $meslimite && (intval(date(\"Y\"))) == $anolimite){ // se o dia tiver ultrapassado, estando no mesmo mês ou em algum seguinte no ano\n\t\t\treturn false; // não é possivel editar\n\t\t}\n\t\telse{ // caso não esteja em nenhuma das condições acima, significa que a data limite ainda não foi ultrapassada\n\t\t\treturn true; // então a aposta eh editável\n\t\t}\n\t}", "function fncValidaDI_24($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_24 = \"(24)Número de Puesto\";\n\t$DI_24_ErrTam = \"Tamaño de Número de Puesto debe ser a 4 Alfanumerico\";\n\t$DI_24_NumPto \t = \"El Número Puesto no es parte del catalogo de DGRH\";\n\t\n $NumPto= array(\"0022\",\"0101\");\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == CUATRO)\n\t{\n\t\tif(!in_array($LocCampo,$NumPto))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_24.\"|\".$LocCampo.\"|\" . $DI_24_NumPto.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_24.\"|\".$LocCampo.\"|\" . $DI_24_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function validarRegistroMedico($id,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$clave2,$correo,$ask,$ans,$id_esp){\n $feedback=\"\";\n if($clave1 == $clave2 ){//verifica que las claves sean iguales\n if($this->validarPass($clave1) == ' '){//verifica que la clave sea valida\n if($this->validarCorreo($correo) == 0){//verifica validas del correo\n if($ask != 0){\n if($ask==1)\n $askf=\"Nombre de su primer mascota\";\n if($ask==2)\n $askf=\"Direccionde su primer lugar de residencia\";\n if($ask==3)\n $askf=\"Nombre mejor amigo de la infancia\";\n if($ask==4)\n $askf=\"Nombre de su localidad de residencia\";\n if($ask==5)\n $askf=\"Color de su camisa favorita\";\n if($sexo != '0' ){\n if($this->verificarIdMedico($id)==0){\n if($this->insertMedico($id,$id_esp,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$correo,$askf,$ans) == true){ \n $feedback='bien';\n }else{\n $feedback='5';//no insert medico \n }\n }else{\n $feedback='8';\n }\n }else{\n $feedback='7';//error de sexo\n }\n }else{\n $feedback='6';//error de pregunta\n } \n }else{\n $feedback='3';//el mail ya esta en la bd\n }\n }else{//envia tipos de error en clave\n $resultado=$this->validarPass($clave1);\n $feedback=$resultado;\n }\n }\n else{\n $feedback='2';//error las claves no son iguales\n }\n \n return $feedback; \n }", "function fncValidaDI_59($IdEstado, $GestorErr, $NumReg, $Campo){\n\t \n\t$Bandera = CERO;\n\t$DI_58 = \"(59)Nombre del Producto\";\n\t$DI_58_ErrTam = \"Nombre del Producto debe ser de 11 caracteres/numeros\";\n\t$DI_58_Catalogo = \"No coincide con directiva de Calidad (Alfanumérico a 11)\";\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == 11){\n\t\tif(!preg_match(\"/[A-Z,a-z,0-9]{11}/\",$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_58.\"|\".$LocCampo.\"|\" . $DI_58_Catalogo.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse{\n\t\t$Error = $NumReg .\"|\".$DI_58.\"|\".$LocCampo.\"|\" . $DI_58_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function fncValidaDI_27($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_27 = \"(27)Centro de Responsabilidad\";\n\t$DI_27_ErrTam = \"Tamaño de campo Centro de Responsabilidad debe ser a 10 Caracters\";\n\t$DI_27_Edo \t = \"El Centro de Responsabilidad no corresponde al Estado\";\n\t$DI_27_CR \t = \"El Centro de Responsabilidad no corresponde al catalogo de DGRH\";\n\t\n\t// agregar catalogo de Municpios\n $Edo= array($IdEstado);\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == DIEZ)\n\t{\n\t\tif(!in_array(substr($LocCampo,0,2),$Edo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_27.\"|\".$LocCampo.\"|\" . $DI_27_Edo.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t\tif(!preg_match(\"/\\d{8}/\",substr($LocCampo,2,8)))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_27.\"|\".$LocCampo.\"|\" . $DI_27_CR.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_27.\"|\".$LocCampo.\"|\" . $DI_27_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function validarCampo($tipo,$campo){\n $valido = false;\n \n switch ($tipo) {\n case 'telefono':\n if (preg_match(\"/[+]{1}[0-9]{11}/i\", $campo)) {\n $valido = true;\n } else {\n $valido = false;\n }\n break;\n case 'correo':\n $valido = (!preg_match(\"/^([a-z0-9ÁéÉíÍóÓúÚñÑ\\+_\\-]+)(\\.[a-z0-9ÁéÉíÍóÓúÚñÑ\\+_\\-]+)*@([a-z0-9ÁéÉíÍóÓúÚñÑ\\-]+\\.)+[a-z]{2,6}$/ix\", $campo)) ? FALSE : TRUE;\n break;\n case 'rut':\n $rut = preg_replace('/[^k0-9]/i', '', $campo);\n $dv = substr($rut, -1);\n $numero = substr($rut, 0, strlen($rut) - 1);\n $i = 2;\n $suma = 0;\n foreach (array_reverse(str_split($numero)) as $v) {\n if ($i == 8)\n $i = 2;\n $suma += $v * $i;\n ++$i;\n }\n $dvr = 11 - ($suma % 11);\n\n if ($dvr == 11)\n $dvr = 0;\n if ($dvr == 10)\n $dvr = 'K';\n\n if ($dvr == strtoupper($dv)){\n $valido = true;\n }\n else{\n $valido = false;\n }\n\n ////\n break;\n }\n\n return $valido;\n }", "function fncValidaDI_22($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_22 = \"(22)Partida\";\n\t$DI_22_ErrTam = \"Tamaño de Actividad Institucional debe ser a 5 Alfanumerico\";\n\t$DI_22_Ptda \t = \"La Partida no es parte del catalogo de DGRH\";\n\t\n $Ptda= array(\"44106\",\"12301\",\"11301\");\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == CINCO)\n\t{\n\t\tif(!in_array($LocCampo,$Ptda))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_22.\"|\".$LocCampo.\"|\" . $DI_22_Ptda.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_22.\"|\".$LocCampo.\"|\" . $DI_22_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function testBuscarBackupDataFormatoIncorreto() {\n $this->instancia->configurarAmbienteParaTeste(\"27062017\", \"18:00:00\");\n $this->expectException(FormatoDataIncorretoException::class); //exceção esperada \n $this->instancia->listarBackups();\n }", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "public function testVerificaPagtoAtrasadoUmDia() {\n \n $pagFatura = new PagamentoFatura();\n $pagFatura->dataVencimento = \"27/12/2010\";\n $pagFatura->dataPagamento = \"28/12/2010\";\n $pagFatura->SomarDatas();\n $pagFatura->StatusPagamento();\n \n $this->assertEquals(\"Pagto feito com atraso de 1 dia\", $pagFatura->status);\n \n }", "function comprobar_nombre()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"nombre vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\tif (strlen($this->nombre) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->nombre) > 31)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"nombre demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->nombre))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"nombre\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"nombre no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "function comprobar_sexo()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->sexo) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"sexo\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"sexo vacio\"]);\n\n\t\t$correcto = false;\n\t}\n\n\treturn $correcto;\n}" ]
[ "0.67128474", "0.6703789", "0.65754277", "0.63179356", "0.62628067", "0.6228392", "0.62076557", "0.61983794", "0.6186251", "0.60918003", "0.603611", "0.6017521", "0.6006595", "0.59780794", "0.59556204", "0.59329426", "0.5931007", "0.5916533", "0.5914389", "0.58746064", "0.5849646", "0.58243716", "0.58135307", "0.5809925", "0.58055466", "0.58054", "0.58007365", "0.57844925", "0.57759225", "0.57743007", "0.5764692", "0.57616484", "0.57559055", "0.57529527", "0.57426697", "0.57370013", "0.5735895", "0.5721819", "0.5720305", "0.57069266", "0.5703196", "0.56957746", "0.5682392", "0.56778246", "0.5660005", "0.5654881", "0.56293833", "0.5621697", "0.56176215", "0.56106055", "0.56042737", "0.5595651", "0.55938834", "0.55903566", "0.5588751", "0.5586451", "0.55855745", "0.5584776", "0.5581105", "0.5577616", "0.5577224", "0.55768734", "0.5576723", "0.5572372", "0.5563169", "0.5560632", "0.55604464", "0.55533886", "0.55459416", "0.5533544", "0.5530599", "0.5529075", "0.55281836", "0.55276036", "0.55261487", "0.5517081", "0.5515781", "0.5515781", "0.5515781", "0.5515781", "0.5515781", "0.5515781", "0.5515781", "0.5515781", "0.55139196", "0.5513085", "0.55083007", "0.5507406", "0.55034727", "0.54934746", "0.54918176", "0.5491487", "0.5486019", "0.5483842", "0.5480902", "0.5480199", "0.54758745", "0.5471336", "0.5471332", "0.5470663", "0.5468813" ]
0.0
-1
Validar Encerramento de movimento
public function setUpdate($model) { $id = $model->get('id'); $newmovementtype = $model->get('movementtype'); $newreleasestype = $model->get('releasestype'); $data = array("query"=>$id); $masterCoach = new \iSterilization\Coach\armorymovement(); $detailCoach = new \iSterilization\Coach\armorymovementitem(); $master = self::jsonToObject($masterCoach->getStore()->select()); $detail = self::jsonToObject($detailCoach->getStore()->getCache()->selectItem($data)); if(count($detail->rows) == 0 && $newreleasestype != "C") { throw new \PDOException("O Movimento não pode ser encerrado pois <b>não existem lançamentos!</b>"); } $oldreleasestype = $master->rows[0]->releasestype; if($oldreleasestype !== $newreleasestype && $newreleasestype == "E") { $closeddate = date("Ymd H:i:s"); $model->set('closeddate',$closeddate); $proxy = $masterCoach->getStore()->getProxy(); $stock = new \iSterilization\Coach\armorystock(); $output = new \iSterilization\Coach\armorymovementoutput(); try { $proxy->beginTransaction(); if($newmovementtype == '002') { $boxsealone = $model->getSubmit()->getRowValue('boxsealone'); $boxsealtwo = $model->getSubmit()->getRowValue('boxsealtwo'); $transportedby = $model->getSubmit()->getRowValue('transportedby'); $output->getStore()->setProxy($proxy); $output->getStore()->getModel()->set('id',$id); $output->getStore()->getModel()->set('boxsealone',$boxsealone); $output->getStore()->getModel()->set('boxsealtwo',$boxsealtwo); $output->getStore()->getModel()->set('transportedby',$transportedby); $result = self::jsonToObject($output->getStore()->update()); if(!$result->success) { throw new \PDOException($result->text); } } foreach ($detail->rows as $item) { $armorylocal = $item->armorylocal; $flowprocessingstepid = $item->flowprocessingstepid; if($newmovementtype == '001') { $stock->getStore()->setProxy($proxy); $stock->getStore()->getModel()->set('id',''); $stock->getStore()->getModel()->set('flowprocessingstepid',$flowprocessingstepid); $stock->getStore()->getModel()->set('armorylocal',$armorylocal); $stock->getStore()->getModel()->set('armorystatus','A'); $result = self::jsonToObject($stock->getStore()->insert()); if(!$result->success) { throw new \PDOException($result->text); } $sql = " declare @flowprocessingid int, @flowprocessingstepid int = :flowprocessingstepid; select @flowprocessingid = flowprocessingid from flowprocessingstep where id = @flowprocessingstepid; update flowprocessing set flowstatus = 'E' where id = @flowprocessingid; update flowprocessingstepaction set isactive = 0 where flowprocessingstepid = @flowprocessingstepid;"; $pdo = $proxy->prepare($sql); $pdo->bindValue(":flowprocessingstepid", $flowprocessingstepid, \PDO::PARAM_INT); $callback = $pdo->execute(); if(!$callback) { throw new \PDOException(self::$FAILURE_STATEMENT); } } if($newmovementtype == '002') { $sql = " declare @flowprocessingstepid int = :flowprocessingstepid; update armorystock set armorystatus = 'E' where flowprocessingstepid = @flowprocessingstepid"; $pdo = $proxy->prepare($sql); $pdo->bindValue(":flowprocessingstepid", $flowprocessingstepid, \PDO::PARAM_INT); $callback = $pdo->execute(); if(!$callback) { throw new \PDOException(self::$FAILURE_STATEMENT); } } if($newmovementtype == '003') { $sql = " declare @armorylocal char(3) = :armorylocal, @flowprocessingstepid int = :flowprocessingstepid; update armorystock set armorystatus = 'A' where flowprocessingstepid = @flowprocessingstepid and armorystatus = 'E' and armorylocal = @armorylocal"; $pdo = $proxy->prepare($sql); $pdo->bindValue(":armorylocal", $armorylocal, \PDO::PARAM_STR); $pdo->bindValue(":flowprocessingstepid", $flowprocessingstepid, \PDO::PARAM_INT); $callback = $pdo->execute(); if(!$callback) { throw new \PDOException(self::$FAILURE_STATEMENT); } } } $proxy->commit(); } catch ( \PDOException $e ) { if ($proxy->inTransaction()) { $proxy->rollBack(); } throw new \PDOException($e->getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validarDados(IExportacaoCenso $oExportacaoCenso) {\n\n $lTodosDadosValidos = true;\n $oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();\n $sMensagem = \"\";\n\n /**\n * Início da validação dos campos obrigatórios\n */\n if( trim( $oDadosEscola->registro00->codigo_escola_inep ) == '' ) {\n\n $sMensagem = \"É necessário informar o código INEP da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( trim( $oDadosEscola->registro00->codigo_escola_inep ) != '' ) {\n\n if( !DBNumber::isInteger( $oDadosEscola->registro00->codigo_escola_inep ) ) {\n\n $sMensagem = \"Código INEP da escola inválido. O código INEP deve conter apenas números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( strlen( trim( $oDadosEscola->registro00->codigo_escola_inep ) ) != 8 ) {\n\n $sMensagem = \"Código INEP da escola inválido. O código INEP deve conter 8 dígitos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if (trim($oDadosEscola->registro00->nome_escola) == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome da Escola não pode ser vazio\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ( trim( $oDadosEscola->registro00->nome_escola ) != ''\n && strlen( $oDadosEscola->registro00->nome_escola ) < 4\n ) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome da Escola deve conter no mínimo 4 dígitos\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->cep == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo CEP é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( !empty( $oDadosEscola->registro00->cep ) ) {\n\n if( !DBNumber::isInteger( $oDadosEscola->registro00->cep ) ) {\n\n $sMensagem = \"CEP inválido. Deve conter somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if (strlen($oDadosEscola->registro00->cep) < 8) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"CEP da escola deve conter 8 dígitos.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if ($oDadosEscola->registro00->endereco == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Endereço da escola é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->uf == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"UF da escolas é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->municipio == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Munícipio da escola é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->distrito == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Distrito é obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n */\n if ($oDadosEscola->registro00->situacao_funcionamento == 1) {\n\n\n if (trim($oDadosEscola->registro00->codigo_orgao_regional_ensino) == '' && $oDadosEscola->registro00->lOrgaoEnsinoObrigatorio) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Orgão Regional de Ensino obrigatório.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->data_inicio_ano_letivo == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Data de Início do Ano Letivo é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->data_termino_ano_letivo == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Data de Término do Ano Letivo é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( !empty( $oDadosEscola->registro00->data_inicio_ano_letivo )\n && !empty( $oDadosEscola->registro00->data_termino_ano_letivo ) ) {\n\n $oDataInicio = new DBDate( $oDadosEscola->registro00->data_inicio_ano_letivo );\n $oDataTermino = new DBDate( $oDadosEscola->registro00->data_termino_ano_letivo );\n\n if( DBDate::calculaIntervaloEntreDatas( $oDataInicio, $oDataTermino, 'd' ) > 0 ) {\n\n $sMensagem = \"A data de início do ano letivo não pode ser maior que a data de término.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oExportacaoCenso->getDataCenso() != '' ) {\n\n $oDataCenso = new DBDate( $oExportacaoCenso->getDataCenso() );\n $iAnoAnterior = $oDataCenso->getAno() - 1;\n if( $oDataInicio->getAno() != $oDataCenso->getAno()\n && $oDataInicio->getAno() != $iAnoAnterior\n ) {\n\n $sMensagem = \"Data de início do ano letivo inválido. Ano informado: {$oDataInicio->getAno()}\";\n $sMensagem .= \" - Anos válidos: {$iAnoAnterior} ou {$oDataCenso->getAno()}\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( DBDate::calculaIntervaloEntreDatas( $oDataCenso, $oDataTermino, 'd' ) > 0\n || $oDataTermino->getAno() != $oDataCenso->getAno()\n ) {\n\n $sMensagem = \"Data de término do ano letivo inválido. O ano deve ser o mesmo do censo\";\n $sMensagem .= \" ( {$oDataCenso->getAno()} ), e a data não pode ser inferior a data de referência\";\n $sMensagem .= \" ( {$oDataCenso->getDate( DBDate::DATA_PTBR )} ).\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n /**\n * Validações referentes aos telefones\n */\n for( $iContador = 0; $iContador <= 2; $iContador++ ) {\n\n $sPropriedadeTelefone = \"telefone\";\n $sMensagemTelefone = \"Telefone\";\n\n if( $iContador > 0 ) {\n\n $sPropriedadeTelefone = \"telefone_publico_{$iContador}\";\n $sMensagemTelefone = \"Telefone Público {$iContador}\";\n }\n\n if( $oDadosEscola->registro00->{$sPropriedadeTelefone} != '' ) {\n\n if( strlen( $oDadosEscola->registro00->{$sPropriedadeTelefone} ) < 8 ) {\n\n $sMensagem = \"Campo {$sMensagemTelefone} deve conter 8 dígitos\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( substr($oDadosEscola->registro00->{$sPropriedadeTelefone}, 0, 1) != 9\n && strlen($oDadosEscola->registro00->{$sPropriedadeTelefone}) == 9\n ) {\n\n $sMensagem = \"Campo {$sMensagemTelefone}, ao conter 9 dígitos, o primeiro algarismo deve ser 9.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n if ($oDadosEscola->registro00->fax != '') {\n\n if (strlen($oDadosEscola->registro00->fax) < 8) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Campo Fax deve conter 8 dígitos\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n * e caso a opção Dependência Administrativa selecionada seja igual a 4\n * 4 - privada\n */\n if ($oDadosEscola->registro00->dependencia_administrativa == 4) {\n\n if ( empty( $oDadosEscola->registro00->categoria_escola_privada ) ) {\n\n $lTodosDadosValidos = false;\n $sErroMsg = \"Escola de Categoria Privada.\\n\";\n $sErroMsg .= \"Deve ser selecionada uma opção no campo Categoria da Escola Privada\";\n $oExportacaoCenso->logErro($sErroMsg, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro00->conveniada_poder_publico == '') {\n\n $sMensagem = \"Deve ser selecionada uma opção no campo Conveniada Com o Poder Público\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $oDadosEscola->registro00->mant_esc_privada_empresa_grupo_empresarial_pes_fis == 0\n && $oDadosEscola->registro00->mant_esc_privada_sidicatos_associacoes_cooperativa == 0\n && $oDadosEscola->registro00->mant_esc_privada_ong_internacional_nacional_oscip == 0\n && $oDadosEscola->registro00->mant_esc_privada_instituicoes_sem_fins_lucrativos == 0\n && $oDadosEscola->registro00->sistema_s_sesi_senai_sesc_outros == 0\n ) {\n\n $sMensagem = \"Deve ser selecionado pelo menos um campo de Mantenedora da Escola Privada\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"O CNPJ da mantenedora principal da escola deve ser informado\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( $oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada != ''\n && !DBNumber::isInteger( $oDadosEscola->registro00->cnpj_mantenedora_principal_escola_privada )\n ) {\n\n $sMensagem = \"O CNPJ da mantenedora principal deve conter somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro00->cnpj_escola_privada == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"O CNPJ da escola deve ser informado quando escola for privada.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro00->regulamentacao_autorizacao_conselho_orgao == '' ) {\n\n $sMensagem = \"Deve ser informada uma opção referente ao Credenciamento da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n $lDadosInfraEstrutura = DadosCensoEscola::validarDadosInfraEstrutura($oExportacaoCenso);\n if (!$lDadosInfraEstrutura) {\n $lTodosDadosValidos = $lDadosInfraEstrutura;\n }\n\n return $lTodosDadosValidos;\n }", "public function validarProcessamento() {\n\n $sWhere = \"q145_issarquivoretencao = {$this->oIssArquivoRetencao->getSequencial()}\";\n $oDaoIssArquivoRetencaoDisArq = new cl_issarquivoretencaodisarq;\n $sSqlIssArquivoRetencaoDisArq = $oDaoIssArquivoRetencaoDisArq->sql_query_file(null, \"*\", null, $sWhere);\n $rsIssArquivoRetencaoDisArq = $oDaoIssArquivoRetencaoDisArq->sql_record($sSqlIssArquivoRetencaoDisArq);\n\n if ($oDaoIssArquivoRetencaoDisArq->numrows > 0) {\n throw new BusinessException( _M( self::MENSAGENS . \"erro_arquivo_processado\") );\n }\n }", "private function valida_exedente(): bool|array\n {\n if (property_exists(object_or_class: 'calcula_imss', property: 'monto_uma')){\n return $this->error->error('Error no existe el campo monto_uma', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'sbc')){\n return $this->error->error('Error no existe el campo sbc', $this);\n }\n\n if (property_exists(object_or_class: 'calcula_imss', property: 'n_dias')){\n return $this->error->error('Error no existe el campo n_dias', $this);\n }\n\n if($this->monto_uma<=0){\n return $this->error->error('Error uma debe ser mayor a 0', $this->monto_uma);\n }\n if($this->sbc<=0){\n return $this->error->error('Error sbc debe ser mayor a 0', $this->sbc);\n }\n if($this->n_dias<=0){\n return $this->error->error('Error n_dias debe ser mayor a 0', $this->n_dias);\n }\n return true;\n }", "public function testCargaSaldoInvalido()\n {\n $tiempo = new Tiempo;\n $recargable = new Recargable();\n $medio = new Medio(0, $tiempo,$recargable);\n $this->assertFalse($medio->recargar(15));\n $this->assertEquals($medio->obtenerSaldo(), 0);\n }", "public function test_validar_archivo_vacio_en_entrega_de_actividad()\n {\n $entrega=new EntregaActividad();\n $entrega->setArchivo(null);\n $this->assertTrue($entrega->validarArchivo()->fails());\n }", "protected function validarDadosInfraEstrutura(IExportacaoCenso $oExportacaoCenso) {\n\n $lTodosDadosValidos = true;\n $oDadosEscola = $oExportacaoCenso->getDadosProcessadosEscola();\n $aDadosTurma = $oExportacaoCenso->getDadosProcessadosTurma();\n\n $aEquipamentosValidacao = array(\n 0 => \"equipamentos_existentes_escola_televisao\",\n 1 => \"equipamentos_existentes_escola_videocassete\",\n 2 => \"equipamentos_existentes_escola_dvd\",\n 3 => \"equipamentos_existentes_escola_antena_parabolica\",\n 4 => \"equipamentos_existentes_escola_copiadora\",\n 5 => \"equipamentos_existentes_escola_retroprojetor\",\n 6 => \"equipamentos_existentes_escola_impressora\",\n 7 => \"equipamentos_existentes_escola_aparelho_som\",\n 8 => \"equipamentos_existentes_escola_projetor_datashow\",\n 9 => \"equipamentos_existentes_escola_fax\",\n 10 => \"equipamentos_existentes_escola_maquina_fotografica\"\n );\n\n $aEstruturaValidacao = array(\n 3000032 => \"equipamentos_existentes_escola_computador\",\n 3000003 => \"quantidade_computadores_uso_administrativo\",\n 3000024 => \"quantidade_computadores_uso_alunos\",\n 3000019 => \"numero_salas_aula_existentes_escola\",\n 3000020 => \"numero_salas_usadas_como_salas_aula\"\n );\n\n $aDependenciasEscola = array(\n \"dependencias_existentes_escola_sala_professores\",\n \"dependencias_existentes_escola_bercario\",\n \"dependencias_existentes_escola_despensa\",\n \"dependencias_existentes_escola_area_verde\",\n \"dependencias_existentes_escola_almoxarifado\",\n \"dependencias_existentes_escola_auditorio\",\n \"dependencias_existentes_escola_banheiro_alunos_def\",\n \"dependencias_existentes_escola_banheiro_chuveiro\",\n \"dependencias_existentes_escola_sala_leitura\",\n \"dependencias_existentes_escola_sala_recursos_multi\",\n \"dependencias_existentes_escola_banheiro_educ_infan\",\n \"dependencias_existentes_escola_cozinha\",\n \"dependencias_existentes_escola_alojamento_professo\",\n \"dependencias_existentes_escola_laboratorio_ciencia\",\n \"dependencias_existentes_escola_patio_coberto\",\n \"dependencias_existentes_escola_alojamento_aluno\",\n \"dependencias_existentes_escola_laboratorio_informa\",\n \"dependencias_existentes_escola_refeitorio\",\n \"dependencias_existentes_escola_parque_infantil\",\n \"dependencias_existentes_escola_banheiro_fora_predi\",\n \"dependencias_existentes_escola_quadra_esporte_desc\",\n \"dependencias_existentes_escola_sala_secretaria\",\n \"dependencias_existentes_escola_dep_vias_alunos_def\",\n \"dependencias_existentes_escola_banheiro_dentro_pre\",\n \"dependencias_existentes_escola_lavanderia\",\n \"dependencias_existentes_escola_quadra_esporte_cobe\",\n \"dependencias_existentes_escola_biblioteca\",\n \"dependencias_existentes_escola_sala_diretoria\",\n \"dependencias_existentes_escola_patio_descoberto\",\n \"dependencias_existentes_escola_nenhuma_relacionada\"\n );\n\n $aModalidadesEtapas = array(\n \"modalidade_ensino_regular\",\n \"modalidade_educacao_especial_modalidade_substutiva\",\n \"modalidade_educacao_jovens_adultos\",\n \"etapas_ensino_regular_creche\",\n \"etapas_ensino_regular_pre_escola\",\n \"etapas_ensino_regular_ensino_fundamental_8_anos\",\n \"etapas_ensino_regular_ensino_fundamental_9_anos\",\n \"etapas_ensino_regular_ensino_medio_medio\",\n \"etapas_ensino_regular_ensino_medio_integrado\",\n \"etapas_ensino_regular_ensino_medio_normal_magister\",\n \"etapas_ensino_regular_ensino_medio_profissional\",\n \"etapa_educacao_especial_creche\",\n \"etapa_educacao_especial_pre_escola\",\n \"etapa_educacao_especial_ensino_fundamental_8_anos\",\n \"etapa_educacao_especial_ensino_fundamental_9_anos\",\n \"etapa_educacao_especial_ensino_medio_medio\",\n \"etapa_educacao_especial_ensino_medio_integrado\",\n \"etapa_educacao_especial_ensino_medio_normal_magist\",\n \"etapa_educacao_especial_ensino_medio_educ_profis\",\n \"etapa_educacao_especial_eja_ensino_fundamental\",\n \"etapa_educacao_especial_eja_ensino_medio\",\n \"etapa_eja_ensino_fundamental\",\n \"etapa_eja_ensino_fundamental_projovem_urbano\",\n \"etapa_eja_ensino_medio\"\n );\n\n foreach ($aEquipamentosValidacao as $sEquipamentoValidacao) {\n\n if (!DadosCensoEscola::validarEquipamentosExistentes($oExportacaoCenso, $oDadosEscola->registro10->$sEquipamentoValidacao)) {\n $lTodosDadosValidos = false;\n }\n break;\n }\n\n $iComputadorExistentes = 0;\n foreach ($aEstruturaValidacao as $iSequencial => $sEstruturaValidacao) {\n\n if( $iSequencial == 3000032 ) {\n\n if( !empty( $oDadosEscola->registro10->$sEstruturaValidacao ) ) {\n $iComputadorExistentes = $oDadosEscola->registro10->$sEstruturaValidacao;\n }\n }\n\n if( $iSequencial == 3000003\n && $oDadosEscola->registro10->$sEstruturaValidacao != ''\n && ( $iComputadorExistentes == 0 || $iComputadorExistentes < $oDadosEscola->registro10->$sEstruturaValidacao )\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Quantidade de computadores informados para uso administrativo\";\n $sMensagem .= \" ({$oDadosEscola->registro10->$sEstruturaValidacao}), é maior que a quantidade de\";\n $sMensagem .= \" computadores existentes na escola ({$iComputadorExistentes}).\";\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iSequencial == 3000024\n && $oDadosEscola->registro10->$sEstruturaValidacao != ''\n && ( $iComputadorExistentes == 0 || $iComputadorExistentes < $oDadosEscola->registro10->$sEstruturaValidacao )\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Quantidade de computadores informados para uso dos alunos\";\n $sMensagem .= \" ({$oDadosEscola->registro10->$sEstruturaValidacao}), é maior que a quantidade de\";\n $sMensagem .= \" computadores existentes na escola ({$iComputadorExistentes}).\";\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if (!DadosCensoEscola::validarEquipamentosGeral($oExportacaoCenso, $iSequencial, $oDadosEscola->registro10->$sEstruturaValidacao)) {\n $lTodosDadosValidos = false;\n }\n }\n\n if( $iComputadorExistentes > 0 ) {\n\n if( $oDadosEscola->registro10->acesso_internet === '' ) {\n\n $sMensagem = \"Deve ser informado se a escola possui acesso a internet ou não, pois foi informada a\";\n $sMensagem .= \" quantidade de computadores que a mesma possui.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->acesso_internet == 1 && $oDadosEscola->registro10->banda_larga == '' ) {\n\n $sMensagem = \"Deve ser informado se a escola possui banda larga, pois foi informado que a mesma\";\n $sMensagem .= \" possui acesso a internet.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if ($oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Número do CPF do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if (trim($oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel) == \"00000000191\") {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Número do CPF ({$oDadosEscola->registro10->numero_cpf_responsavel_gestor_responsavel}) do\";\n $sMensagem .= \" gestor informado é inválido.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro10->nome_gestor == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n $sExpressao = '/([a-zA-Z])\\1{3}/';\n $lValidacaoExpressao = preg_match($sExpressao, $oDadosEscola->registro10->nome_gestor) ? true : false;\n\n if ($lValidacaoExpressao) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Nome do gestor inválido. Não é possível informar mais de 4 letras repetidas em sequência.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if ($oDadosEscola->registro10->cargo_gestor_responsavel == '') {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Cargo do gestor é obrigatório\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n */\n if ($oDadosEscola->registro00->situacao_funcionamento == 1) {\n\n if ($oDadosEscola->registro10->local_funcionamento_escola_predio_escolar == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_templo_igreja == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_salas_empresas == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_casa_professor == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_salas_outras_escolas == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_galpao_rancho_paiol_bar == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_un_internacao_prisional == 0 &&\n $oDadosEscola->registro10->local_funcionamento_escola_outros == 0) {\n\n $sMensagem = \"Deve ser selecionado pelo menos um local de funcionamento da escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n /**\n * Validações que serão executadas caso a situação de funcionamento seja igual a 1\n * 1 - em atividade\n * e o local de funcionamento seja igual a 7\n * 7 - Prédio escolar\n */\n if ($oDadosEscola->registro10->local_funcionamento_escola_predio_escolar == 1) {\n\n if ( empty( $oDadosEscola->registro10->forma_ocupacao_predio ) ) {\n\n $sMensagem = \"Escola Ativa. Deve ser selecionada uma forma de ocupação do prédio.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->predio_compartilhado_outra_escola == '') {\n\n $sMensagem = \"Escola Ativa. Deve ser informado se o prédio é compartilhado ou não com outra escola.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->predio_compartilhado_outra_escola == 1 ) {\n\n $iTotalCodigoVazio = 0;\n $lErroCodigoVazio = false;\n $lErroCodigoInvalido = false;\n\n for( $iContador = 1; $iContador <= 6; $iContador++ ) {\n\n $sCodigoEscolaCompartilhada = \"codigo_escola_compartilha_\" . $iContador;\n if( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) == '' ) {\n $iTotalCodigoVazio++;\n }\n\n if( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) != ''\n && strlen( trim( $oDadosEscola->registro10->{$sCodigoEscolaCompartilhada} ) ) != 8 ) {\n $lErroCodigoInvalido = true;\n }\n }\n\n if( $iTotalCodigoVazio == 6 ) {\n $lErroCodigoVazio = true;\n }\n\n if( $lErroCodigoVazio ) {\n\n $sMensagem = \"Escola com prédio compartilhado. É necessário informar ao menos o código INEP de uma\";\n $sMensagem .= \" escola que compartilhe o prédio.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $lErroCodigoInvalido ) {\n\n $sMensagem = \"Código INEP de uma das escolas que compartilham o prédio, com tamanho inválido.\";\n $sMensagem .= \" Tamanho válido: 8 dígitos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n }\n\n if ($oDadosEscola->registro10->agua_consumida_alunos == '') {\n\n $sMensagem = \"Deve ser selecionada um tipo de água consumida pelos alunos.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->destinacao_lixo_coleta_periodica == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_queima == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_joga_outra_area == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_recicla == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_enterra == 0 &&\n $oDadosEscola->registro10->destinacao_lixo_outros == 0) {\n\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro(\"Destinação do lixo da escola não informado.\", ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n $lNumeroSalasExistentesValido = true;\n if( !DBNumber::isInteger( trim( $oDadosEscola->registro10->numero_salas_aula_existentes_escola ) ) ) {\n\n $lNumeroSalasExistentesValido = false;\n $sMensagem = \"Valor do 'N° de Salas de Aula Existentes na Escola' inválido. Deve ser\";\n $sMensagem .= \" informado somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $lNumeroSalasExistentesValido\n && trim( $oDadosEscola->registro10->numero_salas_aula_existentes_escola == 0 )\n ) {\n\n $sMensagem = \"O valor do campo 'N° de Salas de Aula Existentes na Escola' deve ser maior que 0.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n $lNumeroSalasUsadasValido = true;\n if( !DBNumber::isInteger( trim( $oDadosEscola->registro10->numero_salas_usadas_como_salas_aula ) ) ) {\n\n $lNumeroSalasUsadasValido = false;\n $sMensagem = \"Valor do 'N° de Salas Utilizadas como Sala de Aula' inválido. Deve ser\";\n $sMensagem .= \" informado somente números.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $lNumeroSalasUsadasValido && trim( $oDadosEscola->registro10->numero_salas_usadas_como_salas_aula == 0 ) ) {\n\n $sMensagem = \"O valor do campo 'N° de Salas Utilizadas como Sala de Aula' deve ser maior de 0.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_cede_espaco_turma_brasil_alfabetizado == '') {\n\n $sMensagem = \"Informe se a escola cede espaço para turmas do Brasil Alfabetizado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_abre_finais_semanas_comunidade == '') {\n\n $sMensagem = \"Informe se a escola abre aos finais de semana para a comunidade.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ($oDadosEscola->registro10->escola_formacao_alternancia == '') {\n\n $sMensagem = \"Informe se a escola possui proposta pedagógica de formação por alternância.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if ( $oDadosEscola->registro00->dependencia_administrativa != 3\n && trim( $oDadosEscola->registro10->alimentacao_escolar_aluno ) != 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Campo Alimentação na aba Infra estrutura do cadastro dados da escola deve ser \";\n $sMensagem .= \"informado como Oferece, pois dependência administrativa é Municipal.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n\n if( $oDadosEscola->registro10->abastecimento_agua_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->abastecimento_agua_fonte_rio_igarape_riacho_correg == 1\n || $oDadosEscola->registro10->abastecimento_agua_poco_artesiano == 1\n || $oDadosEscola->registro10->abastecimento_agua_cacimba_cisterna_poco == 1\n || $oDadosEscola->registro10->abastecimento_agua_rede_publica == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de abastecimento de água inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->abastecimento_energia_eletrica_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->abastecimento_energia_eletrica_gerador == 1\n || $oDadosEscola->registro10->abastecimento_energia_eletrica_outros_alternativa == 1\n || $oDadosEscola->registro10->abastecimento_energia_eletrica_rede_publica == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de abastecimento de energia inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->esgoto_sanitario_inexistente == 1 ) {\n\n if( $oDadosEscola->registro10->esgoto_sanitario_rede_publica == 1\n || $oDadosEscola->registro10->esgoto_sanitario_fossa == 1\n ) {\n\n $lTodosDadosValidos = false;\n $sMensagem = \"Informação de esgoto sanitário inválida. Ao selecionar a opção 'Inexistente'\";\n $sMensagem .= \", nenhum dos tipos de abastecimento deve ser selecionado.\";\n $oExportacaoCenso->logErro($sMensagem, ExportacaoCensoBase::LOG_ESCOLA);\n }\n }\n\n if( $oDadosEscola->registro10->dependencias_existentes_escola_nenhuma_relacionada == 1 ) {\n\n $lSelecionouDependencia = false;\n foreach( $aDependenciasEscola as $sDependencia ) {\n\n if( $oDadosEscola->registro10->{$sDependencia} != \"dependencias_existentes_escola_nenhuma_relacionada\"\n && $oDadosEscola->registro10->{$sDependencia} == 1\n ) {\n\n $lSelecionouDependencia = true;\n break;\n }\n }\n\n if( $lSelecionouDependencia ) {\n\n $sMensagem = \"Informação das dependências da escola inválida. Ao selecionar 'Nenhuma das dependências\";\n $sMensagem .= \" relacionadas', nenhuma das outras dependências pode ser selecionada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n\n /**\n * Variáveis para controlar o total de turmas existentes\n * 0 - Normal\n * 4 - AEE\n * 5 - AC\n */\n $iTotalTurmaNormal = 0;\n $iTotalTurmaAC = 0;\n $iTotalTurmaAEE = 0;\n\n foreach( $aDadosTurma as $oDadosTurma ) {\n\n switch( $oDadosTurma->tipo_atendimento ) {\n\n case 0:\n\n $iTotalTurmaNormal++;\n break;\n\n case 4:\n\n $iTotalTurmaAC++;\n break;\n\n case 5:\n\n $iTotalTurmaAEE++;\n break;\n }\n }\n\n /**\n * Validações referentes as opções selecionadas em relação a Atividade Complementar( AC ) e Atendimento\n * Educacional Especializado( AEE )\n * - atendimento_educacional_especializado\n * - atividade_complementar\n */\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == ''\n || $oDadosEscola->registro10->atividade_complementar == ''\n ) {\n\n $sMensagem = \"É necessário marcar uma das opções referentes a Atendimento Educacional Especializado\";\n $sMensagem .= \" e Atividade Complementar( Cadastros -> Dados da Escola -> Aba Infra Estrutura ).\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 2 ) {\n\n if( $oDadosEscola->registro10->atividade_complementar == 2 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado e Atividade Complementar foram marcados como\";\n $sMensagem .= \" 'Exclusivamente'. Ao marcar uma das opções como 'Exclusivamente', a outra deve\";\n $sMensagem .= \" ser marcada como 'Não Oferece'.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaNormal > 0 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado marcado como 'Exclusivamente'. Ao marcar esta\";\n $sMensagem .= \" opção, a escola não deve turmas de Ensino Regular, EJA e/ou Educação Especial, ou\";\n $sMensagem .= \" deve ser alterada a opção marcada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaAEE == 0 ) {\n\n $sMensagem = \"Ao selecionar Atendimento Educacional Especializado como 'Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 2 ) {\n\n if( $iTotalTurmaNormal > 0 ) {\n\n $sMensagem = \"Atividade Complementar marcada como 'Exclusivamente'. Ao marcar esta opção, a escola\";\n $sMensagem .= \" não deve turmas de Ensino Regular, EJA e/ou Educação Especial, ou deve ser alterada\";\n $sMensagem .= \" a opção marcada.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $iTotalTurmaAC == 0 ) {\n\n $sMensagem = \"Ao selecionar Atividade Complementar como 'Exclusivamente', deve existir na escola\";\n $sMensagem .= \" uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( ( $oDadosEscola->registro10->atendimento_educacional_especializado == 1\n && $oDadosEscola->registro10->atividade_complementar == 2 )\n || ( $oDadosEscola->registro10->atividade_complementar == 1\n && $oDadosEscola->registro10->atendimento_educacional_especializado == 2 )\n ) {\n\n $sMensagem = \"Ao selecionar, ou Atendimento Educacional Especializado ou Atividade Complementar, como\";\n $sMensagem .= \" 'Não Exclusivamente', obrigatoriamente a outra opção não poderá ser marcada como\";\n $sMensagem .= \" 'Exclusivamente'.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 1 && $iTotalTurmaAEE == 0 ) {\n\n $sMensagem = \"Ao selecionar Atendimento Educacional Especializado como 'Não Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 1 && $iTotalTurmaAC == 0 ) {\n\n $sMensagem = \"Ao selecionar Atividade Complementar como 'Não Exclusivamente', deve\";\n $sMensagem .= \" existir na escola uma turma deste tipo criada e com aluno matriculado.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atendimento_educacional_especializado == 0 && $iTotalTurmaAEE > 0 ) {\n\n $sMensagem = \"Atendimento Educacional Especializado marcado como 'Não Oferece', porém a escola possui\";\n $sMensagem .= \" turmas cadastradas para este tipo de atendimento.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $oDadosEscola->registro10->atividade_complementar == 0 && $iTotalTurmaAC > 0 ) {\n\n $sMensagem = \"Atividade Complementa marcado como 'Não Oferece', porém a escola possui turmas\";\n $sMensagem .= \" cadastradas para este tipo de atendimento.\";\n $lTodosDadosValidos = false;\n $oExportacaoCenso->logErro( $sMensagem, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n return $lTodosDadosValidos;\n }", "public function testTiempoInvalido()\n {\n $tiempo = new TiempoFalso;\n $recargable = new Recargable();\n $medio = new Medio(0, $tiempo,$recargable);\n\t\t$saldoEsperado =0;\n\n $this->assertTrue($medio->recargar(1119.90));\t//Carga 1300.00\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado =$saldoEsperado+1300.00;\n\n $tiempo->avanzar(300);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado =$saldoEsperado-(32.50/2);\n\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n\n $tiempo->avanzar(50);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n\t\t$saldoEsperado=$saldoEsperado-(32.50/2);\n\n $tiempo->avanzar(265);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n $tiempo->avanzar(584);\n $this->assertEquals($medio->restarSaldo(\"153\"), true);\n $this->assertEquals($medio->restarSaldo(\"153\"), false);\n }", "public function validarArquivo(){\n\n if (empty($this->aRegistrosRetencao)) {\n throw new Exception( _M( self::MENSAGENS . 'erro_validar_arquivo') );\n }\n\n /**\n * Verificamos os registros e caso ocorra inconsistencia populamos o array de Registros inconsistentes\n */\n foreach ($this->aRegistrosRetencao as $oRegistroRetencao) {\n\n /**\n * Validamos se existe CGM cadastrado para o cnpj TOMADOR\n */\n if (CgmFactory::getInstanceByCnpjCpf($oRegistroRetencao->q91_cnpjtomador) == false) {\n\n $this->aRegistrosInconsistentes[] = array( \"sequencial_registro\" => $oRegistroRetencao->q91_sequencialregistro,\n \"registro\" => $oRegistroRetencao->q91_cnpjtomador,\n \"erro\" => self::TOMADOR_SEM_CGM );\n }\n }\n }", "public function validarEquipamentosGeral (IExportacaoCenso $oExportacaoCenso, $iSequencial, $sEquipamento) {\n\n $sMensagem = \"\";\n switch ($iSequencial) {\n\n case 3000002:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores: \";\n break;\n\n case 3000003:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores de Uso Administrativo: \";\n break;\n\n case 3000024:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Quantidade de Computadores de Uso dos Alunos: \";\n break;\n\n case 3000019:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Número de Salas de Aula Existentes na Escola: \";\n break;\n\n case 3000020:\n\n $sMensagem = \"Dados de Infra Estrutura da escola -> Campo Número de Salas Utilizadas Como Sala de Aula - \";\n $sMensagem .= \"Dentro e Fora do Prédio: \";\n break;\n }\n\n $lTodosDadosValidos = true;\n\n if (strlen($sEquipamento) > 4) {\n\n $lTodosDadosValidos = false;\n $sMensagemTamanho = \"Quantidade de dígitos informado inválido. É permitido no máximo 4 dígitos.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemTamanho, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n if( $sEquipamento != null ) {\n\n if( !DBNumber::isInteger( $sEquipamento ) ) {\n\n $lTodosDadosValidos = false;\n $sMensagemInteiro = \"Valor informado para quantidade inválido. Informe apenas números no campo de quantidade.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemInteiro, ExportacaoCensoBase::LOG_ESCOLA );\n }\n }\n\n if( DBNumber::isInteger($sEquipamento) && $sEquipamento == 0 ) {\n\n $lTodosDadosValidos = false;\n $sMensagemInvalido = \"Valor informado para quantidade inválido. Deixar o campo vazio, ao invés de informar 0.\";\n $oExportacaoCenso->logErro( $sMensagem.$sMensagemInvalido, ExportacaoCensoBase::LOG_ESCOLA );\n }\n\n return $lTodosDadosValidos;\n }", "protected function insereErradas() {\n date_default_timezone_set('America/Sao_Paulo');\n $datahora = date(\"Y-m-d H:i:s\");\n $create = new Create;\n $Dados = array(\"datahora\" => $datahora, \"flag\" => $this->resposta, \"usuario_id\" => $this->userid,);\n $create->IniCreate(\"erradas\", $Dados);\n if ($create->getResult()):\n return 0; // Cadastrado errada e retorna flag Incorreta\n endif;\n }", "public function validaDatos(){\n\t\t\t\t\n\t\t\t\tif( $this->nombre == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su nombre por favor.</strong><br />\";\n\t\t\t\t\t}else if( strlen($this->nombre) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un nombre con menos caracteres. (20 caracteres maximo - sin espacios)</strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif( $this->email == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su email por favor.</strong><br />\";\n\t\t\t\t\t}else if( !preg_match($this->sintax,$this->email)){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese formato correcto de email</strong><br /> 'ej: nombre@dominio.com' .<br />\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->asunto == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su asunto por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->asunto) > 20 ){\n\t\t\t\t\t\t$errores.= \"<strong>* Escriba un asunto con menos caracteres. (20 caracteres maximo - sin espacios) </strong><br />\";\n\t\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\tif( $this->msj == \"\" ){\n\t\t\t\t\t\t$this->errores.= \"<strong>* Ingrese su mensaje por favor. </strong><br />\";\n\t\t\t\t\t}else if( strlen($this->msj) > 200 ){\n\t\t\t\t\t$this->errores.= \"<strong>* Maximo permitido 200 caracteres. </strong><br />\";\n\t\t\t\t\t}\n\t\t\t}", "function comprobar_NUMINVENTARIOESPACIO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->NUMINVENTARIOESPACIO == null) || (strlen($this->NUMINVENTARIOESPACIO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"NUMINVENTARIOESPACIO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif((int)$this->NUMINVENTARIOESPACIO<=0){\n\t $mensajeError = array (\n \"nombreatributo\" => \"NUMINVENTARIOESPACIO\",\n \"codigoincidencia\" => \"00004\",\n \"mensajeerror\" => \"Valor de atributo numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif((int)$this->NUMINVENTARIOESPACIO>=99999999){\n\t $mensajeError = array (\n \"nombreatributo\" => 'NUMINVENTARIOESPACIO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[\\d]+$/\",$this->NUMINVENTARIOESPACIO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'NUMINVENTARIOESPACIO',\n \"codigoincidencia\" => \"00070\",\n \"mensajeerror\" => \"Solo se permiten números\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "private function mensagemPrazoEmissao() {\n\n $oContribuinte = $this->_session->contribuinte;\n $iInscricaoMunicipal = $oContribuinte->getInscricaoMunicipal();\n $iIdContribuinte = $oContribuinte->getIdUsuarioContribuinte();\n\n try {\n\n $iQuantidadeNotasEmissao = Contribuinte_Model_NotaAidof::getQuantidadeNotasPendentes(\n $iInscricaoMunicipal,\n NULL,\n Contribuinte_Model_Nota::GRUPO_NOTA_RPS);\n\n if ($iQuantidadeNotasEmissao == 0) {\n\n $sMensagem = 'Limite de notas para emissão atingido, faça uma nova requisição.';\n $this->view->bloqueado_msg = $this->translate->_($sMensagem);\n\n return FALSE;\n }\n\n $oParamContribuinte = Contribuinte_Model_ParametroContribuinte::getById($iIdContribuinte);\n $sMensagemErroEmissao = 'Você possui \"%s\" notas para emissão. É importante gerar uma nova requisição.';\n\n // Verifica a quantidade de notas pela configuracao do Contribuinte\n if (is_object($oParamContribuinte) && $oParamContribuinte->getAvisofimEmissaoNota() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamContribuinte->getAvisofimEmissaoNota()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n } else {\n\n $oParamPrefeitura = Administrativo_Model_Prefeitura::getDadosPrefeituraBase();\n\n if (is_object($oParamPrefeitura) && $oParamPrefeitura->getQuantidadeAvisoFimEmissao() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamPrefeitura->getQuantidadeAvisoFimEmissao()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n }\n }\n } catch (Exception $e) {\n\n echo $this->translate->_('Ocorreu um erro ao verificar a quantidade limite para emissão de notas.');\n\n return FALSE;\n }\n\n return TRUE;\n }", "function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['marca']))?\r\n $_REQUEST['marca']:\"\";\r\n $datos[1] = (isset($_REQUEST['modelo']))?\r\n $_REQUEST['modelo']:\"\";\r\n $datos[2] = (isset($_REQUEST['matricula']))?\r\n $_REQUEST['matricula']:\"\";\r\n \r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarMarca($datos[0]);\r\n $errores[1] = !validarModelo($datos[1]);\r\n $errores[2] = !validarMatricula($datos[2]);\r\n \r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1] ||\r\n $errores[2]);\r\n \r\n}", "public function validarCorreo() {\r\n if (!$this->hasErrors(\"correoElectronico\")) {\r\n $usuario = null;\r\n \r\n if ($this->getScenario() == 'registro') {\r\n $usuario = Usuario::model()->find('correoElectronico=:correo', array(':correo' => $this->correoElectronico));\r\n }else if($this->getScenario() == 'actualizar'){\r\n $usuario = Usuario::model()->find('correoElectronico=:correo AND identificacionUsuario<>:cedula', array(':correo' => $this->correoElectronico, ':cedula' => $this->cedula));\r\n }\r\n\r\n if ($usuario !== null) {\r\n $this->addError('correoElectronico', 'Correo electrónico ya registrado');\r\n }\r\n }\r\n }", "function validarRegistro()\n {\n $mensaje=\"\";\n $adicionado=\"\";\n $idSolicitud=(isset($_REQUEST['idSolicitud'])?$_REQUEST['idSolicitud']:'');\n \n if(is_numeric($idSolicitud) && $idSolicitud){\n $this->solicitud= $this->consultarDetalleSolicitud($idSolicitud);\n\n $datosRegistro=array('solicitante'=>$this->solicitud[0]['SOL_NRO_IDEN_SOLICITANTE'],\n 'identificacion'=>$this->solicitud[0]['SOL_CODIGO'],\n 'correo'=>$this->solicitud[0]['CORREO_ELECTRONICO'],\n 'tipo_documento'=>$this->solicitud[0]['UWD_TIPO_IDEN'],\n 'tipo_contrato'=>$this->solicitud[0]['SOL_TIPO_VINCULACION'],\n 'fecha_inicio'=>$this->solicitud[0]['SOL_FECHA_INICIO'],\n 'fecha_fin'=>(isset($this->solicitud[0]['SOL_FECHA_FIN'])?$this->solicitud[0]['SOL_FECHA_FIN']:''),\n 'tipo_cuenta'=> $this->solicitud[0]['SOL_USUWEBTIPO'],\n 'tipo_usuario'=> $this->solicitud[0]['TIPO_USUARIO'],\n 'estado_usuario'=> 'A',\n 'secuencia'=>1,\n 'anexo'=>''\n );\n //busca si existe registro ya de usuario para rescatar la clave \n $registro = $this->buscarRegistroUsuario($datosRegistro['identificacion']);\n if(is_array($registro)){\n $datosRegistro['clave']=$registro[0]['CLA_CLAVE'];\n \n }else{\n $datosRegistro['clave']=$this->asignarClave();\n $datosRegistro['asigna_clave']='ok';\n }\n \n $datosRegistro = $this->asignarDependencia($datosRegistro);\n if(is_array($datosRegistro)){\n $usuario_existe = $this->buscarRegistroUsuarioYaExiste($datosRegistro[0]);\n \n if(is_array($usuario_existe) && $usuario_existe){\n $adicionado=$this->actualizarUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->actualizarCuentaUsuarioMysql($datosRegistro[0]);\n \n }else{\n $adicionado=$this->adicionarCuentaUsuario($datosRegistro[0]);\n $adicionadoMysql=$this->adicionarCuentaUsuarioMysql($datosRegistro[0]);\n }\n\n foreach ($datosRegistro as $key => $registroUsuario) {\n \n $usuarioWeb = $this->buscarRegistroUsuarioWeb($registroUsuario['identificacion'], $registroUsuario['tipo_cuenta'], $registroUsuario['dependencia']);\n \n if(is_array($usuarioWeb)){\n $actualizadoweb[$key]=$this->actualizarCuentaUsuarioWeb($registroUsuario);\n \n }else{\n $adicionadoweb[$key]=$this->adicionarCuentaUsuarioWeb($registroUsuario);\n \n }\n }\n }\n var_dump($adicionado);\n var_dump($adicionadoMysql);\n if($adicionado && $adicionadoMysql){\n $modificado=$this->actualizarEstadoSolicitud($idSolicitud,3);\n \n $mensaje='Usuario creado con exito';\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Registro de usuario '.$datosRegistro[0]['identificacion'],\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$datosRegistro[0]['identificacion'],\n 'afectado'=>$datosRegistro[0]['identificacion']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n if((isset($datosRegistro[0]['asigna_clave'])?$datosRegistro[0]['asigna_clave']:'')=='ok'){\n $variable=\"pagina=registro_aprobarSolicitudUsuario\";\n $variable.=\"&opcion=enlace\";\n $variable.=\"&mail=\".$datosRegistro[0]['correo'];\n $variable.=\"&usu=\".$datosRegistro[0]['identificacion'];\n $variable.=\"&tipoUsu=\".$datosRegistro[0]['tipo_usuario'];\n }else{\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n }\n \n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n \n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }else{\n $mensaje='Error al crear Usuario. '.$this->mensaje;\n\n $variablesRegistro=array('usuario'=>$this->usuario,\n 'evento'=>'66',\n 'descripcion'=>'Error al registrar usuario -'.$mensaje,\n 'registro'=>\" id_solicitud->\".$idSolicitud.\", usuario-> \".$this->solicitud[0]['SOL_CODIGO'],\n 'afectado'=>$this->solicitud[0]['SOL_CODIGO']);\n\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $variable=\"pagina=admin_consultarSolicitudesUsuario\";\n $variable.=\"&opcion=consultar\";\n $variable=$this->cripto->codificar_url($variable,$this->configuracion);\n\n $this->retornar($pagina,$variable,$variablesRegistro,$mensaje);\n }\n }\n }", "function comprobar_FechaNacimiento()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->FechaNacimiento) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"FechaNacimiento\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"FechaNacimiento vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "public function rangoValido()\r\n\t {\r\n\t \tif ( trim($this->fecha_desde) !== '' && trim($this->fecha_hasta) !== '' ) {\r\n\r\n\t \t\t$fDesde = date('Y-m-d', strtotime($this->fecha_desde));\r\n\t \t\t$fHasta = date('Y-m-d', strtotime($this->fecha_hasta));\r\n\r\n\t \t\tif ( (int)date('Y', strtotime($fDesde)) == (int)date('Y', strtotime($fHasta)) ) {\r\n\t \t\t\tif ( (int)date('m', strtotime($fDesde)) == (int)date('m', strtotime($fHasta)) ) {\r\n\t \t\t\t\tif ( (int)date('d', strtotime($fDesde)) > (int)date('d', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t} elseif ( (int)date('m', strtotime($fDesde)) > (int)date('m', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\r\n\t \t\t\t}\r\n\r\n\t \t\t} elseif ( (int)date('Y', strtotime($fDesde)) < (int)date('Y', strtotime($fHasta)) ) {\r\n\r\n\t \t\t\t$this->addError('fecha_desde', Yii::t('backend', 'Rango de fecha no es valido'));\r\n\t \t\t}\r\n\t \t}\r\n\t }", "public static function validarDados( IExportacaoCenso $oExportacaoCenso ) {\n\n $lDadosValidos = true;\n $oExportacaoCenso = $oExportacaoCenso;\n $aDadosDocente = $oExportacaoCenso->getDadosProcessadosDocente();\n\n DadosCensoDocente2015::getGrauCurso();\n\n foreach( $aDadosDocente as $oDadosCensoDocente ) {\n\n $sDadosDocente = $oDadosCensoDocente->registro30->numcgm . \" - \" . $oDadosCensoDocente->registro30->nome_completo;\n $sDadosDocente .= \" - Data de Nascimento: \" . $oDadosCensoDocente->registro30->data_nascimento;\n\n $oRegistro30 = $oDadosCensoDocente->registro30;\n $oRegistro40 = $oDadosCensoDocente->registro40;\n $oRegistro50 = $oDadosCensoDocente->registro50;\n $aRegistro51 = $oDadosCensoDocente->registro51;\n\n if( !DadosCensoDocente2015::validacoesRegistro30( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $oRegistro40 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro40( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $oRegistro40 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro50( $sDadosDocente, $oExportacaoCenso, $oRegistro50, $oRegistro30 ) ) {\n $lDadosValidos = false;\n }\n\n if( !DadosCensoDocente2015::validacoesRegistro51( $sDadosDocente, $oExportacaoCenso, $oRegistro30, $aRegistro51 ) ) {\n $lDadosValidos = false;\n }\n }\n\n return $lDadosValidos;\n }", "public function retraitEspeceValidation()\n {\n $telephone = $this->utils->securite_xss($_POST['telephone']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $montant = $this->utils->securite_xss($_POST['montant']);\n $frais = $this->utils->securite_xss($_POST['frais']);\n $fkagence = $this->utils->securite_xss($_POST['fkagence']);\n $typeagence = $this->utils->securite_xss($_POST['typeagence']);\n $codevalidation = $this->utils->securite_xss($_POST['code']);\n $soldecarte = $this->utils->securite_xss($_POST['soldecarte']);\n $cni = $this->utils->securite_xss($_POST['cni']);\n $user_creation = $this->userConnecter->rowid;\n $service = ID_SERVICE_CASHOUT;\n $json = $this->compteModel->calculFraisab($service, $montant);\n $result = json_decode($json);\n if (is_object($result) && array_key_exists('frais', $result)) {\n $frais = $result->frais;\n }\n $numtransact = $this->utils->Generer_numtransaction();\n $statut = 0;\n $commentaire = 'Cashout';\n if ($typeagence == 3) {\n $montant_total = $montant + $frais;\n $montant_agence = $montant + ($frais * 0.65);\n $montant_commission = $frais * 0.35;\n $commentaire = 'Cashout Partenaire';\n $service = ID_SERVICE_CASHOUTPARTENAIRE;\n } else {\n $montant_total = $montant;\n $montant_agence = $montant;\n }\n if ($codevalidation != '' && $telephone != '' && $montant > 0 && $frais >= 0 && strlen($numtransact) == 15) {\n if ($soldecarte >= $montant_total) {\n $codeValidation = $this->utils->rechercherCodeRetrait($codevalidation, $montant);\n if ($codeValidation > 0) {\n $typecompte = $this->compteModel->getTypeCompte($telephone);\n if ($typecompte == 0) {\n $username = 'Numherit';\n $userId = 1;\n $token = $this->utils->getToken($userId);\n $soldeavant = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeavant);\n $soldeavant = $jjs->{'statusMessage'};\n $response = $this->api_numherit->debiterCompte($username, $token, $telephone, $montant_total, $service, $user_creation, $fkagence);\n $decode_response = json_decode($response);\n if ($decode_response->{'statusCode'} == 000) {\n $soldeapres = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeapres);\n $soldeapres = $jjs->{'statusMessage'};\n @$this->utils->addMouvementCompteClient($numtransact, $soldeavant, $soldeapres, $montant, $telephone, $operation = \"DEBIT\", $commentaire = \"RETRAITESPECE\");\n\n $statut = 1;\n $message = $decode_response->{'statusMessage'};\n $transactId = $decode_response->{'NumTransaction'};\n $this->utils->validerCodeRetrait($codeValidation, $cni);\n $this->agenceModel->crediter_soldeAgence($montant_agence, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n\n if ($typeagence == 3) {\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($montant_commission, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Retrait Espece';\n $this->utils->addCommission($montant_commission, $service, $fkcarte, $observation, $fkagence);\n } else {\n $observation = 'Commission Retrait Espece à faire';\n $this->utils->addCommission_afaire($montant_commission, $service, $fkcarte, $observation, $fkagence);\n }\n }\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n } else {\n $message = $decode_response->{'statusMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' - ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n } else if ($typecompte == 1) {\n $numcarte = $this->compteModel->getNumCarte($telephone);\n $numeroserie = $this->utils->returnCustomerId($numcarte);\n $last4digitclient = $this->utils->returnLast4Digits($numcarte);\n $statut = 0;\n $json = $this->api_gtp->UnLoadCard($numtransact, $numeroserie, $last4digitclient, $montant_total, 'XOF', 'RetraitEspece');\n $return = json_decode(\"$json\");\n $response = $return->{'ResponseData'};\n if ($response != NULL && is_object($response)) {\n if (array_key_exists('ErrorNumber', $response)) {\n $errorNumber = $response->{'ErrorNumber'};\n $message = $response->{'ErrorMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $errorNumber . '-' . $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n } else {\n $transactionId = $response->{'TransactionID'};\n $message = 'Succes';\n if ($transactionId > 0) {\n $statut = 1;\n $this->utils->validerCodeRetrait($codeValidation, $cni);\n $this->agenceModel->crediter_soldeAgence($montant_agence, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactionId);\n if ($typeagence == 3) {\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($montant_commission, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Retrait Espece';\n $this->utils->addCommission($montant_commission, $service, $fkcarte, $observation, $fkagence);\n } else {\n $observation = 'Commission Retrait Espece à faire';\n $this->utils->addCommission_afaire($montant_commission, $service, $fkcarte, $observation, $fkagence);\n }\n }\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n }\n }\n } else {\n $message = 'Response GTP not object';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n }\n } else {\n $message = 'Code de validation incorrect';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok2'));\n }\n } else {\n $message = 'Solde compte insuffisant';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok3'));\n }\n } else {\n $message = 'Paramétres renseignés incorrects';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Retrait compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRetraitCompte/' . base64_encode('nok4') . '/' . base64_encode($telephone));\n }\n }", "public function validar_reserva($a){\n\t\t$this->error = \"false\";\n\t\tswitch (true) {\n\t\t\tcase ( (strlen($a['estacionamiento']) == 0)):\n\t\t\t\t$this->msj = \"Ingrese estacionamiento.\";\n\t\t\t\tbreak;\n\t\t\tcase ( (strlen($a['fecha']) == 0)):\n\t\t\t\t$this->msj = \"Ingrese fecha.\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ModificarReserva($a);\n\n\t\t\t\t$this->error = \"true\";\n\t\t\t\t$this->msj = \"Reserva editado con exito.\";\n\t\t}\n\t\treturn $this->res;\n\t}", "function ValidarFormularioNuevaReserva($DatosFotmulario = array()){\n\t\t$resultado = array();\n\n\t\t//Creaar un objeto de validacion\n\t\t$campo1 = new stdClass();\n\t\t$campo1->estado = false;\n\t\t$campo1->valor = '';\n\n\t\t$campo2 = new stdClass();\n\t\t$campo2->estado = false;\n\t\t$campo2->valor = '';\n\n\t\t$campo3 = new stdClass();\n\t\t$campo3->estado = false;\n\t\t$campo3->valor = '';\n\n\t\t$campo4 = new stdClass();\n\t\t$campo4->estado = false;\n\t\t$campo4->valor = '';\n\n\t\t$campo5 = new stdClass();\n\t\t$campo5->estado = false;\n\t\t$campo5->valor = '';\n\n\t\t$campo6 = new stdClass();\n\t\t$campo6->estado = false;\n\t\t$campo6->valor = '';\n\n\t\t$campo7 = new stdClass();\n\t\t$campo7->estado = false;\n\t\t$campo7->valor = '';\n\t\n\n\t\t//fechaInicio\n\t\tif($DatosFotmulario['fechaInicio'] != '')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$campo1->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio'];\n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo1->estado = false; //ok\n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\n\n\n\t\t//fechaFin\n\t\tif($DatosFotmulario['fechaFin'] != '')\n\t\t\t{\n\t\t\t\t$campo2->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin'];\n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo2->estado = false; //ok\n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\n\t\t\t \n\n\t\t//cantPersonas\n\t\tif($DatosFotmulario['cantPersonas'] != '')\n\t\t\t{\n\t\t\t\t$campo3->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas'];\n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo3->estado = false; //ok\n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas']; //guarda el valor vacio \n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\n\n\t\t//nombreT\n\t\tif($DatosFotmulario['nombreT'] != '')\n\t\t\t{\n\t\t\t\t$campo4->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT'];\n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo4->estado = false; //ok\n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT']; //guarda el valor vacio \n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\n\n\t\t//numHab\n\t\tif($DatosFotmulario['numHab'] != '')\n\t\t\t{\n\t\t\t\t$campo5->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab'];\n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo5->estado = false; //ok\n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab']; //guarda el valor vacio \n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\n\n\t\t//precioPorNoche\n\n\t\t\t\n\t\tif($DatosFotmulario['precioPorNoche'] != '' )\n\t\t\t{\n\t\t\t\t$campo6->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo6->valor = $DatosFotmulario['precioPorNoche'];\n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \t\t\t\t\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo6->estado6 = false; //ok\n\t\t\t\t$campo6->valor6 = $DatosFotmulario['precioPorNoche']; //guarda el valor vacio \n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \n\t\t\t}\n\n\t\t//documento\n\t\tif($DatosFotmulario['documento'] != '')\n\t\t\t{\n\t\t\t\t$campo7->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo7->valor = $DatosFotmulario['documento'];\n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo7->estado = false; //ok\n\t\t\t\t$campo7->valor = $DatosFotmulario['documento']; //guarda el valor vacio \n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\n\t\t\t\n $cont = 0;\n foreach ($resultado as $e){ \n if ($e->estado == false)\n $cont++;\n }\n\n if ($cont > 0) //Faltan campos\n return $resultado;\n else\n return array(); // Formulario OK \t\t\t\n\t}", "function validar_Validado()\n {\n\n $this->resource = 'Actividades';\n\n if ($this->no_vacio($this->validado) === false) {\n $this->code = '70032';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->es_validado($this->validado) === false) {\n $this->code = '70033';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "function ValidarExpedienteNroYearSecretaria($nroInstancia, $NroExpediente, $AnioExpediente, $Secretaria){\n try{\n\t\tglobal $conn; \n\t\tif(!isset($NroExpediente)){$NroExpediente = '';} \n\t\tif(!isset($AnioExpediente)){$AnioExpediente = '';}\n\t\t\n\t\t$sql = \"SELECT 1\n\t\t\t\t\tFROM legales.ljt_juicioentramite\n\t\t\t\t\tWHERE jt_estadomediacion = 'J'\n\t\t\t\t\tAND jt_idestado <> 3\n\t\t\t\t\tAND NVL2 (jt_anioexpediente,jt_nroexpediente || '/' || jt_anioexpediente,jt_nroexpediente) = \n\t\t\t\t\ttrim(:NroExpediente || '/' || :AnioExpediente)\n\t\t\t\t\tAND jt_idsecretaria = :Secretaria\n\t\t\t\t\tAND JT_ID <> :nroInstancia\n\t\t\t\t\tAND ROWNUM = 1\";\n\n\t\t$params = array(\n\t\t\t\t\t\":nroInstancia\" => $nroInstancia,\n\t\t\t\t\t\":Secretaria\" => $Secretaria,\n\t\t\t\t\t\":NroExpediente\" => $NroExpediente,\n\t\t\t\t\t\":AnioExpediente\" => $AnioExpediente);\n\t\t\n\t\t$result = ValorSql($sql, \"\", $params);\n\t\t//$result = 1;\n\t\t\n\t\tif($result == 1){\n\t\t\t//throw new Exception(\"Nro Expediente \".$NroExpediente.\"/\".$AnioExpediente.\", ya existe en la Secretaria \".$Secretaria.\".\");\n\t\t\tthrow new Exception(\"Expediente ya existente. \".$nroInstancia);\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n }catch (Exception $e) {\n DBRollback($conn); \n\t\tErrorConeccionDatos($e->getMessage());\n\t\treturn false;\n } \t\t\t\t\n}", "public function validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }", "public function validarCorreo() {\n if (!$this->hasErrors(\"correoElectronico\")) {\n $usuario = null;\n \n\t\t\t$usuario = Usuario::model()->find(array(\n\t\t\t\t\t'condition' => 'identificacionUsuario !=:usuario AND correoElectronico =:correo',\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t'usuario' => $this->cedula,\n\t\t\t\t\t\t\t'correo' => $this->correoElectronico\n\t\t\t\t\t)\n\t\t\t));\n\t\t\tif($usuario)\n\t\t\t\t$this->addError('correoElectronico', 'Correo ya registrado');\n }\n }", "public function validar(){\n\t\tif($this->rest->_getRequestMethod()!= 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\n\t\t$request = json_decode(file_get_contents('php://input'), true);\n\t\t$facPgPedido = $request['factura_pagos_pedido'];\n\t\t#verificamos que el registro existe\n\t\t$this->db->where('nro_pedido', $facPgPedido['nro_pedido']);\n\t\t$this->db->where('id_factura_pagos', $facPgPedido['id_factura_pagos']);\n\t\t$this->db->where('concepto', $facPgPedido['concepto']);\n\n\t\t$this->resultDb = $this->db->get($this->controllerSPA);\n\t\tif($this->resultDb->num_rows() != null && \n\t\t\t\t\t\t\t\t\t\t\t\t$request['accion'] == 'create'){\n\t\t\t$this->responseHTTP['message'] =\n\t\t\t\t\t\t\t 'Ya existe un registro con el mismo identificador';\n\t\t\t$this->responseHTTP[\"appst\"] = 2300;\n\t\t\t$this->responseHTTP['data'] = $this->resultDb->result_array();\n\t\t\t$this->responseHTTP['lastInfo'] = $this->mymodel->lastInfo();\n\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t}else{\n\t\t#validamos la informacion\n\t\t\t$status = $this->_validData( $facPgPedido );\n\t\t\tif ($status['status']){\n\n\t\t\t\t#anulamos las fechas en blanco\n\t\t\t\t$facPgPedido['fecha_inicio'] = \n\t\t\t\t(empty($facPgPedido['fecha_inicio'])) ?\tnull : \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $facPgPedido['fecha_inicio'];\n\n\t\t\t\t$facPgPedido['fecha_fin'] = (empty($facPgPedido['fecha_fin'])) ? \n\t\t\t\t\t\t\t\t\t\t\tnull : $facPgPedido['fecha_fin'];\n\n\t\t\t\tif ($request['accion'] == 'create'){\n\t\t\t\t\t$this->db->insert($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['message'] = \n\t\t\t\t\t\t\t\t\t\t\t\t'Registro creado existosamente';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1200;\n\t\t\t\t\t$this->responseHTTP['lastInfo'] = \n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->mymodel->lastInfo();\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}else{\n\t\t\t\t\t$facPgPedido['last_update'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$this->db->where('id_factura_pagos_pedido',\n\t\t\t\t\t\t\t\t\t\t $request['id_factura_pagos_pedido']);\n\t\t\t\t\t$this->db->update($this->controllerSPA, $facPgPedido);\n\t\t\t\t\t$this->responseHTTP['appst'] = 'Registro actualizado';\n\t\t\t\t\t$this->responseHTTP[\"appst\"] = 1300;\n\t\t\t\t\t$this->__responseHttp($this->responseHTTP, 201);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->responseHTTP['message'] = 'Uno de los registros'.\n\t\t\t\t \t\t\t\t'ingresados es incorrecto, vuelva a intentar';\n\t\t\t\t$this->responseHTTP[\"appst\"] = 1400;\n\t\t\t\t$this->responseHTTP['data'] = $status;\n\t\t\t\t$this->__responseHttp($this->responseHTTP, 400);\n\t\t\t}\n\t\t}\n\n\t}", "public function validarRegistroMedico($id,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$clave2,$correo,$ask,$ans,$id_esp){\n $feedback=\"\";\n if($clave1 == $clave2 ){//verifica que las claves sean iguales\n if($this->validarPass($clave1) == ' '){//verifica que la clave sea valida\n if($this->validarCorreo($correo) == 0){//verifica validas del correo\n if($ask != 0){\n if($ask==1)\n $askf=\"Nombre de su primer mascota\";\n if($ask==2)\n $askf=\"Direccionde su primer lugar de residencia\";\n if($ask==3)\n $askf=\"Nombre mejor amigo de la infancia\";\n if($ask==4)\n $askf=\"Nombre de su localidad de residencia\";\n if($ask==5)\n $askf=\"Color de su camisa favorita\";\n if($sexo != '0' ){\n if($this->verificarIdMedico($id)==0){\n if($this->insertMedico($id,$id_esp,$nombres,$apes,$tel,$fecha,$sexo,$clave1,$correo,$askf,$ans) == true){ \n $feedback='bien';\n }else{\n $feedback='5';//no insert medico \n }\n }else{\n $feedback='8';\n }\n }else{\n $feedback='7';//error de sexo\n }\n }else{\n $feedback='6';//error de pregunta\n } \n }else{\n $feedback='3';//el mail ya esta en la bd\n }\n }else{//envia tipos de error en clave\n $resultado=$this->validarPass($clave1);\n $feedback=$resultado;\n }\n }\n else{\n $feedback='2';//error las claves no son iguales\n }\n \n return $feedback; \n }", "public function guardaMovimiento($movimiento, $descripcion, $tabla, $idTabla, $nombre, $unidades, $costoUnidad, $ordenSalida )\r\n {\r\n\t$fecha=date(\"Y-m-d\");\r\n\t$hora=date(\"h:i:s\");\r\n\t$descripcion=\"$_SESSION[nombre] $_SESSION[apellido] siendo las $hora a escrito: \".$descripcion;\r\n\t$reg=mysql_query(\"select * from $this->tabla WHERE $this->ID=$idTabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\t$sql=\"INSERT INTO `$this->database`.`$this->tablaMovInv` ( `Movimiento`, `Fecha`, `Descripcion`, `TablaInv` , `idTablaInv`,`Nombre`, `Unidades`, `CostoUnidad`,`OrdenesSalida_idOrdenesSalida`) \r\n\tVALUES ('$movimiento', '$fecha', '$descripcion', '$tabla', '$idTabla', '$nombre', '$unidades', '$costoUnidad', '$ordenSalida')\";\r\n\t\r\n\tmysql_query($sql, $this->con) or die('no se pudo registrar el movimiento: ' . mysql_error());\t\r\n\treturn(1);\r\n\t\r\n\t}", "public function validarHorarios(Request $request, $empleado)\n\t{\n\t\t$ch = ChecadaCt::where('idEmpleadoCt',$empleado->idEmpleadoCt)->where('fecha',$request->input('fecha'))->first();\n\t\tif($ch != null){ //si hay una checada en esa fecha\n\t\t\t//validar si el turno empieza y termina en otro dia\n\n\t\t\tif($request->input('hora_salida') < $request->input('hora_entrada')){ //si termina el dia siguiente\n\t\t\t\t//solo validar hora salida guardada con la de entrada enviada\n\n\t\t\t\tif(!$ch->hora_entrada > $ch->hora_salida){ //verificar si la checada registrada no termina el dia siguiente\n\n\t\t\t\t\t//solo se necesita saber si la salida registrada es antes que la entrada enviada\n\t\t\t\t\tif($ch->hora_salida > $request->input('hora_entrada')){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse{ //si la checada guardada y la enviada terminan el dia siguiente\n\n\t\t\t\t\t//la validacion es igual que si terminan el mismo dia\n\t\t\t\t\tif(($request->input('hora_entrada') < $ch->hora_entrada && $request->input('hora_salida') <= $ch->hora_entrada) || ($request->input('hora_entrada') >= $ch->hora_salida && $request->input('hora_salida') > $ch->hora_salida)){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse{ //si el turno termina el mismo dia\n\t\t\t\tif(($request->input('hora_entrada') < $ch->hora_entrada && $request->input('hora_salida') <= $ch->hora_entrada) || ($request->input('hora_entrada') >= $ch->hora_salida && $request->input('hora_salida') > $ch->hora_salida)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public static function validarFecha($fecha, $fechaMaxima = '01/01/2200', $fechaMinima = \"01/01/1900\", $obligatorio = 0) { //REDISEÑO TOTAL Y AÑADIDOS PARAMETROS INICIALES\r\n $mensajeError = null;\r\n $fechaMaxima = strtotime($fechaMaxima); //PASAR A TIMESTAMP PARA PODER OPERAR\r\n $fechaMinima = strtotime($fechaMinima);\r\n if ($obligatorio == 1) {\r\n $mensajeError = self::comprobarNoVacio($fecha);\r\n }\r\n $fechaFormateada = strtotime($fecha); //CREAR FECHA PARA TRABAJAR CON LAS FUNCIONES DE PHP\r\n\r\n if (is_bool($fechaFormateada) && !empty($fecha)) {\r\n $mensajeError = \" Formato incorrecto de fecha (Año-Mes-dia) (2000-01-01).\";\r\n } else {\r\n if(!empty($fecha) && ($fechaFormateada < $fechaMinima) || ($fechaFormateada > $fechaMaxima)){\r\n $mensajeError = \" Por favor introduzca una fecha entre \" . date('d/m/Y', $fechaMinima) . \" y \" . date('d/m/Y', $fechaMaxima) . \".\";\r\n }\r\n }\r\n return $mensajeError;\r\n }", "public function validarCargo() {\n if (!$this->getTexto('cargo')) {\n $this->_view->assign('_error', 'Debe introducir la descripcion del cargo');\n $this->_view->renderizar('nuevo_cargo', 'acl');\n exit;\n }\n }", "function reporte($error = ''){\n\t\t \t //si hubo cambio de sede actualizo permisos y filtro sede (lo hago aca en las vistas que no incluyen cruds)\n \t \t if(isset($_POST['insumo']))\n \t{\n $sede_consulta = $this->input->post('insumo');//sede nueva\n $this->auth_model->cambio_sede($sede_consulta);\n \n \t}\n \n \t//set validations\n \n $this->form_validation->set_rules(\"from\", \"Desde\", \"trim|required\");\n $this->form_validation->set_rules(\"to\", \"Hasta\", \"trim|required\");\n \t $this->form_validation->set_rules(\"codigo\", \"equipo\", \"required|is_natural\");// valido que seleccione una opcion con id positivo \"seleccione\" tiene asignado -1\n $this->form_validation->set_message('is_natural', 'Por favor seleccione una opción');\n\n \t if ($this->form_validation->run() == FALSE)// validacion campos\n {\n //validation fails\n \t\t//cargo vista para cargar rengo de fechas nuevamente\n \t\t\t//css y js de la vista a cargar\n \t$data['js_files']=array('subvariable1'=> base_url().'assets/datepicker/js/jquery-1.7.2.min.js','subariable2'=>base_url().'assets/datepicker/js/jquery-ui-1.8.20.custom.min.js');\n\t\t$data['css_files']=array('subariable2'=>base_url().'assets/datepicker/css/ui-lightness/jquery-ui-1.8.20.custom.css', 'subariable3'=>base_url().'assets/css/rangos_fechas.css');\t\t\n \t\t \t\t\n \t \t $data['error'] = \"\";\n \t $data['content_view']='entregas/reporte.php';\n \t $data['equipos'] = $this->equipos_model->obtener_equipos_sede($this->session->userdata('sede_filtro')); \n \t\t $this->load->view('template',$data);\n }\n else\n {\n \t /* capturo fechas seleccionadas */\n $equipo = $this->input->post('codigo');\n $data['equipo'] = $this->equipos_model->obtener_codigo($equipo);\n \t$data['codigo_equipo'] = $equipo;\n \t \t$desde = $this->input->post('from');\n \t// agrego el horario para poder realizar la consulta\n \t$data['desde'] = $this->general_model->cambia_sql_normal($desde);\n \t$desde = \"'\".$desde. \" 00:00:00'\";\n \t$data['fecha_desde'] = $desde;\n \t$hasta = $this->input->post('to');\n \t$data['hasta'] = $this->general_model->cambia_sql_normal($hasta);\n \t$hasta = \"'\".$hasta. \" 23:59:59'\";\n \t$data['fecha_hasta'] = $hasta;\n \t\n \t//genero consulta para enviar\n \t$data['query_ad'] = $this->entregas_model->obtener_consumo_equipo($equipo ,$desde , $hasta );\n\n \tIf($data['query_ad'] == \"-1\")// consulta vacia\n \t{\n \t\t//cargo vista para cargar rengo de fechas nuevamente\n \t\t\t//css y js de la vista a cargar\n \t$data['js_files']=array('subvariable1'=> base_url().'assets/datepicker/js/jquery-1.7.2.min.js','subariable2'=>base_url().'assets/datepicker/js/jquery-ui-1.8.20.custom.min.js');\n\t\t$data['css_files']=array('subariable2'=>base_url().'assets/datepicker/css/ui-lightness/jquery-ui-1.8.20.custom.css', 'subariable3'=>base_url().'assets/css/rangos_fechas.css');\t\t\n \t\t \t\t\n \t \t $data['error'] = \"vacio\";\n \t $data['content_view']='entregas/reporte.php';\n \t $data['equipos'] = $this->equipos_model->obtener_equipos_sede($this->session->userdata('sede_filtro')); \n \t\t $this->load->view('template',$data);\n \t\t\n \t}\n \telse\n \t{\n\t\t\t\n\t\t \t$data['js_files']=array('subvariable1'=> base_url().'assets/DataTables/media/js/jquery.js','subariable2'=>base_url().'assets/DataTables/media/js/jquery.dataTables.js','subariable3'=>base_url().'assets/TableTools/js/dataTables.tableTools.js','subariable4'=>base_url().'assets/DataTables/1.10.2/jquery.dataTables.js','subariable5'=>base_url().'assets/DataTables/1.10.2/jquery.dataTables.min.js');\n\n $data['css_files']=array('subariable2'=>base_url().'assets/DataTables/media/css/jquery.dataTables.css','subariable3'=>base_url().'assets/TableTools/css/dataTables.tableTools.css','subariable4'=>base_url().'assets/TableTools/2.2.2/css/dataTables.tableTools.css','subariable5'=>base_url().'assets/css/reportes.css');\n \t $data['css_files2']=array('subariable2'=>base_url().'assets/css/reportes.css');\t\n \t $data['titulo_reporte'] = \"Informe de consumos\";\n \t $data['sede'] = $this->sedes_model->obtener_nombre($this->session->userdata('sede_filtro'));\n $data['content_view']='entregas/reporte_consumo_equipos';\n $data['menu_sede_oculto']=\"1\";\n\t $this->load->view('template',$data);\n\t\t \n\t\t} \t} \t}", "function evt__validar_datos()\r\n\t{}", "public function validationPaiementAction(Request $request) {\n\n\t\t//Recuperation de la session\n\t\t$session = $request->getSession();\n\t\t\n\t\tif ($session->get('reservation_id') == null) {\n\t\t\treturn $this->redirectToRoute('info_reservation');\n\t\t}\n\n\t\t//Recuperation de la session\n\t\t$session = $request->getSession();\n\n\t\t// Recuperation de l'entite manager\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t//Recupération du service d'envoie d'email\n\t\t$sendEmail = $this->container->get('form.email');\n\n\t\t//Recupération de la réservation\n\t\t$reservation = $this->getDoctrine()->getManager()->getRepository('FormBundle:Reservation')->find($session->get('reservation_id'));\n\n\t\t//Envoie des billets par email\n\t\t$sendEmail->envoyerEmail($reservation);\n\n\t\t// Mise à l'état de payer de la reservation\n\t\t$reservation->setEtat(1);\n\t\t$em->persist($reservation);\n\t\t$em->flush();\n\t\t \n // Création du message flash\n $session->getFlashBag()->add('validation', 'Votre paiement a été validé, vous allez recevoir un email contenant vos billets prochainement.');\n\n //Redirection vers la page de validation\n\t\treturn $this->render('FormBundle::validation.html.twig');\n\t}", "public function validarHorarios(Request $request, $empleado)\n\t{\n\t\t//validar si existe una checada en esa fecha\n\t\t$ch = Checada::where('idEmpleado',$empleado->idEmpleado)->where('fecha',$request->input('fecha'))->first();\n\t\tif($ch != null){ //si hay una checada en esa fecha\n\t\t\t//validar si el turno empieza y termina en otro dia\n\n\t\t\tif($request->input('hora_salida') < $request->input('hora_entrada')){ //si termina el dia siguiente\n\t\t\t\t//solo validar hora salida guardada con la de entrada enviada\n\n\t\t\t\tif(!$ch->hora_entrada > $ch->hora_salida){ //verificar si la checada registrada no termina el dia siguiente\n\n\t\t\t\t\t//solo se necesita saber si la salida registrada es antes que la entrada enviada\n\t\t\t\t\tif($ch->hora_salida > $request->input('hora_entrada')){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse{ //si la checada guardada y la enviada terminan el dia siguiente\n\n\t\t\t\t\t//la validacion es igual que si terminan el mismo dia\n\t\t\t\t\tif(($request->input('hora_entrada') < $ch->hora_entrada && $request->input('hora_salida') <= $ch->hora_entrada) || ($request->input('hora_entrada') >= $ch->hora_salida && $request->input('hora_salida') > $ch->hora_salida)){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse{ //si el turno termina el mismo dia\n\t\t\t\tif(($request->input('hora_entrada') < $ch->hora_entrada && $request->input('hora_salida') <= $ch->hora_entrada) || ($request->input('hora_entrada') >= $ch->hora_salida && $request->input('hora_salida') > $ch->hora_salida)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "function ValidarFechas($fechaIngreso, $fechaInicio){\n\t// $fechaInicio = formatDateSeparador(\"d/m/Y\", $fechaInicio, '-' );\t\t\n\t\n\t// date_format($fechaInicio,\"d/m/Y\");\t\n\tif( !isFechaValida($fechaIngreso) ) return 'Fecha Ingreso Invalida '.$fechaIngreso;\n\tif( !isFechaValida($fechaInicio) ) return 'Fecha Inicio Invalida '.$fechaInicio;\n\t\n\t$dias = dateDiff($fechaIngreso, $fechaInicio);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser mayor/igual a la fecha de Ingreso a la empresa. ';\n\t\n\t$hoy = date(\"d/m/Y\");\n\t$dias = dateDiff($fechaInicio, $hoy);\n\tif($dias < 0) return 'Fecha Inicio de la exposicion, Debe ser menor/igual a la fecha actual. ';\n\t\n\treturn '';\n\t\n}", "function fncValidaArchivo($IdEstado, $Path,$Archivo)\n{\n\t$TotalRegErr = CERO;\n \t$ContadorRegistros=UNO;\n \t\n \t$ContadorErrorDI = InicializaArray(80);\n\n \t$GestorArchivoErr = fopen($Path.$Archivo.\".err\", \"w\");\n \tif (!$GestorArchivoErr) \n\t{\n\t\techo \"Error al abrir archivo Error >>\".$Path.$Archivo.\".err\" .\"<<\";\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Path.$Archivo, \"r\");\n\t\tif ($GestorArchivo) \n\t\t{\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t$BanderaRegistr=0;\n\t\t // echo \"Resgistro >>\" . $Registro .\"<<\";\n\t\t $ArrRegistro = explode(\"|\",$Registro);\n\t\t $NumEmpl= $ArrRegistro[0];\n\t\t $NumFili= $ArrRegistro[1];\n\t\t $CURP= $ArrRegistro[2];\n\n\t\t $NombreEmpleado = $ArrRegistro[3];\n\t\t $BancoNvo= $ArrRegistro[SEIS];\n\t\t $NumCta = $ArrRegistro[SIETE];\n\t\t $CLABE= $ArrRegistro[OCHO];\n\t\t $CveSPC= $ArrRegistro[NUEVE];\n\t\t $UR= $ArrRegistro[14];\n\t\t $GF= $ArrRegistro[15];\n\t\t $Fun= $ArrRegistro[16];\n\t\t $SFun= $ArrRegistro[17];\n\t\t $PG= $ArrRegistro[18];\n\t\t $AI= $ArrRegistro[19];\n\t\t $PP= $ArrRegistro[20];\n\t\t $Ptda= $ArrRegistro[21];\n\t\t $Pto= $ArrRegistro[22];\n\t\t $NumPto= $ArrRegistro[23];\n\t\t $Edo= $ArrRegistro[24];\n\t\t $Mpio= $ArrRegistro[25];\n\t\t $CenRes= $ArrRegistro[26];\n\t\t $NSS= $ArrRegistro[27];\n\t\t $Pagdria= $ArrRegistro[28];\n\t\t $FteFin = $ArrRegistro[29];\n\t\t $TabPto = $ArrRegistro[30];\n\t\t $NIVEL = $ArrRegistro[31];\n\t\t $Rango = $ArrRegistro[32];\n\t\t $IndMando = $ArrRegistro[33];\n\t\t $Horario = $ArrRegistro[34];\n\t\t // el campo 36 queda libre\n\t\t $TipTra = $ArrRegistro[36];\n\t\t $NivSPC= $ArrRegistro[37];\n\t\t $IndStat= $ArrRegistro[38];\n\t\t $FecIng= $ArrRegistro[39];\n\t\t $FecIngSS= $ArrRegistro[40];\n\t\t $FecReIng= $ArrRegistro[41];\n\t\t\t\t$FecPag= $ArrRegistro[43];\n\n\t\t\t\t$PerPagIni= $ArrRegistro[44];\n\t\t\t\t$PerPagFin= $ArrRegistro[45];\n\t\t\t\t$PerAppIni= $ArrRegistro[46];\n\t\t\t\t$PerAppFin= $ArrRegistro[47];\n\n\t\t\t\t\n\n\t\t\t\t$QnaProReal= $ArrRegistro[48];\n\t\t\t\t$AnioProReal= $ArrRegistro[49];\n\n\t\t\t\t$TipoPago = $ArrRegistro[50];\n\t\t\t\t// no va (52) Instrumento de Pago Anterior (Libre) \n\t\t\t\t$IntrPagoNvo = $ArrRegistro[52];\n\t\t\t\t$Prpcns = $ArrRegistro[53];\n\t\t\t\t$Dedcns = $ArrRegistro[54];\n\t\t\t\t$Neto = $ArrRegistro[55];\n\t\t\t\t$NumTrail = $ArrRegistro[56];\n\t\t\t\t$NomProd = $ArrRegistro[58];\n\t\t\t\t$NumCtrl = $ArrRegistro[59];\n\t\t\t\t$NumCque = $ArrRegistro[60];\n\t\t\t\t// no hay regla 61\n\t\t\t\t$Jnda = $ArrRegistro[62];\n\t\t\t\t// no hay 63 Número de Días de Prima Dominical (Libre)\n\t\t\t\t$CicloFONAC = $ArrRegistro[64];\n\t\t\t\t$NumAportFONAC= $ArrRegistro[65];\n\t\t\t\t$AcumuladoFONAC= $ArrRegistro[66];\n\t\t\t\t// no hay 67 Número de faltas en la quincena (Libre)\n\t\t\t\t$LicCLUES = $ArrRegistro[68];\n\n\t\t\t\t$PorcPen1 = $ArrRegistro[69];\n\t\t\t\t$PorcPen2 = $ArrRegistro[70];\n\t\t\t\t$PorcPen3 = $ArrRegistro[71];\n\t\t\t\t$PorcPen4 = $ArrRegistro[72];\n\t\t\t\t$PorcPen5 = $ArrRegistro[73];\n\n\t\t\t\t$ElecTipRtro = $ArrRegistro[74];\t\t\t\t\n\t\t\t\t$TipUni = $ArrRegistro[75];\t\t\t\t\n\t\t\t\t$DescCR = $ArrRegistro[76];\t\t\t\t\n\n\t\t $ValidaError = fncValidaDI_1($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumEmpl);\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[UNO]++;\t\t \t\n\t\t\t\t}\n//break;\n\t\t\t\t$ValidaError = fncValidaDI_2($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumFili, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DOS]++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ValidaError = fncValidaDI_3($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CURP, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[TRES]++;\t\t \t\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_4($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_7($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $BancoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_8($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumCta);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[OCHO]++; \t\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_9($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CLABE);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_10($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CveSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_15($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $UR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_16($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $GF);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_17($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Fun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_18($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $SFun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_19($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PG);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_20($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $AI);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_21($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PP);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_22($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Ptda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_23($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_24($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_25($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Edo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_26($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Mpio);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_27($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CenRes);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_28($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_29($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pagdria);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_30($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FteFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_31($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TabPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_32($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NIVEL);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_33($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Rango);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_34($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndMando);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_35($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Horario);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t// campo 36 queda libre\n\n\t\t\t\t$ValidaError = fncValidaDI_37($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TipTra);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_38($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NivSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_39($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndStat);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_40($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_41($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIngSS, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_42($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecReIng,$FecIngSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_44($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecPag);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_45($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_46($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagFin, $PerPagIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_47($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppIni, $PerAppFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SIETE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_48($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppFin, $PerAppIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_49($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $QnaProReal);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_50($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AnioProReal,$PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_51($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipoPago);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_53($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $IntrPagoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_54($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Prpcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_55($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Dedcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_56($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Neto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_57($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumTrail);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_59($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NomProd);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_60($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCtrl);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_61($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCque);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + UNO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_63($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Jnda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_65($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $CicloFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_66($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumAportFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_67($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AcumuladoFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_69($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $LicCLUES );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_70($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen1 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_71($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen2 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_72($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen3);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_73($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen4);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_74($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen5);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_75($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $ElecTipRtro);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_76($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipUni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_77($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $DescCR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SIETE]++;\n\t\t\t\t}\n\t\t\n\t\t $ContadorRegistros++;\n\t\t }\n\n\t\t foreach ($ContadorErrorDI as &$valor) {\n \t\t\t\t \t\t$TotalRegErr = $TotalRegErr + $valor ;\n\t\t\t}\n /**\n\t\t if (!feof($GestorArchivo)) {\n\t\t echo \"Error: fallo inesperado de fgets()\\n\";\n\t\t $TotalRegErr=FALLA;\n\t\t }\n\t\t **/\n\t\t fclose($GestorArchivo);\n\t\t} // fin Gestor archivo de datos\n\t} //Fin if (!$GestorArchivoErr) \n\treturn $TotalRegErr;\n}", "public function validaEstoque(): bool\n {\n echo \"Registro de retirada efetuado com sucesso\";\n return true;\n }", "function validar_datos() {\n\t\t\tglobal $nombre, $mail, $apellido, $psw, $psw1, $telefono, $desc;\n\n\t\t\t$errores = 0;\n $msj = \"\"; \n\t\t\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t\t{\t\t\t\t\n\t\t\t\t if ($nombre == null || trim($nombre)==\"\")\n\t\t\t\t {\n\t\t\t\t\t$msj .= \"Debe ingresar un nombre\" . '\\n';\n\t\t\t\t\t$errores++;\n\t\t\t\t }\n\t\t\t\t if ($errores == 0)\n \t\treturn true;\n \t\t else\n\t\t\t\t\techo \"<script language='javascript'>alert('$msj');window.location.href='abm_marcas.php'</script>\";\n\t\t\t\t\texit; \t\t\n\t\t\t}\t\t\n\t\t}", "function validar($reservah, $reservaf) {\n list($añor, $mesr, $diar) = split('[/.-]', $reservaf);\n list($horar, $minr) = split('[:]', $reservah);\n list($dia, $mes, $año) = $this->fecha();\n list($hora, $min, $mer) = $this->horario();\n\n $result = false;\n $hoy = false;\n\n //es una fecha valida?\n if (($añor >= $año) && ($mesr >= $mes) && ($diar >= $dia)) {\n //es hoy?\n if (($añor == $año) && ($mesr == $mes) && ($diar == $dia)) {\n $hoy = true;\n }\n if ($hoy) {\n //es hoy\n //verifico que sea una hora valida, y no una que ya pasó.\n if (($horar >= $hora) || ($horar == $hora && $minr > $min)) {\n $result = true;\n }\n } else {\n //es otro dia\n $result = true;\n }\n }\n return $result;\n }", "public function validarCedula() {\n if (!$this->hasErrors()) {\n// $usuario = Usuario::model()->findByPk($this->cedula);\n// if ($usuario !== null) {\n// $this->addError('cedula', 'Cédula ya registrada');\n// }\n \t\n }\n }", "public function rechargeEspeceValidation()\n {\n $telephone = $this->utils->securite_xss($_POST['telephone']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $soldeAgence = $this->utils->securite_xss($_POST['soldeagence']);\n $montant = $this->utils->securite_xss($_POST['montant']);\n $frais = $this->utils->securite_xss($_POST['frais']);\n $fkagence = $this->utils->securite_xss($_POST['fkagence']);\n $codevalidation = $this->utils->securite_xss($_POST['code']);\n $user_creation = $this->userConnecter->rowid;\n $service = ID_SERVICE_RECHARGE_ESPECE;\n $frais = $this->compteModel->calculFrais($service, $montant);\n\n $numtransact = $this->utils->Generer_numtransaction();\n $statut = 0;\n $commentaire = 'Recharge Espece';\n\n if ($codevalidation != '' && $telephone != '' && $montant > 0 && $frais > 0 && $soldeAgence != '' && strlen($numtransact) == 15) {\n //if ($soldeAgence >= ($montant + $frais)) {\n if ($soldeAgence >= $montant) {\n $codeValidation = $this->utils->rechercherCoderechargement($codevalidation, $fkagence);\n if ($codeValidation > 0) {\n $typecompte = $this->compteModel->getTypeCompte($telephone);\n if ($typecompte == 0) {\n $username = 'Numherit';\n $userId = 1;\n $token = $this->utils->getToken($userId);\n $soldeavant = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeavant);\n $soldeavant = $jjs->{'statusMessage'};\n\n $response = $this->api_numherit->crediterCompte($username, $token, $telephone, $montant, $service, $user_creation, $fkagence);\n\n $decode_response = json_decode($response);\n if ($decode_response->{'statusCode'} == 000) {\n $soldeapres = $this->api_numherit->soldeCompte($username, $token, $telephone);\n $jjs = json_decode($soldeapres);\n $soldeapres = $jjs->{'statusMessage'};\n @$this->utils->addMouvementCompteClient($numtransact, $soldeavant, $soldeapres, $montant, $telephone, $operation = \"CREDIT\", $commentaire = \"RECHARGEMENTESPECE\");\n\n $statut = 1;\n $message = $decode_response->{'statusMessage'};\n $transactId = $decode_response->{'NumTransaction'};\n $this->utils->changeStatutCoderechargement($codeValidation);\n $this->agenceModel->debiter_soldeAgence($montant, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($frais, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Recharge Espece';\n $this->utils->addCommission($frais, $service, $fkcarte, $observation, $fkagence);\n\n } else {\n $observation = 'Commission Recharge Espece à faire';\n $this->utils->addCommission_afaire($frais, $service, $fkcarte, $observation, $fkagence);\n }\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n } else {\n $message = $decode_response->{'statusMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $decode_response->{'statusMessage'}, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n } else if ($typecompte == 1) {\n $numcarte = $this->compteModel->getNumCarte($telephone);\n $numeroserie = $this->utils->returnCustomerId($numcarte);\n $last4digitclient = $this->utils->returnLast4Digits($numcarte);\n\n $statut = 0;\n $json = $this->api_gtp->LoadCard($numtransact, $numeroserie, $last4digitclient, $montant, 'XOF', 'RechargementEspece');\n $return = json_decode($json);\n $response = $return->{'ResponseData'};\n if ($response != NULL && is_object($response)) {\n if (array_key_exists('ErrorNumber', $response)) {\n $errorNumber = $response->{'ErrorNumber'};\n $message = $response->{'ErrorMessage'};\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $errorNumber . '-' . $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n } else {\n $transactionId = $response->{'TransactionID'};\n $message = 'Succes';\n if ($transactionId > 0) {\n $statut = 1;\n $this->utils->changeStatutCoderechargement($codeValidation);\n $this->agenceModel->debiter_soldeAgence($montant, $fkagence);\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactionId);\n $crediterCarteCommission = $this->utils->crediter_carteParametrable($frais, 1);\n if ($crediterCarteCommission == 1) {\n $observation = 'Commission Recharge Espece';\n $this->utils->addCommission($frais, $service, $fkcarte, $observation, $fkagence);\n\n\n } else {\n $observation = 'Commission Recharge Espece à faire';\n $this->utils->addCommission_afaire($frais, $service, $fkcarte, $observation, $fkagence);\n }\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('ok') . '/' . base64_encode($telephone) . '/' . base64_encode($montant) . '/' . base64_encode($frais) . '/' . base64_encode($numtransact));\n }\n }\n } else {\n $message = 'Response GTP not object';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok1') . '/' . base64_encode($message));\n }\n }\n } else {\n $message = 'Code de validation incorrect';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok2'));\n }\n } else {\n $message = 'Solde agence insuffisant';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok3'));\n }\n } else {\n $message = 'Paramétres renseignés incorrects';\n $transactId = 0;\n $this->utils->SaveTransaction($numtransact, $service, $montant, $fkcarte, $user_creation, $statut, $commentaire . ' ' . $message, $frais, $fkagence, $transactId);\n $this->utils->log_journal('Recharge compte', 'Téléphone compte:' . $telephone . ' Montant:' . $montant . ' Frais:' . $frais . ' Numtransact:' . $numtransact, $message, 2, $user_creation);\n $this->rediriger('compte', 'validationRechargeCompte/' . base64_encode('nok4') . '/' . base64_encode($telephone));\n }\n }", "public function datos_validos_reserva($nombre, $fecha, $hora_inicio, \n $hora_fin) {\n $mensaje = \"\";\n $mensaje .= $this->validar_nombre($nombre);\n $mensaje .= $this->hora_fecha_validas($fecha, $hora_inicio, $hora_fin);\n return $mensaje;\n }", "public function validateDataInvoice(): void\n {\n $this->validarDatos($this->datos, $this->getRules('fe'));\n\n $this->validarDatosArray($this->datos->arrayOtrosTributos, 'tributos');\n\n /** @phpstan-ignore-next-line */\n if (property_exists($this->datos, 'arraySubtotalesIVA')) {\n $this->validarDatosArray((array) $this->datos->arraySubtotalesIVA, 'iva');\n }\n\n $this->validarDatosArray($this->datos->comprobantesAsociados, 'comprobantesAsociados');\n\n if ($this->ws === 'wsfe') {\n if (property_exists($this->datos, 'arrayOpcionales')) {\n $this->validarDatosArray((array) $this->datos->arrayOpcionales, 'opcionales');\n }\n } elseif ($this->ws === 'wsmtxca') {\n $this->validarDatosArray($this->datos->items, 'items');\n }\n }", "function fecha_entrega($fecha_entrega)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\tif($fecha_entrega < $fecha_valida)\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_entrega', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"noEmpleado\"])) {\n $this->numEmpErr = \"El numero de empleado es requerido\";\n } else {\n $this->noEmpleado = $this->test_input($_POST[\"noEmpleado\"]);\n if (is_numeric($this->noEmpleado)) {\n $this->numEmpErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombre\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombre\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carrera\"])) {\n $this->carreraErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carrera\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"telefono\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefono\"]);\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "public function check_existe_mensalidade($mensalidade_data_vencimento) {\n $mensalidade_mensalista_id = $this->input->post('mensalidade_mensalista_hidden_id');\n\n /* Verifica no banco se há mensalidade já cadastrada para o mensalista e coma data passsados no post */\n $mensalidade_user = $this->core_model->get_by_id('mensalidades', array('mensalidade_mensalista_id' => $mensalidade_mensalista_id, 'mensalidade_data_vencimento' => $mensalidade_data_vencimento));\n\n if ($mensalidade_user) {\n\n /* Faz o explode da $mensalidade_data_vencimento do post */\n $mensalidade_data_vencimento_post = explode('-', $mensalidade_data_vencimento);\n\n\n /* Faz o explode da $mensalidade_data_vencimento vinda do banco */\n $mensalidade_data_vencimento_user = explode('-', $mensalidade_user->mensalidade_data_vencimento);\n\n\n\n if ($mensalidade_data_vencimento_post[0] == $mensalidade_data_vencimento_user[0] && $mensalidade_data_vencimento_post[1] == $mensalidade_data_vencimento_user[1]) {\n $this->form_validation->set_message('check_existe_mensalidade', 'Para o mensalista informado, já existe uma mensalidade para essa data');\n return FALSE;\n } else {\n return TRUE;\n }\n } else {\n return TRUE;\n }\n }", "function validacao($post, &$erro){\n $array = array('nome_autor','sobrenome_autor');\n //FOREACH PERCORRERÁ O ARRAY...\n foreach($array as $campo){\n //VERIFICARÁ SE CAMPOS EXISTEM...\n if(isset($post[$campo])){\n //E SE ESTÃO VAZIOS...\n if(!empty($post[$campo])){\n //DEPOIS VERIFICARÁ SE CAMPOS FORAM PREENCHIDOS DE FORMA CORRETA...\n switch($campo){\n case 'nome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n echo 'erro na validacao do campo ' . $campo;\n $erro[$campo] = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n case 'sobrenome_autor':\n if(!(strlen($post[$campo]) <= 50)){\n $erro = 'O campo deve ter no máximo 50 caracteres!';\n return false;\n }\n break;\n \n default:\n break;\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }else{\n $erro[$campo] = 'Campo obrigatório';\n }\n }\n \n if(empty($erro)){\n return true;\n }else{\n return false;\n }\n \n\t}", "function validar_Fecha()\n {\n $this->resource = 'Actividades';\n $fecha_menor = strtotime(\"2021-01-01 00:00:00\");\n $fecha_mayor = strtotime(\"2050-01-01 00:00:00\");\n $fecha_entrada = strtotime($this->fecha);\n\n if ($this->no_vacio($this->fecha) === false) {\n $this->code = '70027';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->formato_fecha($this->fecha) === false) {\n $this->code = '70028';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada > $fecha_mayor) {\n $this->code = '70029';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada < $fecha_menor) {\n $this->code = '70030';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "public function validationAction($id,Request $request,$dateSortie,$nomEnfant,$prenomEnfant) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n } \n \n $em = $this->getDoctrine()->getManager(); \n //on verifie que les infos sont correctes\n if($this->parametreValide2($id, $dateSortie) == false) {\n return $this->pageErreur(\"informations fournies non correctes\");\n }\n $sortie = $this->getSortie($id, $dateSortie); \n $parents = $em->getRepository('SC\\UserBundle\\Entity\\User')->findOneByEmail($request->getSession()->get('email'));\n //on recupere les enfants pour la vue principale\n $listEnfants = $em->getRepository('SC\\UserBundle\\Entity\\Enfant')->findBy(array('userParent' => $parents));\n $saison = new Saison;\n $year = $saison->connaitreSaison(); \n //on verifie que l'enfant est bien un des fils de l'utilisateur, et qu'il est bien inscirt a la sortie\n if($this->estEnfant($nomEnfant,$prenomEnfant,$parents) == false OR $this->estInscrit($id,$sortie,$request->getSession()->get('email'),$nomEnfant,$prenomEnfant,$year) == false) {\n return $this->pageErreur(\"Erreur sur l'identité de l'enfant\");\n }\n //on met a jour l'entite\n $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')\n ->confirmationParticipation($id,$dateSortie,$nomEnfant,$prenomEnfant,$year,$request->getSession()->get('email'));\n $request->getSession()->getFlashBag()->add('info', 'la confirmation de votre participation a bien ete prise en compte');\n \n return $this->render('SCUserBundle:Security:monCompte.html.twig',array('listEnfants'=>$listEnfants));\n }", "public function cancelarEncerramentoProgressaoParcial (ProgressaoParcialAluno $oProgressaoParcial) {\n\n if (!db_utils::inTransaction()) {\n throw new DBException(\"Sem Transação com o banco de dados ativa.\");\n }\n\n $oMensagem = new stdClass();\n $oMensagem->disciplina = $oProgressaoParcial->getDisciplina()->getNomeDisciplina();\n $oMensagem->etapa = $oProgressaoParcial->getEtapa()->getNome();\n $oMensagem->aluno = $oProgressaoParcial->getAluno()->getNome();\n\n $oUltimaMatricula = MatriculaRepository::getUltimaMatriculaAluno( $oProgressaoParcial->getAluno() );\n\n if( $oUltimaMatricula->getEtapaDeOrigem()->getOrdem() != $oProgressaoParcial->getEtapa()->getOrdem()\n && $oUltimaMatricula->isConcluida()\n ) {\n\n $sMensagem = \"A progressão Parcial / Dependência do {$oMensagem->aluno} \";\n $sMensagem .= \"na disciplina {$oMensagem->disciplina} ({$oMensagem->etapa}), não pode ser encerrada,\";\n $sMensagem .= \" pois a matrícula do aluno na etapa posterior encontra-se concluída.\";\n $oMensagem->mensagem = $sMensagem;\n $this->informarErro($oMensagem);\n return false;\n }\n\n /**\n * caso a progressao parcial não esteja encerrada. devemos ignorar essa progressão.\n */\n if (!$oProgressaoParcial->getVinculoRegencia()->isEncerrado()) {\n\n $sMensagem = \"A progressão Parcial / Dependência do {$oMensagem->aluno} \";\n $sMensagem .= \"na disciplina {$oMensagem->disciplina} ({$oMensagem->etapa}) não está encerrada\";\n $oMensagem->mensagem = $sMensagem;\n $this->informarErro($oMensagem);\n return false;\n }\n $oProgressaoParcial->reativar();\n return true;\n }", "function comprobar_sexo()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->sexo) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"sexo\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"sexo vacio\"]);\n\n\t\t$correcto = false;\n\t}\n\n\treturn $correcto;\n}", "public function store(Request $request, $modalidadeId){\n \n //Obtendo apenas os tipos de extensões selecionadas\n $tiposExtensao = Modalidade::find($modalidadeId);\n \n $mytime = Carbon::now('America/Recife');\n $mytime = $mytime->toDateString();\n $evento = Evento::find($request->eventoId);\n if($evento->inicioSubmissao > $mytime){\n if($mytime >= $evento->fimSubmissao){\n return redirect()->route('home');\n }\n }\n\n $validatedData = $request->validate([\n 'nomeTrabalho' => ['required', 'string',],\n 'areaId' => ['required', 'integer'],\n 'modalidadeId' => ['required', 'integer'],\n 'eventoId' => ['required', 'integer'],\n 'resumo' => ['nullable','string'],\n 'nomeCoautor.*' => ['string'],\n 'emailCoautor.*' => ['string'],\n 'arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra1arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra2arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra3arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra4arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra5arquivo' => ['nullable', 'file', 'max:2000000'],\n 'campoextra1simples' => ['nullable', 'string'],\n 'campoextra2simples' => ['nullable', 'string'],\n 'campoextra3simples' => ['nullable', 'string'],\n 'campoextra4simples' => ['nullable', 'string'],\n 'campoextra5simples' => ['nullable', 'string'],\n 'campoextra1grande' => ['nullable', 'string'],\n 'campoextra2grande' => ['nullable', 'string'],\n 'campoextra3grande' => ['nullable', 'string'],\n 'campoextra4grande' => ['nullable', 'string'],\n 'campoextra5grande' => ['nullable', 'string'],\n ]);\n \n if($tiposExtensao->arquivo == true){\n\n $tiposcadastrados = [];\n if($tiposExtensao->pdf == true){\n array_push($tiposcadastrados, \"pdf\");\n }\n if($tiposExtensao->jpg == true){\n array_push($tiposcadastrados, \"jpg\");\n }\n if($tiposExtensao->jpeg == true){\n array_push($tiposcadastrados, \"jpeg\");\n }\n if($tiposExtensao->png == true){\n array_push($tiposcadastrados, \"png\");\n }\n if($tiposExtensao->docx == true){\n array_push($tiposcadastrados, \"docx\");\n }\n if($tiposExtensao->odt == true){\n array_push($tiposcadastrados, \"odt\");\n }\n\n $extensao = $request->arquivo->getClientOriginalExtension();\n if(!in_array($extensao, $tiposcadastrados)){\n return redirect()->back()->withErrors(['tipoExtensao' => 'Extensão de arquivo enviado é diferente do permitido.\n Verifique no formulário, quais os tipos permitidos.']);\n }\n }\n \n $autor = Auth::user();\n $trabalhosDoAutor = Trabalho::where('eventoId', $request->eventoId)->where('autorId', Auth::user()->id)->count();\n $areaModalidade = AreaModalidade::where('areaId', $request->areaId)->where('modalidadeId', $request->modalidadeId)->first();\n Log::debug('Numero de trabalhos' . $evento);\n if($trabalhosDoAutor >= $evento->numMaxTrabalhos){\n return redirect()->back()->withErrors(['numeroMax' => 'Número máximo de trabalhos permitidos atingido.']);\n }\n\n if($request->emailCoautor != null){\n $i = 0;\n foreach ($request->emailCoautor as $key) {\n $i++;\n }\n if($i > $evento->numMaxCoautores){\n return redirect()->back()->withErrors(['numeroMax' => 'Número de coautores deve ser menor igual a '.$evento->numMaxCoautores]);\n }\n }\n\n if($request->emailCoautor != null){\n $i = 0;\n foreach ($request->emailCoautor as $key) {\n $userCoautor = User::where('email', $key)->first();\n if($userCoautor == null){\n $passwordTemporario = Str::random(8);\n Mail::to($key)->send(new EmailParaUsuarioNaoCadastrado(Auth()->user()->name, ' ', 'Coautor', $evento->nome, $passwordTemporario));\n $usuario = User::create([\n 'email' => $key,\n 'password' => bcrypt($passwordTemporario),\n 'usuarioTemp' => true,\n 'name' => $request->nomeCoautor[$i],\n ]);\n }\n $i++;\n }\n }\n \n $trabalho = Trabalho::create([\n 'titulo' => $request->nomeTrabalho,\n 'resumo' => $request->resumo,\n 'modalidadeId' => $areaModalidade->modalidade->id,\n 'areaId' => $areaModalidade->area->id,\n 'autorId' => $autor->id,\n 'eventoId' => $evento->id,\n 'avaliado' => 'nao',\n ]);\n\n if(isset($request->campoextra1simples)){\n $trabalho->campoextra1simples = $request->campoextra1simples;\n }\n if(isset($request->campoextra1grande)){\n $trabalho->campoextra1grande = $request->campoextra1grande;\n }\n if(isset($request->campoextra2simples)){\n $trabalho->campoextra2simples = $request->campoextra2simples;\n }\n if(isset($request->campoextra2grande)){\n $trabalho->campoextra2grande = $request->campoextra2grande;\n }\n if(isset($request->campoextra3simples)){\n $trabalho->campoextra3simples = $request->campoextra3simples;\n }\n if(isset($request->campoextra3grande)){\n $trabalho->campoextra3grande = $request->campoextra3grande;\n }\n if(isset($request->campoextra4simples)){\n $trabalho->campoextra4simples = $request->campoextra4simples;\n }\n if(isset($request->campoextra4grande)){\n $trabalho->campoextra4grande = $request->campoextra4grande;\n }\n if(isset($request->campoextra5simples)){\n $trabalho->campoextra5simples = $request->campoextra5simples;\n }\n if(isset($request->campoextra5grande)){\n $trabalho->campoextra5grande = $request->campoextra5grande;\n }\n\n $trabalho->save();\n\n if($request->emailCoautor != null){\n foreach ($request->emailCoautor as $key) {\n $userCoautor = User::where('email', $key)->first();\n Coautor::create([\n 'ordem' => '-',\n 'autorId' => $userCoautor->id,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n }\n\n if(isset($request->arquivo)){\n \n $file = $request->arquivo;\n $path = 'trabalhos/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = \"1.pdf\";\n Storage::putFileAs($path, $file, $nome);\n\n $arquivo = Arquivo::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n 'versaoFinal' => true,\n ]);\n }\n\n if(isset($request->campoextra1arquivo)){\n \n $file = $request->campoextra1arquivo;\n $path = 'arquivosextra/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = $request->campoextra1arquivo->getClientOriginalName();\n Storage::putFileAs($path, $file, $nome);\n\n $arquivoExtra1 = Arquivoextra::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n\n if(isset($request->campoextra2arquivo)){\n \n $file = $request->campoextra2arquivo;\n $path = 'arquivosextra/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = $request->campoextra2arquivo->getClientOriginalName();\n Storage::putFileAs($path, $file, $nome);\n\n $arquivoExtra2 = Arquivoextra::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n\n if(isset($request->campoextra3arquivo)){\n \n $file = $request->campoextra3arquivo;\n $path = 'arquivosextra/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = $request->campoextra3arquivo->getClientOriginalName();\n Storage::putFileAs($path, $file, $nome);\n\n $arquivoExtra3 = Arquivoextra::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n\n if(isset($request->campoextra4arquivo)){\n \n $file = $request->campoextra4arquivo;\n $path = 'arquivosextra/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = $request->campoextra4arquivo->getClientOriginalName();\n Storage::putFileAs($path, $file, $nome);\n\n $arquivoExtra4 = Arquivoextra::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n\n if(isset($request->campoextra5arquivo)){\n \n $file = $request->campoextra5arquivo;\n $path = 'arquivosextra/' . $request->eventoId . '/' . $trabalho->id .'/';\n $nome = $request->campoextra5arquivo->getClientOriginalName();\n Storage::putFileAs($path, $file, $nome);\n\n $arquivoExtra5 = Arquivoextra::create([\n 'nome' => $path . $nome,\n 'trabalhoId' => $trabalho->id,\n ]);\n }\n \n $subject = \"Submissão de Trabalho\";\n Mail::to($autor->email)\n ->send(new SubmissaoTrabalho($autor, $subject));\n if($request->emailCoautor != null){\n foreach ($request->emailCoautor as $key) {\n $userCoautor = User::where('email', $key)->first();\n Mail::to($userCoautor->email)\n ->send(new SubmissaoTrabalho($userCoautor, $subject));\n }\n }\n\n return redirect()->route('evento.visualizar',['id'=>$request->eventoId]);\n }", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "public function validarCedula() {\r\n if (!$this->hasErrors()) {\r\n $usuario = Usuario::model()->findByPk($this->cedula);\r\n if ($usuario !== null) {\r\n $this->addError('cedula', 'Cédula ya registrada');\r\n }\r\n }\r\n }", "function comprobar_CODCENTRO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->CODCENTRO == null) || (strlen($this->CODCENTRO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->CODCENTRO)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->CODCENTRO)>10){\n\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\d-]+$/\",$this->CODCENTRO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00040\",\n \"mensajeerror\" => \"Solo están permitidas alfabéticos, números y el “-”\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "public function invalidConfirmation() {\n\t\t$this->messages[] = \"Lösenorden matchar inte.\";\n\t}", "public function deleteCustomValidate()\n {\n // sprawdzanie czy zolnierz jest na misji\n if(self::checkSoldierIsOnMission($this->id)){\n $this->errors = \"Żołnierz przebywa aktualnie lub będzie przebywać na misji.\";\n return false;\n }\n \n // sprawdzanie czy zolnierz jest na szkoleniu\n if(self::checkSoldierIsOnTraining($this->id)){\n $this->errors = \"Żołnierz przebywa aktualnie lub będzie przebywać na szkoleniu.\";\n return false;\n }\n \n return true;\n }", "public function validate() {\n//\t\tif( intval($this->params[\"startYear\"] < date(\"yyyy\"))) $this->add_validation_error(\"Season cannot exist in the past.\");\n\t}", "public function store(EstadoFinancieroRequest $request)\n { \n \n $estados_creados = EstadoFinanciero::where('id_empresa',$request->id_empresa)\n ->where('id_tipo_estado_financiero',$request->id_tipo_estado_financiero)\n ->whereBetween('fecha_inicio',[$request->fecha_inicio,$request->fecha_final])\n ->whereBetween('fecha_final',[$request->fecha_final,$request->fecha_final])->get();\n \n $estado_financiero = new EstadoFinanciero();\n $estado_financiero->id_tipo_estado_financiero = $request->id_tipo_estado_financiero;\n $estado_financiero->id_empresa = $request->id_empresa;\n $estado_financiero->fecha_inicio = $request->fecha_inicio;\n $estado_financiero->fecha_final = $request->fecha_final;\n $fecha_inicio =$request->fecha_inicio;\n $fecha_fin =$request->fecha_final;\n\n\n if($estados_creados)\n { \n return back()->withWarning('Ya se creó un estado financiero para el rango de fechas indicadas, ingrese otro período!');\n \n }\n if($fecha_inicio>$fecha_fin)\n { \n return back()->withWarning('La fecha de inicio debe ser menor a la fecha de fin de período!');\n \n }\n \n $estado_financiero->save();\n \n \n $empresa = Empresa::findOrFail($estado_financiero->id_empresa);\n\n if($estado_financiero->id_tipo_estado_financiero==1)\n {\n $activos = [];\n $pasivos = [];\n $patrimonio = [];\n $catalogo = Catalogo::where('id_empresa', $empresa->id)->get();\n\n foreach($catalogo as $cuenta)\n {\n if($cuenta->cuenta->id_tipo_cuenta == 1)\n {\n $activos[] = $cuenta;\n }\n elseif($cuenta->cuenta->id_tipo_cuenta == 2)\n {\n $pasivos[] = $cuenta;\n }\n elseif($cuenta->cuenta->id_tipo_cuenta == 3)\n {\n $patrimonio[] = $cuenta;\n }\n }\n \n return view('EstadosFinancieros.crear_balance_general', compact('activos', 'pasivos', 'patrimonio','empresa', 'estado_financiero'));\n }\n elseif($estado_financiero->id_tipo_estado_financiero==2)\n {\n $ingresos = [];\n $gastos = [];\n $catalogo = Catalogo::where('id_empresa', $empresa->id)->get();\n\n foreach($catalogo as $cuenta)\n {\n if($cuenta->cuenta->id_tipo_cuenta == 4)\n {\n $gastos[] = $cuenta;\n }\n elseif($cuenta->cuenta->id_tipo_cuenta == 5)\n {\n $ingresos[] = $cuenta;\n }\n \n }\n return view('EstadosFinancieros.crear_estado_resultados', compact('ingresos','gastos','empresa', 'estado_financiero'));\n }\n \n }", "public function registrarErro(){\r\n if($this->dataHora != null){\r\n if($this->classe != null){\r\n if($this->metodo != null){\r\n if(count($this->descricao != null)){\r\n //Registra o erro em arquivos de log .TXT----------\r\n $linha = \"\\n========================================================\\n\";\r\n $linha .= \"Data: \".$this->dataHora.\"\\n\";\r\n $linha .= \"Erro: \".$this->descricao.\"\\n\";\r\n $linha .= \"Classe: {$this->classe}\\n\";\r\n $linha .= \"Metodo: {$this->metodo}\\n\";\r\n $linha .= \"========================================================\\n\";\r\n $nomeArquivo = \"C:\\\\xampp\\\\htdocs\\\\sui\\\\logs\\\\\".date(\"Y-m-d\");\r\n $arquivo = fopen(\"{$nomeArquivo}.txt\", \"a\");\r\n fwrite($arquivo, $linha);\r\n fclose($arquivo);\r\n Helpers::msg(\"Erro\", \"Houve um erro no processo verifique o log para mais informacoes\");\r\n //Registra o erro em arquivos de log .TXT----------\r\n\r\n\r\n //Envia email para todos os programadores---------------------------\r\n// $conn = Conexoes::conectarCentral();\r\n// $programadores = $conn->query(\"select programadores.email from programadores\")->fetchAll();\r\n// $enderecos = Array();\r\n// if(count($programadores) > 0){\r\n// foreach ($programadores as $programador){\r\n// array_push($enderecos, $programador['email']);\r\n// }\r\n// }else{\r\n// array_push($enderecos, \"ti@kronamaxxi.com.br\");\r\n// }\r\n// $email = new Mail();\r\n// $email->de = \"sui@kronamaxxi.com.br\";\r\n// $email->para = $enderecos;\r\n// $email->titulo = \"Erro no sistema de integrações\";\r\n// $email->corpo = $this->corpoEmail();\r\n// try{\r\n// $email->enviaEmail();\r\n// } catch (Exception $ex) {\r\n// echo $ex->getMensage();\r\n// }\r\n// return true;\r\n //Envia email para todos os programadores---------------------------\r\n }else{\r\n echo \"A descricao do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Metodo do erro nao foi informado\";\r\n }\r\n }else{\r\n echo \"Classe do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Date e hora do erro não informada\";\r\n }\r\n }", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"matricula\"])) {\n $this->matriculaErr = \"La matricula es requerida\";\n } else {\n $this->matricula = $this->test_input($_POST[\"matricula\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->matricula)) {\n $this->nameErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombree\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombree\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carreraa\"])) {\n $this->nameErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carreraa\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"email\"])) {\n $this->emailErr = \"Email is required\";\n } else {\n $this->email = $this->test_input($_POST[\"email\"]);\n // check if e-mail address is well-formed\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->emailErr = \"Invalid email format\";\n }\n }\n\n if (empty($_POST[\"telefonoo\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefonoo\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "function validarDatosRegistro() {\r\n // Recuperar datos Enviados desde formulario_nuevo_equipo.php\r\n $datos = Array();\r\n $datos[0] = (isset($_REQUEST['titulo']))?\r\n $_REQUEST['titulo']:\"\";\r\n $datos[0] = limpiar($datos[0]);\r\n $datos[1] = (isset($_REQUEST['url']))?\r\n $_REQUEST['url']:\"\";\r\n\r\n //-----validar ---- //\r\n $errores = Array();\r\n $errores[0] = !validarTitulo($datos[0]);\r\n $errores[1] = !validarURL($datos[1]);\r\n\r\n // ----- Asignar a variables de Sesión ----//\r\n $_SESSION['datos'] = $datos;\r\n $_SESSION['errores'] = $errores; \r\n $_SESSION['hayErrores'] = \r\n ($errores[0] || $errores[1]);\r\n \r\n}", "public function agregarEmpleado(EmpleadoPost $validar){\n\n if($validar){\n \n $this->empleadorepo->agregarEmpleado($validar);\n }\n\nreturn redirect()->route('empleado.index')->with('guardar', 'Se ha Agregado Correctamente');\n /*\n return $request->validate([\n 'nombre' => 'required',\n 'apellido' => 'required',\n 'correo' => 'required|email', \n 'cargo' => 'required']);\n */\n }", "function fncValidaDI_4($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = 0;\n\n\t$DI_4 = \"(4)Nombre del Empleado\";\n\t$DI_4_ErrTam = \"Tamaño de registro debe ser 150 Caracteres\";\n\t$DI_4_ErrIdEdo = \"Identificador de estado Invalido\";\n\t$DI_4_ErrEstructura = \"EL campo no cumple con estructura definida PATERNO,MATERNO/NOMBRE(S)\";\n\n /** Quita caracteres especiales **/\n\t//$LocCampo =preg_replace('/[^A-Za-z0-9\\-]/', '', $Campo);\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) <= 150)\n\t{\n\t\tif(!preg_match (\"/[?,A-Z,a-z,\\s]{1,90},[?,A-Z,a-z,\\s]{1,90}\\/[?.A-Z,a-z,\\s]{1,90}/\" ,$LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_4.\"|\".$LocCampo.\"|\" . $DI_4_ErrEstructura.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_4.\"|\".$LocCampo.\"|\" . $DI_4_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = 1;\n\t}\n\treturn $Bandera;\n}", "public function validar($estado);", "public function reabrir() {\n if ( !($this->estado == self::ORDER_CLOSED || $this->estado == self::ORDER_OPEN) ){\n throw new Exception('Pedido: '.$this->getNumero().'.No se puede reabrir un pedido que no este en estado cerrado o abierto.');\n }\n\n $this->estado = self::ORDER_EXPIRED;\n\n //Desreservamos stock\n $this->desreservarStock();\n\n if (!$this->save())\n throw new Exception('Pedido: '.$this->getNumero().'. Error al procesar pedido: '.Commons::renderError($pedido->getErrors()));\n }", "public function validate_sexo() {\n\t\tif($this->sexo === 'vacio')\n\t\t\t$this->addError('sexo','Por favor, indica tu sexo.');\t\n\t}", "private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }", "function evt__form_integrante_e__guardar($datos)\r\n\t{\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n if($pi['estado']<>'A' and $pi['estado']<>'I'){\r\n toba::notificacion()->agregar('No pueden agregar participantes al proyecto', 'error'); \r\n }else{ \r\n $band=$this->dep('datos')->tabla('integrante_externo_pi')->es_docente($datos['desde'],$datos['hasta'],$datos['integrante'][0],$datos['integrante'][1]);\r\n if($band){\r\n //toba::notificacion()->agregar('Este integrante es docente, ingreselo en la solapa Participantes con Cargo Docente en UNCO');\r\n throw new toba_error(\"Este integrante es docente, ingreselo en la solapa Participantes con Cargo Docente en UNCO\");\r\n } else{\r\n if($datos['desde']>=$datos['hasta']){\r\n throw new toba_error(\"La fecha desde debe ser menor a la fecha hasta!\");\r\n }else{\r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){\r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{\r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n //toba::notificacion()->agregar('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY','error');\r\n throw new toba_error('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if ( isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Resolucion CD de Baja o Modificacion Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n $datos['pinvest']=$pi['id_pinv'];\r\n $datos['nro_tabla']=1;\r\n $datos['tipo_docum']=$datos['integrante'][0];\r\n $datos['nro_docum']=$datos['integrante'][1];\r\n $datos['check_inv']=0;\r\n $this->dep('datos')->tabla('integrante_externo_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_externo_pi')->sincronizar();\r\n $this->dep('datos')->tabla('integrante_externo_pi')->resetear();\r\n $this->s__mostrar_e=0;\r\n toba::notificacion()->agregar('El integrante se ha dado de alta correctamente', 'info'); \r\n }\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t}", "protected function validaMatriculaParaEncerramento (Matricula $oMatricula, Etapa $oEtapa) {\n\n $sNomeAluno = \"{$oMatricula->getAluno()->getCodigoAluno()} - \";\n $sNomeAluno .= \"{$oMatricula->getAluno()->getNome()}.\";\n $oErroMensagem = new stdClass();\n $oErroMensagem->turma = $oMatricula->getTurma()->getCodigo();\n $oErroMensagem->etapa = $oEtapa->getNome();\n $oErroMensagem->aluno = $sNomeAluno;\n\n $oDiario = $oMatricula->getDiarioDeClasse();\n if ( $oMatricula->getSituacao() == 'MATRICULADO' && !$this->validarDiarioAluno($oDiario, $oErroMensagem)) {\n return false;\n }\n return true;\n }", "function saveComprobanteElectronicoError() {\n\t\tglobal $bd;\t\n\t\t$idregistro_pago = $_POST['idregistro_pago'];\n\t\t$jsonxml = $_POST['jsonxml'];\n\n\t\t$sql=\"insert into registro_pago_cpe_error (idregistro_pago, jsonxml) values (\".$idregistro_pago.\", \".$jsonxml.\")\";\n\t\t$bd->xConsulta_NoReturn($sql);\n\t\t// echo $sql;\n\t}", "public function validate()\n {\n // Nombre\n //Requerido\n if ($this->name == '') {\n $this->errors[] = 'El nombre es requerido';\n }\n\n // Dirección de E-mail\n\n //Devuelve el mensaje si el e-mail no es un e-mail valido\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL) === false) {\n $this->errors[] = 'La dirección de e-mail es inválida. Reintentar';\n }\n //Si la función emailExists devuelve true, genera el error de e-mail en uso\n //El segundo parámetro de emailExists puede ser null o el ID de usuario si existe (ejemplo: el usuario esta registrado)\n if(static::emailExists($this->email, $this->id ?? null)) {\n $this->errors[] = 'La dirección de E-mail ya está en uso';\n }\n\n // Password\n\n if (isset($this->password)) {\n\n //Devuelve el mensaje si $password no tiene por lo menos 6 caracteres\n if (strlen($this->password) < 6) {\n $this->errors[] = 'La contraseña debe tener por lo menos 6 caracteres';\n }\n //Usa regexp para matchear si no encuentra por lo menos una letra\n if (preg_match('/.*[a-z]+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una letra';\n }\n\n //Usa regexp para matchear si no encuentra por lo menos un numero\n if (preg_match('/.*\\d+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una número';\n }\n }\n \n }", "public function validar_form_eliminar_comentario(array $datos=array()) {\r\n \r\n self::request_come_by_post(); //Si viene por POST sigue adelante\r\n \r\n $validaciones = array(\r\n \"id\" =>\"errores_requerido && errores_texto && errores_numero_entero_positivo && errores_referencia:id/\".self::$tabla2.\"/id\"\r\n //\"articulo_nombre\" =>\"errores_requerido && errores_texto && errores_unicidad_modificar:id,articulo_nombre/articulos/id,articulo_nombre\"\r\n ,\"usuario_login\" => \"errores_requerido && errores_texto\"\r\n ,\"comentario\" => \"errores_requerido && errores_texto\"\r\n ); \r\n\r\n if ( ! $validacion = ! \\core\\Validaciones::errores_validacion_request($validaciones, $datos)){ //validaciones en PHP\r\n $datos[\"errores\"][\"errores_validacion\"]=\"Corrija los errores, por favor.\";\r\n }else{\r\n //Cogemos el nombre del articulo antes de borrarlo, para luego poder mostrar la misma página\r\n $where = ' id = '.$datos['values']['id'];\r\n $sql = 'select * from '.\\core\\Modelo_SQL::get_prefix_tabla(self::$tabla2).' where '.$where;\r\n $fila = \\core\\Modelo_SQL::execute($sql); \r\n $articulo_id = $fila[0]['articulo_id'];\r\n\r\n if ( ! $validacion = \\modelos\\Modelo_SQL::delete($datos[\"values\"], self::$tabla2)) // Devuelve true o false\r\n $datos[\"errores\"][\"errores_validacion\"]=\"No se han podido grabar los datos en la bd.\";\r\n }\r\n if ( ! $validacion){ //Devolvemos el formulario para que lo intente corregir de nuevo\r\n \\core\\Distribuidor::cargar_controlador(self::$controlador, 'editar_comentario', $datos);\r\n }else{\r\n // Se ha grabado la modificación. Devolvemos el control al la situacion anterior a la petición del form_modificar\r\n //$datos = array(\"alerta\" => \"Se han grabado correctamente los detalles\");\r\n // Definir el controlador que responderá después de la inserción\r\n //\\core\\Distribuidor::cargar_controlador(self::$tabla, 'index', $datos);\r\n $_SESSION[\"alerta\"] = \"El comentario ha sido eliminado\";\r\n //header(\"Location: \".\\core\\URL::generar(\"self::$controlador/index\"));\r\n $articulo_nombre = str_replace(\" \", \"-\",$datos['values']['articulo_nombre']);\r\n \r\n $clausulas['where'] = \" id = $articulo_id \";\r\n $filas = \\modelos\\Datos_SQL::select( $clausulas, self::$tabla);\r\n $articulo_nombre = $filas[0]['nombre'];\r\n $articulo_nombre = str_replace(\" \", \"-\",$articulo_nombre);\r\n \r\n \\core\\HTTP_Respuesta::set_header_line(\"location\", \\core\\URL::generar(self::$controlador.\"/juego/\".$articulo_id.\"/\".$articulo_nombre));\r\n \\core\\HTTP_Respuesta::enviar();\r\n }\r\n }", "public function validar_form_editar_comentario(array $datos=array()) {\r\n \r\n self::request_come_by_post(); //Si viene por POST sigue adelante\r\n \r\n $validaciones = array(\r\n \"id\" =>\"errores_requerido && errores_texto && errores_numero_entero_positivo && errores_referencia:id/\".self::$tabla2.\"/id\"\r\n //\"articulo_nombre\" =>\"errores_requerido && errores_texto && errores_unicidad_modificar:id,articulo_nombre/articulos/id,articulo_nombre\"\r\n ,\"usuario_login\" => \"errores_requerido && errores_texto\"\r\n ,\"comentario\" => \"errores_requerido && errores_texto\"\r\n ); \r\n\r\n if ( ! $validacion = ! \\core\\Validaciones::errores_validacion_request($validaciones, $datos)){ //validaciones en PHP\r\n $datos[\"errores\"][\"errores_validacion\"]=\"Corrija los errores, por favor.\";\r\n }else{\r\n\r\n if ( ! $validacion = \\modelos\\Modelo_SQL::update($datos[\"values\"], self::$tabla2)) // Devuelve true o false\r\n $datos[\"errores\"][\"errores_validacion\"]=\"No se han podido grabar los datos en la bd.\";\r\n }\r\n if ( ! $validacion){ //Devolvemos el formulario para que lo intente corregir de nuevo\r\n \\core\\Distribuidor::cargar_controlador(self::$controlador, 'editar_comentario', $datos);\r\n }else{\r\n // Se ha grabado la modificación. Devolvemos el control al la situacion anterior a la petición del form_modificar\r\n //$datos = array(\"alerta\" => \"Se han grabado correctamente los detalles\");\r\n // Definir el controlador que responderá después de la inserción\r\n //\\core\\Distribuidor::cargar_controlador(self::$tabla, 'index', $datos);\r\n $_SESSION[\"alerta\"] = \"Su comentario ha sido editado\";\r\n //header(\"Location: \".\\core\\URL::generar(\"self::$controlador/index\"));\r\n $articulo_nombre = str_replace(\" \", \"-\",$datos['values']['articulo_nombre']);\r\n \r\n //Cogemos el nombre del articulo antes de borrarlo, para luego poder mostrar la misma página\r\n $where = ' id = '.$datos['values']['id'];\r\n $sql = 'select * from '.\\core\\Modelo_SQL::get_prefix_tabla(self::$tabla2).' where '.$where;\r\n $fila = \\core\\Modelo_SQL::execute($sql);\r\n \r\n $articulo_id = $fila[0]['articulo_id'];\r\n $clausulas['where'] = \" id = $articulo_id \";\r\n $filas = \\modelos\\Datos_SQL::select( $clausulas, self::$tabla);\r\n $articulo_nombre = $filas[0]['nombre'];\r\n $articulo_nombre = str_replace(\" \", \"-\",$articulo_nombre);\r\n \r\n \\core\\HTTP_Respuesta::set_header_line(\"location\", \\core\\URL::generar(self::$controlador.\"/juego/\".$articulo_id.\"/\".$articulo_nombre));\r\n \\core\\HTTP_Respuesta::enviar();\r\n }\r\n }", "function reporte4($error = ''){\n\t //si hubo cambio de sede actualizo permisos y filtro sede (lo hago aca en las vistas que no incluyen cruds)\n \tif(isset($_POST['insumo']))\n \t{\n $sede_consulta = $this->input->post('insumo');//sede nueva\n $this->auth_model->cambio_sede($sede_consulta);\n \n \t}\n \t \n \t//set validations\n \n $this->form_validation->set_rules(\"from\", \"Desde\", \"trim|required\");\n $this->form_validation->set_rules(\"to\", \"Hasta\", \"trim|required\");\n \t $this->form_validation->set_rules(\"proveedor\", \"proveedor\", \"required|is_natural\");// valido que seleccione una opcion con id positivo \"seleccione\" tiene asignado -1\n $this->form_validation->set_message('is_natural', 'Por favor seleccione una opción');\n\n \t if ($this->form_validation->run() == FALSE)// validacion campos\n {\n //validation fails\n \t//cargo vista para cargar rengo de fechas nuevamente\n \t\t\t//css y js de la vista a cargar\n \t\t\t$data['js_files']=array('subvariable1'=> base_url().'assets/datepicker/js/jquery-1.7.2.min.js','subariable2'=>base_url().'assets/datepicker/js/jquery-ui-1.8.20.custom.min.js');\n\t\t$data['css_files']=array('subariable2'=>base_url().'assets/datepicker/css/ui-lightness/jquery-ui-1.8.20.custom.css', 'subariable3'=>base_url().'assets/css/rangos_fechas.css');\t\t\n \t\t \t\t\n \t \t $data['error'] = \"\";\n \t $data['content_view']='entregas/reporte4.php';\n \t $data['proveedores'] = $this->proveedores_model->obtener_proveedores();\n \t $this->load->view('template',$data);\n \t\n\n\t\t }\n else\n {\n\t\n /* capturo echas seleccionadas */\n $proveedor = $this->input->post('proveedor');\n $data['proveedor'] = $this->proveedores_model->obtener_nombre($proveedor);\n \t//$data['codigo_equipo'] = $equipo;\n \t \t$desde = $this->input->post('from');\n \t// agrego el horario para poder realizar la consulta\n \t$data['desde'] = $this->general_model->cambia_sql_normal($desde);\n \t$desde = \"'\".$desde. \" 00:00:00'\";\n \t$data['fecha_desde'] = $desde;\n \t$hasta = $this->input->post('to');\n \t$data['hasta'] = $this->general_model->cambia_sql_normal($hasta);\n \t$hasta = \"'\".$hasta. \" 23:59:59'\";\n \t$data['fecha_hasta'] = $hasta;\n \t//genero consulta para enviar\n \t$data['query_ad'] = $this->entregas_model->calcula_rechazados_entrefechas($desde , $hasta, $this->session->userdata('sede_filtro'));\n\n \tIf($data['query_ad'] == \"-1\")\n \t{\n \t\t//cargo vista para cargar rengo de fechas nuevamente\n \t\t\t//css y js de la vista a cargar\n \t$data['js_files']=array('subvariable1'=> base_url().'assets/datepicker/js/jquery-1.7.2.min.js','subariable2'=>base_url().'assets/datepicker/js/jquery-ui-1.8.20.custom.min.js');\n\t\t$data['css_files']=array('subariable2'=>base_url().'assets/datepicker/css/ui-lightness/jquery-ui-1.8.20.custom.css', 'subariable3'=>base_url().'assets/css/rangos_fechas.css');\t\t\n \t\t \t\t\n \t \t $data['error'] = \"vacio\";\n \t $data['content_view']='entregas/reporte4.php';\n \t $data['proveedores'] = $this->proveedores_model->obtener_proveedores();\n \t \n \t\t $this->load->view('template',$data);\n \t\t\n \t}\n \telse\n \t{\n\t\t\t\n\t\t \t$data['js_files']=array('subvariable1'=> base_url().'assets/DataTables/media/js/jquery.js','subariable2'=>base_url().'assets/DataTables/media/js/jquery.dataTables.js','subariable3'=>base_url().'assets/TableTools/js/dataTables.tableTools.js','subariable4'=>base_url().'assets/DataTables/1.10.2/jquery.dataTables.js','subariable5'=>base_url().'assets/DataTables/1.10.2/jquery.dataTables.min.js');\n\n $data['css_files']=array('subariable2'=>base_url().'assets/DataTables/media/css/jquery.dataTables.css','subariable3'=>base_url().'assets/TableTools/css/dataTables.tableTools.css','subariable4'=>base_url().'assets/TableTools/2.2.2/css/dataTables.tableTools.css','subariable5'=>base_url().'assets/css/reportes.css');\n \t $data['css_files2']=array('subariable2'=>base_url().'assets/css/reportes.css');\t\n \t $data['titulo_reporte'] = \"Informe de consumos por Código\";\n \t $data['sede'] = $this->sedes_model->obtener_nombre($this->session->userdata('sede_filtro'));\n $data['content_view']='entregas/reporte_consumo_equipos4';\n $data['menu_sede_oculto']=\"1\";\n\t $this->load->view('template',$data);\n\t\t\t\t\n \n\t\t}\n \t \n \t}\n \t}", "function valida_Aseguradora_mail($id)\r\n {\r\n $this->db->trans_start();\r\n \r\n $this->db->select('i.aseguradora')->from('institucion_educativa i, evento e')\r\n ->where('i.id_institucion = e.institucion_edu_id')\r\n ->where('e.id_evento',$id);\r\n $query = $this->db->get('');\r\n //retornamos el id de la aseguradora.\r\n if($query->num_rows() > 0)\r\n {\r\n $this->db->trans_complete();\r\n return $query;\r\n }\r\n else\r\n {\r\n $this->db->trans_complete();\r\n return FALSE;\r\n } \r\n \r\n $this->db->trans_complete();\r\n }", "function setValidar($ForzarCorreccion = false){\n\t\t\n\t\t$arrUp\t\t= array();\n\t\t$DC\t\t\t= $this->getDatosInArray();\n\t\t$socio\t\t= $this->mSocioTitular;\n\t\t$cuenta\t\t= $this->mNumeroCuenta;\n\t\t$grupo\t\t= $this->mGrupoAsociado;\n\t\t$sucursal\t= $DC[\"sucursal\"];\n\t\t$user\t\t= $DC[\"idusuario\"];\n\t\t$oficial\t= $DC[\"oficial_de_captacion\"];\n\t\t$credito\t= $DC[\"numero_solicitud\"];\n\t\t$FApertura\t= $DC[\"fecha_apertura\"];\n\t\t$FAfecta\t= $DC[\"fecha_afectacion\"];\n\t\t//Fecha Valida\n\t\t$FechaValida\t= true;\n\t\t\n\t\t$msg\t\t= \"VALIDAR CUENTA $cuenta\\r\\n\";\n\t\t//Datos propios de la Inversion\n\t\t$FVencInv\t= $DC[\"inversion_fecha_vcto\"];\n\t\t$DiasInv\t= $DC[\"dias_invertidos\"];\n\t\t$TCuenta\t= $DC[\"tipo_cuenta\"];\n\t\t//Cuenta de Intereses\n\t\t$CtaInts\t= $DC[\"cuenta_de_intereses\"];\n\t\t//Datos producto\n\t\t$xDT\t\t= new cInformacionProductoCaptacion($TCuenta);\n\t\t$DT\t\t\t= $xDT->init();\n\t\t//validar socios\n\t\t$xSoc\t\t= new cSocio($socio);\n\t\tif ( $xSoc->existe($socio) == false ){\n\t\t\t$msg\t.= \"CRITICO\\tSOCIO\\tEl Socio $socio no EXISTE \\r\\n\";\n\t\t\tif ( $ForzarCorreccion == true ){\n\t\t\t\t$xSoc->add(\"SOCIO_CUENTA_$cuenta\");\n\t\t\t\t$msg\t.= \"NUEVO\\tSOCIO\\tAgregado el Socio $socio\\r\\n\";\n\t\t\t}\n\t\t}\n\t\t//validar grupo\n\t\tif ( $grupo == false OR $grupo == 0 ){\n\t\t\t$arrUp[\"numero_grupo\"]\t= DEFAULT_GRUPO;\n\t\t\t$msg\t.= \"ERROR\\tGRUPO\\tEl Grupo $grupo No es Valido, se actualiza al default \\r\\n\";\n\t\t} else {\n\t\t\t//Controlar Grupo\n\t\t\t$xGrp\t= new cGrupo($grupo);\n\t\t\tif ( $xGrp->existe($grupo) == false ){\n\t\t\t\t$msg\t.= \"CRITICO\\tGRUPO\\tEl Grupo $grupo no EXISTE \\r\\n\";\n\t\t\t\tif ( $ForzarCorreccion == true ){\n\t\t\t\t\t$xGrp->add(\"GRUPO_CUENTA_$cuenta\", \"\", false, false, 10, 1, $grupo, $sucursal);\n\t\t\t\t\t$msg\t.= \"NUEVO\\tGRUPO\\tSe Agrego el Grupo $grupo \\r\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Restaurar Credito\n\t\tif ($credito != DEFAULT_CREDITO){\n\t\t\t$arrUp[\"numero_solicitud\"]\t= DEFAULT_CREDITO;\n\t\t}\n\t\t//\n\t\t//Controlar Usuario\n\t\t$xUsr\t\t= new cSystemUser($user);\n\t\tif ( $xUsr->existe($user) == false ){\n\t\t\t$msg\t.= \"CRITICO\\tUSUARIO\\tEl Usuario $user no EXISTE \\r\\n\";\n\t\t\tif ( $ForzarCorreccion == true ){\n\t\t\t\t$xUsr->add(\"usr$user\", \"\", 2, \"USR_CTA_$cuenta\", \"\", \"\", \"\", false, \"baja\", \"\", $sucursal, $user);\n\t\t\t\t$msg\t.= \"NUEVO\\tUSUARIO\\tSe Agrego el Usuario $user \\r\\n\";\n\t\t\t}\n\t\t}\n\t\t//Controlar Oficial de Captacion\n\t\tif ( $xUsr->existe($oficial) == false ){\n\t\t\t$msg\t.= \"ERROR\\tOFICIAL\\tEl Oficial de Captacion $oficial no EXISTE \\r\\n\";\n\t\t\tif ( $ForzarCorreccion == true ){\n\t\t\t\t$xUsr->add(\"usr$oficial\", \"\", 2, \"OFICIAL_CTA_$cuenta\", \"\", \"\", \"\", false, \"baja\", \"\", $sucursal, $oficial);\n\t\t\t\t$msg\t.= \"NUEVO\\tOFICIAL\\tSe Agrego el OFICIAL $oficial \\r\\n\";\n\t\t\t}\n\t\t}\n\t\tif ( $FApertura == '0000-00-00' ){\n\t\t\t\t$msg\t.= \"WARN\\tLa fecha de Apertura $FApertura es INVALIDA\\r\\n\";\n\t\t\t\t$arrUp[\"fecha_apertura\"]\t= fechasys();\n\t\t\t\t$FechaValida = false;\t\t\n\t\t}\n\t\tif ( $FAfecta == '0000-00-00' ){\n\t\t\t\t$msg\t.= \"WARN\\tLa fecha de Afectacion $FAfecta es INVALIDA\\r\\n\";\n\t\t\t\t$arrUp[\"fecha_afectacion\"]\t= fechasys();\n\t\t\t\t$FechaValida = false;\t\t\n\t\t}\n\t\t//Validar las fechas\n\t\tif ( $FechaValida == true ){\n\t\t\tif ( strtotime($FApertura) > strtotime($FAfecta) ){\n\t\t\t\t$msg\t.= \"WARN\\tLa fecha de Apertura $FApertura es mayor a la de operaciones $FAfecta\\r\\n\";\n\t\t\t\t$arrUp[\"fecha_apertura\"]\t= $FAfecta;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Validar las funciones del Subproducto\n\t\tif ( $ForzarCorreccion == true ){\n\t\t\t//Guardar Cambios\n\t\t\t$this->setUpdate($arrUp);\n\t\t\treturn $msg;\n\t\t}\n\t}", "protected function removerVinculoComDepartamento() {\n\n $oDaoPontoParadaDepartamento = new cl_pontoparadadepartamento();\n $oDaoPontoParadaDepartamento->excluir(null, \"tre05_pontoparada = {$this->getCodigo()}\");\n if ($oDaoPontoParadaDepartamento->erro_status == 0) {\n\n $sMensagem = 'educacao.transporteescolar.PontoParada.erro_persitir_dados_ponto_departamento';\n $oVariaveis = new stdClass();\n $oVariaveis->erro_dao = $oDaoPontoParadaDepartamento->erro_msg;\n throw new BusinessException(_M($sMensagem, $oVariaveis));\n }\n }", "protected function validate()\n {\n if ( ! $this->check()) {\n throw new Exception(\"Message is incomplete\");\n }\n }", "public function store(Request $request)\n {\n\n $problema = false;\n $fecha_reserva = date('Y-m-d', strtotime($request->fecha_reserva));\n $reservas = TenisReserva::where('fecha_reserva',$fecha_reserva)->get();\n $hoy = getdate();\n //preguntar si es fecha actual\n $fecha_actual =(date(\"Y-m-d\",time()));\n if($fecha_actual > $fecha_reserva){\n flash::error('Ingrese una fecha valida');\n return redirect()->route('tenisreservas.index');\n }\n\n //preguntar si es unica\n foreach($reservas as $reserva){\n if($reserva->id_horario1 == $request->id_horario1){\n $problema=true;\n Flash::error('La reserva ya existe');\n break;\n }else{\n if($reserva->id_horario2 > $request->id_horario1){\n $problema=true;\n Flash::error('La reserva ya existe');\n break;\n } else{\n $problema = false;\n }\n }\n }\n \n if($problema == false){\n $reserva = new TenisReserva();\n $reserva->id_usuario = $request->id_usuario;\n $reserva->id_horario1 = $request->id_horario1;\n $reserva->id_horario2 = $request->id_horario2;\n $reserva->fecha_reserva = $fecha_reserva;\n\n //validador de que el horario fin tiene que ser mayor al horario inicial\n if($reserva->id_horario1 == $reserva->id_horario2){\n flash::error('La hora fin debe ser superior a la hora inicio');\n return redirect()->route('babyreservas.create');\n } else{\n if($reserva->id_horario1 > $reserva->id_horario2){\n flash::error('La hora fin debe ser superior a la hora inicio');\n return redirect()->route('babyreservas.create');\n }\n }\n\n //si la fecha es actual es igual a la de reserva debe ser una hora superior a la actual\n if($fecha_actual == $fecha_reserva){\n if($reserva->id_horario1 == 1){\n if($hoy['hours'] -3 >= '08'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 2){\n if($hoy['hours'] -3 >= '09'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 3){\n if($hoy['hours'] -3 >= '10'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 4){\n if($hoy['hours'] -3 >= '11'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 5){\n if($hoy['hours'] -3 >= '12'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 6){\n if($hoy['hours'] -3 >= '13'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 7){\n if($hoy['hours'] -3 >= '14'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 8){\n if($hoy['hours'] -3 >= '15'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 9){\n if($hoy['hours'] -3 >= '16'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 10){\n if($hoy['hours'] -3 >= '17'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 11){\n if($hoy['hours'] -3 >= '18'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 12){\n if($hoy['hours'] -3 >= '19'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 13){\n if($hoy['hours'] -3 >= '20'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n if($reserva->id_horario1 == 14){\n if($hoy['hours'] -3 >= '21'){\n flash::error('ingrese una hora valida');\n return redirect()->route('tenisreservas.create');\n }\n }\n }\n $reserva->save();\n Flash::success('La reserva ha sido ingresada con éxito');\n }\n\n\n\n\n return redirect()->route('tenisreservas.index');\n }", "function fncValidaDI_46($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_46 = \"(46)Periodo de Pago Final\";\n\t$DI_46_ErrTam = \"Periodo de Pago Final ser de 8 Caracteres AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_46_noDI \t = \"Periodo de Pago Final no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_46_PerFinal = \"El perido final no puede ser menor al Periodo Inicial\";\t\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . $DI_46_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($LocCampo);\n\t\t\t$Fecha2 = date_create($Campo2);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a') )> CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . \n\t\t\t\t\t$DI_46_PerFinal.\"(\". $LocCampo . \")(\". $Campo2 .\")|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_46.\"|\".$LocCampo.\"|\" . $DI_46_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "private function validarDatosFormulario($data) {\n\t if(empty($data['titulo'])) {\n\t\t$mensaje .= 'El titulo del corto esta vacío<br/>';\n\t }\n if(empty($data['director'])) {\n\t\t$mensaje .= 'El directo/res del corto esta vacío<br/>';\n\t }\n if(empty($data['id_edicion'])) {\n\t\t$mensaje .= 'La edición del festival del corto esta vacía<br/>';\n\t }\n if(empty($data['id_categorias'])) {\n\t\t$mensaje .= 'La categoria del corto esta vacío<br/>';\n\t }\n if(empty($data['duracion'])) {\n\t\t$mensaje .= 'La duración del corto esta vacía<br/>';\n\t }\n if(empty($data['lugar'])) {\n\t\t$mensaje .= 'El lugar del corto esta vacío<br/>';\n\t }\n\n\t return $mensaje;\n\t}", "public function validateExpiredTests()\n {\n try\n {\n $tests = AnswerHeader::query()->where('estado', 'A')->get();\n if ($tests->count() > 0)\n {\n foreach ($tests as $test)\n {\n $limitTime = (float)$test->parameter->duracion_examen;\n $startTime = strtotime($test->fecha_inicio);\n $currentTime = strtotime(date('Y-m-d H:i:s'));\n $time = round(($currentTime - $startTime)/60, 2);\n\n // Valida si tiempo esta expirado\n if($time > $limitTime)\n $expiredIds[] = $test->id;\n }\n\n if (isset($expiredIds))\n {\n AnswerHeader::whereIn('id', $expiredIds)\n ->update(['estado' => 'E', 'modificado_por' => 0, 'fecha_modificacion' => date('Y-m-d H:i:s')]);\n }\n }\n }\n catch (\\Exception $ex)\n {\n Log::error(\"[DashboardController][validateExpiredTests] Exception: \".$ex);\n }\n }", "public function store(Request $request)\n {\n $messages=['required'=>'El campo :attribute es requerido.'\n \n ];\n \n //Validacion\n\n $validator = Validator::make($request->all(),[\n\n 'MateriaPrimaID'=>'required',\n 'Cantidad'=>'required',\n 'FechaMovimiento'=>'required',\n 'SucursalID'=>'required',\n\n ],$messages);\n\n\n if ($validator->fails()) {\n \n $errores=$validator->errors();\n return response()-> json($errores, 402);\n \n }\n\n else\n {\n \n //si todo sale bien \n $MovimientoMateriaPrima=MovimientosMP::create($request->all());\n return '{\"msg\":\"creado\",\"result\":' . $MovimientoMateriaPrima . '}';\n \n };\n\n\n }", "public function valida ($codFila) {\n\t\tglobal $log;\n\t\t\n\t\t#################################################################################\n\t\t## Zera os contadores de quantidade de registros\n\t\t#################################################################################\n\t\t$linha\t\t\t= 0;\n\t\t$numDetalhes\t= 0;\n\t\t\n\t\t#################################################################################\n\t\t## Alterar o status para Validando\n\t\t#################################################################################\n\t\t\\Zage\\App\\Fila::alteraStatus($codFila, 'V');\n\t\t\n\t\tforeach ($this->registros as $reg) {\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Descobre o tipo de Registro\n\t\t\t#################################################################################\n\t\t\t\n\t\t\t$codTipoReg\t\t= $reg->getTipoRegistro();\n\t\t\tif ($codTipoReg == 3) {\n\t\t\t\t$codSegmento\t= $reg->getCodSegmento();\n\t\t\t}else{\n\t\t\t\t$codSegmento\t= \"\";\n\t\t\t}\n\t\t\t$tipoReg\t\t= $codTipoReg . $codSegmento;\n\t\t\t$linha++;\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Alterar a linha atual\n\t\t\t#################################################################################\n\t\t\t\\Zage\\App\\Fila::alteraLinhaAtual($codFila, $linha);\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Faz a validação do registro (tipo de dados, tamanho e etc ...)\n\t\t\t#################################################################################\n\t\t\t$valido\t= $reg->validar();\n\t\t\tif ($valido !== true)\t$this->adicionaErro(0, $reg->getLinha(), $reg->getTipoRegistro(), $valido);\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Verifica se a primeira linha é o header\n\t\t\t#################################################################################\n\t\t\tif (($linha == 1) && ($tipoReg !== '0')) {\n\t\t\t\t$this->adicionaErro(0, $reg->getLinha(), $reg->getTipoRegistro(), 'Header não encontrado');\n\t\t\t}\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Verifica o tipo de arquivo, para fazer a devida validação\n\t\t\t#################################################################################\n\t\t\tswitch ($tipoReg) {\n\t\t\t\t \n\t\t\t\t#################################################################################\n\t\t\t\t## Header\n\t\t\t\t#################################################################################\n\t\t\t\tcase '0':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os campos do header\n\t\t\t\t\t#################################################################################\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->header[$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Detalhes do Segmento T\n\t\t\t\t#################################################################################\n\t\t\t\tcase '3T':\n\t\t\t\t\t$numDetalhes++;\n\t\t\t\t\t\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os detalhes com as variáveis\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t$i\t= sizeof($this->detalhesSegT);\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->detalhesSegT[$i][$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Detalhes do Segmento U\n\t\t\t\t#################################################################################\n\t\t\t\tcase '3U':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os detalhes com as variáveis\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t$i\t= sizeof($this->detalhesSegU);\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->detalhesSegU[$i][$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t#################################################################################\n\t\t\t\t## Trailler\n\t\t\t\t#################################################################################\n\t\t\t\tcase '9':\n\t\t\t\t\t#################################################################################\n\t\t\t\t\t## Salva os campos do trailler\n\t\t\t\t\t#################################################################################\n\t\t\t\t\tforeach ($reg->campos as $campo) {\n\t\t\t\t\t\t$var\t= $campo->getVariavel();\n\t\t\t\t\t\tif ($var) {\n\t\t\t\t\t\t\t$this->trailler[$var]\t= $campo->getCleanVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Validação geral do arquivo\n\t\t#################################################################################\n\t\tif (empty($this->header))\t\t\t$this->adicionaErro(0, 0, \"0\", 'As informações do Header não foram encontradas');\n\t\tif (empty($this->trailler))\t\t\t$this->adicionaErro(0, 0, \"9\", 'As informações do trailler não foram encontradas');\n\n\t\t#################################################################################\n\t\t## Verifica a quantidade de registros\n\t\t#################################################################################\n\t\tif (sizeof($this->detalhesSegT)\t== 0)\t$this->adicionaErro(0, 0, \"1\", 'As informações dos registros de detalhes não foram encontradas');\n\t\t\n\t\t#################################################################################\n\t\t## Verifica as variáveis obrigatórias\n\t\t#################################################################################\n\t\tif (!isset($this->header[\"AGENCIA\"]) \t\t|| empty($this->header[\"AGENCIA\"]))\t\t\t$this->adicionaErro(0, 0, \"0\", 'Variável \"Agência\" não encontrada no Header');\n\t\t//if (!isset($this->header[\"CONTA_CORRENTE\"]) || empty($this->header[\"CONTA_CORRENTE\"]))\t$this->adicionaErro(0, 0, \"0\", 'Variável \"CONTA_CORRENTE\" não encontrada no Header');\n\t\n\t}", "public function validate()\n {\n // FUTURE FIXME: no se deberia retornar un simple true/false, sino que \n // si una condicion no se cumple deberia devolverse un mensaje \n // indicando qué no se ha cumplido, posiblemente usando una excepcion \n // para cada caso, para que el controlador la capture y muestre el \n // mensaje adecuado a la vista y no un simple mensaje de error \n // generico.\n\n // name solo puede tener letras, números y guiones\n if (!filter_var($this->name, FILTER_VALIDATE_REGEXP, [\"options\" => [\"regexp\" => \"/[a-zA-Z0-9\\-]+/\"]]))\n return false;\n\n // descrpicion debe limpiarse para prevenir ataques XSS\n $this->description = filter_var($this->description, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n // nombre debe tener como minimo 4 caracteres y como maximo 255\n if (strlen($this->name) <4 || strlen($this->name) > 255)\n return false;\n\n // estado debe ser \"pendiente\", \"subasta\" o \"venta\" exclusivamente\n if ($this ->state !== \"pendiente\" && $this->state !== \"subasta\" && $this->state !== \"venta\")\n return false;\n\n // el propietario debe existir como usuario en la BD\n $user = new User($this->owner);\n if (!$user->fill()) return false;\n\n // todas las condiciones se han cumplido, retorna true\n return true;\n }", "public function rechargeEspeceCodeValidation()\n {\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $data['telephone'] = base64_decode($this->utils->securite_xss($_POST['telephone']));\n $data['fkcarte'] = base64_decode($this->utils->securite_xss($_POST['fkcarte']));\n $data['soldeAgence'] = $this->utils->securite_xss($_POST['soldeagence']);\n $data['soldeCarte'] = $this->utils->securite_xss($_POST['soldecarte']);\n $data['montant'] = $this->utils->securite_xss($_POST['montantbis']);\n $data['frais'] = $this->utils->securite_xss($_POST['frais2']);\n $data['fkagence'] = $this->userConnecter->fk_agence;\n if ($data['telephone'] != '' && $data['montant'] != '' && $data['frais'] != '' && $data['fkagence'] != '') {\n\n $recup_mail = $this->utils->recup_mail($this->userConnecter->fk_agence);\n $recup_tel = $this->utils->recup_tel($this->userConnecter->fk_agence);\n $code_recharge = $this->utils->generateCodeRechargement($data['fkagence']);\n\n $message = $data['lang']['mess_recharge_espece1'] . $code_recharge . $data['lang']['mess_recharge_espece2'] . $this->utils->number_format($data['montant']) . $data['lang']['currency'];\n @$this->utils->sendSMS($data['lang']['paositra1'], $recup_tel, $message);\n //@$this->utils->envoiCodeRechargement($this->userConnecter->email, $this->userConnecter->prenom . ' ' . $this->userConnecter->nom, $code_recharge, $data['lang']);\n\n /*****BALDE*****/\n @$this->utils->envoiCodeRechargement('alioubalde@numherit.com', 'Aliou' . ' ' . 'BALDE', $code_recharge, $data['lang']);\n /****BALDE*****/\n\n if ($recup_mail != -1 && $recup_mail != -2 && $code_recharge != '') {\n\n @$this->utils->envoiCodeRechargement($recup_mail, $data['lang']['chef_agence'], $code_recharge, $data['lang']);\n\n }\n\n /* if (DEBUG === TRUE) {\n @$this->utils->envoiCodeRechargement('ibrahima.fall@numherit.com', '', $code_recharge, $data['lang']);\n }*/\n }\n\n $params = array('view' => 'compte/recharge-espece-code-validation');\n $this->view($params, $data);\n }", "public function testValidationFailsWithCorruptedBankAccount() {\n\t\t$bankAccount = $this->transaction->getDestinationBankAccount();\n\t\t$bankAccount->setNumber(null);\n\t\t$violations = Validator::validateMoneyTransferTransaction($this->transaction);\n\t\t$this->assertTrue(count($violations) === 1);\n\t\t$this->assertTrue(count($violations->get('destinationBankAccount')) === 1);\n\t}", "function fncValidaDI_42($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_42 = \"(42)Fecha de Reingreso\";\n\t$DI_42_ErrTam = \"Fecha de Reingreso debe ser de 8 Digíto(AAAAMMDD (AAAA=año, MM=mes, DD=día))\";\n\t$DI_42_noDI \t = \"Fecha de Reingreso no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día))\";\n\t$DI_42_FecIng \t = \"Fecha de Reingreso no puede ser menor a Fecha de Ingreso al Gobierno Federal\";\n\t\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($Campo2);\n\t\t\t$Fecha2 = date_create($LocCampo);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a')) < CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_FecIng.\"|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_42.\"|\".$LocCampo.\"|\" . $DI_42_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function validarUsuario(array $usuario)\n{\n //Metodo de validação\n if(empty($usuario['codigo']) || empty($usuario['nome']) || empty($usuario['idade']))\n {\n //Message erro\n throw new Exception(\"Campos obrigatórios não foram preenchidos ! \\n\");\n }\n return true;\n}", "function comprobar_apellidos()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"apellidos vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) > 51)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"apellidos demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\tif (strlen($this->apellidos) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->apellidos))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"apellidos no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "function fncValidaDI_45($IdEstado, $GestorErr, $NumReg, $Campo, $Campo2)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_45 = \"(45)Periodo de Pago Inicial\";\n\t$DI_45_ErrTam = \"Periodo de Pago Inicial ser de 8 Caracteres AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_45_noDI \t = \"Periodo de Pago Inicial no corresponde al formato establecido por DGRH(AAAAMMDD (AAAA=año, MM=mes, DD=día)\";\n\t$DI_45_PerFinal \t = \"Periodo de Pago Inicial no puede ser posterior a Periodo de Pago Final\";\t\t\n\t\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == OCHO)\n\t{\n\t\tif(!validateDate($LocCampo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . $DI_45_noDI.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\n\n\t\tif(validateDate($LocCampo) and validateDate($Campo2))\t\n\t\t{\n\t\t\t$Fecha1 = date_create($LocCampo);\n\t\t\t$Fecha2 = date_create($Campo2);\n\t\t\t$interval = date_diff($Fecha1, $Fecha2);\n\t\t\tif(intval($interval->format('%R%a') )< CERO)\n\t\t\t{\n\t\t\t\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . \n\t\t\t\t\t$DI_45_PerFinal .\"(\" .$LocCampo.\" )(\". $Campo2.\")|\\n\";\n\t\t\t\t\tfwrite($GestorErr, $Error);\n\t\t\t\t\t$Bandera = UNO;\n\t\t\t}\t\n\t\t}\t\n\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_45.\"|\".$LocCampo.\"|\" . $DI_45_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "public function vacation_expired() {\n\t\t$vacaciones = $this->solicitudes_model->getVacacionesExpired();\n\t\tforeach ($vacaciones as $registro) :\n\t\t\t$datos = array(\n\t\t\t\t//'dias_acumulados'=>((int)$registro->dias_acumulados - (int)$registro->dias_uno) + (int)$registro->dias_dos,\n\t\t\t\t'dias_acumulados' => (int)$registro->dias_acumulados - (int)$registro->dias_uno,\n\t\t\t\t'dias_uno' => $registro->dias_dos,\n\t\t\t\t'vencimiento_uno' => $registro->vencimiento_dos,\n\t\t\t\t'dias_dos' => null,\n\t\t\t\t'vencimiento_dos' => null,\n\t\t\t);\n\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($registro->colaborador,$datos);\n\t\tendforeach;\n\t}", "public function store()\n\t{\n\n\n\t\t// $input = Input::all();\n\n\t\t// var_dump($input);\n\t\t// die;\n\n\n\n\n\t\t$rules = [\n\t\t\t'ventasmovimientos_id' => 'exists:ventasmovimientos,id',\n\t\t\t'cantidad' => 'required',\n\t\t\t'articulos_id' => 'exists:articulos,id',\n\t\t\t'precio_unitario' => 'required',\n\t\t\t'iva' => 'required',\n\t\t\t'precio_total' => 'required'\n\t\t];\n\n\n\n\t\tif (! Ventasmovimientoscuerpo::isValid(Input::all(),$rules)) {\n\n\t\t\treturn Redirect::back()->withInput()->withErrors(Ventasmovimientoscuerpo::$errors);\n\n\t\t}\n\n\t\t$ventasmovimientoscuerpo = new Ventasmovimientoscuerpo;\n\n\t\t$ventasmovimientoscuerpo->ventasmovimientos_id = Input::get('ventasmovimientos_id');\n\t\t$ventasmovimientoscuerpo->cantidad = Input::get('cantidad');\n\t\t$ventasmovimientoscuerpo->articulos_id = Input::get('articulos_id');\n\t\t$ventasmovimientoscuerpo->precio_unitario = Input::get('precio_unitario');\n\t\t$ventasmovimientoscuerpo->bonificacion = Input::get('bonificacion');\n\n\n\n\t\t$articulo = Articulo::find($ventasmovimientoscuerpo->articulos_id);\n\n\t\t$ventasmovimientoscuerpo->articulo = $articulo->articulo;\n\t\t$ventasmovimientoscuerpo->porcentaje_iva = $articulo->iva;\n\t\t$ventasmovimientoscuerpo->precio_total = Input::get('precio_total') * ($articulo->iva / 100 + 1);\n\t\t$ventasmovimientoscuerpo->importe_gravado = $ventasmovimientoscuerpo->precio_total / (($articulo->iva / 100)+1);\n\t\t$ventasmovimientoscuerpo->importe_iva = $ventasmovimientoscuerpo->precio_total - $ventasmovimientoscuerpo->importe_gravado;\n\n\t \t$ventasmovimientoscuerpo->importe_no_gravado = 0;\n\t \t$ventasmovimientoscuerpo->importes_otros_impuestos = 0;\n\t \t$ventasmovimientoscuerpo->porcentaje_bonificacion = 0;\n\t\t$ventasmovimientoscuerpo->descripcion = Input::get('descripcion','');\n\n\n\n\n\t\t$ventasmovimientoscuerpo->save();\n\n\t\treturn Redirect::to('/ventasmovimientos/' . $ventasmovimientoscuerpo->ventasmovimientos_id . \"/cuerpo\");\n\n\t}", "function comprobar_email()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->email) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"email\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"email vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\tif (strlen($this->email) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"email\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->email) > 61)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"email\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"email demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "function valida_excel($archi){\n\nini_set(\"display_errors\",1);\nerror_reporting(E_ALL);\nrequire_once 'excel_reader2.php';\n$excel = new Spreadsheet_Excel_Reader($archi);\n //\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\n $cont = 0;\n $conta = 0;\n\t$no_conta = 0;\n\t$arre = \"\";\n\t$item_bueno=\"\";\n\t$item_malo=\"\";\n\t$cadena_buenos = \"\";\n\t$columnas =0;\n\n\t$formato = array(\"Hora de salida\",\"Numero de Grupo\",\"Fecha de incicio\",\"SAP ( Cliente)\",\"Pedido\",\"Kilos\",\"Economico\",\"Unidad Medida\",\"Fecha estimada\",\"Hora de Entrada\",\"Hora de Salida\",\"Comentarios\",\"Hora de Llegada\");\n\t$formato_actual = array();\t\n\t$bandera = true;\t\n\t$m = -1;\n\t\n\n for ($row=1;$row<2;$row++){\n \t for ($col=1;$col<=$excel->colcount();$col++) {\n \t\t $m = $m +1;\n \t\t if($excel->val($row,$col)!=\"\"){\n \t\t\t\t \t $formato_actual[$m] = strtoupper($excel->val($row,$col));\n \t\t\t\t\t $columnas = $columnas +1; \n \t\t\t\t}else{\n\t\t\t\t\t break;\n\t\t\t\t}\n \t\t }\n }\n\n\t \n if($columnas == count($formato)){\n // Echo \"formato completo\";\n \t for ($col=0;$col<count($formato_actual);$col++) {\n \t \n \t if(in_array($formato_actual[$col],$formato)){\n \t\t\t\t if( $formato_actual[$col] == $formato[$col]){\n\t\t\t\t\t // echo ' no estan en la misma posicion <b style=\"color:#00ff00;\">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />';\n\t\t\t\t\t\t\t $bandera = true;\n\t\t\t\t\t }else{\n\t\t\t\t\t // echo ' La posicion de las columnas no es correcta <b style=\"color:#993300;\">'.$formato_actual[$col] .'=='. $formato[$col].'</b><br />';\n\t\t\t\t\t\t\t $bandera = false;\n \t\t\t\t break;\n\t\t\t\t\t }\n \t\t\t }else{\n \t\t\t\t //echo \"segun este \".$formato_actual[$col].'<br />';\n \t\t\t\t\t $bandera = false;\n \t\t\t\t break;\n \t\t\t }\n \t\t}\n \t\n }else{\n \t$bandera = false;\n }\n\n\n\nreturn $bandera;\n}", "function validaCamposArchivo($Archivo)\n{\n\t$ValRegreso=FALLA;\n\tif (!copy($Archivo, $Archivo.\".bak\")) {\n \techo \"Error al copiar $Archivo <br>\";\n\t\t$ValRegreso=FALLA;\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Archivo.\".bak\", \"r\");\n\t\tif ($GestorArchivo){\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t// 83 echo \" validaCamposArchivo >\" .substr_count($Registro, '|') .\"< <br>\";\n\t\t \tif( substr_count($Registro, '|') > 70)\n\t\t \t\t$ValRegreso=DATA_NOMINA;\n\t\t \telseif(substr_count($Registro, '|') < 70)\n\t\t \t\t$ValRegreso=DATA_NOMINA_TRAILER;\n\t\t \telse\n\t\t \t\t$ValRegreso=FALLA;\n\t \t\tbreak;\n\t\t }// fin del while\t\n\t\t fclose($GestorArchivo);\n\t\t } \n\t\t else\n\t\t \treturn FALLA;\n\t}// fin copy\n\treturn $ValRegreso;\n}", "public function validarProfesion() {\n if (!$this->hasErrors()) {\n if (empty($this->profesion) && empty($this->ocupacion)) {\n $this->addError('profesion', 'Profesi&oacute;n/ocupaci&oacute;n no puede estar vac&iacute;o');\n $this->addError('ocupacion', 'Profesi&oacute;n/ocupaci&oacute;n no puede estar vac&iacute;o');\n }\n }\n }", "public static function validarCampos($dados){\n\t\t$erro = array();\n\t\t\n\t\tif(isset($dados['nome'])){\n\t\t\tif(strlen($dados['nome']) < 6 || !self::isName($dados['nome'])){\n\t\t\t\t$erro['nome'] = 'Nome inválido. Deve conter somente letras com no mínimo 6 caracteres.';\n\t\t\t}\n\t\t}\n\n\t\tif(isset($dados['email'])){\n\t\t\tif(strlen($dados['email']) < 10 || !self::isEmail($dados['email'])){\n\t\t\t\t$erro['email'] = 'Email inválido.';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($dados['login'])){\n\t\t\tif(strlen($dados['login']) < 5 || !self::isLogin($dados['login'])){\n\t\t\t\t$erro['login'] = 'Login inválido. Deve conter mais de 4 caracteres.';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($dados['senha_atual'])){\n\t\t\tif(isset($dados['senha']) && isset($dados['confirmar_senha']) && (strlen($dados['senha']) != 0 || strlen($dados['confirmar_senha']) != 0)){\n\t\t\t\tif(strlen($dados['senha']) < 6 || $dados['senha'] != $dados['confirmar_senha']){\n\t\t\t\t\t$erro['senha'] = 'Senha inválida. Deve conter mais de 5 caracteres e devem ser iguais.';\n\t\t\t\t\t$erro['confirmar_senha'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(isset($dados['senha']) && isset($dados['confirmar_senha'])){\n\t\t\t\tif(strlen($dados['senha']) < 6 || $dados['senha'] != $dados['confirmar_senha']){\n\t\t\t\t\t$erro['senha'] = 'Senha inválida. Deve conter mais de 5 caracteres e devem ser iguais.';\n\t\t\t\t\t$erro['confirmar_senha'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($dados['cpf'])){\n\t\t\tif(strlen($dados['cpf']) != 11){\n\t\t\t\t$erro['cpf'] = 'CPF inválido.';\n\t\t\t}\n\t\t\telse if($dados['cpf'] == '00000000000' ||\n\t\t\t\t\t$dados['cpf'] == '11111111111' ||\n\t\t\t\t\t$dados['cpf'] == '22222222222' ||\n\t\t\t\t\t$dados['cpf'] == '33333333333' ||\n\t\t\t\t\t$dados['cpf'] == '44444444444' ||\n\t\t\t\t\t$dados['cpf'] == '55555555555' ||\n\t\t\t\t\t$dados['cpf'] == '66666666666' ||\n\t\t\t\t\t$dados['cpf'] == '77777777777' ||\n\t\t\t\t\t$dados['cpf'] == '88888888888' ||\n\t\t\t\t\t$dados['cpf'] == '99999999999'){\n\t\t\t\t$erro['cpf'] = 'CPF inválido.';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Calcula os digitos verificadores(os dois ultimos digitos)\n\t\t\t\tfor($t = 9; $t < 11; $t++){\n\t\t\t\t\tfor($d = 0, $c = 0; $c < $t; $c++){\n\t\t\t\t\t\t$d += $dados['cpf']{$c} * (($t + 1) - $c);\n\t\t\t\t\t}\n\t\t\t\t\t$d = ((10 * $d) % 11) % 10;\n\t\t\t\t\tif($dados['cpf']{$c} != $d){\n\t\t\t\t\t\t$erro['cpf'] = 'CPF inválido.';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(isset($dados['data_nascimento'])){\n\t\t\t$tmp = explode('/', $dados['data_nascimento']);\n\t\t\tif(strlen($dados['data_nascimento']) != 10 || count($tmp) != 3 || strlen($tmp[0]) != 2 || strlen($tmp[1]) != 2 || strlen($tmp[2]) != 4){\n\t\t\t\t$erro['data_nascimento'] = 'Data inválida.';\n\t\t\t}\n\t\t\telse if((int)$tmp[2] > ((int)date('Y') - 10)){\n\t\t\t\t$erro['data_nascimento'] = 'Data inválida.';\n\t\t\t}\n\t\t}\n\n\t\tif(isset($dados['estado']) && strlen($dados['estado']) == 0){\n\t\t\t$erro['estado'] = 'Selecione um Estado.';\n\t\t}\n\n\t\tif(isset($dados['cidade']) && strlen($dados['cidade']) == 0){\n\t\t\t$erro['cidade'] = 'Selecione uma Cidade.';\n\t\t}\n\n\t\tif(isset($dados['endereco']) && strlen($dados['endereco']) < 10){\n\t\t\t$erro['endereco'] = 'Endereço inválido. Deve conter mais de 10 caracteres.';\n\t\t}\n\n\t\tif(isset($dados['cep']) && strlen($dados['cep']) != 8){\n\t\t\t$erro['cep'] = 'CEP inválido.';\n\t\t}\n\n\t\tif(isset($dados['master']) && strlen($dados['master']) == 0){\n\t\t\t$erro['master'] = 'Permissão inválido.';\n\t\t}\n\t\t\n\t\treturn $erro;\n\t}\n\t\n\t//valida o nome do jogo\n\tpublic static function isNameJogo($nome){\n\t\t$pattern = '/^[ .a-zA-ZáéíóúÁÉÍÓÚ()0-9]+$/';\n\t\tif(preg_match($pattern, $nome)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t//valida o nome do usuario\n\tpublic static function isName($nome){\n\t\t$pattern = '/^[ .a-zA-ZáéíóúÁÉÍÓÚ]+$/';\n\t\tif(preg_match($pattern, $nome)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t//valida o login do usuario\n\tpublic static function isLogin($login){\n\t\t$pattern = '/^[_a-zA-Z-0-9]+$/';\n\t\tif(preg_match($pattern, $login)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t//valida o e-mail do usuario\n\tpublic static function isEmail($email){\n\t\t$pattern = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/';\n\t\tif(preg_match($pattern, $email)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n}" ]
[ "0.6909103", "0.66102177", "0.65153074", "0.64116156", "0.6380646", "0.62766254", "0.6219057", "0.6170864", "0.6158191", "0.61497927", "0.612717", "0.6124736", "0.61087173", "0.60788953", "0.60522723", "0.60184777", "0.5928861", "0.5891428", "0.58837384", "0.584307", "0.5838837", "0.5823735", "0.5812668", "0.57749826", "0.5767671", "0.5752542", "0.5736397", "0.57193923", "0.5718124", "0.5714847", "0.5705562", "0.569456", "0.5690731", "0.567385", "0.56703836", "0.5665845", "0.56443053", "0.56334305", "0.562933", "0.56156695", "0.561286", "0.560445", "0.56023824", "0.5588108", "0.55874187", "0.5581521", "0.55745506", "0.55728805", "0.5564482", "0.55624914", "0.5545292", "0.5527874", "0.5527748", "0.5520855", "0.5511966", "0.54886466", "0.5487013", "0.54844236", "0.54840976", "0.5483215", "0.546517", "0.5456817", "0.5455646", "0.5454288", "0.54514134", "0.544998", "0.54495037", "0.5441105", "0.5430791", "0.54298407", "0.5425185", "0.54234445", "0.5421652", "0.5421121", "0.5413714", "0.54106164", "0.54040176", "0.54027283", "0.53991914", "0.5394874", "0.5394421", "0.5391007", "0.53891", "0.53869915", "0.5383631", "0.53803384", "0.5379445", "0.5365684", "0.53565216", "0.5352362", "0.5352303", "0.5348463", "0.5348108", "0.53409225", "0.5340453", "0.53401625", "0.53391504", "0.5338468", "0.5333672", "0.53300786", "0.5328688" ]
0.0
-1
make the API call
public function call(Services_Ebay_Session $session) { $return = parent::call($session); if (isset($return['ShippingRates']['ShippingRate'][0])) { return $return['ShippingRates']['ShippingRate']; } return array($return['ShippingRates']['ShippingRate']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function do_api_request();", "public function api_call() {\n\n }", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "function acapi_call($method, $resource, $args, $params = array(), $body = array(), $options = array()) {\n $default_options = array(\n 'display' => TRUE,\n );\n $options = array_merge($default_options, $options);\n\n $debug = drush_get_option('debug', FALSE);\n $verbose = drush_get_option('verbose', FALSE);\n $simulate = drush_get_option('simulate', FALSE);\n $format = acapi_get_option('format');\n\n // Build the API call URL.\n $url = acapi_get_option('endpoint');\n $url .= acapi_dt($resource, $args);\n $url .= '.json';\n\n foreach ($params as $k => $v) {\n if (is_array($v)) {\n unset($params[$k]);\n foreach ($v as $key => $val) {\n $params[\"$k-$key\"] = \"$k%5B%5D=\" . urlencode($val);\n }\n }\n else {\n $params[$k] = \"$k=\" . urlencode($v);\n }\n }\n\n $url .= '?' . implode('&', $params);\n\n $creds = acapi_get_creds();\n if (!$creds) {\n return FALSE;\n }\n\n // Build the body.\n $json_body = json_encode($body);\n\n $display = \"curl -X $method '$url'\";\n if ($debug) {\n $display .= \" ($creds)\";\n }\n if ($debug || $verbose || $simulate) {\n drush_print($display, 0, STDERR);\n if (!empty($body)) {\n drush_print(\" $json_body\", 0, STDERR);\n }\n }\n\n if ($simulate) {\n return;\n }\n\n $headers = array();\n $ch = curl_init($url);\n // Basic request settings\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n curl_setopt($ch, CURLOPT_USERAGENT, basename(__FILE__));\n if (!empty($options['result_stream'])) {\n curl_setopt($ch, CURLOPT_FILE, $options['result_stream']);\n }\n else {\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n }\n // User authentication\n curl_setopt($ch, CURLOPT_HTTPAUTH, TRUE);\n curl_setopt($ch, CURLOPT_USERPWD, $creds);\n // SSL\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, preg_match('@^https:@', acapi_get_option('endpoint')));\n curl_setopt($ch, CURLOPT_CAINFO, acapi_get_option('cainfo'));\n // Redirects\n if (!empty($options['redirect'])) {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $options['redirect']+1);\n }\n /* Body\n We need to set a Content-Length header even on empty POST requests, or the webserver\n will throw a 411 Length Required.\n */\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json_body);\n $headers[] = 'Content-Type: application/json;charset=utf-8';\n $headers[] = 'Content-Length: ' . strlen($json_body);\n // Headers\n if (!empty($headers)) {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n // Debugging\n curl_setopt($ch, CURLOPT_VERBOSE, $debug);\n // Go\n $content = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n return drush_set_error('ACAPI_CURL_ERROR', dt('Error accessing @url: @err', array('@url' => $url, '@err' => curl_error($ch))));\n }\n\n $result = json_decode($content);\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if (!empty($format)) {\n drush_print(drush_format($result, NULL, $format));\n }\n else if ($options['display']) {\n if (is_array($result)) {\n foreach ($result as $item) {\n if (! is_scalar($item)) {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($item)));\n }\n else {\n drush_print($item);\n }\n }\n }\n else {\n if ($method == 'POST') {\n // All POST actions return a task. Display something helpful.\n drush_log(dt('Task @taskid started.', array('@taskid' => $result->id)), 'ok');\n }\n else {\n drush_print_table(drush_key_value_to_array_table(acapi_convert_values($result)));\n }\n }\n }\n\n if ($status != 200) {\n return drush_set_error('ACAPI_HTTP_STATUS_' . $status, dt('API status code @status', array('@status' => $status)));\n }\n\n return array($status, $result);\n}", "function __apiCall($url, $post_parameters = FALSE) {\n \n \t// Initialize the cURL session\n\t $curl_session = curl_init();\n\t \t\n\t // Set the URL of api call\n\t\tcurl_setopt($curl_session, CURLOPT_URL, $url);\n\t\t \n\t\t// If there are post fields add them to the call\n\t\tif($post_parameters !== FALSE) {\n\t\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $post_parameters);\n\t\t}\n\t\t \n\t\t// Return the curl results to a variable\n\t curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);\n\t\t \n\t // Execute the cURL session\n\t $contents = curl_exec ($curl_session);\n\t\t \n\t\t// Close cURL session\n\t\tcurl_close ($curl_session);\n\t\t \n\t\t// Return the response\n\t\treturn json_decode($contents);\n \n }", "private function dispatch(): void {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"{$this->apiUrl}/{$this->endpoint}\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => \"CURL_HTTP_VERSION_1_1\",\n CURLOPT_CUSTOMREQUEST => $this->method\n ));\n\n $this->response = curl_exec($curl); \n curl_close($curl);\n }", "public function call()\r\n\t{\r\n\t\t// get the request XML from the DOM document\r\n\t\t$request_xml = $this->__toString();\r\n\t\t\r\n\t\t// get the API function name\r\n\t\t$function_name = get_class($this);\r\n\t\tif (substr($function_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$function_name = substr($function_name, 0, -4);\r\n\t\t}\r\n\t\t$function_name = substr($function_name, strrpos($function_name, '_') + 1);\r\n\t\t\r\n\t\t// make the API call\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// instantiate the SOAP client and make the API call\r\n\t\t\t$client = new SoapClient($this->props['remote_host'].'/external/api/api.wsdl', \r\n\t\t\t\tarray('location' => $this->props['remote_host'].'/external/api/api.php'));\r\n\t\t\t$result = $client->$function_name($this->props['api_version'], $this->props['auth_key'], $request_xml);\r\n\t\t} // end try\r\n\t\t// there was an error trying to make the API call\r\n\t\tcatch (SoapFault $fault)\r\n\t\t{\r\n\t\t\tthrow new Services_WorkXpress_API_Exception(\"SOAP Fault: (faultcode: {$fault->faultcode}; faultstring: {$fault->faultstring})\");\r\n\t\t} // end catch SoapFault\r\n\t\t\r\n\t\t// create a response object\r\n\t\t$class_name = str_replace('Request', 'Response', get_class($this));\r\n\t\tif (substr($class_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$class_name = substr($class_name, 0, -4);\r\n\t\t}\r\n\t\t$response = new $class_name($result);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "function CallAPI($method, $url, $data = false)\n{\n $curl = curl_init();\n\n switch ($method)\n {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // Optional Authentication:\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n\n curl_close($curl);\n\n// echo \"<pre>\",print_r($result);\n return $result;\n}", "public function execute(){\n try {\n $request = $this->getRestClient();\n $raw_response = $request->request();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::helper('unbxd_recommendation')->log(Zend_Log::ERR,\n sprintf($this->getUrl() .\" failed because HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('unbxd_recommendation/api_response')\n ->setErrorMessage(Unbxd_Recommendation_Model_Api_Response::SERVER_ERR);\n }\n return Mage::getModel(\"unbxd_recommendation/api_response\")\n ->setJsonResponse($this->isJsonResponse())\n ->setResponse($raw_response, $this->getUrl());\n }", "public function callApi()\n {\n // Call URL\n $fetchUsers = $this->requestUsingCurl($this->url);\n \n if (!$fetchUsers) {\n return false;\n }\n // Get Data in array format\n $this->users = json_decode($fetchUsers, true);\n }", "public function request();", "function api_call(){\n\n\t\t$p = App::$cmd;\n\t\t$type = null;\n\n\t\tif(strrpos($p,'.')) {\n\t\t\t$type = substr($p,strrpos($p,'.')+1);\n\t\t\tif(strpos($type,'/') === false) {\n\t\t\t\t$p = substr($p,0,strrpos($p,'.'));\n\t\t\t\t// recalculate App argc,argv since we just extracted the type from it\n\t\t\t\tApp::$argv = explode('/',$p);\n\t\t\t\tApp::$argc = count(App::$argv);\n\t\t\t}\n\t\t}\n\n\t\tif((! $type) || (! in_array($type, [ 'json', 'xml', 'rss', 'as', 'atom' ])))\n\t\t\t$type = 'json';\n\n\t\t$info = \\Zotlabs\\Lib\\Api_router::find($p);\n\n\t\tif(in_array($type, [ 'rss', 'atom', 'as' ])) {\n\t\t\t// These types no longer supported.\n\t\t\t$info = false;\n\t\t}\n\n\t\tlogger('API info: ' . $p . ' type: ' . $type . ' ' . print_r($info,true), LOGGER_DEBUG,LOG_INFO);\n\n\t\tif($info) {\n\n\t\t\tif ($info['auth'] === true && api_user() === false) {\n\t\t\t\t\tapi_login($a);\n\t\t\t}\n\n\t\t\tload_contact_links(api_user());\n\n\t\t\t$channel = App::get_channel();\n\n\t\t\tlogger('API call for ' . $channel['channel_name'] . ': ' . App::$query_string);\n\t\t\tlogger('API parameters: ' . print_r($_REQUEST,true));\n\n\t\t\t$r = call_user_func($info['func'],$type);\n\n\t\t\tif($r === false) \n\t\t\t\treturn;\n\n\t\t\tswitch($type) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\theader ('Content-Type: text/xml');\n\t\t\t\t\treturn $r; \n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\n\t\t\t\t\theader ('Content-Type: application/json');\n\t\t\t\t\t// Lookup JSONP to understand these lines. They provide cross-domain AJAX ability.\n\t\t\t\t\tif ($_GET['callback'])\n\t\t\t\t\t\t$r = $_GET['callback'] . '(' . $r . ')' ;\n\t\t\t\t\treturn $r; \n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\n\t\t$x = [ 'path' => App::$query_string ];\t\n\t\tcall_hooks('api_not_found',$x);\n\n\t\theader('HTTP/1.1 404 Not Found');\n\t\tlogger('API call not implemented: ' . App::$query_string . ' - ' . print_r($_REQUEST,true));\n\t\t$r = '<status><error>not implemented</error></status>';\n\t\tswitch($type){\n\t\t\tcase 'xml':\n\t\t\t\theader ('Content-Type: text/xml');\n\t\t\t\treturn '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\" . $r;\n\t\t\t\tbreak;\n\t\t\tcase \"json\":\n\t\t\t\theader ('Content-Type: application/json');\n\t\t\t return json_encode(array('error' => 'not implemented'));\n\t\t\t\tbreak;\n\t\t\tcase \"rss\":\n\t\t\t\theader ('Content-Type: application/rss+xml');\n\t\t\t\treturn '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\" . $r;\n\t\t\t\tbreak;\n\t\t\tcase \"atom\":\n\t\t\t\theader ('Content-Type: application/atom+xml');\n\t\t\t\treturn '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\" . $r;\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function callApi(){\n $endpoint = sprintf( self::$ENDPOINT, $this->category );\n\n // call URL and get contents\n $content = file_get_contents($endpoint);\n\n // Check if Backend API has failed to return a successul response\n if($content===FALSE){\n throw new Exception(\"Backend service failed to return a response. Possibly throttling our request.\");\n }\n\n // Parse JSON response\n $response = json_decode($content, true);\n\n // Return just the quote\n $quote = $response['contents']['quotes'][0];\n $quote['requested_category'] = $this->category;\n if(!$quote['id']){\n $quote['id'] = substr( md5($str), 0, 32); // just a unique id if missing\n }\n\n return $quote;\n }", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "function callApi($url) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt ($ch, CURLOPT_URL, $url);\n\n // Get the response and close the channel.\n $response = curl_exec ( $ch );\n\n if ($response === false) {\n echo \"Failed to \".$action.\" : \" . curl_error ( $ch );\n }\n\n curl_close($ch);\n\n return $response;\n}", "function _do_api_call($verb, $url, $data, &$result) { \n $api_key = elgg_get_plugin_setting('api_key', 'babelroom');\n $api_server = elgg_get_plugin_setting('api_server', 'babelroom');\n $server_url = $api_server.$url;\n $rc = false;\n\n if (!extension_loaded('curl'))\n return false;\n\n if (\n !(stripos(ini_get('disable_functions'), 'curl_init') !== FALSE) and\n ($ch = @curl_init($server_url)) !== false) {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $verb); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n# curl_setopt($ch, CURLOPT_HEADER, false); -- for later reference\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $api_key.':');\n if ($data) {\n $data_string = json_encode($data);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string)));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); \n }\n $tmp_result = curl_exec($ch);\n if (!curl_errno($ch)) {\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($code>=200 and $code<=299) {\n $result = json_decode($tmp_result);\n $rc = true;\n }\n else {\n elgg_log(\"BRAPI error response code $code, [$server_url]\",'ERROR');\n }\n }\n else {\n elgg_log(\"BRAPI connect error [$server_url]\",'ERROR');\n }\n curl_close($ch);\n }\n else {\n elgg_log(\"BRAPI curl initialization error [$server_url]\",'ERROR');\n }\n\n return $rc;\n}", "function make_call($url)\n {\n echo \"API Call:<br /><textarea id='orig' rows='4' cols='150'>$url</textarea><br />\";\n $ch = curl_init();\n $timeout = 20;\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\n\n $data = curl_exec($ch);\n\n if (curl_errno($ch)) {\n print curl_error($ch);\n } else {\n curl_close($ch);\n }\n echo htmlentities($data) . \"<br />\";\n return $data;\n }", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "abstract protected function requestApi($action = '', $params = array(), $method = 'POST');", "function call($postfields) {\r\n\t\t$postfields[\"username\"] = $this->api_user;\r\n\t\t$postfields[\"password\"] = md5($this->api_pass);\r\n\r\n\t\t// Make curl request\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->api_url);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 100);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\r\n\t\t$data = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t// Format response\r\n\t\t$data = explode(\";\",$data);\r\n\t\tforeach ($data AS $temp) {\r\n\t\t $temp = explode(\"=\",$temp);\r\n\t\t $key = trim($temp[0]);\r\n\t\t $value = trim($temp[1]);\r\n\t\t $results[$key] = $value;\r\n\t\t}\r\n\t\t\r\n\t\t// Returns array with response\r\n\t\treturn $results;\r\n\t}", "function apiCall($rtm_method, $http_method, $args = array(), $require_sig = true) {\n\t\n\t\t$api_url = $this->apiURL($rtm_method, $args, $require_sig);\n\t\t\n\t\t$curl_handle = curl_init();\n\t\tcurl_setopt($curl_handle, CURLOPT_URL, $api_url);\n\t\tif ($http_method == 'post') {\n\t\t\tcurl_setopt($curl_handle, CURLOPT_POST, true);\n\t\t}\n\t\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Expect:'));\n\t\t$rtm_data = curl_exec($curl_handle);\n\t\t$this->http_status = curl_getinfo($curl_handle, CURLINFO_HTTP_CODE);\n\t\t$this->last_api_call = $api_url;\n\t\tcurl_close($curl_handle);\n\t\treturn $rtm_data;\n\t}", "function http($url, $method, $postfields = NULL, $headers = array()) {\n $this->http_info = array();\n $ci = curl_init();\n /* Curl settings */\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n switch ($method) {\n case 'POST':\n curl_setopt($ci, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n $this->postdata = $postfields;\n }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n if (isset($this->access_token) && $this->access_token)\n $headers[] = \"Authorization: OAuth2 \" . $this->access_token;\n if (!empty($this->remote_ip)) {\n if (defined('SAE_ACCESSKEY')) {\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\n } else {\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\n }\n } else {\n if (!defined('SAE_ACCESSKEY')) {\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\n }\n }\n curl_setopt($ci, CURLOPT_URL, $url);\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);\n $response = curl_exec($ci);\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n $this->url = $url;\n if ($this->debug) {\n echo \"=====post data======\\r\\n\";\n var_dump($postfields);\n echo \"=====headers======\\r\\n\";\n print_r($headers);\n echo '=====request info=====' . \"\\r\\n\";\n print_r(curl_getinfo($ci));\n echo '=====response=====' . \"\\r\\n\";\n print_r($response);\n }\n curl_close($ci);\n return $response;\n }", "private function make_api_call($url, $options) {\n $options['wsapikey'] = $this->wsapikey;\n $options['format'] = 'json';\n $query = http_build_query($options);\n $response_url = $url . '?' . $query;\n $curlHandler = curl_init();\n curl_setopt($curlHandler,CURLOPT_ENCODING , \"gzip\");\n curl_setopt($curlHandler, CURLOPT_URL, $response_url);\n curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, true);\n // curl_setopt($curlHandler, CURLOPT_USERAGENT, $user_agent);\n curl_exec($curlHandler);\n $response_json = curl_multi_getcontent($curlHandler);\n $response = json_decode($response_json);\n return $response;\n }", "public function processApi();", "function externalapis()\n\n {\n //get usd rate\n\n\n //koinok value\n $koinok = koinokapi();\n\n //idex\n $idex = idexapi();\n\n //mercatox\n $mercatox = mercatoxapi();\n\n //etherflyer\n $etherflyer = etherflyerapi();\n\n //bancor\n $bancor = bancorapi();\n// echo json_encode($koinok);\n\n $result = array('IDEX'=>$idex,'KOINOK'=>$koinok,'MERCATOX'=>$mercatox,'ETHERFLYER'=>$etherflyer,'BANCOR'=>$bancor);\n echo json_encode($result);\n\n }", "public function request()\n {\n }", "public function request()\n {\n }", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "function callAPI($method, $url, $data){\n $curl = curl_init();\n switch ($method){\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\t\t\t \t\t\t\t\t\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n // OPTIONS:\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // EXECUTE:\n $result = curl_exec($curl);\n curl_close($curl);\n return $result;\n}", "private function _makeRequest($type)\n\t{\n\t\n\t\t$http = new Varien_Http_Adapter_Curl();\n\t\t$config = array('timeout' => 30);\n\t\t\n\t\t//Build URL from the \n\t\t$url = Wp_WhitePages_Model_Api::API_URL.'/'.$type.'/'.Wp_WhitePages_Model_Api::API_VERSION.'/'. $this->_requestQuery;\n\n\t\t//Magento logging\n\t\t$isLogsActive = Mage::getStoreConfig('dev/log/active');\n\t\tif($isLogsActive)\n\t\t{\n\t\t\t$this->wpDebug(\"Requests URL: \".$url);\n\t\t}\n\t\t//echo $url; die;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t//Make Curl Request\n\t\t\t$http->write('GET',\t$url, '1.1');\n\t\t\t$this->_result = json_decode(Zend_Http_Response::extractBody($http->read()), true );\n\t\t\t\n\t\t\t//Check for Curl Error\n\t\t\tif($http->getErrno() != 0)\n\t\t\t{\n\t\t\t\tMage::throwException($http->getError(). ' error number '. $http->getErrno());\n\t\t\t}\n\t\t\t//Check for API result Errors\n\t\t\telseif(array_key_exists('errors',$this->_result))\n\t\t\t{\n\t\t\t\tMage::throwException($this->_result[\"errors\"][0]);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) \n\t\t{\n\t\t \t$this->wpDebug($e->getMessage(), Zend_Log::ERR);\n\t\t\t$this->_hasError = true;\n\t\t}\n\t\t\n\t\t//Magento logging\n\t\tif($isLogsActive)\n\t\t{\n\t\t\t$this->wpDebug( \"Response Data: \".var_export($this->_result, true));\n\t\t}\n\t\t\n\t\treturn $this->_result;\n\t}", "function CallAPI($method, $url, $data = false)\r\n{\r\n $curl = curl_init();\r\n\r\n switch ($method)\r\n {\r\n case \"POST\":\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n\r\n if ($data)\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n break;\r\n case \"PUT\":\r\n curl_setopt($curl, CURLOPT_PUT, 1);\r\n break;\r\n default:\r\n if ($data)\r\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n }\r\n\r\n // Optional Authentication:\r\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r\n curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\r\n\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n\r\n $result = curl_exec($curl);\r\n\r\n curl_close($curl);\r\n\r\n return $result;\r\n}", "function revSPORTapiRequest(string $api, string $endpoint, int $id = null, array $parameters = [])\n{\n date_default_timezone_set('Australia/Sydney');\n\n //Replace these with\n //revdemoclub\n $apiKey = '';\n $secretKey = '';\n $method = 'GET';\n //$url = 'https://lz-1.revolutionise.com.au/' . $api . '/' . $endpoint . '/';\n $url = 'https://lz-1-staging.revolutionise.com.au/' . $api . '/' . $endpoint . '/';\n //$url = 'https://lz-1.rev.local/' . $api . '/' . $endpoint . '/';\n\n if (empty($id) === false)\n {\n $url .= $id;\n }\n\n $now = time();\n $date = date('d M Y H:i:s', $now);\n $URLFriendlyDate = str_replace(' ', '', $date);\n $nonce = rand(100000, 999999); // generated randomly\n\n // Build the digest to send\n $digest = base64_encode(hash_hmac('sha256', $method . \"+/\" . $endpoint . \"/\" . (empty($id) ? '' : $id) . \"+$URLFriendlyDate+$nonce\", $secretKey));\n $x = array(\n 'api_key' => $apiKey,\n 'date' => $date,\n 'nonce' => $nonce,\n 'digest' => $digest\n );\n\n $postfields = array_merge($x, $parameters);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //make sure it returns a response\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); // allow https verification if true\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // allow https verification if true\n curl_setopt($ch, CURLOPT_POST, true); //tell it we are posting\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query_for_curl($postfields)); //tell it what to post\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); //response comes back as json\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: multipart/form-data')); //response comes back as json\n $response = curl_exec($ch);\n\n\n // Check if any error occurred\n if (!curl_errno($ch))\n {\n $info = curl_getinfo($ch);\n }\n // Close handle\n curl_close($ch);\n\n //$response = json_decode($response, true);\n\n return $response;\n}", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n\t\t//print_r($postfields);exit;\r\n\t\t$this->http_info = array();\r\n\t\t$ci = curl_init();\r\n\t\t/* Curl settings */\r\n\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_USERAGENT, 'PHP-SDK OAuth2.0');\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, 3);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, false);\t\t\r\n\t\tcurl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n\t\tcurl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n\t\tcurl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n\t\tcurl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t\tswitch ($method) {\r\n\t\t\tcase 'POST':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_POST, TRUE);\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\tcurl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n\t\t\t\t\t$this->postdata = $postfields;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'DELETE':\r\n\t\t\t\tcurl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n\t\t\t\tif (!empty($postfields)) {\r\n\t\t\t\t\t$url = \"{$url}?{$postfields}\";\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n\t\tcurl_setopt($ci, CURLOPT_URL, $url );\r\n\t\tcurl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n\t\tcurl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n\t\t$response = curl_exec($ci);\r\n\t\t\r\n\t\t$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n\t\t$this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n\t\t$this->url = $url;\r\n\r\n\t\tif ($this->debug) {\r\n\t\t\techo \"=====post data======\\r\\n\";\r\n\t\t\tvar_dump($postfields);\r\n\r\n\t\t\techo '=====info====='.\"\\r\\n\";\r\n\t\t\tprint_r( curl_getinfo($ci) );\r\n\r\n\t\t\techo '=====$response====='.\"\\r\\n\";\r\n\t\t\tprint_r( $response );\r\n\t\t}\r\n\t\tcurl_close ($ci);\r\n\t\treturn $response;\r\n\t}", "abstract public function request();", "private function __request($method, $api) {\n\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL , $this->__apiURL($api));\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST , $method);\n curl_setopt($curl, CURLOPT_POSTFIELDS , http_build_query($this->__leadData));\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_VERBOSE , $this->__debug);\n curl_setopt($curl, CURLOPT_IPRESOLVE , CURL_IPRESOLVE_V4);\n\n $result = curl_exec($curl);\n\n $response = array();\n $response['result'] = json_decode ($result);\n\n if ($this->__debug) {\n\n $response['error'] = curl_error ($curl);\n $response['info'] = curl_getinfo($curl);\n }\n\n curl_close($curl);\n\n return $response;\n }", "private function _call_api($url, $method, $data = array()) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\n curl_setopt($curl, CURLOPT_HEADER, 0);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);\n\n if($method == 'POST')\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n\n //curl_setopt($curl, CURLOPT_POSTFIELDS, $product);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n $response = curl_exec($curl);\n curl_close ($curl);\n\n return $response;\n }", "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n $this->http_info = array();\r\n $ci = curl_init();\r\n /* Curl settings */\r\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r\n if (version_compare(phpversion(), '5.4.0', '<')) {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\r\n } else {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);\r\n }\r\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\r\n switch ($method) {\r\n case 'POST':\r\n curl_setopt($ci, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n $this->postdata = $postfields;\r\n }\r\n break;\r\n case 'DELETE':\r\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url = \"{$url}?{$postfields}\";\r\n }\r\n }\r\n\r\n if ( isset($this->access_token) && $this->access_token )\r\n $headers[] = \"Authorization: OAuth2 \".$this->access_token;\r\n\r\n if ( !empty($this->remote_ip) ) {\r\n if ( defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\r\n } else {\r\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\r\n }\r\n } else {\r\n if ( !defined('SAE_ACCESSKEY') ) {\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n }\r\n }\r\n curl_setopt($ci, CURLOPT_URL, $url );\r\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\r\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\r\n\r\n $response = curl_exec($ci);\r\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n $this->url = $url;\r\n\r\n if ($this->debug) {\r\n echo \"=====post data======\\r\\n\";\r\n var_dump($postfields);\r\n\r\n echo \"=====headers======\\r\\n\";\r\n print_r($headers);\r\n\r\n echo '=====request info====='.\"\\r\\n\";\r\n print_r( curl_getinfo($ci) );\r\n\r\n echo '=====response====='.\"\\r\\n\";\r\n print_r( $response );\r\n }\r\n curl_close ($ci);\r\n return $response;\r\n }", "function callAPI($method, $url, $data){\n $curl = curl_init();\n\n switch ($method){\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // OPTIONS:\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json'\n ));\n\n // EXECUTE:\n $result = curl_exec($curl);\n if(!$result){die(\"Connection Failure\");}\n curl_close($curl);\n return $result;\n}", "private function suivi_crm(){\t\n\t\t\t\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t\n\t\t\t$result=suivi_crm();\n\t\t\t$this->response($this->json($result), 200);\n\t\t\t$this->response('',204);\t\n\t\t}", "public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}", "public function makeRequest(): void\n {\n if (!$this->token) {\n $this->login();\n }\n\n try {\n $promise = $this->client->requestAsync('POST', 'https://api.jamef.com.br/rastreamento/ver',\n [\n 'headers' =>\n [\n 'Authorization' => 'Bearer ' . $this->token,\n ],\n 'json' => $this->buildRequest()\n ]\n )->then(function ($response) {\n $this->parseResult($response);\n });\n $promise->wait();\n } catch (RequestException $e) {\n $error = json_decode($e->getResponse()->getBody());\n if($error->message){\n $this->result->errors[] = utf8_decode($error->message->message);\n }\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n }", "protected function _execute(){\n\t\t\t$this->_getUrl();\n\n\t\t\t$c = curl_init($this->_url);\n\t\t\tob_start();\n\t\t\tif(!empty($this->_postFields)) {\n\t\t\t\tcurl_setopt($c, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($c, CURLOPT_POSTFIELDS, json_encode($this->_postFields));\n\t\t\t}\n\n\t\t\tcurl_exec($c);\n\t\t\tcurl_close($c);\n\t\t\t$this->_result = trim(ob_get_contents());\n\t\t\tob_end_clean();\n\t\t}", "function CallAPI($method, $url, $data = false){\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_PUT, 1);\t\t\n\t\t$update_json = json_encode($data);\t\n\t\tcurl_setopt($curl, CURLOPT_URL, $url . \"?\" . http_build_query($data));\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSLVERSION, 4);\n\t\t$result = curl_exec($curl); \n\t\t$api_response_info = curl_getinfo($curl);\n\t\tcurl_close($curl);\n\t\treturn $result;\n}", "public function r2__statamic_api_call()\n {\n // Figure out which class and method to use.\n // Default to POST, fall back to GET.\n $class = array_get($_POST, 'class', array_get($_GET, 'class'));\n $method = array_get($_POST, 'method', array_get($_GET, 'method'));\n // Unset the class and method so that the implosion of the rest of the\n // data results in the necessary args.\n unset($_POST['class'], $_POST['method'], $_GET['class'], $_GET['method']);\n\n $args = !empty($_POST) ? $_POST : $_GET;\n\n $response = call_user_func_array(array($class, $method), $args);\n\n if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&\n strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'\n ) {\n die(json_encode($response));\n }\n return $response;\n }", "function request($httpMethod, $service, $apiMethod, array $parameters = array(), array $options = array());", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "function chargeAPI($api_url, $server_key, $request_body){\n $ch = curl_init();\n $curl_options = array(\n CURLOPT_URL => $api_url,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n // Tambahkan heder ke permintaan, termasuk Otorisasi yang dihasilkan dari kunci server\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'Accept: application/json',\n 'Authorization: Basic ' . base64_encode($server_key . ':')\n ),\n CURLOPT_POSTFIELDS => $request_body\n );\n curl_setopt_array($ch, $curl_options);\n $result = array(\n 'body' => curl_exec($ch),\n 'http_code' => curl_getinfo($ch, CURLINFO_HTTP_CODE),\n );\n return $result;\n}", "function activate_car($id)\n{\n $url = set_url('advert');\n $url .= '/' . $id . '/activate';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, '{}');\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n return $apiResponse;\n}", "public function doRequests();", "public function perform()\n\t\t{\n##\t\t\t$data_string = json_encode($data);\n\t\t\t$ch = curl_init($this->endpoint);\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request_type);\n\n\t\t\tif ($this->payload != NULL)\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->payload);\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t#curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json'));\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\t\t\t\n\t\t\t$this->result = curl_exec($ch);\n\t\t\t\n\t\t\tif ($ret = json_decode($this->result,true))\n\t\t\t\treturn $ret;\n\t\t\telse\n\t\t\t\tdie(\"ERROR: $this->result\");;\n\t\t\treturn json_decode($this->result,true);\n\t\t}", "public function api_call($query) {\n $query = $this->sanitize_str($query); \n $url = \"https://superheroapi.com/api/1180364012471833/search/\" . $query;\n \n if (!file_get_contents($url)) {\n $err = array(\n \"response\" => \"error\",\n \"error\" => \"Couldn't connect to API\",\n );\n \n $res = json_encode($err);\n }\n else {\n $res = file_get_contents($url);\n }\n \n return $res;\n }", "function apiCall ( $http_method, $url, $params=array(), $response_format=null, $request_format=null ) {\n\n if ( empty($response_format) )\n {\n $response_format = $this->guessFormatFromUrl($url);\n }\n\n $ssl_auth = 0;\n if(defined('SYNDICATIONAPICLIENT_SSL_AUTH'))\n $ssl_auth = SYNDICATIONAPICLIENT_SSL_AUTH;\n if(isset($params['ssl_auth'])) {\n $ssl_auth = $params['ssl_auth'];\n unset($params['ssl_auth']);\n }\n\n /*\n foreach ( $params as $p=>$param )\n {\n if ( empty($param) && $param!==0 && $param!=='0' )\n {\n unset( $params[$p] );\n }\n }\n */\n /// ascending order is default, descending order is speicified by a '-' sign\n /// if 'order' param is set, reinterpret that as part of sort param\n if ( !empty($params['sort']) && !empty($params['order']) )\n {\n // clean up sort, strip off leading '-'\n if ( $params['sort']{0} != '-' )\n {\n $params['sort'] = substr( $params['sort'], 1 );\n }\n if ( strtolower(substr($params['order'],4)) == 'desc' )\n {\n $params['sort'] = '-'.$params['sort'];\n }\n }\n\n $http_params = '';\n\n /// our request format type\n $request_headers = array();\n switch( $request_format )\n {\n case 'html':\n $http_params = http_build_query($params,'','&');\n $request_headers[] = 'Content-Type: text/html;charset=UTF-8';\n break;\n case 'xml':\n $http_params = http_build_query($params,'','&');\n $request_headers[] = 'Content-Type: text/xml;charset=UTF-8';\n break;\n case 'json':\n $http_params = json_encode($params);\n $request_headers[] = 'Content-Type: application/json;charset=UTF-8';\n break;\n default:\n @$http_params = http_build_query($params,'','&');\n $request_headers[] = 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8';\n break;\n }\n\n $request_headers[] = 'Date: '.gmdate('D, d M Y H:i:s', time()).' GMT';\n\n /// ask for a specific format type of response\n if ( !empty($response_format) )\n {\n switch( $response_format )\n {\n case 'html':\n $request_headers[] = 'Accept: text/html;charset=UTF-8';\n break;\n case 'json':\n $request_headers[] = 'Accept: application/json;charset=UTF-8';\n break;\n case 'js':\n $request_headers[] = 'Accept: application/javascript;charset=UTF-8';\n break;\n case 'text':\n $request_headers[] = 'Accept: text/plain;charset=UTF-8';\n break;\n case 'image':\n $request_headers[] = 'Accept: image/*;';\n break;\n }\n }\n\n /// content-length required for apiKeyGen\n switch ( strtolower($http_method) )\n {\n case 'post':\n case 'put':\n case 'delete':\n $request_headers[] = 'Content-Length: '.strlen($http_params);\n break;\n case 'get':\n default:\n $request_headers[] = 'Content-Length: 0';\n break;\n }\n\n $apiKey = $this->apiGenerateKey( $http_method, $url, $http_params, $request_headers );\n $request_headers[] = \"Authorization: syndication_api_key {$apiKey}\";\n\n $curl = $this->apiBuildCurlRequest( $http_method, $url, $http_params, $request_headers, $response_format );\n\n /// do some temp memory writing bs to capture curl's output to grab actual request string\n curl_setopt($curl, CURLOPT_VERBOSE, true);\n $verbose = fopen('php://temp', 'rw+');\n curl_setopt($curl, CURLOPT_STDERR, $verbose);\n\n if($ssl_auth == 1) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n $content = curl_exec($curl);\n rewind($verbose);\n $verbose_log = stream_get_contents($verbose);\n $http = curl_getinfo($curl);\n $http['verbose_log'] = $verbose_log;\n\n if ($content === false)\n {\n curl_close($curl);\n throw new Exception('Syndication: No Response: '. $http['http_code'], $http['http_code'] );\n return null;\n }\n curl_close($curl);\n\n if ( empty($response_format) )\n {\n $response_format = $this->guessFormatFromResponse($http);\n }\n\n $api_response = array(\n 'http' => $http,\n 'content' => $content,\n 'format' => $response_format\n );\n /// test result content-type for JSON / HTML / IMG\n /// json needs to be decoded\n /// html stay as text\n /// images need to be: base64_encoded string or image resource\n if ( $response_format=='image' )\n {\n // as GD handle ?\n // $api_response['content'] = imagecreatefromstring($content);\n } else if ( $response_format=='text' ) {\n // nuthin\n } else if ( $response_format=='html' ) {\n // any html cleaning ?\n } else if ( $response_format=='js' ) {\n // any xss cleaning ?\n } else if ( $response_format=='json' ) {\n try {\n $decoded = json_decode($content,true);\n if ( $decoded === null )\n {\n /// bad json should return empty, or return raw unencoded values?\n } else if ( isset($decoded['results']) ) {\n if ( empty($decoded['results']) || count($decoded['results'])==1 && empty($decoded['results'][0]) )\n {\n $decoded['results'] = array();\n }\n }\n $api_response['content'] = $decoded;\n } catch ( Exception $e ) {\n /// bad json should return empty, or return raw unencoded values?\n }\n }\n return $api_response;\n }", "public function execute(): object\n {\n $this->buildRequest();\n $client = new HttpClient();\n Log::debug('Creating Digicert Request', [\n 'Method' => $this->requestMethod,\n 'RequestURI' => $this->requestUri,\n 'Options' => $this->options,\n ]);\n RateLimiter::checkLimit();\n $request = $client->request($this->requestMethod, $this->requestUri, $this->options);\n \n return json_decode($request->getBody());\n }", "function makecurl($api,$data=array())\n{\n$options = array(\n);\n$ds1=array();\n$ds1['header']=\"Content-type: application/x-www-form-urlencoded\\r\\n\";\n$ds1['method']=\"POST\";\n$ds1['content']=http_build_query($data);\n$options['http']=$ds1;\n \n$context = stream_context_create($options);\n$result = file_get_contents($api, false, $context);\nif ($result === FALSE) { /* Handle error */ }\nreturn $result;\n}", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "function doApiRequest($email, $name, $location, $phone, $category){\n try{\n #!important!\n $eamil = get_value($email);\n $final = 0;\n #get api data from hosted server\n $request = file_get_contents(\"http://34.212.19.150:8000/request/users\");\n #parse api data to json_decoder \n $json_response = json_decode($request);\n #create array to hold api data \n $response_array = array();\n #split fetched data from api for array\n foreach ($json_response->data as $response ) {\n #add email addresses to response_array \n array_push($response_array, $response->email);\n }\n #check if value exist in fetched api array\n if(in_array($email, $response_array)){\n #add free_lancer to database\n $addFreeLancer = doAddFreeLancer($name, $email, $location, $phone, $category);\n #fetch inserted data from parameters \n $insertedData = array('email' => $email ,'name' => $name,'location' => $location,'phone' => $phone,\n 'category' => $category);\n #send reponses \n $final = api_response(true, $insertedData, $addFreeLancer);\n }else{\n $final = api_response(false, null, \"not found in api\");\n }\n #returned data to user\n return $final;\n \n }catch(Exception $ex){\n return $ex->getMessage();\n }\n}", "public function makeCall() {\n try {\n $request_params = \\Request::all();\n $file_name = str_replace('+', '0', $request_params['To']) . '.xml';\n $data = file_get_contents(\"https://s3.eu-central-1.amazonaws.com/barq-live/call_xmls/\" . $file_name);\n print($data);\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n return $this->getExceptionUtils()->storeException($ex);\n } catch (\\Exception $ex) {\n return $this->getExceptionUtils()->storeException($ex);\n }\n }", "public function api_connect($url);", "function CallAPI($method, $url, $api_name, $data = false)\n{\n if (!endsWith($url, '/')) {\n $url .= '/';\n }\n $url .= $api_name;\n $curl = curl_init();\n\n switch ($method) {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n\n if ($data)\n $data = json_encode($data, JSON_PRETTY_PRINT);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n //Set the content type to application/json\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n // // HTTP GET\n // $query_data = http_build_query($data);\n // curl_setopt($ch, CURLOPT_URL, \"$url?$query_data\");\n // curl_setopt($ch, CURLOPT_POST, false);\n }\n\n // Optional Authentication:\n // curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n curl_close($curl);\n\n $data = json_decode($result);\n\n return $data;\n}", "function get_rest_api($api_url = '')\n{\n try {\n // url\n $url = $api_url;\n\n // init\n $curl = curl_init();\n // execute rest\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n \n // save data \n $response = curl_exec($curl); \n\n // close connection\n curl_close($curl);\n\n return $response;\n\n } catch (\\Throwable $th) {\n //throw $th;\n }\n}", "function get_city($query,$type)\r\n{\r\nrequire_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('city/list', array(\r\n 'query' =&amp;gt; $query,\r\n 'type' =&amp;gt; $type,\r\n 'courier' =&amp;gt; 'jne',\r\n 'API-Key' =&amp;gt; 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ), 'JSON');\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n return $cities = $result['cities'];\r\n //print_r($cities);\r\n //foreach ($cities-&amp;gt;item as $item)\r\n //{\r\n //echo 'Kota: ' . $item . '&amp;lt;br /&amp;gt;';\r\n // }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan kota yang diawali &amp;quot;band&amp;quot;';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }", "function CallAPI($method, $url, $data = false)\n\t{\n\t\t$curl = curl_init();\n\t\tswitch ($method)\n\t\t{\n\t\t\tcase \"POST\":\n\t\t\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\n\t\t\t\tif ($data)\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\tcurl_setopt($curl, CURLOPT_PUT, 1);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ($data)\n\t\t\t\t\t$url = sprintf(\"%s?%s\", $url, http_build_query($data));\n\t\t}\n\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t$result = curl_exec($curl);\n\n\t\tcurl_close($curl);\n\n\t\treturn $result;\n\t}", "public function call()\n {\n $this->dispatchRequest($this['request'], $this['response']);\n }", "protected function send()\n {\n $this->addAuthorization();\n\n $response = $this->client->post(\n $this->apiUrl,\n array(\n 'json' => array(\n 'query' => $this->getQuery(),\n 'variables' => $this->variables,\n ),\n 'headers' => $this->headers,\n )\n );\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody === null) {\n throw new \\RuntimeException('Invalid api call: '.json_encode($this->getQuery()));\n }\n\n $this->body = $responseBody;\n if (isset($responseBody['errors'])) {\n $this->errors = $responseBody['errors'];\n } else {\n $this->response = $responseBody['data'];\n }\n }", "public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }", "private function apiCall($action,$parameters=false,$assoc=false){\n\t\tif(!$this->cookiefile){\n\t\t\t$this->cookiefile=sys_get_temp_dir().'/remoteCloudCookie'.uniqid();\n\t\t}\n\t\t$url=$this->path.='/files/api.php';\n\t\t$fields_string=\"action=$action&\";\n\t\tif(is_array($parameters)){\n\t\t\tforeach($parameters as $key=>$value){\n\t\t\t\t$fields_string.=$key.'='.$value.'&';\n\t\t\t}\n\t\t\trtrim($fields_string,'&');\n\t\t}\n\t\t$ch=curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$url);\n\t\tcurl_setopt($ch,CURLOPT_POST,count($parameters));\n\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE,$this->cookiefile); \n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR,$this->cookiefile); \n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\t\t$result=curl_exec($ch);\n\t\t$result=trim($result);\n\t\t$info=curl_getinfo($ch);\n\t\t$httpCode=$info['http_code'];\n\t\tcurl_close($ch);\n\t\tif($httpCode==200 or $httpCode==0){\n\t\t\treturn json_decode($result,$assoc);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function processRequest() {\n $serviceType = $this->getServiceType();\n if(!$serviceType){return \"Invalid Call ! \\n\";}\n $repoPath = $this->getRepoName();\n if(!defined(\"__APIURL__\" . $serviceType)){\n return \"API URL not found for $serviceType\\n\";\n }\n $apiUrl = sprintf(constant(\"__APIURL__\" . $serviceType), $repoPath);\n $response = $this->makeCurlRequest($apiUrl, 'get');\n switch ($serviceType) {\n case 'github.com':\n return $this->getCountForGit($response);\n break;\n case 'bitbucket.org':\n return $this->getCountForBit($response);\n break;\n default :\n return $response;\n break;\n }\n }", "function MyFatoorah($api, $userData)\n{\n // dd($userData);\n $token = $api;\n $basURL = \"https://apitest.myfatoorah.com\";\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"$basURL/v2/ExecutePayment\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $userData,\n CURLOPT_HTTPHEADER => array(\"Authorization: Bearer $token\", \"Content-Type: application/json\"),\n ));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n if ($err) {\n return $err;\n } else {\n return $response;\n }\n}", "public function serviceRequest()\n {\n API::post('ivr/serviceRequest', array(\n 'caller' => $this->caller,\n 'called' => $this->called\n ), $this->app->getAccessToken());\n }", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "public function exchangeRate() {\n try{\n $client = new GuzzleHttp\\Client(['base_uri' => 'https://api.exchangeratesapi.io/']);\n // Latest endpoint \n $response = $client->request('GET', 'latest');\n $statusCode = $response->getStatusCode();\n if($statusCode == 200) {\n // Get body of the response and stringify\n $body = (string)$response->getBody();\n // Parse json to ApiResponse Object\n $apiResponse = new ApiResponse($body);\n // Print associative response to console\n print_r($apiResponse);\n }\n }catch(Exception $e){\n echo $e;\n }\n\n }", "function apiRequest($method, $data=[]) {\n // Define our target address for the API call.\n $url = \"https://api.telegram.org/bot\".API_KEY.\"/\".$method;\n\n // Perform cURL session.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n $result = curl_exec($ch);\n\n // Error checking. If successful, return data.\n if ( curl_error($ch) ) {\n return false;\n } else {\n return json_decode($result, TRUE);\n }\n }", "public function execute_http()\n {\n }", "public function processApi() {\r\n\tif($this->securedRest){\r\n\t if(!isset($this->requestSecure) || !isset($this->requestPublicKey)){\r\n\t\t$this->response('Utilisateur non authentifié', 401);\r\n\t }\r\n\t if(!$this->verifyKeys($this->requestPublicKey, $this->requestSecure)){\r\n\t\t$this->response('Utilisateur non authentifié', 401);\r\n\t }\r\n\t}\r\n\t\r\n\t$func = $this->_method;\r\n\tif ((int) method_exists($this, $func) > 0){\r\n\t $this->$func();\r\n\t}else{\r\n\t $this->response('', 404);\r\n\t}\r\n\t\r\n }", "public function send()\n\t{\n\t\t$url \t\t= $this->getURL();\t\t\n\t\t$data \t\t= $this->getData();\n\t\t$method \t= $this->getMethod();\n\t\t\t\t\n\t\t$ch = curl_init();\n\t\t$options = $this->_options;\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_USERAGENT \t => $options->useragent,\n\t\t\tCURLOPT_CONNECTTIMEOUT => $options->connection_timeout,\n\t\t\tCURLOPT_TIMEOUT\t\t => $options->timeout,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLINFO_HEADER_OUT\t => true,\n\t\t\tCURLOPT_SSL_VERIFYPEER => $options->ssl,\n\t\t\tCURLOPT_HEADER\t\t => false\n\t\t));\n\t \n $headers = array();\n //if data is string then \n //set the authorization header\n //A Hack to make the linked-in work wihtout affecting\n //other services\n if ( is_string($this->_data) ) {\n $headers[] = $this->_internal_request->to_header();\n $headers[] = \"Content-Type: text/plain\";\n }\n \n if ( !empty($headers) )\n curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);\n \n\t\tswitch ($method) \n\t\t{\n\t\t\tcase KHttpRequest::POST :\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\n\t\t\tcase KHttpRequest::PUT\t: \n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\t\n\t\t\tcase KHttpRequest::DELETE:\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\t\n\t\t$response = curl_exec($ch);\n\t\t\n\t\treturn new ComConnectOauthResponse($response, curl_getinfo($ch));\n\t}", "public function fromAPI($data);", "private function _api_call( $url, $params = array() ) {\n\n $connection = new OAuthDamnit( $this->_config['consumer_key'], $this->_config['consumer_secret'],\n $this->_token['token1'], $this->_token['token2'] );\n\n $data_json = $connection->get($url, $params);\n $data = json_decode($data_json);\n return $data;\n }", "public function sendRequest($params) {\n \n // encrypt the request \n $request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->_app_key, json_encode($params), MCRYPT_MODE_ECB));\n //$request = base64_encode(json_encode($params));\n \n // redefine the parameters array so that it will be accepted by the api \n $params = array();\n $params['data'] = $request;\n $params['app_id'] = $this->_app_id;\n \n //initialize and setup the curl handler\n $handle = curl_init();\n curl_setopt($handle, CURLOPT_URL, $this->_api_url);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($handle, CURLOPT_POST, count($params));\n curl_setopt($handle, CURLOPT_POSTFIELDS, $params); \n $ans = curl_exec($handle); \n if ($ans === false) {\n printf(\"cUrl error (#%d): %s<br>\\n\", curl_errno($handle), htmlspecialchars(curl_error($handle)));\n } \n \n //echo \"GAC: \".$ans.\"\\n\";\n $rawans = $ans;\n $ans = json_decode($ans, true); \n //echo \"ABC: \".$ans.\"\\n\";\n \n //check if we're able to json_decode the result correctly\n if ($ans == false || isset($ans['success']) == false) { \n throw new Exception('Request was not correct in GeneralApiCaller: '.$rawans);\n }\n \n // if there was an error in the request, throw an exception\n if ($ans['success'] == false) {\n throw new Exception($ans['errormsg']);\n }\n \n // if reached here, the data component should have the result\n return $ans['data'];\n }", "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}", "public function processApi(){\n\n\t\t$params = array();\n\t\t$parts = $this->getRequestPartsFrom(\"API\");\n\t\t$this->parseIncomingParams();\n\t\t\n\t\tif($parts[1]=='Clients')\n\t\t{\n\t\t\tif(($parts[2]=='Client')&&(is_numeric($parts[3])))\n\t\t\t{\n\t\t\t\t$this->ID = $parts[3];\n\n\t\t\t\tswitch($this->getRequestMethod()) {\n\t\t\t\t\tcase \"PUT\":\n\t\t\t\t\t\t$this->updateClient();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"GET\":\n\t\t\t\t\t\t$this->getClient();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DELETE\":\n\t\t\t\t\t\t$this->deleteClient();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->response('',404);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($parts[2]=='Client')\n\t\t\t{\n\t\t\t\tswitch($this->getRequestMethod()) {\n\t\t\t\t\tcase \"POST\":\n\t\t\t\t\t\t$this->newClient();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->response('',404);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->getClients();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response('',404);\n\t\t}\n\t\t\t\n\t}", "public function call($arguments, $encode = false) {\n\n $url = $this->api_endpoint . '/' . $arguments['url'] . '.json';\n\n\n if (isset($arguments['params'])) {\n\n //POST\n $response = $this->client->fetch($url, $arguments['params'], OAuth2Client::HTTP_METHOD_POST, $this->http_headers(), $encode);\n } else {\n //GET\n $response = $this->client->fetch($url, array(), OAuth2Client::HTTP_METHOD_GET, $this->http_headers(), $encode);\n }\n\n if (isset($response['body'])) {\n $return = $response['body'];\n $this->body = $response['body'];\n } else {\n $return = null;\n }\n $this->code = $response['code'];\n if (!headers_sent()) {\n header('Brid-Api-Url: ' . $url);\n }\n if (!$encode && !headers_sent()) {\n header('Content-type: application/json');\n\n if (isset($arguments['params']))\n header('Brid-Api-Post: ' . json_encode($arguments['params']));\n\n header('Brid-Api-Resonse: ' . json_encode($response));\n }\n //Return body on success\n if ($this->code == 200) {\n return $return;\n } else {\n\n if ($this->code == 500 || $this->code == 404) {\n $response['body'] = $response['body'];\n if (!is_object($response['body'])) {\n $response['body'] = (isset($response['body']) && !empty($response['body'])) ? json_decode($response['body']) : new StdClass();\n }\n if ($response['body'] == '') {\n $response['body'] = new StdClass();\n }\n\n $response['body']->error = isset($response['body']->name) ? $response['body']->name : 'Unknown error or empty error response.';\n if (isset($this->code)) {\n $response['body']->error .= ' Code:' . $this->code;\n }\n if (!$encode) {\n $response['body'] = json_encode($response['body']);\n }\n } else\n //Return custom Api object on error that will be checked in JS to show friendly message if API is down\n if (is_object($response['body']) && $response['body'] != false) {\n $response['body']->error = isset($response['body']->name) ? $response['body']->name : 'Unknown error or empty error response.';\n if ($encode) {\n $response['body'] = json_encode($response['body']);\n }\n } else {\n $response['body'] = new StdClass();\n $response['body']->error = 'Unknown error or empty error response. No response from api.';\n if ($encode) {\n $response['body'] = json_encode($response['body']);\n }\n }\n\n return $response['body'];\n }\n }", "public function call( $params = array(), $method = 'POST' ) {\n\n\t\t$params['apiKey'] = $this->api_key;\n\t\t$this->base_url = $this->get_base_url();\n\n\t\tswitch ( $method ) {\n\t\t\tcase 'GET':\n\t\t\t\t$response = $this->send( 'GET', $this->base_url . '&' . http_build_query( $params ) );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$response = $this->send( 'POST', $this->base_url, $params );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $response;\n\t}", "abstract function getPairsFromAPI();", "private function executeAPI($method, $url, $params=\"\", $headers=array()){\n\n $result = $this->curlExec($method, rtrim(MESOS_API_URL2,'/').\"/\".$url,$params, $headers);\n $obj = $result['obj'];\n $statusCode = $result['statusCode'];\n\n if($statusCode == 200 || $statusCode == 201 || $statusCode == 204){\n return array('success'=>1, 'status_code'=>$statusCode,'message'=>'success','data'=>$obj);\n }else{\n if ($obj == null) {$obj = array(\"message\"=>\"Request failed.\");}\n $errmsg = serialize($obj);\n $msgJson = json_decode($obj);\n if ($msgJson != null && property_exists($msgJson, 'message')){\n $errmsg = $msgJson->message;\n }\n $errmsg = ''.$statusCode.':'.$errmsg;\n Yii::app()->user->setFlash('flash-error','Service is unavailable!!'.$errmsg);\n return array('success'=>0, 'status_code'=>$statusCode,'data'=>json_encode($obj), 'message'=>$errmsg);\n }\n }", "function api_request($zone_uri, $req_type, $api_params, $token)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); # TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.\n\tcurl_setopt($ch, CURLOPT_FAILONERROR, false); # Do not fail silently. We want a response regardless\n\tcurl_setopt($ch, CURLOPT_HEADER, false); # disables the response header and only returns the response body\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Auth-Token: '.$token)); # Set the token and the content type so we know the response format\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $req_type);\n\tcurl_setopt($ch, CURLOPT_URL, $zone_uri); # Where this action is going,\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($api_params));\n\t\n\t$http_result = curl_exec($ch);\n\t\n\t$decoded_result = json_decode($http_result); # Decode from JSON as our results are in the same format as our request\n\t$decoded_result = api_fail($token, $decoded_result);\t\n\treturn $decoded_result;\n}", "private function _call($method, $params = array(), $apiKey = false)\n {\n // Build the URL\n $url = $this->baseURI . $method;\n\n // Add API key and nonce\n if ($apiKey == true) {\n $params['apikey'] = $this->key;\n $params['nonce'] = time();\n }\n\n // Add parameters to the URL\n if (!empty($params)) {\n $url .= '?' . http_build_query($params);\n }\n\n // Sign some stuff based on secret\n $sign = hash_hmac('sha512', $url, $this->secret);\n\n // Initialize cURL\n $ch = curl_init($url);\n\n // Set cURL options\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['apisign: ' . $sign]);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Execute cURL call\n $result = curl_exec($ch);\n\n // Get the response and return the result, or throw an error\n $response = json_decode($result, true);\n\n if ($response['success'] == false) {\n throw new \\Exception ($response['message']);\n }\n\n return $response['result'];\n }", "function Redactedapi() {\n \n if(!empty($_POST['site_id']) && is_numeric($_POST['site_id']))\n {\n $this->site_id = $_POST['site_id']; \n } \n else\n {\n $this->site_id = 1;\n }\n \n if($_SERVER['SERVER_NAME'] == 'www.redacted.com'){\n $this->username = 'xxxx';\n $this->password = 'xxxx';\n $this->url \t\t= 'https://api-1.redacted.com/redactedapiservice.asmx';\n } else{\n $this->username = 'xxxxx';\n $this->password = 'xxxxx';\n $this->url \t = 'https://testapi-1.redacted.com/redactedAPIService.asmx?wsdl';\n } \n\t\t\t\n\t\t$this->CI =& get_instance();\n\t\t$this->CI->load->helper('cookie');\n\t}", "function apiCall ($url, $data) {\n\t$url = \"https://api.cloudns.net/{$url}\";\n\t$data = \"auth-id=\".AUTH_ID.\"&auth-password=\".AUTH_PASS.\"&{$data}\";\n\t\n\t$init = curl_init();\n\tcurl_setopt($init, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($init, CURLOPT_URL, $url);\n\tcurl_setopt($init, CURLOPT_POST, true);\n\tcurl_setopt($init, CURLOPT_POSTFIELDS, $data);\n\tcurl_setopt($init, CURLOPT_USERAGENT, 'cloudns_api_script/0.1 (+https://github.com/ClouDNS/cloudns-api-bulk-updates/tree/master/bulk-records-update)');\n\t\n\t$content = curl_exec($init);\n\t\n\tcurl_close($init);\n\t\n\treturn json_decode($content, true);\n}", "private function _api($args = array()) {\n\n\t\t$path = '';\n\t\tswitch($this->_api){\n\t\tcase 'json': $path = '/json-api/cpanel?'; break;\n\t\tcase 'xml': $path = '/xml-api/cpanel?'; break;\n\t\t}\n\n\t\t$url = 'https://' . $this->_hostname . ':' . $this->_port;\n\t\t$url .= $path . http_build_query($args, '', '&');\n\n\t\t$pass = base64_encode($this->_username . \":\" . $this->_password);\n\t\t$header = array();\n\t\t$header[] = \"Authorization: Basic \" . $pass . \"\\n\\r\";\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\n\t\tif (($result = curl_exec($curl)) === false) {\n\t\t\tthrow new Exception(\"cURL: \" . curl_error($curl));\n\t\t}\n\n\t\tcurl_close($curl);\n\t\treturn $result;\n\t}", "function display_cars()\n{\n //displays posted cars\n $url = set_url('advert');\n $url .= '?limit=10&page=1';\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Authorization: Bearer ' . $token,]);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = json_decode(curl_exec($cURLConnection));\n curl_close($cURLConnection);\n print_r($apiResponse);\n exit;\n}", "function restAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, $request_data);\n }", "function tfnm_call_api( $api_key, $api_url ){\n\n\t$header_args = array();\n\n\tif( !empty( $api_key ) ){\n\t\t$header_args = array(\n\t\t\t'user-agent' => '',\n\t\t\t'headers' => array(\n\t\t\t\t'authorization' => 'Bearer ' . $api_key\n\t\t\t)\n\t\t);\n\t}\n\n\t$response = wp_safe_remote_get( $api_url, $header_args );\n\n\t// Error proofing\n\tif ( is_wp_error( $response ) ) {\n\t\treturn 'There was an error in response. Please contact the administrator.';\n\t}\n\n\t// Doing some data clean up before returning.\n\tif( !empty( $response['body'] ) ){\n\t\t$response = json_decode( $response['body'] );\n\t}\n\n\treturn $response;\n}", "public function processApi() {\n $request = $this->_request['request'];\n $values = $this->_request;\n\n // WARNING: This method needs to add some ways to authenticate the user\n // and should also filter out any dangerous or magic methods before it\n // would be safe. This code is for demonstration purposes only!\n\n if (method_exists($this->database, $request)) {\n if (!empty($_REQUEST['request'])) {\n unset($values['request']);\n $result = $this->database->processRequest($request, $values);\n if (!empty($result)) {\n $this->response($this->json($result), 200);\n }\n else {\n // If no records \"No Content\" status\n $this->response('',204);\n }\n }\n else {\n // If the method not exist with in this class, response would be \"Page not found\".\n $this->response('',404);\n }\n }\n }", "public function __construct()\r\n {\r\n $this->constructApiUrl();\r\n }", "protected function buildRequest($call, $method = Varien_Http_Client::GET, $postData = false, $headers = false)\n {\n\n // Grab a new instance of HTTP Client\n $http = new Varien_Http_Client();\n\n if(Mage::getStoreConfig(self::API_ENVIRONMENT_XML_PATH) == Smartbox_Smartboxparcels_Model_System_Config_Environment::SMARTBOX_PRODUCTION){\n $http->setUri(Mage::getStoreConfig(self::API_PRODUCTION_XML_PATH) . $call);\n $api_key = array(\n 'X-Api-Key' => Mage::getStoreConfig(self::API_KEY_XML_PATH),\n 'X-Api-User'=> Mage::getStoreConfig(self::API_USERNAME_XML_PATH),\n 'X-Api-Passwd'=> Mage::getStoreConfig(self::API_PASSWORD_XML_PATH)\n );\n $http->setHeaders($api_key);\n }\n else{\n $http->setUri(Mage::getStoreConfig(self::API_STAGING_XML_PATH) . $call);\n $api_key = array(\n 'X-Api-Key' => Mage::getStoreConfig(self::API_KEY_XML_PATH),\n 'X-Api-User'=> Mage::getStoreConfig(self::API_USERNAME_XML_PATH),\n 'X-Api-Passwd'=> Mage::getStoreConfig(self::API_PASSWORD_XML_PATH)\n );\n $http->setHeaders($api_key);\n }\n\n // Set the method in, defaults to GET\n $http->setMethod($method);\n\n // Do we need to add in any post data?\n if($method == Varien_Http_Client::POST) {\n if (is_array($postData) && !empty($postData)) {\n\n // Add in our post data\n $http->setParameterPost($postData);\n\n } else if (is_string($postData)) {\n\n // Try and decode the string\n try {\n\n // Attempt to decode the JSON\n $decode = Mage::helper('core')->jsonDecode($postData, Zend_Json::TYPE_ARRAY);\n\n // Verify it decoded into an array\n if ($decode && is_array($decode)) {\n\n // Include the post data as the raw data body\n $http->setRawData($postData, 'application/json')->request(Varien_Http_Client::POST);\n }\n\n } catch (Zend_Json_Exception $e) {\n $this->_log($e);\n return false;\n }\n\n }\n }\n\n // attempting to add any headers into the request\n if($headers && is_array($headers) && !empty($headers)) {\n\n // Add in our headers\n $http->setHeaders($headers);\n }\n\n // Return the HTTP body\n return $http;\n }", "public function callAPI($request)\n {\n return $this->submitRequest($request);\n }", "public function send(): GetDataFromApiClass;" ]
[ "0.78418875", "0.76973027", "0.7039074", "0.7003127", "0.68814445", "0.68537015", "0.67102975", "0.6692289", "0.6686538", "0.6649428", "0.6637268", "0.6624183", "0.6564474", "0.6550397", "0.6512928", "0.65082294", "0.6503576", "0.6502726", "0.650249", "0.6487964", "0.64699006", "0.64611083", "0.6460922", "0.64603156", "0.6445409", "0.6426441", "0.642516", "0.642516", "0.6412313", "0.64077723", "0.6385251", "0.6369032", "0.63681716", "0.636658", "0.63662714", "0.6364959", "0.6352314", "0.63465214", "0.6332313", "0.63310254", "0.6325474", "0.6320229", "0.6304138", "0.6298019", "0.6291038", "0.628795", "0.6286078", "0.6280677", "0.6278086", "0.627301", "0.62689674", "0.6260945", "0.6256329", "0.6252951", "0.62464464", "0.6245505", "0.6244094", "0.6244077", "0.6227393", "0.6226278", "0.6224047", "0.6212698", "0.6190747", "0.61881375", "0.61856854", "0.61756325", "0.6174209", "0.61741227", "0.6167706", "0.6155112", "0.61542594", "0.6152791", "0.6149005", "0.6145619", "0.61421776", "0.61415935", "0.6133122", "0.612194", "0.61181813", "0.61084", "0.60995775", "0.6089621", "0.6088467", "0.60785246", "0.60641855", "0.60635674", "0.60551554", "0.6043885", "0.6038567", "0.6034262", "0.6033092", "0.6032056", "0.6030779", "0.602945", "0.6025974", "0.6013416", "0.60134083", "0.60100895", "0.6009331", "0.60087126", "0.6004867" ]
0.0
-1
$this>db>where(array('username' = >$username, 'password' => $password));
public function loginAdmin($username, $password){ $query = $this->db->get_where('admin_table', array('username' => $username, 'password' => $password)); //status sholud be 1 if($query->num_rows() == 1){ $userArr = array(); foreach($query->result() as $row){ $userArr[0] = $row->admin_id; $userArr[1] = $row->username; } $userdata = array( 'admin_id' => $userArr[0], 'username' => $userArr[1], 'logged_in'=> TRUE ); $this->session->set_userdata($userdata); return $query->result(); }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkUserPassword()\r\n{\r\n $query_string = \"SELECT userid, username, password \";\r\n $query_string .= \"FROM users \";\r\n $query_string .= \"WHERE \";\r\n $query_string .= \"userid = :userid AND \";\r\n $query_string .= \"username = :username\";\r\n\r\n return $query_string;\r\n}", "function auth_user($username,$password){\n $query=$this->db->query(\"SELECT * FROM t_user WHERE username='$username' AND password= md5('$password') LIMIT 1\");\n return $query;\n }", "function auth_user($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM user_table WHERE user_name='$username' AND user_password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "function auth_admin($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM admin_table WHERE username='$username' AND admin_password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "function auth_admin($username,$password){\n $query=$this->db->query(\"SELECT * FROM t_adminpii WHERE username='$username' AND password=md5('$password') LIMIT 1\");\n return $query;\n }", "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 }else {\n return $res->fetch_assoc();\n }\n}", "function getCustomerByUserAndPass($username, $password) {\n $query = \"SELECT * FROM `customers` WHERE `username`='$username' AND `password`='\". md5($password). \"'\";\n $result = Database::selectQuery($query);\n if(count($result) == 1) {\n return true;\n } else {\n return false;\n }\n }", "function check_user_account($username, $password){\n\t\t $this->db->select('*');\n\t\t $this->db->from('pengguna');\n\t\t $this->db->where('username', $username);\n\t\t $this->db->where('password', $password);\n\n\t\t return $this->db->get();\n\t }", "function auth_mahasiswa($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM member WHERE nim='$username' AND password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "function login($username, $password)\n {\n $this -> db -> select('id, username, password');\n $this -> db -> from('admin');\n $this -> db -> where('username = ' . \"'\" . $username . \"'\");\n $this -> db -> where('password = ' . \"'\" . MD5($password) . \"'\");\n $this -> db -> limit(1);\n\n $query = $this -> db -> get();\n\n if($query -> num_rows() == 1)\n {\n return $query->result();\n }\n else\n {\n return false;\n }\n }", "function getUser($username,$password){\n $str_query = \"Select * from users where username='$username' AND password='$password'\";\n return $this->query ($str_query);\n }", "function auth($data){\n\t\t$sql=\"SELECT * \n\t\t\tFROM admin_users\n\t\t\tWHERE username='\".$data['username'].\"'\n\t\t\tAND password='\".$data['password'].\"'\n\t\t\tAND status=1\";\n\t\t$query=$this->db->query($sql);\n\t\t\n\t\treturn $query;\n\t}", "function cek_login($table,$where){ \n return $this->db->get_where($table,$where);\n }", "function cekLogin($username,$password)\n\t{\n\t\t$pwd \t= md5($password);\n\t\t// cek login\n\t\t$query \t= $this->db->where('username',$username)\n\t\t\t\t\t\t ->where('password',$pwd)\n\t\t\t\t\t\t ->get('admin');\n\t\treturn $query;\t\t\n\t}", "public function checkAdmin($username, $password){\n return $this->db->where('username', $username)->where('password', $password)->get('admin')->row();\n }", "function validate($username, $password)\n\t{\n\t\t$this->db->where('status',1);\n\t\t$this->db->where('password', $password);\n\t\t$this->db->where('username', $username);\n\t\t$query = $this->db->get('login');\n\t\treturn $query->result();\t\n\t}", "function login($username,$password){\n\n //$password = urlencode($password);\n\n $password = sha1($password);\n\n $this->db->select();\n $this->db->from('users');\n $this->db->where(\"login = '$username'\");\n $this->db->where(\"password = '$password'\");\n $this->db->where(\"actif = '1'\");\n $query = $this->db->get();\n\n if($query->num_rows() == 1){\n return $query->result();\n } else {\n return false;\n }\n\n}", "function auth($username, $password)\n {\n\n $this->db->select('*');\n $this->db->from('user');\n $this->db->join('role', 'role.role_id = user.role_id');\n $this->db->join('employee_details', 'employee_details.user_id = user.user_id');\n $this->db->where('username', $username);\n $this->db->where('password', sha1($password));\n $this->db->where('employee_details.empstat', 'ACTIVE');\n $this->db->limit(1);\n\n\n $query = $this->db->get();\n \n if($query->num_rows()==1)\n {return $query->result_array();} \n else \n {return false;}\n }", "function cek_login($username, $password){\n\t\t$this->db->where('nama', $username);\n\t\t$this->db->where('password', $password);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "public function search($query=array()) {\r\n\t\tif (isset($query['password'])) {\r\n\t\t\t$query['password'] = md5($query['password']);\r\n\t\t}\r\n\t\treturn $this->db\r\n\t\t\t->where($query)\r\n\t\t\t->get($this->user_table)\r\n\t\t\t->result();\r\n\t}", "function auth_dosen($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM member_dosen WHERE nip='$username' AND password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "function login($username, $password) {\n $this->db->select('*');\n $this->db->from('tbl_user');\n $this->db->where('username', $username);\n $this->db->where('password', md5($password));\n $this->db->limit(1);\n\n //get query and processing\n $query = $this->db->get();\n if($query->num_rows() == 1) {\n return $query->result(); //if data is true\n } else {\n return false; //if data is wrong\n }\n }", "function authenticate($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user['id'];\n }\n }\n return false;\n }", "function selectByEmailAndPassword($email, $password) {\n $connection = openDb();\n $email = escape($email, $connection);\n $password = escape($password, $connection);\n\n\n //Using prepared statements and parameterized queries:\n $sql = \"SELECT * FROM users WHERE EMAIL = ? AND PASSWORD = ? AND DATE_APPROVED IS NOT NULL\";\n $stmt = $connection->stmt_init();\n if(!$stmt->prepare($sql)) {\n return false;\n }\n $stmt->bind_param(\"ss\",$email,$password);\n\n return executeQueryPrepared($stmt, $connection, true);\n}", "function cek_login($table,$where){\n\t\treturn $this->db->get_where($table,$where); //cek database\n\t}", "public function login($username,$password)\n\t{ \n\t\t$array = array('username' => $username, 'password' => $password, 'is_active' => True);\n\n\t\t$this->db->where($array);\n\n\t\t$result = $this->db->get('auth_user');\n\n\t\tif ($result->num_rows() > 0){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function authUser($username, $password) {\n try {\n $connString = \"mysql:host=localhost;dbname=knovak18\";\n $user = \"knovak18\";\n $pass = \"web2\";\n\n $pdo = new PDO($connString,$user,$pass);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $sql = \"select * from rruser where Username=\\\"\" . $username . \"\\\"\";\n $result = $pdo->query($sql);\n\n while ($row = $result->fetch()) {\n if($row['Password'] == $password) {\n return true;\n } else {\n return false;\n }\n }\n $pdo = null;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "public function login_admin() {\n $data = array(\n 'id' => strip_tags($this->input->post('id')),\n 'password' => md5($this->input->post('password')),\n );\n\n\n $condition = \"u_email =\" . \"'\" . $data['id'] . \"' AND \" . \"u_password =\" . \"'\" . $data['password'] . \"'\";\n $this->db->select('*');\n $this->db->from('users');\n $this->db->where($condition);\n $this->db->limit(1);\n $query = $this->db->get();\n\n if ($query->num_rows() == 1) {\n $result = $query->row_array();\n return $result;\n } else {\n return false;\n }\n }", "function getUser() {\n $stmt = prepareQuery(\"\n SELECT\n `password`,\n `userID`,\n `role`\n FROM\n `user`\n WHERE\n `username` LIKE :username OR \n `email` LIKE :username\n \");\n\n $stmt->bindValue(\":username\", test_input($_POST[\"user\"]));\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n}", "public function getUser($username)\r\n {\r\n\r\n $stmt = $this->connection()->prepare(\"SELECT * FROM users WHERE username=? OR email=?\");\r\n \r\n $stmt->execute([$username,$username]);\r\n if($stmt->rowCount())\r\n {\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function auth_user_exists($username)\n{\n return dbFetchCell(\"SELECT * FROM `users` WHERE `username` = ?\", array($username));\n}", "function can_login($username, $password) \n {\n $this->db->where('adminNumber', $username);\n //$this->db->where('password', $password); \n $query = $this->db->get('user'); \n $db_hash_password = $query->row()->password;\n \n if(($query->num_rows() > 0) && (password_verify($password ,$db_hash_password)))\n {\n return true; \n } \n else \n { \n return false; \n } \n }", "function is_logged_in(): bool\n{\n return App::$db->getRowWhere('users', [\n 'name' => $_SESSION['name'] ?? null,\n 'password' => $_SESSION['password'] ?? null\n ]) ? true : false;\n}", "function get_one_user($username, $password){\n global $db;\n $query = \"SELECT * FROM users \n WHERE userName = :username AND \n password = :password\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->bindValue(':password', $password);\n $statement->execute();\n $user = $statement->fetch();\n $statement->closeCursor();\n return $user; \n }", "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "public function login($data) {\n\n$condition = \"Email =\" . \"'\" . $data['Cemail'] . \"' AND \" . \"Password =\" . \"'\" . $data['Cpassword'] . \"'\";\n$this->db->select('*');\n$this->db->from('customer');\n$this->db->where($condition);\n$this->db->limit(1);\n$query = $this->db->get();\n\nif ($query->num_rows() == 1) {\nreturn true;\n} else {\nreturn false;\n}\n}", "public static function authenticate($username=\"\", $password=\"\") {\r\r\n\t\tglobal $database;\r\r\n\t\t$username = $database->escaped_value($username);\r\r\n\t\t$password = $database->escaped_value($password);\r\r\n\t\r\r\n\t\t$sql = \"SELECT * FROM \".self::$table_name.\" WHERE ((emp_email = '{$username}' or emp_uname ='{$username}') AND emp_pword = '\".crypt($password,'$2a$07$usesomesillystringforsalt$').\"')\";\r\r\n\t\t\r\r\n\t\t$result_array = self::find_by_sql($sql);\r\r\n\t\t\treturn !empty($result_array) ? array_shift($result_array) : false;\r\r\n\t}", "public function check_user($data){\n\n $this->db->where('Benutzername', $data['username']);\n $this->db->where('Passwort', md5($data['password']));\n $result = $this->db->get('Admins')->row();\n return $result;\n \n }", "function check_user($username){\n\t\t$this->db->where('username', $username);\n\t\treturn $this->db->get('tbl_user');\n\t}", "public function findByLoginAndPassword($data);", "public function findByCredentials($username, $password){\n $db = database::getInstance();\n if($db === null){\n header('Location: /500');\n die;\n }\n\n try{\n $password = hash('sha512', $password); //Hash the password\n\n $stmt = $db->connection->prepare('SELECT id FROM '.static::$table.' WHERE username = :username AND password = :password LIMIT 1;');\n $stmt->bindParam('username', $username);\n $stmt->bindParam('password', $password);\n $stmt->execute();\n\n if($stmt->rowCount()==1){\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->load($row['id']); //Load the found object\n return true;\n } else {\n return false;\n }\n }catch (PDOException $e){\n database::logAndDestroy($e);\n }\n }", "public function user_login($username,$password){\n $sqlQuery= \"select * from Sidhus_Login_credentials where (mobileno='\".$username.\"' or emailId ='\".$username.\"') and (password='\".$password.\"')\";\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }", "public function getUserIDandEmail()\r\n{\r\n $query_string = \"SELECT userid FROM users \";\r\n $query_string .= \"WHERE username = :username OR email = :email\";\r\n\r\n return $query_string;\r\n}", "public function log_in_check($conn,$select_columns,$table,$user_column,$password_column,$username,$password){\r\n\r\n $query=\"SELECT \" .$select_columns.\" FROM \" .$table.\" WHERE \".$user_column.\" =:e AND \" .$password_column.\" =:p \";\r\n $get=$conn->prepare($query);\r\n $get->bindParam(\":e\",$username);\r\n $get->bindParam(\":p\",$password);\r\n $get->execute();\r\n $data = $get->fetchAll(PDO::FETCH_ASSOC); \r\n return $data; \r\n }", "protected function checkCredentials ($username,$password) {\n\t\t$sql = \"SELECT user_name,user_password FROM users\n\t\t\t\tWHERE user_name = ? AND user_password = MD5(?)\";\n\t\t$data = [$username,$password];\n\t\t//create stdStatemment object | call to Model method from core/Database.php\t\n\t\t$statement = $this->setStatement($sql,$data);\n\t\t\tif ( $statement->rowCount() > 0 ) {\n\t\t\t\t$out = true;\n\t\t\t} else {\n\t\t\t\t$out = false;\n\t}\n\t\treturn $out;\n\t}", "public static function authenticate($password, $email){\n $password = md5($password);//this encodes the password\n $sql = \"SELECT * FROM \".static::$table_name.\" WHERE email = '{$email}' AND password = '$password' LIMIT 1\";//user id is the first item on the array hence it will be popped\n $user = static::findBySql($sql);//Use the above sql query to find user\n // echo $sql;\n return ($user) ? array_shift($user) : false;//array_shift = pop in python\n }", "function dbloginCheck($user_login, $pwd)\n{\n $sql=\"SELECT * FROM ra_company WHERE _email = :email AND _password=:passwword\";\n $q = $this->conn->prepare($sql);\n $q->execute(array(':email'=>$user_login, ':passwword'=>md5($pwd))) or die(print_r($q->errorInfo()));\n $totalrow=$q->rowCount();\n if($totalrow==1){\n $data = $q->fetch(PDO::FETCH_ASSOC);\n return $data;\n}\n else{\n return 0;\n }\n}", "public function cekUser($username, $password)\n {\n $result = $this->db->query(\"SELECT * FROM tb_user WHERE username='$username' AND password = MD5('$password') \")->result_array();\n return $result;\n }", "public function authenticate($username, $password){\n\t\t$verify_user_password_query = \"SELECT * from appuser WHERE username = $1 AND password = $2;\";\n\n\t\t$if_verified = pg_prepare($this->con, \"my_query1\", $verify_user_password_query);\n \t$if_verified = pg_execute($this->con, \"my_query1\", array($username,$password));\n \treturn $if_verified;\n\t}", "function LoginCheck($username, $password) //check if user is login\n{\n global $connect;\n $query = \"SELECT * FROM User WHERE Username = :username AND Password = :password\";\n try {\n $statement = $connect->prepare($query);\n $statement->bindValue(':username', $username, PDO::PARAM_STR);\n $statement->bindValue(':password', $password, PDO::PARAM_STR);\n $statement->execute();\n $count = $statement->rowCount();\n if ($count > 0) {\n $result = $statement->fetch();\n return $result;\n } else return false;\n } catch (PDOException $e) {\n }\n}", "public function login($username, $password) {\n $query = \"SELECT * FROM users WHERE username='\".$username.\"' AND password='\".$password.\"' AND status > 0 LIMIT 1\";\n $data = $this->select($query); \n return $data;\n }", "public function login($username, $password)\n\t {\n\t\t \n\t $this->db->select('id, username, password');\n\t $this->db->from('users');\n\t $this->db->where('username', $username);\n\t $this->db->where('password', MD5($password));\n\t $this->db->limit(1);\n\n\t $query = $this->db->get();\n\t \n\t if($query->num_rows() == 1)\n\t {\n\t\t //print_r($query->row());\n\t\t return $query->row();\n\t }\n\t else\n\t {\n\t\t return false;\n\t }\n\t }", "function validateLogin($user,$pass,$database)\n{\n $sql_query = 'SELECT * FROM USER WHERE user_id = \"'.$user.'\" AND password = \"'.$pass.'\"';\n return mysql_query($sql_query,$database);\n}", "static public function find_by_username($userName, $password) {\n\t$sql = \"SELECT * FROM \" . static::$table_name;\n\t$sql .= \" WHERE userName='\" . self::$database->escape_string($userName) . \"' AND password='\" . self::$database->escape_string($password) . \"'\";\n\t$obj_array = static::find_by_sql($sql);\n\tif(!empty($obj_array)){\n\t\treturn array_shift($obj_array);\n\n\t} else {\n\t\treturn false;\n\t}\n}", "function login($username, $password) {\n //create query to connect user login database\n $this->db->select('*');\n $this->db->from('tbl_user');\n/*\n $this->db->join('tbl_pegawai', 'tbl_user.id_pegawai = tbl_pegawai.id_pegawai');\n*/\n $this->db->where('username', $username);\n $this->db->where('password', md5($password));\n $this->db->limit(1);\n\n //get query and processing\n $query = $this->db->get();\n if($query->num_rows() == 1) {\n return $query->result(); //if data is true\n } else {\n return false; //if data is wrong\n }\n }", "public function hasUser($_login,$_password);", "function auth($username,$password)\r\n{\r\n $user = getUserByUsername($username);\r\n if($user){\r\n //return $user[4] == md5($password);\r\n return $user[5] == $password;\r\n\r\n }\r\n}", "public function getByUsernamePass()\n {\n $sth = $this->db->prepare(\"SELECT id FROM \" . static::tableName() . \" WHERE\n\t\t\t\tusername = :username AND password = MD5(:password)\");\n $sth->execute(array(\n ':username' => $this->username,\n ':password' => $this->password\n ));\n $data = $sth->fetch();\n return $data;\n }", "public static function check_credentials($email_or_username, $password)\n {\n\n\n $password = Security::encrypt($password);\n\n $email_or_username = e($email_or_username);\n\n\n $sql = \"SELECT\n id, user_type\n FROM\n users\n WHERE\n password = '{$password}'\n AND(\n email = '{$email_or_username}'\n OR\n username = '{$email_or_username}')\n AND\n deleted = 0\n LIMIT\n 1\";\n\n\n return DB::query($sql);\n\n\n }", "public function read_credentials(){\n $query='SELECT * FROM '.$this->table.' WHERE name=? and password=?';\n\n $stmt = $this->conn->prepare($query);\n\n \n $stmt->bindparam(1,$this->name);\n $stmt->bindparam(2,$this->password);\n\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->name=$row['name'];\n $this->email=$row['email'];\n $this->status=$row['status'];\n\n if($stmt->execute()) {\n return true;\n }\n \n // Print error \n printf(\"Error: %s.\\n\", \"invalid user\");\n \n return false;\n \n \n }", "public function findUserByName($name){\r\n $this->db->query('SELECT * FROM users WHERE name = :name');\r\n // Bind value\r\n $this->db->bind(':name', $name);\r\n $row = $this->db->single();\r\n // Check row\r\n if($this->db->rowCount() > 0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "public function getLogin(){\n $statement = \"SELECT * FROM conf_usuario WHERE username=:Username and pass=:Pass and estado=1\";\n $sql = MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->execute();\n return $sql;\n }", "function login(){\n $query = \"SELECT\n `id_user`, `nama`, `username`, `password`\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"' AND password='\".$this->password.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n return $stmt;\n }", "public function validate($username, $password){\n\n\t\t$query = $this->db->get_where('Employee', array('bDeleted' => 0, 'username' => $username, 'password' => sha1($password)));\n \treturn $query->row();\n }", "protected function user_where_clause() {}", "function id_matches_db($username, $password)\n{\n global $idStore;\n\n if($idStore->authenticate($username, $password))\n {\n return true;\n }else{\n return false;\n }\n}", "public static function findByCredentials($username, $password)\n {\n $sql = \"SELECT adminID, username, adminGroupID, 1 AS isAdmin\n\t \t\tFROM app_admin\n\t \t\tWHERE active = 1\n\t \t\t\tAND username = :username\n\t \t\t\tAND password = MD5(:password) \";\n\t \t$admin = Core::getRow($sql, array('username'=>$username, 'password'=>$password));\n\n return empty($admin) ? null : new static($admin);\n }", "function login_customer($email,$password) {\n global $db;\n // $password = sha1($email.$password);\n $query = 'SELECT customerID, email, firstName, lastName\n FROM customers\n WHERE email = :email\n AND password = :password';\n $statement = $db->prepare($query);\n $statement->bindValue(':email', $email);\n $statement->bindValue(':password', $password);\n $statement->execute();\n $user = $statement->fetch();\n $statement->closeCursor();\n return $user;\n\n}", "function check_user_existence($username, $password) \n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE user_name = '$username' AND password = '$password'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "public function loginAdmins($tablename,$username,$password)\n{\n\tif(!empty($username) and !empty($password) and !empty($tablename))\n\t{\n\t\n\t$password = md5($password);\n\n\t$this->db->select('*');\n\t$this->db->from('cmd_user');\n\t$this->db->where('email',$username);\n\t$this->db->where('password',$password);\n\t$this->db->where('user_type','Admin');\n\n\t$query_one = $this->db->get();\n\t$count_one = $query_one->num_rows();\t\n\tif($count_one > 0){\n\treturn $query_one->result_array();\n\t}else{\n\treturn FALSE;\n\t}\n\t}else{\n\treturn FALSE;\n\t}\n}", "function getCredentialsAreValid($username, $passwordHash) {\r\n global $db;\r\n\r\n // Query String\r\n $query = \"\r\n SELECT *\r\n FROM user\r\n WHERE user_name = :username\";\r\n\r\n try {\r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':username', $username);\r\n $statement->execute();\r\n $result = $statement->fetch();\r\n $statement->closeCursor();\r\n // If user doesn't exist, return false\r\n if (empty($result))\r\n return false;\r\n\r\n return ($result['password'] == $passwordHash);\r\n } catch (PDOException $ex) {\r\n echo $ex->getMessage();\r\n exit;\r\n }\r\n}", "function is_valid($username, $password) \n{\n global $conn;\n \n $sql = \"SELECT * FROM Users WHERE ((Username ='$username') and (Password = '$password'))\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) // check the number of selected rows\n return true;\n else\n return false;\n}", "function check_login($email,$pass)\n {\n $this->db->where('email', $email);\n $this->db->or_where('username', $email);\n $query = $this->db->get('users');\n if( $query->num_rows() > 0 ){ return True; } else { return False; }\n }", "function checkUserData($dbh, $user)\n{\n $query = \"SELECT username, password \n FROM users \n WHERE username = :username\";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array('username' => $user));\n $row = $stmt->fetch();\n return $row;\n}", "public function login_user($username, $password){\n\t\t//Secure password\n $enc_password = md5($password);\n\n //Validate\n $this->db->where('username', $username);\n $this->db->where('password', $enc_password);\n \n $result = $this->db->get('admins');\n\n if ($result->num_rows() == 1) {\n return $result->row();\n }\n\t}", "function valid_user($username, $password)\n\t{\n\t\t$query = $this->db->get_where('usuarios', array('username'=>$username,'password'=>$password, 'baja'=> 'NO'), 1);\n\t\t//si es igual a 1 quiere decir que encontro el usuario\n if($query->num_rows() == 1)\n {\n return $query->result();\n }\n else\n {\n return false;\n }\n\t}", "public function login($username, $password){\n\n\t\t$user = array();\n\n\t\t$this->db->selectTable('user');\n\t\t$this->db->select(array('id', 'name', 'mail'))\n\t\t\t\t\t->where(array('username' => $username))->and_operator(array('password' => $password));\n\n\t\t$user = $this->db->query();\n\n\t\treturn (isset($user[0])) ? $user[0]:false;\n\n\t}", "function getPassword($username) {\n\t$username = dbEscape($username);\n\treturn(dbFirstResult(\"SELECT password FROM users WHERE username='$username'\"));\n}", "function getProfileLogin($usr, $pwd){\r\n\t\t//$pwd = strtoupper ($pwd);\r\n\t\t\r\n\t\t$query = $this->db->get_where('cuid_lahir', array('oper_id' => $usr,'password like binary' => $pwd));\t\r\n\t\treturn $query; \r\n\t}", "public function cek_user($username, $password) {\n\t\t$this->db->where(\"email = '$username'\");\n\t\t$this->db->where(\"password\", md5($password));\n\t\t$query = $this->db->get(\"t00_users\");\n\t\treturn $query->row_array();\n\t}", "function isUser($username){\n $results = sqlSelectOne(\"SELECT * FROM users WHERE user_username='$username'\", 'user_username');\n if ($results === null) {\n return false;\n }\n return true;\n}", "public function findUserByUsername($username)\n {\n $this->db->query('SELECT * FROM user WHERE username = :username');\n $this->db->bind(':username', $username);\n $row = $this->db->single();\n if($this->db->rowCount() > 0){\n return true;\n }else{\n return false;\n }\n }", "public function check($username, $password) {\n $isExistUserName = false;\n $isExistUserName = Account::whereRaw('UserName = ? and Password = ?', [$username, $password])->first();\n \tif($isExistUserName) \n\t{\n \techo \"5dcfbae053cfd29905e90b3c8fdc4b45a1d744f072f1c850ec795ecc825a3c43\";\n \t}\n \telse \n\t{\n \techo \"5dcfbae053cfd29905e90b3c8fdc4b45ald744f072f1c850ec795cec825a3c43\";\n \t}\n }", "function find_user() //функция авторизации пользователя\n\t{\n\t\t//echo \"Hello <br/>\";\n\t\t$sth = $this->db->prepare(\"SELECT id, username FROM accounts WHERE username = :username AND password = :password\");\n \t\t$sth->execute(array(\n\t\t\t\t\t\t\t':username'=>$_POST['username'], \n\t\t\t\t\t\t\t':password' =>Hash::create('sha256', $_POST['password'], 'cats do not fliing')\n \t\t\t\t\t));\n\n \t/*$result = $sth->fetchAll();\n\t\tprint_r($result);*/\n\t\t$data = $sth->fetch();\n\t\t//print_r($data);\n\n\t\t$count = $sth->rowCount();\n\t\tif($count > 0)\n\t\t{\n\t\t\t//logged in\n\t\t\tSession::init();\n\t\t\tSession::set('username', $data['username'] );\n\t\t\tSession::set('loggedIn', true);\n\t\t\theader('location: ../dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: ../login');\n\t\t}\n\t\t\n\t}", "public function _pwdntmatchdb($input, $password) {\n\t\t\n\t\t$password \t= md5(r::post($password));\n\t\t$username \t= r::post($input);\n\n\t\t$prepare\t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ? AND `password` = ?\");\n\t\t$prepare->execute(array($username, $password));\n\t\t$result\t\t= $prepare->fetch(PDO::FETCH_ASSOC);\n\n\t\tif(empty($result)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->userid = $result['id'];\n\t}", "public function UserAuthorization($username) {\n\t\t//$query = $this->db->query($sql);\n $query = $this->db->query('select',DB_PREFIX . \"user\",'','','',array('user_id'=>(int)$this->db->escape($username),'status'=>true ));\n\t\treturn $query->row;\n\t}", "public function verificarLoginPassword($obj, $conex){\r\n $usuario= trim($obj->getUsuario());\r\n $password= sha1(trim($obj->getPassword())); \r\n $sql = \"SELECT * FROM USUARIO WHERE USUARIO=:usuario AND PASSWORD=:password AND ROL='CLIENTE' AND BAJA='0' AND ESTADO='ACTIVADO'\";\r\n $consulta = $conex->prepare($sql);\r\n $consulta->execute(array(\":usuario\" => $usuario, \":password\" => $password));\r\n $result = $consulta->fetchAll();\r\n return $result;\r\n}", "public function checkUser($inputArray){\r\n\r\n\t\t$login_username = $inputArray[0];\r\n\t\t$login_password = $inputArray[1];\r\n\r\n\t\t$this->stmt = $this->db->prep(\"SELECT password, username FROM Users WHERE username=:username1 OR email=:username2\");\r\n\t\t\r\n\t\t$this->stmt->bindParam(':username1', $login_username);\r\n\t\t$this->stmt->bindParam(':username2', $login_username);\r\n\t\t$this->stmt->execute();\r\n\t\t$user = $this->stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n\t\tif(password_verify($login_password, $user['password'])){\r\n\t\t\treturn $user['username'];\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function login($username,$password){\r\n\t$password =\tmd5($password);\r\n\t$sql = \"SELECT * FROM users WHERE `UserName`='$username' AND `PassWord`='$password' \";\r\n\t$row=mysql_query($sql);\r\n\t$data=mysql_fetch_array($row);\r\n\treturn $data;\r\n}", "public static function check_for_another_user($username,$email)\n{\n$user_check_sql = \"SELECT * FROM users WHERE name='$username' OR email='$email' LIMIT 1\";\n $statement = Database::$db->prepare($user_check_sql);\n $statement->execute();\n return $statement->fetch(PDO::FETCH_ASSOC);\n}", "public function authenticate()\n {\n $where_condition = array();\n foreach ($this->compare_attributes as $field => $value) {\n $value = addslashes($value);\n $where_condition[] = \"$field = '$value'\";\n }\n $result = (new $this->class)->count(join(\" AND \", $where_condition));\n if ($result) {\n $model = (new $this->class)->find_first(join(\" AND \", $where_condition));\n $identity = array();\n foreach ($model->fields as $field) {\n /**\n * Trata de no incluir en la identidad el password del usuario\n */\n if (!in_array($field, array('password', 'clave', 'contrasena', 'passwd', 'pass'))) {\n $identity[$field] = $model->$field;\n }\n }\n $this->identity = $identity;\n }\n return $result;\n }", "function login($username=NULL, $password=NULL)\n {\n if ($username && $password)\n {\n $sql = \"\n SELECT\n id,\n username,\n password,\n salt,\n first_name,\n last_name,\n email,\n language,\n is_admin,\n status,\n created,\n updated\n FROM {$this->_db}\n WHERE (username = \" . $this->db->escape($username) . \"\n OR email = \" . $this->db->escape($username) . \")\n AND status = '1'\n AND deleted = '0'\n LIMIT 1\n \";\n\n $query = $this->db->query($sql);\n\n if ($query->num_rows())\n {\n $results = $query->row_array();\n $salted_password = hash('sha512', $password . $results['salt']);\n\n if ($results['password'] == $salted_password)\n {\n unset($results['password']);\n unset($results['salt']);\n\n return $results;\n }\n }\n }\n\n return FALSE;\n }", "function fetchUserDetails($username=NULL,$token=NULL, $id=NULL){\n\tif($username!=NULL) {\n\t\t$column = \"username\";\n\t\t$data = $username;\n\t}elseif($id!=NULL) {\n\t\t$column = \"id\";\n\t\t$data = $id;\n\t}\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE $column = $data LIMIT 1\");\n\t$results = $query->first();\n\treturn ($results);\n}", "public function loginByUserAndPassword($username, $password) {\r\n $result = mysql_query(\"select * from tbl_users where username = '\".$username.\"' and password = '\".md5($password).\"'\") or die(mysql_error());\r\n // check for result \r\n $no_of_rows = mysql_num_rows($result);\r\n if ($no_of_rows > 0) {\r\n $result = mysql_fetch_array($result);\r\n return $result;\r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }", "function authenticate($username, $pass) {\n global $db;\n\n $query = \"SELECT id, pass FROM user WHERE username=:username\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username); \n $statement->execute();\n $hash = $statement->fetchAll();\n $statement->closeCursor();\n if(count($hash) > 0) {\n // correct pass\n if(password_verify($pass, $hash[0]['pass'])) {\n return $hash[0]['id'];\n }\n }\n return -1;\n}", "function login_user($username, $password)\n\t{\n\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM users\n\t\t\t\tWHERE username = '$username' AND password = MD5(CONCAT('$password', salt))\n\t\t\t\";\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\treturn $dbdata->fetchObject();\n\t}", "public function login($username, $password)\n\t{\n $password = md5($username . $password); // THIS IS NOT SECURE. DO NOT USE IN PRODUCTION.\n $sql = 'SELECT * FROM user WHERE username = ? AND password = ? LIMIT 1';\n $user = $this->db->execute($sql, [$username, $password]);\n if(count($user) > 0) {\n return $this->db->fetchOne($sql, [$username, $password]); \n }\n\t}", "function get_user($usr, $pwd)\n { \n $sql = \"select * from user where username = '\" . $usr . \"' and password = '\" . md5($pwd).\"'\" ;\n // $sql = \"select * from user where username = '\" . $usr . \"' and password = '\" . md5($pwd) . \"' and status = 'active'\";\n $query = $this->db->query($sql);\n return $query->num_rows();\n }", "function validate($lukasid = '', $password = '', $login = TRUE)\r\n\t{\r\n\t\t$lid = preg_replace(\"/(@.*)/\", \"\", $lukasid);\r\n\r\n\t\t$this->db->where('lukasid', $lid);\r\n\t\t$this->db->where('password_hash', encrypt_password($password));\r\n\t\tif($login)\r\n\t\t\t$this->db->where('disabled', 0);\r\n\t\t$query = $this->db->get('users');\r\n\t\tif($query->num_rows == 1)\r\n\t\t{\r\n\t\t\treturn $query;\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}", "function authenticate($username, $password)\n\t{\n\t\t$sql = \"SELECT username, password FROM users where username='$username'\";\n\t\t$hashpasswd = sha1($password);\n\t\t\n\t\t//Validate Against Database\n\t\t$link = mysqli_connect(\"localhost\", \"dev_user\", \"d3vUser\", \"dev_user\");\n\t\t\n\t\t/* check connection */\n\t\tif (mysqli_connect_errno()) {\n\t\t\techo \"Connect failed to database\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($result = mysqli_query($link, $sql)) {\t\t\t\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t\tif ($row['password'] == $hashpasswd)return true;\n\t\t}\n\t\treturn false;\n\t\t\n\t\tmysqli_free_result($result);\n\t\tmysqli_close($link);\n\t\t\n\t}", "function auth($username, $password) {\n\n if ($password == 'password') { \n return true;\n }\n return false;\n\n}" ]
[ "0.71065694", "0.6983414", "0.69370157", "0.6778968", "0.67439437", "0.66766536", "0.66596794", "0.664518", "0.66053617", "0.65362895", "0.64727837", "0.6464305", "0.64610547", "0.645611", "0.64278495", "0.6422443", "0.6410614", "0.6366545", "0.6347594", "0.6339473", "0.6325993", "0.6311215", "0.6295315", "0.62847877", "0.6277732", "0.6273749", "0.6259584", "0.6245374", "0.6239084", "0.62360394", "0.6233314", "0.6225956", "0.62184083", "0.6211919", "0.6188456", "0.61812496", "0.6153726", "0.6150217", "0.61349803", "0.61251736", "0.6087969", "0.6083009", "0.60801023", "0.60738945", "0.6063022", "0.60558724", "0.60450256", "0.6043478", "0.6040922", "0.60400194", "0.6036731", "0.6029691", "0.6013417", "0.6013012", "0.60126203", "0.6003344", "0.598345", "0.5976223", "0.5974059", "0.59666204", "0.5966319", "0.5956151", "0.5947319", "0.59464943", "0.59445274", "0.592916", "0.59286714", "0.5922278", "0.59184647", "0.5913606", "0.59117293", "0.5905909", "0.59046066", "0.590456", "0.5902773", "0.5902279", "0.5889372", "0.5885347", "0.5880835", "0.5878882", "0.5877127", "0.58768106", "0.58682394", "0.58633024", "0.5848256", "0.5822892", "0.58188856", "0.5818425", "0.58173", "0.5815501", "0.5812147", "0.57983893", "0.57970417", "0.57967407", "0.5796316", "0.57951975", "0.57915276", "0.57891685", "0.5785411", "0.5784853", "0.57839334" ]
0.0
-1
Creates data provider instance with search query applied
public function search($params) { $query = DebitoAutomaticoModel::find(); // add conditions that should always apply here $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } // grid filtering conditions $query->andFilterWhere([ 'id' => $this->id, 'fecha_creacion' => $this->fecha_creacion, 'fecha_procesamiento' => $this->fecha_procesamiento, 'inicio_periodo' => $this->inicio_periodo, 'fin_periodo' => $this->fin_periodo, 'fecha_debito' => $this->fecha_debito, 'procesado' => $this->procesado, 'registros_enviados' => $this->registros_enviados, 'registros_correctos' => $this->registros_correctos, 'saldo_enviado' => $this->saldo_enviado, 'saldo_entrante' => $this->saldo_entrante, ]); $query->andFilterWhere(['like', 'nombre', $this->nombre]) ->andFilterWhere(['like', 'banco', $this->banco]) ->andFilterWhere(['like', 'tipo_archivo', $this->tipo_archivo]); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }", "protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }", "public function getDataProvider(array $query = []);", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }", "public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}", "public function getMetadataQueryProviderWrapper();", "private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }", "public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }", "protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}", "public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }", "protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }", "public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}", "public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function parametersAndQueriesDataProvider() {}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}", "public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }", "public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);", "protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }", "public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }", "private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search($query);", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }", "public function createQuery() {}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }", "public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }", "public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }", "public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }", "public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = 'createDate, employeeId';\n\t\t$criteria->distinct = true;\n\t\t$criteria->addCondition('employeeId=\"' . $this->employeeId . '\" AND createDate between \"' . $this->startDate . '\" AND \"' . $this->endDate . '\"');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}" ]
[ "0.77754045", "0.67421407", "0.65724546", "0.65028906", "0.64694583", "0.63888705", "0.6374424", "0.6287579", "0.6266666", "0.62487423", "0.6242171", "0.6210627", "0.61966836", "0.617166", "0.6123567", "0.61223465", "0.61156565", "0.6102474", "0.6100059", "0.60868347", "0.60809517", "0.6079289", "0.6075252", "0.6070803", "0.6040372", "0.60403675", "0.6036491", "0.60334826", "0.6031112", "0.6022714", "0.6014616", "0.59993726", "0.5975993", "0.5965912", "0.59610206", "0.59579283", "0.59550977", "0.59411377", "0.59342974", "0.5903398", "0.5899811", "0.5894818", "0.58940864", "0.5888192", "0.58832353", "0.58828473", "0.5876079", "0.5863242", "0.58631855", "0.58460945", "0.5844007", "0.58408684", "0.5832351", "0.582618", "0.5820561", "0.5819979", "0.58188397", "0.5815329", "0.5810095", "0.5802644", "0.57948804", "0.578582", "0.5780501", "0.57780486", "0.5776818", "0.5775902", "0.5775902", "0.5775902", "0.57752824", "0.57736534", "0.5771259", "0.57706285", "0.5770197", "0.5769091", "0.57689655", "0.57611334", "0.57565415", "0.5746991", "0.5745416", "0.5744942", "0.574107", "0.5736739", "0.5732943", "0.5730252", "0.5730227", "0.57267326", "0.57236457", "0.57222086", "0.57148373", "0.5713509", "0.5712734", "0.5711617", "0.5710129", "0.5709881", "0.5708396", "0.5707615", "0.570728", "0.5704908", "0.5703457", "0.56999385", "0.5694788" ]
0.0
-1
Fetch all or a subset of resources
public function fetchAll($params = array()) { $criteria = $params->get('query', []); $orderBy = $params->get('order_by', []); $adapter = $this->getRepository()->getPaginatorAdapter($criteria, $orderBy); return new $this->collectionClass($adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n $this->authorizeUserAction('viewAll');\n\n $model = new static::$model;\n\n // If we are caching the endpont, do a simple get all resources\n if (static::$cacheAll) {\n return $this->response->collection(Cache::remember(static::getCacheKey(), static::$cacheExpiresIn, function () use ($model) {\n return $model::with($model::getCollectionWith())->get();\n }), $this->getTransformer());\n }\n\n $query = $model::with($model::getCollectionWith());\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n $perPage = $model->getPerPage();\n if ($perPage) {\n // If specified, use per_page of the request\n if (request()->has('per_page')) {\n $perPage = intval(request()->input('per_page'));\n }\n\n $paginator = $query->paginate($perPage);\n\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public function fetchAll()\n {\n $products = product::with('brand')->paginate(8);\n return productResource::collection($products);\n }", "public abstract function getAll();", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "protected function getAll() {}", "abstract protected function doFetchAll();", "public abstract function fetchAll();", "public abstract function fetchAllObjects();", "public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public static function getAll() {}", "public function get_all ();", "public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }", "public final function get_all()\n {\n }", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public static function getAll();", "public static function getAll();", "public function fetchAll()\n {\n $query = $this->em->createQuery(\"\n SELECT\n ccb.id,\n usr.nome corretor,\n con.nome contato ,\n ccb.dataBloqueio,\n ccb.status\n FROM\n {$this->repository} ccb\n JOIN crm\\Entity\\Usuarios usr WITH ccb.corretor = usr.id\n JOIN crm\\Entity\\Contatos con WITH ccb.contato = con.id\"\n );\n $results = $query->getResult();\n if(!is_null($results)) {\n return $results;\n }\n return new ApiProblem('404', \"Recurso n�o localizado\");\n }", "function getAll();", "function getAll();", "public function findAllAction();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function getAll() : Collection;", "public function fetchAll($params = array())\n {\n return new ApiProblem(405, 'The GET method has not been defined for collections');\n }", "public function getallAction()\n\t{\n\t\t$resource_id = (int) $this->getRequest()->getParam('resource_id');\n\t\t$resource_type = $this->getRequest()->getParam('resource_type');\n\t\t\n\t\t$Likes = new Application_Model_Likes();\n\t\t\n\t\t$ret = $Likes->getUsersLiked($resource_type, $resource_id);\n\t\t\n\t\t$this->getHelper('json')->sendJson($ret);\n\t}", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function all(){\n \t\t$response = $this->curl->get( $this->api_url, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\n \t\tif( $response->success ){\n \t\t\t$products = [];\n\t\t\tforeach ($response->products as $product) {\n\t \t\t\t$tmp = new Product( $this );\n\t \t\t\t$tmp->fetch($product);\n\t \t\t\t$products[] = $tmp;\n\n\t \t\t\treturn $products;\n\t \t\t}//foreach\n \t\t}//if\n \t\telse{\n \t\t\t// Throw error according to status\n \t\t}//else\n\n \t}", "public function getAllResources() {\n\t\t\t$res=array();\n\t\t\t$res=$this->resources;\n\n\t\t\tforeach ($this->categories as $category)\n\t\t\t\t$res=array_merge($res,$category->getAllResources());\n\n\t\t\treturn $res;\n\t\t}", "public function getResources()\n {\n $this->_limit = $this->getProperty('limit', 100);\n $this->_offset = $this->getProperty('offset', 0);\n $c = $this->modx->newQuery('modResource');\n\n $conditions = [\n 'modResource.id = sfUrls.page_id'\n ];\n if (!$this->indexSeoEmpty) {\n $conditions[] = 'sfUrls.total > 0';\n }\n if (!empty($this->indexSeoRules)) {\n $excludeSeoRules = array_map('abs', array_filter($this->indexSeoRules, function ($val) {\n return (int)$val < 0;\n }));\n $includeSeoRules = array_map('abs', array_filter($this->indexSeoRules, function ($val) {\n return (int)$val > 0;\n }));\n if (!empty($excludeSeoRules)) {\n $conditions[] = 'sfUrls.multi_id NOT IN ('.implode(',', $excludeSeoRules).')';\n }\n if (!empty($includeSeoRules)) {\n $conditions[] = 'sfUrls.multi_id IN ('.implode(',', $includeSeoRules).')';\n }\n }\n $c->leftJoin('sfUrls', 'sfUrls', $conditions);\n $c->leftJoin('sfRule', 'sfRule', 'sfRule.id = sfUrls.multi_id');\n $c->select($this->modx->getSelectColumns('modResource', 'modResource', '', $this->resourceFields));\n $c->select($this->modx->getSelectColumns('sfUrls', 'sfUrls', 'seo_', $this->seoFields));\n $c->select($this->modx->getSelectColumns('sfRule', 'sfRule', 'rule_', $this->ruleFields));\n $c->groupby('modResource.id, sfUrls.id');\n $c->sortby('modResource.id', 'ASC');\n $c->sortby('sfUrls.id', 'ASC');\n $c = $this->prepareQuery($c);\n $this->_total = $this->modx->getCount('modResource', $c);\n $c->limit($this->_limit, $this->_offset);\n $collection = [];\n if ($c->prepare() && $c->stmt->execute()) {\n $collection = $c->stmt->fetchAll(PDO::FETCH_ASSOC);\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,\n '[mSearch2] Could not retrieve collection of resources: '.$c->stmt->errorInfo());\n }\n\n return $collection;\n }", "protected function fetchResources(array $ids)\n {\n return self::$async ? $this->fetchConcurrentResources($ids) : $this->fetchSequentialResources($ids);\n }", "public function getAll($cache = true) {}", "public function index()\n {\n return Resource::collection(Query::get(request('query', 'default')));\n }", "public static function fetch_all($params) {}", "public function fetchAllForBase3();", "public function index(): AnonymousResourceCollection\n {\n return CommerceResource::collection(Commerce::latest()->paginate());\n }", "public function all(){\t\r\n\t\t//Get ALL recipes from the database, but limit the search according to the \r\n\t\t//GET parameters outlining upper and lowerl imits\r\n\t\t$recipes = Recipe::retrieve();\r\n\t\t//Set the recipes results to the template and display\r\n\t\t$this->template->recipes = $recipes;\r\n\t\t$this->template->display('all.html.php');\r\n\t}", "public function allresources($contentType){\n return $this->hasMany('App\\Models\\Resource')->inRandomOrder()->orderBy('created_at', 'desc')->paginate( 4, ['*'], \"ContentType\".$contentType);\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function findAll() {\r\n\t\t$stmt = $this->db->query(\"SELECT * FROM resources\");\r\n\t\t$resources_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\t$resources = array();\r\n\r\n\t\tforeach ($resources_db as $resource) {\r\n\t\t\tarray_push($resources, new Resource($resource[\"id\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"nombre\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"aforo\"],\r\n\t\t\t\t\t\t\t\t\t\t\t\t$resource[\"descripcion\"]));\r\n\t\t}\r\n\r\n\t\treturn $resources;\r\n\t}", "function _resource_list($resource){\n\t_resource_list_offset($resource, '1', '20');\n}", "public function fetchAll()\r\n {\r\n \t// get from mem if available\r\n \t$memcache = new \\Memcached();\r\n \t$memcache->addServer('localhost', 11211);\r\n \t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n \t$cache_data = $memcache->get($key);\r\n \tif ($cache_data) {\r\n \t\t$this->log->addInfo('cache hit', array(\"key\" => $key));\r\n \t\t$this->data = $cache_data;\r\n \t} else {\r\n\t\t\t$this->data = $this->client->catalogProductList($this->sessionid);\r\n\t\t\t$memcache->set($key, $this->data, 60*1);\r\n \t}\r\n }", "function getAll()\r\n {\r\n\r\n }", "protected function fetchAllImages(){\n $this->fetchImagesInContent();\n $this->fetchFullTextImage();\n $this->fetchIntroImage();\n $this->fetchFirstImageInContent();\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }", "public function fetchAll()\n {\n }", "public function fetchList();" ]
[ "0.6690989", "0.66767395", "0.66767395", "0.66767395", "0.6566814", "0.6565596", "0.6422411", "0.6422411", "0.6422411", "0.6422106", "0.6422106", "0.6421483", "0.6419449", "0.63960814", "0.6396076", "0.63714886", "0.6370375", "0.6359936", "0.63537747", "0.630936", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.6290394", "0.61996174", "0.61996174", "0.605703", "0.60417664", "0.60417664", "0.602478", "0.60142314", "0.60142314", "0.60142314", "0.60142314", "0.60116535", "0.60025465", "0.6000336", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.59867764", "0.5980714", "0.59737724", "0.5968881", "0.5953209", "0.5948234", "0.59212565", "0.59025973", "0.5894296", "0.5880416", "0.58704185", "0.5868806", "0.58488977", "0.5823646", "0.58213735", "0.5816942", "0.5798234", "0.5797123", "0.5787458", "0.5771587", "0.5768725", "0.57655454" ]
0.0
-1
Patch (partial inplace update) a resource
public function patch($id, $data) { $data = $this->sanitizeData((array)$data); return $this->getRepository()->update($id, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function patch($resource, $with=[]){\n return $this->fetch($resource, self::PATCH, $with);\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function isUpdateResource();", "public function update(Request $request, Partial $partial)\n {\n //\n }", "public function edit(Resource $resource)\n {\n //\n }", "function patch(Request &$request, Response &$response);", "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 ]\n ]);\n }", "public function patch(): ModifiedResourceResponse {\n //get parameters\n $id = Drupal::request()->query->get('id');\n $datum = Drupal::request()->query->get('datum');\n $instructeur = Drupal::request()->query->get('instructeur');\n $weer = Drupal::request()->query->get('weer');\n $verslag = Drupal::request()->query->get('verslag');\n\n $dagverslagrecord = $this->processDagverslag($id, $datum, $instructeur, $weer, $verslag);\n // write start record to database\n $nrAffected = $dagverslagrecord->update();\n return new ModifiedResourceResponse($nrAffected, 200);\n\n }", "public function patchAction(int $id)\n {\n $manager = new \\Art4\\JsonApiClient\\Utils\\Manager();\n // @todo handle validation errors\n $document = $manager->parse($this->request->getRawBody());\n $resource = $this->resource->getModel()::findFirst($id);\n\n // basic attributes\n if ($document->get('data')->has('attributes')) {\n\n foreach ($document->get('data')->get('attributes')->asArray(true) as $key => $value) {\n $resource->{$key} = $value;\n }\n }\n\n if ($document->get('data')->has('relationships')) {\n\n foreach ($document->get('data')->get('relationships')->asArray() as $property => $relationship) {\n $relatedResource = $this->di->get('resources')[$relationship->get('data')->get('type')];\n $related = $relatedResource->getModel()::findFirst($relationship->get('data')->get('id'));\n\n $resource->{$property} = $related;\n }\n }\n\n // @todo handle saving errors\n $resource->update();\n\n return $this->renderSerialized($resource);\n }", "public function patch($path, array $parameters = array(), ApiInterface $api);", "public function _patch($url = null, array $parameters = []);", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function patch($id, $data)\n {\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function patch() {\n\t\t$this->method('PATCH');\n\t\treturn $this;\n\t}", "public function patch(...$args)\n {\n return $this->curl('patch', ...$args);\n }", "public function doPatch($path, array $parsed_body);", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function httpPatch()\n {\n return $this->method(\"PATCH\");\n }", "public function update(R $request, $id)\n {\n //\n }", "public function update($data) {}", "public function update($data) {}", "public function patch()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'PATCH';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'PATCH::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'PATCH::DATA', $this->getData());\n Log::write('WebRequest', 'PATCH::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'PATCH::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if ($iHTTPCode !== 204) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "public function update($request, $id);", "public function update($request,$id) {\n \n\n }", "protected function patchResource(\n ResourceInterface $resource,\n array $meta = [],\n array $headers = [],\n ): ResourceInterface {\n return $this->sendResource($resource, 'patch', $meta, $headers);\n }", "public function patch($id, $data)\n {\n return $this->update($id ,$data);\n }", "public function doRestUpdate($id, $data) {\t\t\n\t\t$model = $this->saveModel($this->loadOneModel($id), $data);\n $this->outputHelper(\n 'Record Updated',\n $model,\n 1\n );\n\t}", "public function testApplyPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n $patch->apply($target);\n $this->assertEquals($target['foo'], 'baz');\n }", "public function postEditResources()\n {\n $id = $this->_params['id'];\n\n $errors = validateEditResource($id);\n\n if(!($errors === true)) {\n $database = new Database();\n\n $resource = $database->getResourceById($id);\n /*construct($resourceID = \"0\", $resourceName = \"Resource\", $description = \"Info\",\n $contactName =\"\",$contactEmail = \"\",$contactPhone = \"\",$link = \"\", $active = \"1\" )*/\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['Active']);\n $this->_f3->set('Resource', $availableResource);\n $this->_f3->set('errors', $errors);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n } else {\n // fixme add routing\n $this->_f3->reroute('/Admin');\n }\n\n }", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "function restPatch($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t//Need to set the request to be a PATCH\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "public function update(Request $request, ResourceSubject $resourceSubject)\n {\n //\n }", "public function update()\n {\n $this->getResource()->update($this);\n return $this;\n }", "function propPatch($path, PropPatch $propPatch);", "public function update(Request $req)\n { \n\n }", "public function update(Request $r)\n {\n //\n\n }", "public function update($entity);", "public function update($entity);", "public function patch($key=null,$value=null){\n return $this->methodsData(\"patch\",$key,$value);\n }", "public function update(Request $request)\n {\n \n\n \n }", "public function testUpdateValue()\n {\n $response = $this->json('PATCH', '/api/values');\n $response->assertStatus(200);\n }", "protected function update()\n {\n $this->preUpdate();\n if ($this->owner_resource) {\n $api_owner = $this->owner_resource;\n $this->data = $this\n ->api\n ->$api_owner($this->owner_id)\n ->update($this->id, $this->data)[static::$api_name];\n } else {\n $this->data = $this->api->update($this->id, $this->data)[static::$api_name];\n }\n $this->postUpdate();\n\n return $this;\n }", "static function updatePatch($request, $id)\n {\n $respuestaBLL = new respuestaBLL();\n $objRespuesta = $respuestaBLL->select($id);\n if ($objRespuesta == null) {\n http_response_code(404);\n return;\n }\n if ($request == null) {\n http_response_code(400);\n echo \"request mal formado\";\n return;\n }\n $snombre = $objRespuesta->getSnombre();\n $srespuesta = $objRespuesta->getSrespuesta();\n $idpregunta = $objRespuesta->getIdpregunta();\n if (property_exists($request, 'snombre')) {\n $snombre = $request->snombre;\n }\n\n if (property_exists($request, 'srespuesta')) {\n $srespuesta = $request->srespuesta;\n }\n\n if (property_exists($request, 'idpregunta')) {\n $idpregunta= $request->idpregunta;\n }\n\n $respuestaBLL = new respuestaBLL();\n $respuestaBLL->update($snombre, $srespuesta, $idpregunta, $id);\n $objRespuesta = $respuestaBLL->select($id);\n echo json_encode($objRespuesta);\n }", "public function update($post);", "public function patch($data = null)\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest($data);\n }", "public function testUpdatePet()\n {\n // initialize the API client\n $config = (new Configuration())->setHost('http://petstore.swagger.io/v2');\n $api_client = new ApiClient($config);\n $pet_id = 10001; // ID of pet that needs to be fetched\n $pet_api = new Api\\PetApi($api_client);\n // create updated pet object\n $updated_pet = new Model\\Pet;\n $updated_pet->setId($pet_id);\n $updated_pet->setName('updatePet'); // new name\n $updated_pet->setStatus('pending'); // new status\n // update Pet (model/json)\n $update_response = $pet_api->updatePet($updated_pet);\n // return nothing (void)\n $this->assertSame($update_response, null);\n // verify updated Pet\n $response = $pet_api->getPetById($pet_id);\n $this->assertSame($response->getId(), $pet_id);\n $this->assertSame($response->getStatus(), 'pending');\n $this->assertSame($response->getName(), 'updatePet');\n }", "public function updateStream($resource);", "public function patch(string $url, array $input = [], $headers = null);", "public abstract function update($object);", "abstract public function put(Request $request);", "public function update()\n {\n abort(404);\n }", "public function update(Request $request, Post $post)\n {\n $this->authorize('update',$post);\n if($request->has('status')){\n $post->status = $request->status;\n }\n if($request->has('likes')){\n $post->likes = $request->likes;\n }\n if($request->has('body')){\n $post->body = $request->body;\n }\n $post->save();\n return new PostResource($post);\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "public function testUpdate(): void { }", "public function edit(array $data = []): PodiumResponse;", "public function update(string $slug, int $id, array $attributes): ResponseInterface;", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update(Request $request,$id)\n {\n $part=Part::findOrFail($id);\n \n $part->number=$request->input('number');\n $part->description=$request->input('description');\n $part->brand_name=$request->input('brand_name');\n $part->qty=$request->input('qty');\n $part->price=$request->input('price');\n $part->condition=$request->input('condition');\n $part->location=$request->input('location');\n \n if($part->save()){\n return new PartResource($part);\n } \n }", "public function update(Request $request, $id)\n {\n //put (post+get)\n }", "public function updated(Patient $patient)\n {\n\n }", "public function update(Request $request, retiro $retiro)\n {\n //\n }", "public function update(stubObject $entity);", "public function update(Request $request)\n {\n \n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function patch($id, $data = NULL) {\n if ($data == NULL) {\n throw new BadRequestHttpException('No data received.');\n }\n // Are we able to successfully load a node with that ID?\n if ($node = Node::load($id)) {\n // Is the client attempting to update a Water Eco Action item?\n if ($node->getType() != 'water_eco_action') {\n throw new BadRequestHttpException('You have not requested a Water Eco Action item.');\n }\n\n/******************************************************************************\n ** **\n ** Make sure that you check that the client has access! You don't want your **\n ** REST resources to create access bypass vulnerabilities. **\n ** **\n ******************************************************************************/\n if (!$node->access('update')) {\n throw new AccessDeniedHttpException();\n }\n // Is the client updating a particular translation?\n if (isset($data['language_code'])) {\n if ($node->hasTranslation($data['language_code'])) {\n $translatedNode = $node->getTranslation($data['language_code']);\n }\n else {\n throw new BadRequestHttpException('This translation does not yet exist.');\n }\n }\n else {\n $translatedNode = $node;\n }\n\n if (isset($data['title'])) {\n $translatedNode->set('title', $data['title']);\n }\n $wea_fields = array(\n 'contact_email',\n 'coordinates',\n 'description',\n 'status',\n 'urgency'\n );\n foreach ($wea_fields as $field) {\n if (isset($data[$field])) {\n // Note: We'd want to do some type of data validation\n $translatedNode->set('field_wea_' . $field, $data[$field]);\n }\n }\n\n try {\n $translatedNode->save();\n\n/******************************************************************************\n ** **\n ** This message will get logged to the watchdog database file if you are **\n ** using database logging (dblog) and to your system log file if you are **\n ** using system logging (syslog). **\n ** **\n ******************************************************************************/\n $this->logger->notice('Updated water eco action item with ID %id.', array('%id' => $id));\n\n/******************************************************************************\n ** **\n ** We don't need to worry about how to serialize our data. Drupal will take **\n ** care of that for us! **\n ** **\n ******************************************************************************/\n // Return the updated node in the response body.\n return new ModifiedResourceResponse($translatedNode, 200);\n }\n catch (EntityStorageException $e) {\n\n/******************************************************************************\n ** **\n ** We need to make sure that our method returns something, even if that is **\n ** an exception that we throw. Drupal will turn the exception into a **\n ** response. **\n ** **\n ******************************************************************************/\n throw new HttpException(500, 'Internal Server Error', $e);\n }\n }\n throw new NotFoundHttpException(t('Water eco action item with ID @id was not found', array('@id' => $id)));\n }", "public function testParallelPatchPatchSame(): void {\n $location = $this->createMetadataResource();\n $prop = 'http://foo';\n\n $txId = $this->beginTransaction();\n $headers = [\n self::$config->rest->headers->transactionId => $txId,\n 'Eppn' => 'admin',\n 'Content-Type' => 'application/n-triples',\n ];\n $req1 = new Request('patch', $location . '/metadata', $headers, \"<$location> <$prop> \\\"value1\\\" .\");\n $req2 = new Request('patch', $location . '/metadata', $headers, \"<$location> <$prop> \\\"value2\\\" .\");\n list($resp1, $resp2) = $this->runConcurrently([$req1, $req2], 50000);\n $codes = [$resp1->getStatusCode(), $resp2->getStatusCode()];\n $this->assertContains(200, $codes);\n $this->assertContains(409, $codes);\n }", "public function update(Request $request)\n { \n }", "public function update($path);", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $req){\n\n }", "public static function updateIt(int $id, array $request);", "public function update(Request $request) {\n \n \n }", "public function testApiUpdate()\n {\n $user = User::find(1);\n\n \n $compte = Compte::where('name', 'compte22')->first();\n\n $data = [\n 'num' => '2019',\n 'name' => 'compte22',\n 'nature' => 'caisse',\n 'solde_init' => '12032122' \n \n ];\n\n $response = $this->actingAs($user)->withoutMiddleware()->json('PUT', '/api/comptes/'.$compte->id, $data);\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n 'compte' => true,\n ]);\n }", "private function editResource($request, $resourceForm, $post, $version, $isLastVersion)\n {\n $coAuthors = null;\n $sendNotif = true;\n if (count($post->getCoAuthors())) {\n $coAuthors = clone $post->getCoAuthors();\n }\n if ($request->isMethod('POST')) {\n if ($resourceForm->handleRequest($request)->isValid()) {\n $em = $this->getOEM();\n $em->getConnection()->beginTransaction();\n $postDate = new \\DateTime();\n $create = true;\n\n $postContent = $post->getContent();\n // Purify HTML Content (remove scripts, onclick, etc.)\n $config = \\HTMLPurifier_Config::createDefault();\n // $config->set('HTML.TargetBlank', true);\n $config->set('Attr.AllowedFrameTargets', array('_blank'));\n $config->set('HTML.SafeIframe', true);\n $config->set('URI.SafeIframeRegexp', '%^(http:|https:)?//(www.youtube.com/embed/|player.vimeo.com/video/|www.flickr.com/services/oembed|www.hulu.com/embed|www.google.com/maps/embed|www.dailymotion.com/embed|w.soundcloud.com/player|www.slideshare.net|prezi.com|webtv.ac-versailles.fr|scolawebtv.crdp-versailles.fr|www.audio-lingua.eu|www.xmind.net)%');\n $config->set('Cache.SerializerPermissions', 0775);\n $config->set('Cache.SerializerPath', $this->get('kernel')->getCacheDir().'/htmlpurifier');\n $purifier = new \\HTMLPurifier($config);\n $cleanPostContent = $purifier->purify($postContent);\n\n // User\n $user = $this->getUser();\n\n // Post\n $post\n ->setContent($cleanPostContent)\n ->setStatus($resourceForm->get('submit_draft')->isClicked() ? PostVersion::STATUS_DRAFTING : PostVersion::STATUS_PUBLISHED);\n // reset coauthor if not author of post\n if ($user != $post->getAuthor()) {\n foreach ($coAuthors as $coAuthor) {\n $post->addCoAuthor($coAuthor);\n }\n }\n\n // New version or current ( current if last edit done less than 30 min ago)\n $recentUpdate = ($postDate->getTimestamp() - $version->getUpdateDate()->getTimestamp()) <= 1800;\n if ($isLastVersion && $recentUpdate && $version->getAuthor() == $user) {\n $postVersion = $version;\n $create = false;\n $sendNotif = false;\n } else {\n $postVersion = $this->createObject('post_version');\n }\n $postVersion\n ->setAuthor($user)\n ->setStatus($post->getStatus())\n ->setName($post->getName())\n ->setContent($cleanPostContent)\n ->setUpdateDate($postDate)\n ->setPost($post)\n ;\n\n if ($create) {\n $postVersion->setCreateDate($postDate);\n }\n\n // Group\n $group = false;\n $type = $resourceForm->get('where')->getData();\n\n switch ($type) {\n case Post::TYPE_WALL:\n $post\n ->setType(Post::TYPE_WALL)\n// ->setTargetUser($user)\n ->setPublishedGroup(null)\n ->setPublishedBlog(null)\n ->setPublishedEditor(null)\n ;\n break;\n\n case Post::TYPE_EDITOR:\n if (null !== $editor = $user->getEditor()) {\n $editor->addPost($post);\n $post\n ->setType(Post::TYPE_BLOG)\n ->setPublishedGroup(null)\n ->setPublishedBlog(null)\n ->setPublishedEditor($editor)\n ;\n } else {\n return $this->redirect($this->generateUrl('publish_publications'));\n }\n break;\n\n case Post::TYPE_BLOG:\n if (null !== $blog = $user->getBlog()) {\n $blog->addPost($post);\n $post\n ->setType(Post::TYPE_BLOG)\n ->setPublishedGroup(null)\n ->setPublishedBlog($blog)\n ->setPublishedEditor(null)\n ;\n } else {\n return $this->redirect($this->generateUrl('publication_edit', array('id' => $post->getId())));\n }\n break;\n\n case Post::TYPE_GROUP:\n if (null !== $group = $post->getPublishedGroup()) {\n $post\n ->setType(Post::TYPE_GROUP)\n ->setPublishedBlog(null)\n ->setPublishedEditor(null)\n ;\n $group->addPost($post);\n $this->persist($group);\n\n $this->get('rpe.logs')->create($user, Log::TYPE_POST_RESOURCE, $user, $group);\n } else {\n return $this->redirect($this->generateUrl('publication_edit', array('id' => $post->getId())));\n }\n break;\n\n default:\n return $this->redirect($this->generateUrl('publication_edit', array('id' => $post->getId())));\n }\n\n // MEDIAS\n // if (!$create) {\n // foreach ($postVersion->getMedias() as $media) {\n // $postVersion->removeMedia($media);\n // }\n // }\n\n foreach ($post->getMedias() as $media) {\n // Post\n $media\n ->setUser($user)\n ->setType(RpeMedia::TYPE_POST)\n ->setDate($postDate)\n // ->setDescription($post->getName())\n ;\n\n if (false === $media->getPosts()->contains($post)) {\n $media->addPost($post);\n // Version\n }\n $media->addPostVersion($postVersion);\n if (false === $user->getMedias()->contains($media)) {\n $user->addMedia($media);\n }\n };\n\n // Medias added from Library\n $libraryMedias = array_unique($resourceForm->get('library_medias')->getData());\n $userLibraryMedias = $user->getMediasFromIDs($libraryMedias);\n\n foreach ($userLibraryMedias as $media) {\n $media\n ->addPost($post)\n ->addPostVersion($postVersion)\n ;\n };\n\n $post->setUpdateDate($postDate);\n\n if ($post->isCollaborative()) {\n // close or re-open pad editing\n if ($resourceForm->get('pad_close')->getData() or true) {\n // Send \"close\" notifications to members of the group\n $this->get('rpe.notifications')->wait(Notification::TYPE_RESOURCE_PAD_CLOSE, $user, $post);\n } elseif ($padOldStatus = $post->getMeta('pad_is_closed')) {\n if ($padOldStatus->getValue()) {\n // Send \"re-open\" notifications to members of the group\n $this->get('rpe.notifications')->wait(Notification::TYPE_RESOURCE_PAD_REOPEN, $user, $post);\n }\n }\n $this->setPostMeta($post, 'pad_is_closed', $resourceForm->get('pad_close')->getData(), 'etherpad');\n }\n\n // Persis & Flush\n $this->persist($user, $post, $postVersion)->flush();\n\n // check media quota\n $user_quota = $user->getDiskQuota();\n foreach ($post->getMedias() as $media) {\n $check_media = $this->checkMediaSize($media, $user_quota);\n if ($check_media === false) {\n $em->getConnection()->rollback();\n return false;\n } else {\n $user_quota += $check_media;\n }\n }\n $this->setUserMeta($user, User::META_MEDIA_DISK_QUOTA, $user_quota);\n $em->getConnection()->commit();\n\n if (false === $resourceForm->get('submit_draft')->isClicked() && $create && $sendNotif) {\n $this->get('rpe.notifications')->wait(Notification::TYPE_RESOURCE_EDIT, $user, $post);\n }\n return $this->redirect($this->generateUrl('publication', array('id' => $post->getId())));\n\n } else {\n throw new \\RuntimeException('Form is not valid...');\n }\n }\n return false;\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n { \n }", "public function update ( Request $request, $id )\n {\n // NO-OP\n }", "public function update($request, $id)\n {\n }", "public function update($request, $id)\n {\n }", "public function update($request, $id)\n {\n }", "public function update($request, $id)\n {\n }", "public function update(Request $request)\r\n {\r\n }", "public function update(Request $request)\r\n {\r\n }", "public function update(UpdatePostRequest $request, Post $post): JsonResource\n {\n $post->title = $request->title;\n $post->body = $request->body;\n $post->slug = makeSlug($request->title);\n $post->saveOrFail();\n\n return PostResource::make($post);\n }" ]
[ "0.71156454", "0.6881936", "0.66891867", "0.62369704", "0.62286144", "0.6152422", "0.6146694", "0.609801", "0.6088176", "0.6069512", "0.6000171", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59955853", "0.59941524", "0.59612346", "0.5871893", "0.58339113", "0.5824302", "0.5809647", "0.5802328", "0.58006436", "0.58006436", "0.5784783", "0.57831824", "0.5770732", "0.5761319", "0.5754913", "0.57443273", "0.57270145", "0.5720673", "0.57178175", "0.57139385", "0.5709093", "0.5706817", "0.56953454", "0.5688198", "0.5663984", "0.56546956", "0.5640483", "0.5638536", "0.5638536", "0.56353486", "0.56179297", "0.5614668", "0.5604768", "0.56036687", "0.5596144", "0.5593664", "0.55809975", "0.5577958", "0.5576639", "0.55704534", "0.5564149", "0.5563621", "0.5561032", "0.5560622", "0.5556893", "0.5554823", "0.5547087", "0.5545898", "0.55399734", "0.55391777", "0.55381465", "0.5538084", "0.55371594", "0.5529701", "0.5527811", "0.552374", "0.5519235", "0.5519001", "0.5516084", "0.54990685", "0.54945314", "0.54945314", "0.5493119", "0.5492141", "0.5486436", "0.5483152", "0.54806244", "0.54738486", "0.54738486", "0.54738486", "0.54738486", "0.54738486", "0.5470652", "0.5470528", "0.54665285", "0.54665285", "0.54665285", "0.54665285", "0.54655504", "0.54655504", "0.54638106" ]
0.0
-1
Removes all underscored properties e.g. _links _embedded
protected function sanitizeData($data) { $ret = []; foreach($data as $key => $value) { if($key[0] === '_') { continue; } $ret[$key] = $value; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Dispose()\n {\n foreach($this as $key => $value)\n {\n if($key[0] == \"_\")\n unset($this->$key);\n }\n }", "function unprefix( $key, $strip_underscores = true ) {\n\n\treturn utils\\unprefix_meta_key( $key, '_wpmoly_', $strip_underscores );\n}", "public function clearProperties();", "public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}", "public function RemoveUnknownProperties()\n\t{\n\t\t$this->__unknown_properties = [];\n\t}", "private function cleanProperties(&$properties) {\r\n unset($properties['identifier'],\r\n $properties['geometry'],\r\n $properties['_geometry'], \r\n $properties['metadata'], \r\n $properties['metadataMimeType'],\r\n $properties['wms'],\r\n $properties['resource'],\r\n $properties['resourceMimeType'],\r\n $properties['resourceSize'],\r\n $properties['resourceChecksum'],\r\n $properties['bbox3857'],\r\n $properties['bbox4326'],\r\n $properties['visibility']\r\n );\r\n \r\n }", "public function __unset($key)\n {\n if( (substr($key,0,1) !== '_') && (isset($this->$key))){\n unset($this->$key);\n }\n }", "protected function __removeInternalProperties(array &$properties): void\n {\n parent::__removeInternalProperties($properties);\n\n unset($properties['__exposed']);\n }", "private function unsetProperties(){\n //Human::log(\"--------------------------------------------------- unset initial properties for \".$this->modelName);\n foreach($this->fields() as $f){\n \n $fieldName=$f->name;\n \n unset($this->$fieldName);\n /*\n if(gettype($this->$fieldName)==\"object\"){\n Human::log(\"FIELD now $fieldName is \". get_class($this->$fieldName)); \n }else{\n Human::log(\"FIELD now $fieldName is \". gettype($this->$fieldName)); \n }\n\t \n\t */\n } \n }", "public function cleanSavedProperties(){\n\t\t\n\t\tunset( $_SESSION[ get_class($this) ] );\n\t}", "protected function resetProperties() {}", "abstract protected function propertyUnset($name);", "public function underscored()\n {\n return $this->delimit('_');\n }", "function prop_clean() {\n\n remove_action('template_redirect', 'rest_output_link_header', 11);\n remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);\n\n add_filter( 'use_default_gallery_style', '__return_false' );\n\n // Emoji related\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n\tremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n\n}", "public function removeGlobalNamespaceSeparators() {\n\t\t$this->processedClassCode = preg_replace_callback(self::PATTERN_GLOBAL_OBJECT_NAMES, function($matches) {\n\t\t\treturn $matches['objectName'];\n\t\t}, $this->processedClassCode);\n\t}", "public static function clear_key($k)\n\t{\n\t\tif(!$k)\n\t\t\treturn '';\n \t$k = htmlspecialchars(urldecode($k));\n \t$k = str_replace('..','',$k);\n \t$k = preg_replace('/\\_\\_(.+?)\\_\\_/','',$k);\n \t$k = preg_replace('/^([\\w\\.\\-\\_]+)$/','$1',$k);\n \treturn $k;\n\t}", "public function clear_style_keys()\t{\n\t\tglobal $phpbbForum;\n\t\t\n\t\t$phpbbForum->erase_style_keys();\n\t\t$this->styleKeys = array();\n\t}", "private function _removeUnderscores($data)\n {\n if (is_array($data))\n {\n foreach ($data as $key => $value)\n {\n if (substr($key, 0, 1) == '_')\n {\n unset($data[$key]);\n }\n elseif (is_array($value))\n {\n $data[$key] = $this->_removeUnderscores($value);\n }\n }\n }\n\n return $data;\n }", "public function __unset($_name);", "protected function unsetFields()\n\t{\n unset(\n $this['headshot_id'], $this['created_at'],\n $this['updated_at'], $this['slug']\n );\n\t}", "public function __unset($property) {\n\t\tif (strpos($property, 'source') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->source);\n\t\t\t} else {\n\t\t\t\tunset($this->source->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t} elseif (strpos($property, 'remote') === 0) {\n\t\t\t$property = lcfirst(substr($property, 6));\n\t\t\tif ($property === '') {\n\t\t\t\tunset($this->bean->target);\n\t\t\t} else {\n\t\t\t\tunset($this->remote->$property);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\t//Temporary properties are kept in the object, and not written to the database.\n\t\t} elseif (strpos($property, 'temp') === 0) {\n\t\t\t$property = lcfirst(substr($property, 4));\n\t\t\tunset($this->tempProperties[$property]);\n\t\t} else {\n\t\t\tif (isset($this->properties[$property])) {\n\t\t\t\tif ($this->loadedProperties === false) {\n\t\t\t\t\t$this->loadProperties();\n\t\t\t\t}\n\t\t\t\tunset($this->properties[$property]);\n\t\t\t\t$this->bean->setMeta('tainted', true);\n\t\t\t}\n\t\t\tif (isset($this->bean->$property)) {\n\t\t\t\tunset($this->bean->$property);\n\t\t\t}\n\t\t}\n\t}", "public function clear() {\n\t\t$vars = get_object_vars($this);\n\t\tforeach ($vars as $key => $val) {\n\t\t\t$this->$key = null;\n\t\t}\n\t}", "function getProperties($public = true) {\n\t\t$vars = get_object_vars ( $this );\n\n\t\tif ($public) {\n\t\t\tforeach ( $vars as $key => $value ) {\n\t\t\t\tif ('_' == substr ( $key, 0, 1 )) {\n\t\t\t\t\tunset ( $vars [$key] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $vars;\n\t}", "private function unsetAll() {\n $ref = new ReflectionClass( $this );\n foreach ( $ref->getProperties() as $key => $value ) {\n $value = $value->getName();\n if ( in_array($value, array('_mysqlCharset', '_mysqlEngine', '_arraySplitChar', '_dbObject', '_singletonThis', '_dbConfig', '_lastQuery')) ) {\n continue;\n }\n\n $this->$value = NULL;\n }\n\n return $this;\n }", "public function pruneSymbolicLinks(): void\n {\n Site::pruneLinks();\n }", "public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }", "protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\tforeach($this->properties() as $key => $value){\n\t\t\t$clean_properties[$key]=$database->escape_string($value);\t\n\t\t}\n\t\treturn $clean_properties;\t\n\t}", "protected function clean_properties(){\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n\n // the value is being escaped in cases of sql injections and etc.it is also being paired with the key \n $clean_properties[$key] = $database->escape_string($value);\n }\n\n return $clean_properties;\n }", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "public function clearRules()\r\n\t{\r\n\t \t$this->mapping_rules = array();\r\n\t}", "private function _clean_paths()\n {\n $path_vars = array('dash_path', 'asset_path', 'css_path', 'js_path', 'dash_fldr', 'dash', 'img_path', 'file_path', 'oop_path');\n\n foreach ($path_vars as $var) {\n $this->$var = trim($this->$var);\n }\n }", "public static function clear($prop) {\n if (isset(self::$props[$prop])) {\n unset(self::$props[$prop]);\n }\n }", "public function clean_properties(){\n global $database;\n $clean_properties = array();\n foreach ($this->properties() as $key =>$value){\n $clean_properties[$key] =$database->escape_string($value);\n }\n \n return $clean_properties ; \n }", "private function removePseudoRelationsFromFieldSet(FieldSet& $fields) {\n\t\t$dataFields = $fields->dataFields();\n\t\tif ($dataFields) foreach ($dataFields as $field) {\n\t\t\tif (preg_match('/^__/', $field->Name()))\n\t\t\t\t$fields->removeByName($field->Name());\n\t\t}\n\t}", "public static function alm_filters_revert_underscore($key){\n\t \t// If value is _year, _month, _day or _author remove the '_'\n\t \t$key = ($key === '_year' || $key === '_month' || $key === '_day' || $key === '_author') ? str_replace('_', '', $key) : $key;\n\t \treturn $key;\n \t}", "public function getVars()\n {\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ('_' == substr($key, 0, 1)) {\n unset($vars[$key]);\n }\n }\n\n return $vars;\n }", "public function clear()\n\t{\n\t\t$classvars = get_class_vars(__CLASS__);\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif ('_s_' == substr($property, 0, 3)) // Don't touch static variables\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tunset($this->$property);\n\t\t\t$this->$property = $value;\n\t\t}\n\n\t\t$objvars = get_object_vars($this);\n\n\t\tforeach ($objvars as $property => $value)\n\t\t{\n\t\t\tif (!array_key_exists($property, $classvars))\n\t\t\t{\n\t\t\t\tunset($this->$property);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function removeUrlsFromReferences()\n {\n foreach ($this->findAll() as $doc) {\n $ref = $doc->getReference();\n if (strpos($ref, 'http://esmeree.fr')) {\n $ref = preg_replace('#'.preg_quote('http://esmeree.fr', '#').'[^\\s]+#', '', $ref);\n $doc->setReference($ref);\n }\n }\n }", "public static function clear_name_space()\n\t{\n\t\t$_SESSION['Session_Master'][self::$s_name_space] = array();\n\t}", "function unset_key($key)\n\t{\n\t\tif(empty($key) || !isset($GLOBALS['ACCESS_KEYS'][$key])) return;\n\t\tif(ACCESS_MODEL === \"roles\") {\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $k) {\n\t\t\t\tif(substr($k, 0, 1) == '@') {\n\t\t\t\t\t// This key references another role - pull in all keys from that role\n\t\t\t\t\t$this->unset_key(substr($k, 1));\n\t\t\t\t} else {\n\t\t\t\t\t$old = $this->access_keys;\n\t\t\t\t\t$this->access_keys = array();\n\t\t\t\t\tforeach($old as $v) {\n\t\t\t\t\t\tif($v !== $k) $this->access_keys[] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL === \"discrete\") {\n\t\t\t$old = $this->access_keys;\n\t\t\t$this->access_keys = array();\n\t\t\tforeach($old as $v) {\n\t\t\t\tif($v !== $key) $this->access_keys[] = $v;\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['_ACCESS']['keys'] = $this->access_keys;\n\t}", "function remove_underscores($word, $sub = ' ')\n {\n return str_replace('_', $sub, $word);\n }", "public function remove_packlink_meta_data() {\n\t\t$query = \"DELETE FROM `{$this->db->postmeta}` WHERE `meta_key` LIKE \\\"%_packlink_%\\\"\";\n\n\t\t$this->db->query( $query );\n\t}", "public function __unset($key) {\n\t\t$this->vars[$key] = '';\n\t}", "public static function clearExtensionKeyMap() {}", "public function resetLookupCollections()\n\t{\n\t\t$this->lookupCollections[] = null;\n\t}", "private function unset_members() {\n unset($this->id);\n unset($this->label);\n unset($this->controlGroup);\n unset($this->versionable);\n unset($this->state);\n unset($this->mimetype);\n unset($this->format);\n unset($this->size);\n unset($this->checksum);\n unset($this->checksumType);\n unset($this->createdDate);\n unset($this->content);\n unset($this->url);\n unset($this->location);\n unset($this->logMessage);\n }", "protected function resetNamespaceFilter() {\n\t\t$this->lookup->clearFilter( 'namespace_text' );\n\t}", "public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}", "function __destruct(){\n unset($this->charset);\n foreach (get_object_vars($this) as $prop => $val) {\n if ($prop != null) {\n unset($this->{$prop});\n }\n }\n }", "function clean_assignments_cache() {\n cache_remove_by_pattern('object_assignments_*');\n cache_remove_by_pattern('object_assignments_*_rendered');\n cache_remove_by_pattern('user_assignments_*');\n }", "public function removeNamespaceDeclarations() {\n\t\t$this->processedClassCode = preg_replace(self::PATTERN_NAMESPACE_DECLARATION, '', $this->processedClassCode);\n\t}", "private function cleanHead()\n {\n remove_action('wp_head', 'print_emoji_detection_script', 7);\n remove_action('wp_print_styles', 'print_emoji_styles');\n remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link.\n remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link.\n remove_action('wp_head', 'wp_generator'); //removes meta name generator.\n remove_action('wp_head', 'wp_shortlink_wp_head'); //removes shortlink.\n remove_action('wp_head', 'feed_links', 2); //removes feed links.\n remove_action('wp_head', 'feed_links_extra', 3); //removes comments feed.\n }", "final public function purge($key) {\n\t\tunset($this->original[$key]);\n\n\t\tunset($this->attributes[$key]);\n\t}", "public function _getCleanProperties() {}", "function spartan_head_cleanup() {\n\t// EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n // remove WP version from css\n add_filter( 'style_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n // remove Wp version from scripts\n add_filter( 'script_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n\n}", "public function head_cleanup() {\n\n\t\tremove_action( 'wp_head', 'rsd_link' );\n\t\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t\tremove_action( 'wp_head', 'wp_generator' );\n\t}", "public function reset() {\n foreach ($this->syncedProperties as $property) {\n unset($this->data[$property]);\n }\n\n if (session_id()) {\n unset($_SESSION[self::SESSION_KEY]);\n }\n }", "private function clearHash($key) {\n if (array_key_exists($key, $this->_data)) unset($this->_data[$key]);\n if (array_key_exists($key, $this->_loaded_relatives)) unset($this->_loaded_relatives[$key]);\n }", "public function __clone()\n {\n $keep_prefix = 'CLASS_';\n $keep_len = strlen($keep_prefix);\n $keep_prefix2 = 'CONF_';\n $keep_len2 = strlen($keep_prefix2);\n foreach ((array) get_object_vars($this) as $k => $v) {\n if (substr($k, 0, $keep_len) === $keep_prefix) {\n continue;\n }\n if (substr($k, 0, $keep_len2) === $keep_prefix2) {\n continue;\n }\n $this->$k = null;\n }\n }", "private function __keys() {\n $vars = get_object_vars($this);\n $vars = array_filter($vars, function ($x) {\n return $x[0] !== '_';\n }, ARRAY_FILTER_USE_KEY);\n return $vars;\n }", "function reset_permalinks() {\n global $wp_rewrite;\n $wp_rewrite->set_permalink_structure( '/%postname%/' );\n}", "function wooadmin_my_remove_columns1( $posts_columns ) {\n\n unset( $posts_columns['author'] );\n\n unset( $posts_columns['email'] );\n\n unset( $posts_columns['posts'] );\n\n unset( $posts_columns['posts'] );\n\n return $posts_columns;\n\n}", "function unhook_hotlink_scanner() {\n\t\tremove_action( 'save_post', array( &$this, 'localize_hotlinked_files' ) );\n\t}", "private function _unsetHiddenProperties($item) {\n\t\tfor ($i=0; $i < count($this->hiddenProperties); $i++) { \n\t\t\tunset($item[$this->hiddenProperties[$i]]);\n\t\t}\n\t\treturn $item;\n\t}", "function clear()\n {\n $this->meta_name = \"\";\n $this->vocab = \"\";\n $this->text = \"\";\n $this->lang = \"\";\n $this->attrs = array();\n }", "public function __unset($key)\n {\n unset($this->attributes[$key], $this->relations[$key]);\n }", "public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}", "public function clearNoticias()\n\t{\n\t\t$this->collNoticias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public static function removeAll(){\n\n foreach(static::all() as $key => $value){\n static::remove($key);\n }\n }", "function grav_head_cleanup() {\n\t// remove header links\n\t\n\t// these two are for RSS feeds - only uncomment if you don't want RSS\n\t//remove_action( 'wp_head', 'feed_links_extra', 3 ); // Category Feeds\n\t//remove_action( 'wp_head', 'feed_links', 2 ); // Post and Comment Feeds\n\t\n\tremove_action( 'wp_head', 'rsd_link' ); // EditURI link\n\tremove_action( 'wp_head', 'wlwmanifest_link' ); // Windows Live Writer\n\tremove_action( 'wp_head', 'index_rel_link' ); // index link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // previous link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); // Links for Adjacent Posts\n\tremove_action( 'wp_head', 'wp_generator' ); // WP version\n}", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "function mizzouChangeAuthorPermalinks()\n{\n global $wp_rewrite;\n $wp_rewrite->author_structure= '';\n}", "public function unsetReservedGlobalVariables() {}", "function __unset($name) {\n\t\tunset($this->object[$name]);\n\t}", "public function __unset($prop)\r\n {\r\n unset($this->wrappedObj->$prop);\r\n }", "public function tearDown()\n {\n foreach (array_keys($_SERVER) as $key) {\n if (strpos($key, 'Shib') !== false || strpos($key, 'HTTP_SHIB') !== false) {\n unset($_SERVER[$key]);\n }\n }\n // And other keys we set\n $keys = array(\n 'HTTP_HOST',\n 'REQUEST_URI',\n 'REMOTE_USER',\n 'eppn',\n 'HTTP_EPPN',\n 'uid',\n 'HTTP_UID',\n 'multiAttribute',\n 'HTTP_MULTIATTRIBUTE'\n );\n foreach ($keys as $key) {\n if (isset($_SERVER[$key])) unset($_SERVER[$key]);\n }\n }", "private function getCleanReflectionName(): string\n {\n return \\str_replace(\"\\x00\", '', $this->refl->getName());\n }", "function unregister_meta_key($object_type, $meta_key, $object_subtype = '')\n {\n }", "public function __unset($key)\r\n {\r\n $this->_smarty->clearAssign($key);\r\n }", "public function tear_down() {\n\t\tunset( $GLOBALS['link'] );\n\t\tparent::tear_down();\n\t}", "public function clearNamespace();", "function remove_underscore($string)\n{\n return str_replace('_', ' ', $string);\n}", "public function __destruct()\n {\n foreach ($this as $key => $value) {\n unset($this->$key);\n }\n }", "public function cleanAlias( $value ){\n $value = $this->removeAccents($value); \n $value = strtolower($value);\n // remove anything not alphanumeric OR \"_\"\n $value = preg_replace(\"/([^a-z0-9_\\-]+)/i\", '_', $value);\n // remove duplicate \"_\"\n $value = preg_replace(\"/(__+)/\", '_', $value);\n // remove posible start/end \"_\"\n return trim($value, '_');\n }", "function private_unset()\n{\n\n\tunset($_SESSION['search_adv']);\n\tunset($_SESSION['adver_type']);\n\n\tunset($_SESSION['catinfolist']);\n\tunset($_SESSION['url_of_list_pro']);\n\n\tunset($_SESSION['catprojectlist']);\n\t\n\tunset($_SESSION['search_name']);\n\tunset($_SESSION['search_code']);\n\tunset($_SESSION['search_type']);\n\t\n\tunset($_SESSION['txtInfo_Search']);\t\t\n}", "public function __unset($name)\n {\n if (array_key_exists($name, $this->_unsaved)) {\n // if changing property, remove relation model\n if (isset($this->_relationships[$name])) {\n unset($this->_relationships[$name]);\n }\n\n unset($this->_unsaved[$name]);\n }\n }", "public function __unset($key) {\n unset($this->_fields[$key]);\n unset($this->_fieldBoosts[$key]);\n }", "function wooadmin_remove_contactmethods($contactmethods ) {\n\n unset($contactmethods['aim']);\n\n unset($contactmethods['website']);\n\n unset($contactmethods['yim']);\n\n unset($contactmethods['jabber']);\n\n unset($contactmethods['googleplus']);\n\n unset($contactmethods['twitter']);\n\n unset($contactmethods['url']);\n\n return $contactmethods;\n\n}", "function remove_generator_meta() {\n\t\tremove_action('wp_head', 'wp_generator');\n\t}", "public function remove_declaration($property)\n {\n }", "function the_champ_clear_shorturl_cache(){\r\n\tglobal $wpdb;\r\n\t$wpdb->query(\"DELETE FROM $wpdb->postmeta WHERE meta_key = '_the_champ_ss_bitly_url'\");\r\n\tdie;\r\n}", "public function cleanLookupCache(){\n\t\t$this->lookup = [];\n\t}", "function rkv_remove_columns( $columns ) {\n\t// remove the Yoast SEO columns\n\tunset( $columns['wpseo-score'] );\n\tunset( $columns['wpseo-title'] );\n\tunset( $columns['wpseo-metadesc'] );\n\tunset( $columns['wpseo-focuskw'] );\n \n\treturn $columns;\n}", "public static function clear_all() {\n\t\tstatic::$cache = array();\n\t\tstatic::$mapping = array();\n\t}", "protected function _clearIds(): void\n {\n $this->_idSuffixes = [];\n }", "function remove_attachment_title_attr( $attr ) {\n\tunset($attr['title']);\n\treturn $attr;\n}", "public function reset() {\n $this->num_aliases = 0;\n $this->alias2class = array();\n $this->alias2table = array();\n }", "protected function removeUnknownReferences()\n\t{\n\t\tforeach ($this->references as &$references)\n\t\t{\n\t\t\t$references = array_intersect_key($references, $this->captures);\n\t\t}\n\t}", "public static function resetNamespaces()\n {\n self::$namespaces = self::$initial_namespaces;\n }", "function removeHeadLinks() {\n\t \tremove_action('wp_head', 'rsd_link');\n\t \tremove_action('wp_head', 'wlwmanifest_link');\n\t }" ]
[ "0.61983746", "0.5978918", "0.5958469", "0.58192325", "0.57490987", "0.5732534", "0.5665093", "0.56207854", "0.55578715", "0.5557007", "0.5552438", "0.55469275", "0.554364", "0.551528", "0.5495715", "0.5485096", "0.5465416", "0.54006696", "0.53500944", "0.53440565", "0.52723634", "0.52628183", "0.5249226", "0.5245122", "0.5234831", "0.5226536", "0.5222263", "0.5191867", "0.5191484", "0.5187326", "0.5177245", "0.5156334", "0.51539177", "0.51536036", "0.51449364", "0.5126732", "0.5123026", "0.5108266", "0.50907665", "0.50847495", "0.5083017", "0.5081678", "0.50499165", "0.50372493", "0.5035038", "0.4993653", "0.49887756", "0.49804088", "0.49728775", "0.496896", "0.49633443", "0.49523228", "0.49495056", "0.49494964", "0.4947607", "0.49445543", "0.4936317", "0.4928501", "0.49232572", "0.491866", "0.49129838", "0.49104092", "0.4898063", "0.48901677", "0.48891678", "0.48879248", "0.4887824", "0.4879863", "0.48739433", "0.4872965", "0.48715973", "0.48715973", "0.48708797", "0.48599672", "0.4851857", "0.4848746", "0.48448908", "0.48426002", "0.4840932", "0.48398516", "0.48345953", "0.48340338", "0.48254818", "0.48243606", "0.4818774", "0.48162082", "0.4809134", "0.48079705", "0.4807758", "0.4807295", "0.48062146", "0.4805023", "0.48046756", "0.4802308", "0.48020223", "0.48015654", "0.47953498", "0.4794719", "0.4791871", "0.4789969", "0.4784683" ]
0.0
-1
Check the size of the beverage, not of the current class.
public function cost(): float { if ($this->beverage->isSmallSize()) { return 0.10 + $this->beverage->cost(); } if ($this->beverage->isMediumSize()) { return 0.15 + $this->beverage->cost(); } if ($this->beverage->isLargeSize()) { return 0.20 + $this->beverage->cost(); } return 0.20 + $this->beverage->cost(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasSize() {\n return $this->_has(2);\n }", "public function hasSize() {\n return $this->_has(6);\n }", "public function hasSize() {\n return $this->_has(3);\n }", "public function hasCheckInSize(){\n return $this->_has(4);\n }", "public function hasCheckInSize(){\n return $this->_has(4);\n }", "public function hasSize($size) {\n return $this->is(new NotPossible('has a size'));\n }", "public function checkSize()\r\n\t{\r\n\t\treturn ((abs(@filesize($this->targetFile) - @filesize($this->referenceFile))) < $this->sizeTol);\r\n\t}", "public function size()\n {\n return 100 - $this->eaten;\n }", "public function countSpareBoxSpaces() {\r\n\t\t $catsInside = $this->getCatsInside();\r\n\t\t $totalCatsInside = count($catsInside);\r\n\t\t $capacity = $this->getBoxCapacity();\r\n\t\t $spareBoxes = $capacity-$totalCatsInside;\r\n\t\t if($spareBoxes<=0){\r\n\t\t $spareBoxes = 0;\r\n\t\t }\r\n\t\t return $spareBoxes;\r\n\t}", "public function validSize() {\n\t\tif($this->file['size'] <= $this->max_bytes) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function hasSizes() {\n if (!empty($this->cropBox['width'])) {\n return TRUE;\n }\n\n if (!empty($this->cropBox['height'])) {\n return TRUE;\n }\n\n return FALSE;\n }", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "function check_size() {\r\n\t\t$product_id = $this->uri->rsegment('3');\r\n\t\t$product_id = intval($product_id);\r\n\t\t$size = $this->input->post('num_size');\r\n\t\t$where = array('size' => $size, 'product_id' => $product_id);\r\n\t\tif($this->product_detail_model->check_exists($where)) {\r\n\t\t\t$this->form_validation->set_message(__FUNCTION__, '* Size vừa nhập đã tồn tại');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function getSize()\n {\n }", "function validSize($size)\n {\n return $size > 1;\n }", "public function getClothingSize()\n {\n return $this->clothingSize;\n }", "public function supportsSize()\n {\n return $this->disk->getDriver() instanceof SizeAwareInterface;\n }", "public function hasHardSizes() {\n return (!empty($this->cropBox['width']) && !empty($this->cropBox['height'])) ? TRUE : FALSE;\n }", "function getSize() {\n\t\t\treturn count($this->items);\n\t\t}", "protected function checkThumbSizeSettings()\n {\n\n if ($this->gc_size_albumlisting == \"\")\n {\n $this->gc_size_albumlisting = serialize(array(\"110\", \"110\", \"crop\"));\n }\n if ($this->gc_size_detailview == \"\")\n {\n $this->gc_size_detailview = serialize(array(\"110\", \"110\", \"crop\"));\n }\n }", "function checkSize(){\n global $postpath;\n return (filesize($postpath) / 1000000) < 1;\n }", "public function getSize(){\n return count($this->sides);\n }", "public function hasItems()\n {\n return $this->getProductCollection()->getSize();\n }", "public function hasCommittedSize(){\n return $this->_has(1);\n }", "public function hasCommittedSize(){\n return $this->_has(1);\n }", "public function testCanSetMaxBoxesToWeightBalance()\n {\n $packer = new Packer();\n $packer->setMaxBoxesToBalanceWeight(3);\n self::assertEquals(3, $packer->getMaxBoxesToBalanceWeight());\n }", "function check_size($data)\n {\n try {\n $file_name = $data[\"file\"][\"name\"];\n if (!empty ($file_name)) {\n $size = $data[\"file\"][\"size\"];\n if ($size <= 1048576) { //1MB\n return true;\n }\n return false;\n }\n return true;\n } catch (Exception $exception) {\n echo $exception->getMessage();\n }\n }", "public function hasCapacity(int $size): bool\r\n {\r\n $currentSize = 0;\r\n foreach ($this->getItems() as $item) {\r\n if ($item instanceof SizableEntityInterface) {\r\n $currentSize += $item->getSize();\r\n }\r\n }\r\n\r\n return $this->getCapacity() >= $currentSize + $size;\r\n }", "private function checkSize()\n {\n $allowedSize = intval($this->getSetting('allowed_upload_size', true));\n if ($allowedSize) {\n if ($this->file->getSize() > $allowedSize) {\n throw new FileException(\"File cannot be bigger than $allowedSize bytes\");\n }\n }\n }", "abstract public function getBoxSize();", "public function getBoxCapacity() {\r\n\t\t$boxes = $this->getBoxes();\r\n\t\t$count = 0;\r\n\t\tforeach($boxes as $box) {\r\n\t\t\t$boxclass = new $box;\r\n\t\t\t$count = $count + $box->getCapacity();\r\n\t\t}\r\n\t\treturn $count;\r\n\t}", "public function checkMaximumGiftwrapItems() {\r\n// $maxItems = Mage::getStoreConfig(\r\n// 'giftwrap/general/maximum_items_wrapall');\r\n// $quoteId = Mage::getSingleton('checkout/session')->getQuote()->getId();\r\n// $items = Mage::getSingleton('checkout/cart')->getItems();\r\n// $itemsOnCart = 0;\r\n// foreach ($items as $item) {\r\n// $productId = $item->getProductId();\r\n// if (Mage::getModel('catalog/product')->load($productId)->getGiftwrap()) {\r\n// $itemsOnCart += $item->getQty();\r\n// }\r\n// }\r\n// if ($itemsOnCart > $maxItems) {\r\n// Mage::getModel('giftwrap/selection')->loadByQuoteId($quoteId, 0)->delete();\r\n// return false;\r\n// }\r\n// return true;\r\n }", "public function getSize()\n {\n return $this->item['size'];\n }", "public function testSize() {\n\t\t$array = array(1, 2, 3, 4, 5);\n\t\t$result = _::size($array);\n\t\t$this->assertEquals(5, $result);\n\n\t\t// test with an object\n\t\t$object = (object)array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$result = _::size($object);\n\t\t$this->assertEquals(3, $result);\n\t}", "function check_garage_size()\n\t{\n\t\tglobal $userdata, $db;\n\n\t\t$sql = \"SELECT count(id) AS total FROM \" . GARAGE_TABLE . \" WHERE member_id = \" . $userdata['user_id'];\n\n\t\tif ( !($result = $db->sql_query($sql)) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Error Getting Total Vehicles', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "function calc_size()\n\t{\n\t}", "public function getSize()\n {\n if (!isset($this->_size)) {\n throw new \\LogicException('Missing property _size');\n }\n return $this->_size;\n }", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function isFull()\n {\n return $this->getFreeInMb() <= 0.0;\n }", "public function hasBytesNeeded()\n {\n return $this->bytes_needed !== null;\n }", "public function get_size()\n {\n }", "function getSize()\r\n\t{\r\n\t\treturn $this->size;\r\n\t}", "public function checkStock()\n {\n if ($this->qty > ($this->beer->stock - $this->beer->requested_stock)){\n return false;\n }\n\n return true;\n }", "function getSize() {\n return $this->size;\n }", "public function getSize()\n {\n return count($this->getItems());\n }", "function checkFileSize()\r\n\t{\r\n\t\tif ($this->file_size_max >= 0)\r\n\t\t{\r\n\t\t\t$post \t\t= $_FILES[$this->post_name];\r\n\t\t\t$size \t\t= ( !$this->isArrayPostName ) ? $post['size'] : $post['size'][$this->arrayPostName];\r\n\t\t\tif ($size > $this->file_size_max) return false;\r\n\t\t\telse return true;\r\n\t\t}else return true;\r\n\t}", "public function getTotalSize();", "public function getSizeBeforeFiltersHaveBeenApplied() : int\n {\n return $this->getLoader()->getSizeBeforeFiltersHaveBeenApplied();\n }", "function getSize() { return $this->_size; }", "public function getShelfCapacity() : int\n {\n return $this->shelfCapacity;\n }", "public function testCSize() {\n\t\t$csize = new CSize();\n\t\t$csize->set(100,200,300);\n\t\t$this->assertTrue($csize->w===100);\n\t\t$this->assertTrue($csize->h===200);\n\t\t$this->assertTrue($csize->l===300);\n\t\t$csize->scale(0.5,2.0,1.5);\n\t\t$this->assertTrue($csize->w==50);\n\t\t$this->assertTrue($csize->h==400);\n\t\t$this->assertTrue($csize->l==450);\n\t}", "public function size() {}", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "protected function QtyAvailable() {\n\t//throw new exception('Call CountForSale() instead of QtyAvailable().');\t// 2018-02-17\n\treturn $this->GetFieldValue('CountForSale');\t\t\t\t\t// 2018-04-18 was QtyAvail\n }", "public function hasMaxBesave(){\n return $this->_has(17);\n }", "public function size_validation($size,$req_size){\t\n\t\tif($size > $req_size){\n\t\t\treturn true;\n\t\t}\t\n\t}", "public function size_validation($size,$req_size){\t\n\t\tif($size > $req_size){\n\t\t\treturn true;\n\t\t}\t\n\t}", "public function isAllowedFileSize()\n {\n if (empty($this->max_upload_size)) {\n $this->max_upload_size = ini_get('upload_max_filesize');\n }\n\n if ($this->_file_info['size'] > $this->max_upload_size) {\n NUCLEUS_Exceptions::catcher(UPLOAD_FILESIZE_DENIED);\n return false;\n }\n\n return true;\n }", "public function getSizeGb()\n {\n return $this->size_gb;\n }", "public function getSize()\n {\n return $this->size;\n }", "function sizeLimitExceeded()\n {\n return ($this->getErrorCode() == 4);\n }", "public function hasQuota(){\n return $this->_has(12);\n }", "public function getSize() \n {\n return $this->_size; \n }", "public static function get_sizes()\n {\n }", "function getSize() ;", "public function size()\n {\n return count($this->deck);\n }", "public function isFull(): bool\n {\n return $this->maxSize === $this->size;\n }", "public function getSizeGib()\n {\n return $this->size_gib;\n }", "public static function getSize($type) {}", "function size()\n\t{\n\t\treturn $this->nb;\n\t}", "public function hasMaxHands(){\n return $this->_has(12);\n }", "protected function checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize() {}", "public function getTotalSize(): int;", "public function isValidSize( $size ){ return $size <= MAX_FILE_SIZE;}", "public function getSize() {\n\n return $this->size;\n\t}", "public function getSize(): int\n {\n [$className, $methodName] = explode('::', $this->getName());\n\n return TestUtil::getSize($className, $methodName);\n }", "function searchSize()\t{\n\t\treturn $this->getRandomSize();\n\t}", "public function getSize()\n {\n return $this->domain ? $this->domain->getSize() : false;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "function __checkSize($size = null) {\n\t if($size > 1024 * 1024 * 2) {\n\t\t\t$this->Session->setFlash('You tried to upload an image that was too large! Images must be under 2MB.');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}" ]
[ "0.7230534", "0.7203746", "0.7196442", "0.65930414", "0.65930414", "0.6214602", "0.6208093", "0.6157042", "0.61177593", "0.60597265", "0.60556203", "0.6049057", "0.60472053", "0.60472053", "0.60472053", "0.60472053", "0.6047113", "0.6031216", "0.5990298", "0.59560037", "0.59544873", "0.5953", "0.59411097", "0.5906961", "0.58909196", "0.5887929", "0.58856493", "0.58843887", "0.5879819", "0.5879819", "0.5871942", "0.5869032", "0.5851154", "0.5846086", "0.5832765", "0.5819277", "0.5793073", "0.57905275", "0.5782834", "0.57828104", "0.5780125", "0.5775617", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.5767881", "0.57104313", "0.56966954", "0.5692202", "0.5689655", "0.5677171", "0.56765884", "0.56475335", "0.56323993", "0.56305885", "0.5629674", "0.56230676", "0.56226707", "0.5618567", "0.55952024", "0.559124", "0.559124", "0.55851495", "0.5578445", "0.5577438", "0.5577438", "0.55743086", "0.55705005", "0.55691487", "0.5566014", "0.556235", "0.5561394", "0.55534583", "0.55525446", "0.55520266", "0.5539233", "0.5535105", "0.55328274", "0.5531102", "0.5531016", "0.55308956", "0.5527263", "0.5526806", "0.55242616", "0.5518705", "0.55141956", "0.55139315", "0.5510224", "0.5510224", "0.5510224", "0.5510224", "0.5510224", "0.5510224", "0.5510224", "0.5510224", "0.5508936" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('guest'); }
{ "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->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "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.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Get a validator for an incoming registration request.
protected function validator(array $data) { return Validator::make($data, [ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:8', '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 {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }", "protected function createValidator() {\n return $this->validator;\n }", "public static function getValidatorInstance()\n {\n if (static::$validator === null)\n {\n static::$validator = new Validator();\n }\n\n return static::$validator;\n }", "private function getValidator()\n {\n return Validation::createValidatorBuilder()->enableAnnotationMapping()->getValidator();\n }", "public function getValidator()\n\t{\n\t\treturn $this->validation->validator->validator;\n\t}", "protected function get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f(): \\Viserio\\Component\\Validation\\Validator\n {\n return $this->services[\\Viserio\\Contract\\Validation\\Validator::class] = new \\Viserio\\Component\\Validation\\Validator();\n }", "public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}", "public function getValidator() {\n return $this->__validator;\n }", "public function getValidator() \n {//--------------->> getValidator()\n return $this->_validator;\n }", "protected function getValidatorInstance()\n {\n $factory = $this->container->make('Illuminate\\Validation\\Factory');\n if (method_exists($this, 'validator')) {\n return $this->container->call([$this, 'validator'], compact('factory'));\n }\n\n $rules = $this->container->call([$this, 'rules']);\n $attributes = $this->attributes();\n $messages = [];\n\n $translationsAttributesKey = $this->getTranslationsAttributesKey();\n\n foreach ($this->requiredLocales() as $localeKey => $locale) {\n $this->localeKey = $localeKey;\n foreach ($this->container->call([$this, 'translationRules']) as $attribute => $rule) {\n $key = $localeKey . '.' . $attribute;\n $rules[$key] = $rule;\n $attributes[$key] = trans($translationsAttributesKey . $attribute);\n }\n\n foreach ($this->container->call([$this, 'translationMessages']) as $attributeAndRule => $message) {\n $messages[$localeKey . '.' . $attributeAndRule] = $message;\n }\n }\n\n return $factory->make(\n $this->all(),\n $rules,\n array_merge($this->messages(), $messages),\n $attributes\n );\n }", "public function validator()\n {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('postHashtag', json_decode($this->input()['postHashtag'], true));\n $this->request->set('activeLocales', json_decode($this->input()['activeLocales'], true));\n // clean alias from unnecessary symbols\n $this->request->set('postAlias', Helpers::cleanToOnlyLettersNumbers($this->input()['postAlias']));\n\n\n return parent::getValidatorInstance();\n }", "public function getValidatorService();", "private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }", "protected function getValidationFactory()\n {\n return app('validator');\n }", "public function getValidator($name = 'default') {\n\t\t\t//\n\t\t\tif ($name == 'default') { return new Validator();}\n\t\t\trequire (VALIDATORS . $name . '_validator.php');\n\t\t\t$name = $name . '_Validator';\n\t\t\treturn new $name();\n\t\t}", "protected function getValidator($request)\n {\n $rules = [\n 'page_title' => 'required',\n 'status' => 'required|integer|between:0,1'\n ];\n \n $customMessages = [\n 'page_title.required' => __('admin.pages.field_validation.title_field_required_msg'),\n 'status.required' => __('admin.pages.field_validation.status_field_required_msg')\n ];\n\n return Validator::make($request->all(), $rules, $customMessages);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Cubos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Cubos);\n }\n }\n\n return $this->_validator;\n }", "protected function getValidatorService()\n {\n return $this->services['validator'] = $this->get('validator.builder')->getValidator();\n }", "public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }", "public function getValidatorService()\n {\n return $this->validatorService;\n }", "public function getCreateTaskValidator()\n : Validators\\ValidatorInterface\n {\n return $this->app->make(\n Validators\\CreateTaskValidator::class\n );\n }", "protected function getValidator()\n {\n if ($form = $this->owner->getForm()) {\n \n if (($validator = $form->getValidator()) && $validator instanceof Validator) {\n return $validator;\n }\n \n }\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Newsletter')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Newsletter);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Kanpaina')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Kanpaina);\n }\n }\n\n return $this->_validator;\n }", "function getCMSValidator()\n {\n return $this->getValidator();\n }", "function validator() {\n if ($this->validator) return $this->validator;\n $options = array();\n foreach ($this->fields_options as $field => $field_options) {\n if (!@$field_options['validation']) continue;\n $options[$field] = $field_options['validation'];\n }\n return $this->validator = new xValidatorStore($options, $_REQUEST);\n }", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n $validator->sometimes('family_member_id.*', 'distinct', function($input)\n {\n return $input->family_member == 1;\n });\n\n $validator->sometimes('family_member_id.*', 'not_in:'. $this->request->get('patriarch'), function($input)\n {\n return $input->family_member == 1;\n });\n\n return $validator;\n }", "public function getDelegatedValidator()\n {\n return $this->validator;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n return UserValidator::class;\n }", "public function createValidator();", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n $validator->setAttributeNames(trans('mconsole::personal.form'));\n\n return $validator;\n }", "public function getValidator($validator)\n {\n $instance = null;\n\n if (strpos($validator, 'iPhorm_Validator_') === false) {\n $validator = 'iPhorm_Validator_' . ucfirst($validator);\n }\n\n $validators = $this->getValidators();\n if (array_key_exists($validator, $validators)) {\n $instance = $validators[$validator];\n }\n\n return $instance;\n }", "public function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n\n $validator->after(\n function () use ($validator) {\n $input = $this->all();\n }\n );\n\n return $validator;\n }", "public function get($codename) {\n\t\treturn $this->validators[$codename];\n\t}", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('categories_names', json_decode($this->input()['categories_names'], true));\n // clean alias from unnecessary symbols\n $this->request->set('category_alias', Helpers::cleanToOnlyLettersNumbers($this->input()['category_alias']));\n\n return parent::getValidatorInstance();\n }", "public static function getValidator($name, array $options = []);", "protected function validator($request)\n {\n $data = $request->all();\n $vcode = $request->session()->get('p'.$data['phone']);\n return Validator::make($data, [\n 'name' => 'required|max:255|unique:users,name',\n 'phone' => 'required|phone|max:255|unique:users,phone',\n 'email' => 'required|email|max:255|unique:users,email',\n 'phonecode' => 'required|regex:/' . $vcode['verifycode'] . '/',\n 'password' => 'required|confirmed|min:6|max:20',\n ]);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Mensajes')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Mensajes);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if (!isset($this->customValidator)) {\n throw new CertaintyException('Custom class not defined');\n }\n return $this->customValidator;\n }", "private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }", "public function createFooResponseValidator(): ResponseValidatorInterface\n {\n return new AcmeFooResponseValidator();\n }", "protected function getAjaxValidationFactory()\n {\n return app()->make('validator');\n }", "public function withContext(mixed $context): ValidatorInterface;", "public function getValidatorInstance() {\n $validator = parent::getValidatorInstance();\n\n $validator->after(function() use ($validator) {\n\n // Does the event exist?\n if( !$this->checkEventExists()){\n $validator->errors()->add('event.Exists', 'This event does not longer exist.');\n } else {\n\n // Does the booker is not the creator?\n if( !$this->checkEventNotBookedByCreator()){\n $validator->errors()->add('event.BookedCreator', 'You can\\'t unbook this event because since you are the owner.'); \n }\n\n // Does the event is not already finished/has begun?\n if( !$this->checkEventDateNotDue()){\n $validator->errors()->add('event.DateDue', 'You can\\'t unbook this event because it\\'s already begun or is terminated.'); \n }\n }\n\n });\n\n return $validator;\n }", "protected function getValidator(): void\n {\n // TODO: Implement getValidator() method.\n }", "protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }", "public function validator()\n {\n\n return ConfigValidator::class;\n }", "protected function makeValidator()\n {\n $rules = $this->expandUniqueRules($this->rules);\n\n $validator = static::$validator->make($this->getAttributes(), $rules);\n\n event(new ModelValidator($this, $validator));\n\n return $validator;\n }", "public function validator()\n {\n\n return FormInfoValidator::class;\n }", "public function getValidator(): ?ValidatorInterface\n {\n return new CompoundValidator(\n new CzechIbanValidator($this->accountNumber, $this->bankCode),\n new GenericIbanValidator($this)\n );\n }", "public function validator()\n {\n\n return ProvidersValidator::class;\n }", "protected function getForm_TypeGuesser_ValidatorService()\n {\n return $this->services['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser($this->get('validator'));\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function validator(array $data)\n {\n return self::getValidator($data);\n }", "protected static function validator() {\n\t\tif (empty(self::$validate)) {\n\t\t\tself::$validate = new MpoValidator();\n\t\t}\n\t\treturn self::$validate;\n\t}", "public function makeValidator()\r\n {\r\n if (10 == $this->countDigits($this->string)) {\r\n return new Validator10($this->string);\r\n }\r\n\r\n if (13 == $this->countDigits($this->string)) {\r\n return new Validator13($this->string);\r\n } \r\n }", "public function initValidator()\n {\n if (!is_null($this->_validator)) {\n return $this->_validator;\n }\n $this->_validator = new SurveyManager_Entity_Validator_Survey($this);\n \n return $this->_validator;\n }", "public function make($validator)\n\t{\n\t\tif ($validator instanceof Closure)\n\t\t{\n\t\t\t$validator = new ClosureValidator($validator, $this->request, $this->validatorFactory, $this->router);\n\n\t\t\treturn array($validator->getInput(), $validator->getRules(), $validator->getFailedMessages());\n\t\t}\n\n\t\tif (is_string($validator) AND ! isset($this->validators[$validator]))\n\t\t{\n\t\t\t$this->validators[$validator] = $validator;\n\t\t}\n\n\t\tif (isset($this->validators[$validator]))\n\t\t{\n\t\t\tif ($this->validators[$validator] instanceof Closure)\n\t\t\t{\n\t\t\t\treturn new ClosureValidator($this->validators[$validator], $this->request, $this->validatorFactory);\n\t\t\t}\n\n\t\t\treturn new $this->validators[$validator]($this->request, $this->validatorFactory);\n\t\t}\n\n\t\tthrow new \\InvalidArgumentException('Invalid input validator.');\n\t}", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }", "protected function validator(Request $request)\n\t{\n\t\treturn Validator::make($request->all(), [\n\t\t\t'title' => 'required',\n\t\t\t]);\n\t}", "public function getContractValidator(): ?ContractValidator {\n\n return $this->contractValidator;\n\n }", "public function validator()\n {\n\n return DistribuidorValidator::class;\n }", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n // $validator->sometimes();\n\n $validator->after(function ($validator) {\n $this->request->remove('is_post');\n $this->request->remove('is_update');\n $this->request->remove('is_editing');\n $this->request->remove('is_delete');\n });\n return $validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Tipos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Tipos);\n }\n }\n\n return $this->_validator;\n }", "public function validator()\n {\n\n return BabyInfoValidator::class;\n }", "protected function getValidator(array $options = [])\n {\n $type = '\\\\marvin255\\\\serviform\\\\validators\\\\Regexp';\n\n return FactoryValidators::initElement($type, $options);\n }", "public function validator()\n {\n return ZhuanTiValidator::class;\n }", "public function validator()\n {\n\n return EmpreValidator::class;\n }", "public function validator()\n {\n\n return OccupationValidator::class;\n }", "public function validator()\n {\n\n return GrupoServicosValidator::class;\n }", "public function validator()\n {\n\n return ScheduleValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'suburb' => 'required',\n 'zipcode' => 'required',\n\t\t\t\n ]);\n }", "public function validator()\n {\n return NotificationValidator::class;\n }", "public function validator()\n {\n $validator = $this->baseValidator([\n 'stripe_token' => 'required',\n 'vat_id' => 'nullable|max:50|vat_id',\n ]);\n\n if (Spark::collectsBillingAddress()) {\n $this->validateBillingAddress($validator);\n }\n\n return $validator;\n }", "public function validator()\n {\n\n return ProducerValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'password' => 'required'\n ]);\n }", "protected function validation($request)\n {\n\n $validator = Validator::make($request->all(), [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required',\n 'pocketmoney' => 'required',\n 'password' => 'required',\n 'age' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'zip' => 'required',\n 'country' => 'required',\n ]);\n\n return $validator;\n }", "public function getValidator(?string $code) : ?Validator {\n if ($code === null || strlen($code) < 2) { // ensure we can extract the code\n return null;\n }\n\n $key = substr($code, 0, 2);\n\n return $this->validators[$key] ?? null;\n }", "public function validator()\n {\n $validator = validator($this->all(), [\n 'name' => 'required|max:255',\n 'server_provider_id' => ['required', Rule::exists('server_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'region' => 'required|string',\n 'source_provider_id' => ['required', Rule::exists('source_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'repository' => [\n 'required',\n 'string',\n new ValidRepository(SourceProvider::find($this->source_provider_id))\n ],\n 'database' => 'string|alpha_dash|max:255',\n 'database_size' => 'string',\n ]);\n\n return $this->validateRegionAndSize($validator);\n }", "public function validator()\n {\n return LeaveRequestValidator::class;\n }", "private function validator(Request $request)\n {\n //validate the form...\n }", "protected function createUserValidator($request) {\n \treturn Validator::make($request,[\n 'first_name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'last_name' => 'required',\n 'password' => 'required|min:6',\n 'status' => 'required'\n ]);\n \t}", "public function validator()\n {\n\n return PescariaValidator::class;\n }", "protected function parseRulesFromValidator()\n {\n // First we call needed method with needed container\n $factory = app()->make(ValidationFactory::class);\n $validator = app()->call([$this->getFormRequestInstance(), 'validator'], [$factory]);\n\n // After that we get initialRules property (since plain `rules` prop doesn't contain array rules)\n // and make it public so that later we can get it's value\n $property = (new ReflectionClass($validator))->getProperty('initialRules');\n $property->setAccessible(true);\n\n return $property->getValue($validator);\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'page' => ''\n ]);\n }" ]
[ "0.7216855", "0.7101004", "0.7101004", "0.70485556", "0.70485556", "0.70485556", "0.69237643", "0.6917013", "0.68998235", "0.6853857", "0.68479085", "0.68129474", "0.68009216", "0.67971444", "0.674607", "0.6697467", "0.6687251", "0.66447186", "0.6593175", "0.6564368", "0.65065056", "0.6500438", "0.64932007", "0.642847", "0.64064974", "0.6402458", "0.63928795", "0.6366771", "0.6347543", "0.6343588", "0.62822825", "0.62520355", "0.62329775", "0.6228032", "0.6228032", "0.6228032", "0.6213428", "0.6202459", "0.61241037", "0.61241037", "0.61241037", "0.61241037", "0.61241037", "0.6105877", "0.60826224", "0.606675", "0.60370934", "0.5994496", "0.598103", "0.59796995", "0.59738314", "0.5938826", "0.59266984", "0.59037423", "0.5889354", "0.5889209", "0.5872053", "0.586733", "0.5865833", "0.5862512", "0.58235526", "0.581557", "0.5815036", "0.57837397", "0.57811576", "0.5768135", "0.57487625", "0.5748592", "0.5748592", "0.5738151", "0.57236016", "0.5716446", "0.57139736", "0.571146", "0.5674024", "0.56738126", "0.5673608", "0.56691164", "0.5667663", "0.5643301", "0.56366414", "0.56231016", "0.56142664", "0.5613163", "0.5581661", "0.5569898", "0.55689657", "0.5561292", "0.55594975", "0.55522", "0.5535275", "0.55248845", "0.55241793", "0.55206096", "0.551269", "0.55099493", "0.5507512", "0.5504495", "0.5503175", "0.549219", "0.5486392" ]
0.0
-1
Create a new user instance after a valid registration.
protected function create(array $data) { function generateRandomString($length = 7) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } $pwduser = $data['password']; $password = $pwduser; $hashpassword = str_split($password); $count = count($hashpassword); $hash = []; foreach($hashpassword as $pwd){ $hash[] = generateRandomString()."".$pwd.""; } $datas = implode('-',$hash); $insertpwd = $datas; $userid = substr(strtotime('now'),-6,6).generateRandomString(); $date = date('y-m-d H:i:s'); $ip = \Request::getClientIp(); $located = geoip()->getLocation($ip); $user = User::create([ 'user_id'=>$userid, 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), 'provider_name' => 'Whitelebel1', 'pro_id' => '0001', 'userBalance' => 0, 'totalOnlineHour'=>0, 'userStatus'=>'online', 'registerTime'=>$date, 'last_activity'=>$date, 'accessTime'=>$date, 'accessIP'=>$ip, 'pwdhashed'=>$insertpwd, ]); $id = trim(User::latest()->limit(1)->pluck('id'),'["]'); userdetail::create([ 'id' => $id, 'user_id' => $userid, 'currency' => $located['currency'], 'lang' => $located['iso_code'], 'TotalRolling' => 0, 'AvailableRolling' => 0, ]); 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 }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }", "public function createUser()\n {\n return User::factory()->create();\n }", "public function create() {\n $username = Input::get('reg_username');\n $email = Input::get('email');\n $password = Input::get('reg_password');\n $confirm_password = Input::get('confirm_password');\n\n // Make sure that both passwords are identical\n if (strcmp($password, $confirm_password) == 0) {\n $hashed_password = Hash::make($password);\n try {\n $user = new User;\n $user -> username = $username;\n $user -> email = $email;\n $user -> password = $hashed_password;\n $user -> save();\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'Error: Failed to register user in database.',\n 'alert-class' => 'alert-danger'\n ));\n }\n\n // Login the new user automatically\n $user = User::where('username', '=', $username) -> first();\n Auth::login($user);\n\n return Redirect::route('home') -> with(array(\n 'alert-message' => 'Welcome! You have successfully created an account, and have been logged in.',\n 'alert-class' => 'alert-success'\n ));\n }\n\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'The attempt to create an account was unsuccessful!',\n 'alert-class' => 'alert-danger'\n ));\n }", "private function newUser()\n {\n return factory(User::class)->create([\n 'name' => 'John Doe',\n 'email' => 'john.doe@example.com',\n 'email_verified_at' => '2019-06-01 16:45:00',\n 'password' => Hash::make('test1234'),\n 'photo' => 'https://lorempixel.com/640/480/?65533',\n 'created_at' => '2019-06-01 16:45:00',\n 'updated_at' => '2019-06-01 16:45:00',\n 'deleted_at' => '2019-06-01 16:45:00',\n 'logged_in_at' => '2019-06-01 16:45:00',\n ]);\n }", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "public function create() {\n\n //Create validator for User registration form with all data sended. Load from model\n $validator = Validator::make(Input::all(), User::$rules_validator);\n \n //Only if request is send by form (post) procces to create user\n if (Request::isMethod('post')) {\n \n //Check fields data sended\n if ($validator->fails()) {\n //Redirecto to form with error\n $messages = $validator->messages()->all(\"<li>:message</li>\");\n $error = \"<ul>\". implode(\"\", $messages).\"</ul>\";\n return Redirect::to('/user/register')->with('error', $error)->withInput(Input::all());\n }\n \n //Pass validator, proccess to create User\n if( $user = User::_save( Input::all() ) ){\n //Auto login user created, is same that attemd method\n Auth::login($user);\n //Redirecto to profile\n return Redirect::intended(action('UserController@profile', array('username' => Auth::user()->username )))->with('notice', trans(\"app.welcome_message\", array(\"user\"=>Auth::user()->username) ));\n }else{\n //Error to try create User, redirecto to Registration form\n return Redirect::to('/user/register')->with('error', trans(\"app.error_creating\"))->withInput(Input::all());\n }\n }\n \n //Return to view\n return View::make('user.register');\n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function create(array $data)\n {\n $user = User::isCurrentUser($data);\n\n // If user doesn't exist, attempt to create.\n if (!$user) {\n $user = new User($data);\n\n $validator = $this->validation->make($user->toArray(), [\n 'phone' => 'unique:users',\n 'email' => 'unique:users',\n ]);\n\n if($validator->fails()) {\n throw new ValidationException($validator);\n }\n\n $user->country_code = get_country_code();\n $user->northstar_id = $this->northstar->register($user);\n\n $user->save();\n\n event(new UserRegistered($user));\n }\n\n return $user;\n }", "private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }", "public function postCreate() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n\n \t// i made a user with something@place.com, goodbye\n \tif ($validator->passes()) {\n \t\t// validation has passed, save user in DB\n \t\t$user = new User;\n \t\t$user->first_name = Input::get('first_name');\n \t\t$user->last_name = Input::get('last_name');\n \t\t$user->email = Input::get('email');\n \t\t$user->password = Hash::make(Input::get('password'));\n \t\t$user->save();\n\n \t\treturn Redirect::to('users/login')->with('message', '<div class=\"alert alert-success\" role=\"alert\">Thanks for registering!</div>');\n \t}\n \telse {\n \t\t// validation has failed, display error messages\n \t\treturn Redirect::to('users/register')->with('message', '<div class=\"alert alert-warning\" role=\"alert\">The following errors occurred</div>')->withErrors($validator)->withInput();\n \t}\n }", "public function create()\n {\n return $this->userService->create();\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "function register_new_user()\n{\n // alidate the data submited by our user\n $result = _validation([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|unique:users',\n 'password' => 'required|string|equals:password_confirmation'\n ]);\n\n // Get the validated data.\n $validated = $result['validated'];\n\n // _dump(bcrypt_hasher_make($validated['password']), true);\n\n // Create the user\n $user = create_new_user(\n $validated['name'],\n $validated['email'],\n bcrypt_hasher_make($validated['password']) // Always hash your users password\n );\n\n // Redirect back if the user was not created.\n _redirect_back_if($user === false, ['errors' => [\n 'Unable to register user at the moment.'\n ]]);\n\n // log the user in\n login_user($user);\n}", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "public function create()\n {\n $request = (object) $this->request->getPost();\n\n if (! $this->validate(static::rules())) {\n return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());\n }\n\n $user = static::createUser($request);\n\n Auth::login($user);\n\n // Automatic trigger send verify email if user\n // instanceof VerifyEmailInterface.\n if ($user instanceof VerifyEmailInterface) {\n Events::trigger(VerifyEmailInterface::class, $user->email);\n }\n\n return redirect(config('Auth')->home);\n }", "public function createUser()\n {\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "protected function create(array $data)\n {\n $user = $this->userService->createUser($data);\n if(!$user) \n return redirect()->back()->with([\"status\" => \"error\", \"msg\"=>\"An Error Occured While Creating a user\"]);\n $this->capsuleService->createParty(PartyDto::fromUser($user)); // create a party on capsule crm for representing registered user\n $this->capsuleService->notifySalesHeadOfNewUserSignup($user); // Send a notification to app sales head on user signup\n return $user;\n }", "protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }", "function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'uuid' => Uuid::generate(5,$data['email'], Uuid::NS_DNS),\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $userObj = User::find($user->id);\n\n if(Event::fire(new WelcomeUser($userObj)))\n {\n return $user;\n }else\n {\n //Redirect to error page and log in the incident\n }\n\n }", "public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}", "protected function create(array $data)\n {\n\n // incase the user does not enter the password and exits, then \n // we give give them to re register into the website, so \n // a new email is sent for verification and the old token is regenerated\n if($user = User::where('email', '=', $data['email'])->first()){\n\n $user->verification_token = str_random(30);\n $user->status = User::NOT_VERIFIED;\n $user->save();\n\n return $user;\n }\n\n return User::create([\n 'email' => $data['email'],\n 'name' => $data['name'],\n 'verification_token' => str_random(30)\n ]);\n }", "public function handle_create(RegisterRequest $request)\n {\n $request->validated();\n\n $user = new User;\n\n $user->fullname = $request->fullname;\n $user->username = $request->username;\n $user->email = $request->email;\n\n $user->phone = $request->phone;\n $user->address = $request->address;\n $user->password = Hash::make($request->password);\n\n\n if (\n isset($request->file_img)\n &&\n ($request->file_img->getMimeType() == 'image/png' ||\n $request->file_img->getMimeType() == 'image/jpeg' ||\n $request->file_img->getMimeType() == 'image/jpg')\n && $request->file_img->getSize() <= 5120\n ) {\n $extension = $request->file('file_img')->guessClientExtension();\n $new_name_img = time() . '-' . $request->username . '.' . $extension;\n\n // move image to public images folder\n $request->file_img->move(public_path('images', $new_name_img));\n\n $user->image = $new_name_img;\n }\n $user->create_by = Auth::guard('admin')->user()->username;\n\n $save = $user->save();\n if ($save) {\n return redirect()->route('admin.showuser');\n } else {\n return back()->with('fail', 'an error occurred!');\n }\n }", "public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }", "public static function create() {\n\t\tif (empty(Validator::$errors)) {\n\t\t\tself::insert(self::$tablename, array(\"email\"=>self::$email, \"password_hash\"=>self::$password_hash));\n\t\t\tSession::setFlash(\"alert-success\",\"You have successfully signed up!\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", self::display(Validator::$errors));\n\t\t\tValidator::$errors = [];\n\t\t}\n\t}", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }", "private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht g&uuml;ltig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }", "public function store()\n {\n // Validate form\n $validator = User::registrationValidation();\n $this->validate(request(), $validator);\n\n // Register user\n $registrationParams = User::registrationParams();\n $user = User::create(request($registrationParams));\n\n // Log in user\n User::loginUser($user);\n\n // Redirect to home page\n return redirect('/');\n }", "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "public function create(array $input)\n {\n Validator::make($input, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => $this->passwordRules(),\n 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '',\n ])->validate();\n\n $user = User::create([\n 'name' => $input['name'],\n 'email' => $input['email'],\n 'password' => Hash::make($input['password']),\n 'timezone_id'=> Timezone::getTimezoneId($input['timezone'] ?? null),\n 'role_id'=> $input['role_id'] ?? Role::getDefaultRoleId()\n ]);\n\n $user->notify(new MyAccountRegistration);\n\n // todo: will require a change on role implementation\n User::where('id', '!=', $user->id)->get()->map(function ($admin) use ($user) {\n $admin->notify(new NewUserRegistration($user));\n });\n\n return $user;\n }", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => 'markdownmarkdown@gmail.com',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }", "public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'verifyToken' => Str::random(40)\n ]);\n\n $thisUser = User::findorFail($user->id);\n $this->sendEmail($thisUser);\n \n Session::flash('status','Registered! but verify your email to active your account');\n\n return $user;\n\n }", "public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}", "public function signupUser()\n { \n $user = User::findByUserEmail($this->email);\n if($user == null) { \n $user = new User();\n $user->user_full_name = $this->username;\n if(!empty($this->phone)) {\n $user->phone_number = $this->phone;\n }\n if(!empty($this->email)) { \n $user->email = $this->email;\n }\n $user->password_hash = md5($this->password);\n $user->login_method = 'email';\n $user->save();\n } \n return $user;\n }", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function registration(UserCreateRequest $request)\n {\n $credentials = request()->all(['phone', 'password']);\n\n if ($token = auth()->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n if (User::where('phone', $credentials['phone'])->count() > 0) {\n return response()->json([\n 'errors' => [\n 'wrong' => 'Already exist'\n ]\n ], 401);\n }\n\n $user = User::store($request->all());\n auth()->login($user);\n\n $token = auth()->attempt($credentials);\n return $this->respondWithToken($token);\n }", "public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }", "public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required',\n ]);\n $user = User::create($attributes);\n\n // Auth facades\n auth()->login($user);\n }", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username'=> 'required|alpha_dash|min:3|unique:users,username',\n\t\t\t'display_name'=> 'required',\n\t\t\t'email'=>'email',\n\t\t\t'password'=> 'required',\n\t\t\t'repeat_password'=> 'required|same:password'\n\t\t);\t\n\n\t\t$validation= Validator::make(Input::all(), $rules);\n\n\t\tif ($validation ->fails()) {\n\t\t\treturn Redirect::to('register')\n\t\t\t\t->withErrors($validation)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->password = Hash::make(Input::get('password'));\n\t\t$user->display_name = Input::get('display_name');\n\t\t$user->email = Input::get('email');\n\t\t$user->role = 'user';\n\t\t$user->token = sha1(uniqid());\n\t\t$user->status = 'pending';\n\t\t$user->save();\n\n\t\treturn Redirect::to('/')\n\t\t\t->with('message','User Created, Waiting for Approval');\n\t}", "public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }", "public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }", "public function store(UserCreateRequest $request)\n {\n\t\t\t$user = User::create([\n\t\t\t\t'name' \t\t\t\t=> $request->input('name'),\n\t\t\t\t'lastname' \t\t=> $request->input('lastname'),\n\t\t\t\t'idNumber'\t\t=> $request->input('idNumber'),\n\t\t\t\t'email' \t\t\t=> $request->input('email'),\n\t\t\t\t'phone' \t\t\t=> $request->input('phone'),\n\t\t\t\t'address' \t\t=> $request->input('address'),\n\t\t\t\t'birthdate' \t=> $request->input('birthdate'),\n\t\t\t\t'category_id' => $request->input('category_id'),\n\t\t\t\t'password'\t\t=> 'password', // I NEED TO ADD LOGIN FUNCTIONALITY\n\t\t\t\t'is_admin'\t\t=> 0,\n\t\t\t\t'status' \t\t\t=> 'non live' // As default in the db?\n\t\t\t]);\n\n\t\t\treturn redirect('/users')->with('success', 'User Registered');\n }", "public function register()\n {\n $create_from = $this->request->get_body_params();\n\n $input = (object) array_intersect_key( $create_from,\n array_fill_keys(['username', 'password', 'email'], false)\n );\n\n $update = [\n 'first_name',\n 'last_name',\n ];\n\n /** @var \\WP_Error|integer $user */\n $user_id = \\wp_create_user($input->username, $input->password, $input->email);\n\n if (\\is_wp_error($user_id)) {\n throw new UnauthorizedException($user_id->get_error_message());\n }\n\n /** @var \\WP_User $user */\n $user = \\get_userdata($user_id);\n\n foreach ($update as $att) {\n $user->$att = $create_from[$att];\n }\n\n \\wp_update_user($user);\n\n return $this->response->ok([\n 'message' => sprintf(__('Hello %s', PMLD_TD), $user->nickname),\n 'user' => User::make($user),\n ]);\n\n }", "public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "protected function create(array $data)\n {\n $company = Company::create([\n 'name' => $data['company'],\n 'referrer_id' => Session::pull(self::REFERRER_KEY),\n ]);\n\n $user = new User([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $user->company()->associate($company);\n\n if (!$user->save()) {\n abort(500, 'User registration failure.');\n }\n\n return $user;\n }", "public function register( CreateUserRequest $request ) {\n // store the user in the database\n $credentials = $request->only( 'name', 'email', 'password');\n $credentials[ 'password' ] = bcrypt( $credentials[ 'password' ] );\n $user = User::create($credentials);\n\n // now wire up the provider account (e.g. facebook) to the user, if provided.\n if ( isset( $request['provider'] ) && isset( $request['provider_id'] ) && isset( $request['provider_token'] ) ) {\n $user->accounts()->save( new Account( [\n 'provider' => $request['provider'],\n 'provider_id' => $request['provider_id'],\n 'access_token' => $request['provider_token'],\n ] ) );\n }\n\n // return the JWT to the user\n $token = JWTAuth::fromUser( $user );\n return response( compact( 'token' ), 200 );\n }", "public function store() \n\t{\n\t\t$input = Input::all();\n\t\t$validation = $this->validator->on('create')->with($input);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles(\"orchestra::users/create\"))\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($validation);\n\t\t}\n\n\t\t$user = App::make('orchestra.user');\n\t\t$user->status = User::UNVERIFIED;\n\t\t$user->password = $input['password'];\n\n\t\t$this->saving($user, $input, 'create');\n\n\t\treturn Redirect::to(handles('orchestra::users'));\n\t}", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }", "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Your email address is not in a valid email format\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_last = $this->db_connection->real_escape_string(strip_tags($_POST['user_last'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, that username / email address is already taken. </div>\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_last, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_last . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"<div class='alert alert-success center' role='alert'> Your account has been created successfully. Please check your emails.</div>\";\n\n // Load username and datejoined for verifcation via email hashing\n $sql=\"SELECT `user_id`, `user_name`, `user_date_joined` FROM `users` WHERE `user_email` = '\" . $user_email . \"';\";\n $query_load_hash_verify = $this->db_connection->query($sql);\n\n // if loaded then include send email and display message\n if ( $query_load_hash_verify) {\n $result_row = $query_load_hash_verify -> fetch_object();\n $codeid = $result_row->user_id;\n $code2 = md5($result_row->user_name);\n $code3 = md5($result_row->user_date_joined);\n\n // created a hash of when the user joined split it into two parts\n $cuthashtime = substr($code3, 0, 4);\n $endhashtime = substr($code3, -4); \n\n $hashedname = $code2;\n $middlehashname = substr($hashedname, 0, 4);\n\n include 'Email.php';\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, but we couldn't send your email. Please contact support.</div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, your registration failed. Please go back and try again. </div>\";\n }\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, no database connection. </div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> An unknown error occurred. </div>\";\n }\n }", "public function registerViaRequest()\n {\n return User::create(array_merge([\n 'password' => bcrypt(input('password')),\n ], only('email', 'name', 'is_public')));\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'role_id' => '3',\n 'status' => '0',\n 'territory' => $data['territory'],\n 'password' => bcrypt($data['password']),\n ]);\n $user->assignRole('client');\n try {\n EmailHelper::emailConfigChanges('user');\n Mail::send('emails.confirm-email', ['user' => $user, 'password' => false], function ($message) use ($user) {\n $message->from(config('mail.from.address'), config('mail.from.name'));\n $message->to($user->email);\n $message->bcc(config('site.bcc_users'));\n $message->subject(config('mail.from.name') . ': Verify your online account.');\n });\n } catch (\\Exception $e) {\n Log::info($e);\n }\n return $user;\n }", "public function store(CreateUserRequest $request)\n {\n\n // Try creating new user\n $newUser = User::createUserWithProfile($request->all());\n\n // Event new registered user\n event(new Registered($newUser));\n // Send user registered notification\n $newUser->sendUserRegisteredNotification();\n\n // Check if user need to verify email if not app will try to login the new user\n if (config('access.users.verify_email')) {\n // Send Email for Verification\n $newUser->sendEmailVerificationNotification();\n }\n\n return $newUser->sendResponse();\n }", "protected function create(array $data)\n {\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'user_type' => $data['user_type'],\n 'active' => true,\n 'confirmed' => true,\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n ]);\n\n // See if adding any additional permissions\n // if (! isset($data['permissions']) || ! count($data['permissions'])) {\n // $data['permissions'] = [];\n // }\n\n if ($user) {\n // User must have at least one role\n // if (! count($data['roles'])) {\n // throw new GeneralException(__('This User Needs atleast One Role'));\n // }\n\n // Add selected roles/permissions\n // $user->syncRoles($data['roles']);\n // $user->syncPermissions($data['permissions']);\n $user->assignRole('Organisation Superadmin');\n $user ->givePermissionTo('View Backend');\n\n //Send confirmation email if requested and account approval is off\n // if (isset($data['confirmation_email']) && $user->confirmed == 0 && ! config('access.users.requires_approval')) {\n // $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n // }\n\n // event(new UserCreated($user));\n\n return $user;\n }\n\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }", "protected function createUser()\n {\n $this->question('Enter your details for the admin user.');\n\n $user = \\App\\User::create([\n 'name' => $this->ask('Name', 'Admin'),\n 'email' => $this->ask('Email address', 'noreply@'.str_replace(['http://', 'https://'], '', config('app.url'))),\n 'password' => Hash::make($this->ask('Password')),\n ]);\n \n $this->info(\"Admin user created successfully. You can log in with username {$user->email}\");\n }", "public function createBlankUser()\r\n {\r\n $user = CrugeFactory::get()->getICrugeStoredUserNewModel();\r\n if ($user != null) {\r\n // asegura que no falle al validar por terminos y condiciones\r\n $user->terminosYCondiciones = true;\r\n // asegura que no falle al validar por captcha\r\n //\tcruge\\models\\data\\CrugeStoredUser.php (bypassCaptcha y _getCaptchaRule)\r\n $user->bypassCaptcha = true;\r\n return $user;\r\n } else {\r\n return null;\r\n }\r\n }", "public function newUser($user)\n\t{\n\t\t$input = $user;\n\t\t$rules = array(\n\t\t\t'username' => 'required|alpha_num|max:25|unique:users',\n\t\t\t'password' => 'required|min:8|max:25|confirmed',\n\t\t\t'dob' => 'required|before:'.date('Y-m-d', strtotime('-13 years')),\n\t\t\t'gender' => 'required|in:M,F',\n\t\t\t'email' => 'required|email|unique:users',\n\t\t\t'location' => 'regex:/[a-zA-Z0-9 \\-_]*/',\n\t\t\t'wug_api' => 'required_with:location|alpha_num'\n\t\t);\n\n\t\t$validation = Validator::make($input, $rules);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t return $validation->messages();\n\t\t}\n\n\t\t$api = new Api();\n\t\t$key = $api->randomString(40);\n\n\t\t$loc_id = NULL;\n\n\t\tif(!empty($input['location'])) {\n\t\t\t$loc = new Location();\n\t\t\t$loc_id = $loc->insertGetId(array(\n\t\t\t\t'location' => $input['location'],\n\t\t\t\t'wug_api' => $input['wug_api'],\n\t\t\t));\n\t\t}\n\n\t\t$user = new User();\n\t\t$user->api_key = $key;\n\t\t$user->username = $input['username'];\n\t\t$user->password = Hash::make($input['password']);\n\t\t$user->dob = $input['dob'];\n\t\t$user->gender = $input['gender'];\n\t\t$user->location_id = $loc_id;\n\t\t$user->email = $input['email'];\n\n\t\t$user->save();\n\n\t\treturn true;\n\t}", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }", "public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "public function execute(array $data) : User\n {\n $data['password'] = Hash::make($data['password']);\n\n //We will create activation code to be used for Email Confirmation\n $data['activation_token'] = QioskApp::createToken('email');\n\n //Now we create the user by adding it to our database\n $user = $this->User::create($data);\n\n //throws an exception if user hasnt yet created\n if (!$user) {\n throw new CustomException('Registration falied!', 500);\n }\n\n //dispatch an event to send confirmation email and log user creation\n event(new $this->signedUpEvent($user));\n\n return $user;\n }", "public function createRegister(){\n\t\t$userRepo = new UserRepository(App::getInstance());\n\n\t\t//check if user exists first. Search user by email.\n\t\t$user = $userRepo->getUserByEmail($_POST['email']);\n\t\tif($user!=null){\n\t\t\t//Error Message\n\t\t\treturn view('newRegForm')->with('error', true);\n\t\t}\n\n\t\telse{\n\t\t\t//Creates a new user and then returns ALL the registers to the view\n\t\t\t$user = new User($_POST);\n\t\t\t$user = $userRepo->create($user);\n\t\t\t$user = $userRepo->selectAll();\n\n\t\t\treturn view('viewRegisters')->with(['users'=>$user,'error'=>false]);\n\t\t}\n\t}", "public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function signup()\n {\n if ($this->validate()) {\n $user = new User();\n $user->username = $this->username;\n $user->first_name = $this->firstName;\n $user->last_name = $this->lastName;\n $user->email = $this->email;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->ip = Yii::$app->request->getUserIP();\n $user->ua = Yii::$app->request->getUserAgent();\n if ($user->save()) {\n $this->user = $user;\n $this->sendMail();\n return $user;\n }\n }\n\n return false;\n }", "protected function create(array $data)\n {\n $userData = Request::all();\n $confirmationCode = str_random(30);\n\n $fields = [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ];\n if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {\n $fields['username'] = $data['username'];\n }\n\n //return User::create($fields);\n //create user with role and permisssion\n $user = new User;\n $user->name = $userData['name'];\n $user->email = $userData['email'];\n $user->password = Hash::make($userData['password']);\n $user->confirmation_code = $confirmationCode;\n $user->save();\n\n //adding roles to a user\n $user->assignRole('user');\n //adding permissions to a user\n $user->givePermissionTo('edit not allowed');\n //user id $user->id\n //save userlocation info\n $this->SaveUserMeta($user->id, \"182.185.148.11\");\n //send verification email.\n $this->SendActivationEmail($confirmationCode);\n\n return $user;\n\n }", "public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }", "public function registerUser() {\n $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|is_unique[user.username]',\n array('min_length' => 'Username length has to be between 5 & 12 characters.',\n 'max_length' => 'Username length has to be between 5 & 12 characters.',\n 'is_unique' => 'Username is already in use.'));\n $this->form_validation->set_rules('password', 'Password', 'required|min_length[8]|max_length[16]|matches[confirmPassword]',\n array('min_length' => 'Password length has to be between 8 & 16 characters.',\n 'max_length' => 'Password length has to be between 8 & 16 characters.',\n 'matches' => 'Passwords do not match.'));\n $this->form_validation->set_rules('confirmPassword', 'Password Confirmation', 'required');\n $this->form_validation->set_rules('emailAddress', 'Email Address', 'trim|required|valid_email|is_unique[user.userEmail]',\n array('valid_email' => 'Email is not valid.',\n 'is_unique' => 'Email is already in use.'));\n\n if ($this->form_validation->run() == FALSE) {\n $this->registration();\n\n } else {\n $formUsername = $this->input->post('username');\n $formPassword = $this->input->post('password');\n $formEmailAddress = $this->input->post('emailAddress');\n $this->UserManager->registerUser($formUsername, $formPassword, $formEmailAddress);\n $this->login();\n }\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'status' => 'active'\n ]);\n\n $user->profile()->create($data['profile']);\n $user->travelInformation()->create($data['travel']);\n\n return $user;\n }", "public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }", "public function save(CreateUserRequest $request)\n {\n $this->authorize('create', User::class);\n\n $pass = $this->get_password($request);\n $user = User::create([\n 'name' => $request->input('name'),\n 'phone_number' => $request->input('phone_number'),\n 'email' => $request->input('email'),\n 'password' => bcrypt($pass),\n 'role_id' => $request->input('role_id', 3)\n ]);\n\n $user->notify(new AdminUserCreated($user, $pass));\n\n return redirect()->route('active_user', $user->id);\n }", "public function create(CreateUserRequest $request) {\n $user = $request->commit();\n\n //Trigger user edited event\n event(new UserCreated($user));\n\n //Reloads page\n return redirect()->action('Platform\\UserController@edit', $user)->with('alert', [\n 'type' => 'success',\n 'message' => 'User created'\n ]);\n }", "function register_user() {\n\t\tglobal $ID, $lang, $conf, $auth, $yubikey_associations;\n\n\t\tif(!$auth->canDo('addUser')) return false;\n\n\t\t$_POST['login'] = $_POST['nickname'];\n\n\t\t// clean username\n\t\t$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);\n\t\t$_POST['login'] = cleanID($_POST['login']);\n\t\t// clean fullname and email\n\t\t$_POST['fullname'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['fullname']));\n\t\t$_POST['email'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['email']));\n\n\t\tif (empty($_POST['login']) || empty($_POST['fullname']) || empty($_POST['email'])) {\n\t\t\tmsg($lang['regmissing'], -1);\n\t\t\treturn false;\n\t\t} else if (!mail_isvalid($_POST['email'])) {\n\t\t\tmsg($lang['regbadmail'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// okay try to create the user\n\t\tif (!$auth->createUser($_POST['login'], auth_pwgen(), $_POST['fullname'], $_POST['email'])) {\n\t\t\tmsg($lang['reguexists'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $_POST['login'];\n\t\t$yubikey = $_SERVER['REMOTE_USER'];\n\n\t\t// if our yubikey id is based on a non-registered user, we need to chunk off the \"yubikey:\"\n\t\t// part of it\n\t\tif (preg_match('!^yubikey:!', $yubikey)) {\n\t\t\t$yubikey = substr($yubikey, 8);\n\t\t}\n\n\t\t// we update the YubiKey associations array\n\t\t$this->register_yubikey_association($user, $yubikey);\n\n\t\t$this->update_session($user);\n\n\t\t// account created, everything OK\n\t\t$this->_redirect(wl($ID));\n\t}", "public function store(UserCreateRequest $request): UserResource\n {\n /* Convert request to array */\n $data = $request->all();\n\n /* Hashing password */\n $data['password'] = bcrypt($request->input('password'));\n\n /* Store data to database */\n $user = User::create($data);\n\n /* Send Register email to the user */\n event(new Registered($user));\n\n activity(\"Admin\")\n ->on($user)\n ->withProperties([\n ['IP' => $request->ip()],\n ['user_data' => $request->all()],\n ])\n ->log('Store a user');\n\n return new UserResource($user->loadMissing('plans'));\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.706826", "0.70554525", "0.7055291", "0.7033631", "0.7026784", "0.70149404", "0.70132315", "0.69851196", "0.6964616", "0.695086", "0.6941911", "0.6941205", "0.69300467", "0.6901686", "0.68745273", "0.6854613", "0.6849693", "0.68476766", "0.6847447", "0.6837731", "0.682097", "0.6814089", "0.6806235", "0.67993814", "0.67931235", "0.6783314", "0.6782719", "0.678171", "0.6778698", "0.67755586", "0.67709005", "0.67694837", "0.6768079", "0.6756934", "0.67446995", "0.67405665", "0.6738445", "0.673286", "0.67255026", "0.67174953", "0.671197", "0.66984844", "0.66933024", "0.6691878", "0.6691874", "0.669181", "0.66914505", "0.66904813", "0.66883856", "0.6682501", "0.66823685", "0.6680357", "0.66773355", "0.66739744", "0.6673674", "0.6671424", "0.6666521", "0.66582483", "0.6656376", "0.6650788", "0.66468096", "0.6645676", "0.66385514", "0.6634876", "0.6629156", "0.66243297", "0.66243136", "0.66239494", "0.66212934", "0.66176444", "0.6614809", "0.6607175", "0.6601911", "0.66013247", "0.65973485", "0.6595453", "0.65950507", "0.65944815", "0.6586079", "0.65689844" ]
0.0
-1
Create log record and return ID.
public function create($data = array(), $meta = array()) { $data = array_merge($this->getLogDefaults(), $data); $meta = array_merge($this->getMetaDefaults(), $meta); // Insert log record if ($id = $this->createQuery($data)) { // Add meta values foreach ($meta as $key => $value) { $this->createMetaQuery($id, $key, $value); } return $id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRecord();", "protected function createEntity()\n {\n return (new LogRecord());\n }", "public function new_log_entry( $log ) {\n\t\t$post_id = wp_insert_post(\n\t\t\t[\n\t\t\t\t'post_title' => $log->get_subject(),\n\t\t\t\t'post_content' => $log->get_body(),\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'post_type' => $this->post_type,\n\t\t\t\t'meta_input' => [\n\t\t\t\t\t'recipients' => wp_json_encode( $log->get_recipients() ),\n\t\t\t\t\t'headers' => wp_json_encode( $log->get_headers() ),\n\t\t\t\t\t'attachments' => $log->get_attachments(),\n\t\t\t\t\t'timestamp' => $log->get_timestamp(),\n\t\t\t\t\t'error' => $log->get_error(),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\treturn $post_id;\n\t}", "function saveLog($logRecord, $logID)\n {\n // Define the query to determine whether to update or insert\n $logQuery = (is_null($logID)) ? null : array('id' => $logID);\n \n // Now run the insert/update, returning the ID\n return $this->_upsert($logRecord, $logQuery);\n }", "public function createPost($record) {\n if ( ! isset($record['created']) ) $record['created'] = time();\n $this->db->insert( $this->getTable(), $record );\n $id = $this->db->insert_id();\n\n $this->set('id', $id); // set id for the entity.\n\n if ( ! isset($record['id_root']) || empty($record['id_root']) ) {\n $this->update('id_root', $id);\n }\n\n return post_data($id);\n }", "public function newRecord($data,$module=\"Leads\") {\r\n \r\n \r\n //if(count($data)&lt;=0)return \"\";\r\n $records = [];\r\n try{\r\n \r\n $record = ZCRMRecord::getInstance( $module, null );\r\n foreach($data as $d=>$v)\r\n $record->setFieldValue($d, $v);\r\n \r\n\r\n $records[] = $record;\r\n \r\n $zcrmModuleIns = ZCRMModule::getInstance($module);\r\n $bulkAPIResponse=$zcrmModuleIns->createRecords($records); // $recordsArray - array of ZCRMRecord instances filled with required data for creation.\r\n $entityResponses = $bulkAPIResponse->getEntityResponses();\r\n \r\n foreach($entityResponses as $entityResponse){\r\n if(\"success\"==$entityResponse->getStatus()){\r\n $createdRecordInstance=$entityResponse->getData();\r\n return $createdRecordInstance->getEntityId();\r\n \r\n }\r\n else{\r\n $file_names = __DIR__.\"/zoho_ERROR_ADDNEW_log.txt\";\r\n \t\t\t\t file_put_contents($file_names, (json_encode($entityResponses)).PHP_EOL , FILE_APPEND | LOCK_EX);\t\r\n \t\t\t\t return \"-1\";\r\n }\r\n }\r\n \r\n \r\n }catch(Exception $e){\r\n $file_names = __DIR__.\"/zoho_ERROR_ADDNEW_log.txt\";\r\n\t\t\t\t file_put_contents($file_names, $e.PHP_EOL , FILE_APPEND | LOCK_EX);\t\r\n return \"\";\r\n }\r\n \r\n \r\n }", "public function createRecord(\n $loggerNamespace,\n $loggerClass,\n $loggerMethod,\n $namespace,\n $class,\n $method,\n $level,\n $filename,\n $lineno,\n $msg,\n array $args,\n \\Exception $exception = null\n );", "public function create() {\n global $db;\n $this->_precreate();\n $sql_keys = ''; $sql_values = '';\n $data = array();\n foreach($this->_magicProperties as $key=>$value)\n {\n $sql_keys .= \"`\".addslashes($key).\"`,\";\n $sql_values .= \"?,\";\n $data[] = $value;\n }\n $sql_keys = substr($sql_keys, 0, -1);\n $sql_values = substr($sql_values, 0, -1);\n\n $query = \"INSERT INTO {$this->table} ($sql_keys) VALUES ($sql_values);\";\n $result = $db->query($query,$data);\n if (!isset($this->_magicProperties['id']) || !$this->_magicProperties['id']) {\n $id = $db->lastInsertId();\n $this->{'set'.$this->id_field}($id);\n }\n $this->loaded = true;\n $this->_postcreate($result);\n return $this->id;\n }", "private function generateTraceId()\n {\n $this->setTraceId($this->generateId());\n }", "private function create_entry_from_db_record( $record ) {\n\t\tif ( empty( $record ) ) {\n\t\t\treturn new ActionScheduler_NullLogEntry();\n\t\t}\n\n\t\t$date = as_get_datetime_object( $record->log_date_gmt );\n\n\t\treturn new ActionScheduler_LogEntry( $record->action_id, $record->message, $date );\n\t}", "function create_run_log() {\n\n\t\t$this->log = new Log();\n\t\t$this->log->set_workflow_id( $this->get_id() );\n\t\t$this->log->set_date( new DateTime() );\n\n\t\tif ( $this->is_tracking_enabled() ) {\n\t\t\t$this->log->set_tracking_enabled( true );\n\n\t\t\tif ( $this->is_conversion_tracking_enabled() ) {\n\t\t\t\t$this->log->set_conversion_tracking_enabled( true );\n\t\t\t}\n\t\t}\n\n\t\t$this->log->save();\n\t\t$this->log->store_data_layer( $this->data_layer() );\n\n\t\tdo_action( 'automatewoo_create_run_log', $this->log, $this );\n\t}", "private function create() {\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (!empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toCreat();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to create!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute insert.\n\t\t$this->objAccessCrud->setDateInsert(date(\"Y-m-d H:i:s\"));\n\t\t$id = $this->objAccessCrud->create ();\n\t\t// Check result.\n\t\tif ($id == 0) {\n \t\t\t$this->msg->setError ('There were issues on creating ther record!');\n\t\t\t\treturn;\n\t\t}\n\t\t// Save the id in the session to be used in the update.\n\t\t$_SESSION ['PK']['ACCESSCRUD'] = $id;\n\t\t\t\n\t\t$this->msg->setSuccess ( 'Created the record with success!' );\n\t\treturn;\n\t}", "public function log ($severity, $subject, $details) {\n\t\t# create the record\n\t\t#\n\t\t# For the timestamp, we want int64 timestamp_microseconds_value (since Jan 1 1970)\n\t\t# See https://cloud.google.com/datastore/docs/concepts/entities#Datastore_Properties_and_value_types\n\t\t# $microtime_parts = explode ( ' ', microtime());\n\t\t# $timestamp = intval($microtime_parts[1]) + intval($microtime_parts[0]);\n\t\t# Never mind! The library is casting everything through DateTime so no sub-second resolution\n\t\t\n\t\t$entry = $this->log_db->createEntity([\n\t\t\t'timestamp' => new DateTime(),\n\t\t\t'severity' => $severity,\n\t\t\t'subject' => $subject,\n\t\t\t'x_details' => $details\n\t\t]);\n\t\t$bol_result1 = $this->log_db->upsert($entry);\n\t}", "public function create_log($login_id)\n {\n $this->db->insert('login_log', array(\n 'login_id' => $login_id,\n 'lasttime' => date('Y-m-d H:i:s'),\n 'agent' => json_encode(array(\n 'is_mobile' => ($this->agent->is_mobile()) ? 1 : 0,\n 'browser' => ($this->agent->is_browser()) ? $this->agent->browser() . ' ' . $this->agent->version() : '',\n 'platform' => $this->agent->platform(),\n 'agent_string' => $this->agent->agent_string(),\n 'ip' => get_ip(),\n ))\n ));\n\n return $this->db->insert_id();\n }", "public function createRecord(string $type, array $data): string\n {\n $url = $this->generateUrl('sobjects/' . $type);\n\n $response = $this->makeRequest(\n 'post',\n $url,\n [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => $this->getAuthHeader()\n ],\n 'body' => json_encode($data)\n ]\n );\n\n return $response['id'];\n }", "function inbound_record_log( $title = '', $message = '', $rule_id = 0, $job_id = '', $type = null ) {\n\tglobal $inbound_automation_logs;\n\t$inbound_automation_logs->add( $title, $message, $rule_id, $job_id, $type );\n\n}", "protected function createEntryRecord() {\n\n\t\t$lot = CqlixHistory::getInstance()->getEntryLotRecord();\n\t\t$modelName = $this->model->getTable()->getModelName();\n\n\t\treturn HistoryEntry::create(array(\n\t\t\t'history_id' => $this->historyRecord->getId(),\n\t\t\t'Lot' => $lot,\n\t\t\t'model' => $modelName,\n\t\t\t'model_id' => $this->model->getPrimaryKeyValue(),\n\t\t\t'operation' => $this->operation,\n\t\t));\n\t}", "function save() {\n\n\n Debug::printMsg('<h2>Saving '.$this->className.'</h2>');\n\n if($this->hasErrors())\n throw new Exception('Can not save! Errors found!'.print_r($this->errors));\n \n // make record id\n if($this->insertMe()) {\n Debug::printMsg('<p>InsertMe() gave: '.$this->id.'</p>');\n } else {\n Debug::printMsg('<p><span style=\"color:red\">Record is empty!</span></p>');\n return 0;\n }\n\n // save records (if needed) and link them\n if(is_array($this->data)) {\n foreach($this->data as $obj) {\n $obj->save();\n $obj->link($this);\n }\n }\n\n // if this is Place, then add it to place hierarchy (under 0 node by default)\n $val = XML::order($this->classNameFull);\n if($val) {\n IdaDb::insert2PreOrderedTree(\"_sys_\".$val.\"order\", $this->id, 0);\n }\n \n $this->logXML->firstChild->setAttribute(\"id\", $this->id);\n IdaLog::saveXML($this->logXML->saveXML(), $this->id);\n return $this->id;\n \n }", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "private function createRecord($entityName, array $data) {\n $response = $this->callRaynetcrmRestApi($entityName, self::HTTP_METHOD_PUT, $data);\n $body = Json::decode($response->getBody());\n\n if ($response->getStatusCode() === self::HTTP_CODE_CREATED) {\n return $body->data->id;\n } else {\n throw new RaynetGenericException(\n $body->translatedMessage ? $body->translatedMessage : $body->message,\n $response->getStatusCode()\n );\n }\n }", "public function create($row)\n\t{\n\t\t$this->db->insert('tournaments', $row);\n\t\treturn $this->db->insert_id();\n\t}", "public function create()\n {\n $this->db->query('INSERT INTO ' . $this->db->tableName('p_democracy_votes') . ' (' . $this->db->fieldName('voting_id') . ', ' . $this->db->fieldName('player_id') . ', ' . $this->db->fieldName('type') . ', ' . $this->db->fieldName('comment') . ') VALUES (0, 0, 0, '');\n\n // reads created voting's ID\n $this->data['id'] = $this->db->lastInsertId();\n\n // return name of newly created \n return $id;\n }", "function add_audit($params){\n $this->db->insert('audit',$params);\n $id = $this->db->insert_id();\n\t\t$db_error = $this->db->error();\n\t\tif (!empty($db_error['code'])){\n\t\t\techo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n\t\t\texit;\n\t\t}\n\t\treturn $id;\n }", "abstract public function insertID();", "public function create($id)\n {\n //\n return \"这里是create:\".$id;\n }", "private function newActivityLog()\n {\n return factory(ActivityLog::class)->create([\n 'user_id' => 1,\n 'log_activity' => 'Log created from testing suite.'\n ]);\n }", "protected function recordLastTransactionID()\n {\n }", "public function createRecord($request){\n\t}", "public function create_a_record()\n {\n // Add a record\n factory(Email::class, 1)->create();\n\n $this->assertCount(1, Email::all());\n }", "public function getRecordId()\n {\n return $this->get(self::_RECORD_ID);\n }", "static function add_a_lead($lead_id, $log){\n\t\tglobal $wpdb;\n\t\t$table = self::get_offline_table();\n\t\t\n\t\treturn $wpdb->insert($table, array('lead_id'=>$lead_id, 'log'=>serialize($log)), array('%d', '%s'));\n\t}", "public function getRecordId()\n {\n return isset($this->fields['id']) ?\n $this->fields['id'] : '';\n }", "function create($data) {\n $ID = guid();\n\n if ($this->_insert($ID, $data)) {\n return $ID;\n }\n\n return FALSE;\n }", "public function getLogId() {\n\t\treturn $this->logId;\n\t}", "function create($data){\n $data['created_at'] = date('Y-m-d H:i:s');\n $data['updated_at'] = date('Y-m-d H:i:s');\n\t\t$this->db->insert($this->table, $data);\n\t\treturn $this->db->insert_id();\n\t}", "public function create(Tinebase_Record_Interface $_record) {\n }", "public function getRecordId()\n {\n return $this->record_id;\n }", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public static function addPartyOrderRequestLog($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('party_id', $poRequestParamDetails)){\n if($poRequestParamDetails['party_id']!=''){\n $sqlColumnNames.=\" party_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_id'].\"',\";\n }\n }\n if(array_key_exists('description', $poRequestParamDetails)){\n if($poRequestParamDetails['description']!=''){\n $sqlColumnNames.=\" description,\";\n $sqlValues.=\"'\".$poRequestParamDetails['description'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST_LOG \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "public function saveToDB()\r\n\t{\r\n\t\t$date = new DateTime();\r\n\t\t$this->timestamp = date('Y-m-d H:i:s',$date->getTimestamp());\r\n\t\t$con = db_connect();\r\n\t\t\r\n\t\t//user, game, timestamp, text, building, card, location, icon\r\n\t\t$this->user!=null ? $userid=$this->user->getUserID() : $userid=null;\r\n\t\t$this->game!=null ? $gameID=$this->game->getGameID() : $gameID=null;\r\n\t\t$this->building!=null ? $buildingID=$this->building->getBuildingID() : $buildingID=null;\r\n\t\t$this->card!=null ? $cardID=$this->card->getCardID() : $cardID=null;\r\n\t\t\r\n\t\t$statement = $con->prepare('Insert into logger (user, game, timestamp, text, building, card, location, icon) values (?,?,?,?,?,?,?,?)');\r\n\t\t$statement->execute(array($userid,$gameID,$this->timestamp,$this->Text,$buildingID,$cardID,$this->location->locationID, $this->icon));\r\n\t\t\r\n\t\t$id = $con->lastInsertId();\r\n\t\t$con = null;\r\n\t\treturn $id;\r\n\t}", "public function getRecordId()\n {\n return $this->recordId;\n }", "public function getRecordId()\n {\n return $this->recordId;\n }", "public function create($data_id, $created_by, $created_at);", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "public function new($params)\r\n {\r\n $insert_id = $this->insert($params);\r\n return $insert_id;\r\n }", "public function insertHistoryRecord($fields) {\r\n //insert the history record\r\n $this->db->insert('return_delete_history', $fields);\r\n\r\n return $this->db->insert_id();\r\n }", "function saveToRecord() {\n\t\t$fields_values = $this->toArray();\n\t\t$fields_values['tstamp'] = mktime();\n\t\t$fields_values['crdate'] = mktime();\n\t\tunset($fields_values['uid']);\n\t\t\n\t\t// If we have a non-zero UID, update an existing record, otherwise create a new record\n\t\tif($this->getUID()) {\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_wecassessment_result', 'uid=' . $this->getUID(), $fields_values);\n\t\t} else {\n\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_wecassessment_result', $fields_values);\n\t\t\t$this->setUID($GLOBALS['TYPO3_DB']->sql_insert_id());\t\t\t\n\t\t}\n\t\t\n\t\t$answers = $this->getAnswers();\n\t\tforeach((array) $answers as $answer) {\n\t\t\t$answer->setResultUID($this->getUID());\n\t\t\t$answer->save();\n\t\t}\n\t\t\n\t\t// Blow up session data\n\t\ttx_wecassessment_sessiondata::storeSessionData(null, $this->getPID());\n\t\t\n\t\treturn $this->_uid;\n\t}", "function create($dataInfo)\n {\n $this->db->trans_start();\n $parent = $this->getById($dataInfo['parent_id']);\n $dataInfo['level'] = $parent->level + 1;\n $this->db->insert($this->tablename, $dataInfo);\n \n $insert_id = $this->db->insert_id();\n \n $this->refreshDestination();\n \n $this->db->trans_complete();\n\n return $insert_id;\n }", "function insertId();", "public function store(Request $request)\n\t{ \n\t\t$newlog = new NewLog;\n\t\t$newlog->incident_no = $request->incident_no;\n\t\t$newlog->start_date = $request->start_date;\n\t\t$newlog->customer_id = $request->customer_id;\n\t\t$newlog->caller_person = $request->caller_person;\n\t\t$newlog->hp_no = $request->hp_no;\n\t\t$newlog->office_no = $request->office_no;\n\t\t$newlog->extension_no = $request->extension_no;\n\t\t$newlog->email = $request->email;\n\t\t$newlog->total_downtime = $request->total_downtime;\n\t\t$newlog->status = $request->status;\n\t\t$newlog->save();\n\n\t\t\n\t\t// $newlog->description = $request->description;\n\t\t// $newlog->remarks = $request->remarks;\n\t\t// $newlog->file = $request->file;\n\t\t\n\n\t\t// $newlog->received_via = $request->received_via;\n\t\t// $newlog->customer_report_no = $request->customer_report_no;\n\t\t// $newlog->category_id = $request->category_id;\n\t\t// $newlog->problem_type = $request->problem_type;\n\t\t// $newlog->sla_code = $request->sla_code;\n\t\t// $newlog->severity = $request->severity;\n\t\t// $newlog->asset_sn = $request->asset_sn;\n\t\t// $newlog->vendor = $request->vendor;\n\t\t// $newlog->coordinator_name = $request->coordinator_name;\n\t\t// $newlog->coordinator_hp_no = $request->coordinator_hp_no;\n\t\t// $newlog->coordinator_team = $request->coordinator_team;\n\t\t\n\n\t\t// dd($newlog);\n\t\treturn redirect()->route('newlog.index')->withStatus('New Log has been created.');\n\n\t}", "public function createRecord(array $data);", "public function create(){\n\n $id=0;\n $attributes = $this->prepared_attributes_insert();\n\t\t\n\t $sql = \"INSERT INTO \".static::$table_name.\" (\";\n\t $sql .= join(\",\",array_keys($attributes));\n\t $sql .= \") VALUES (\"; \n $sql .= join(\",\",array_values($attributes));\t\t \n $sql .= \") \";\n \n $idf = static::$id_field;\n \n $this->{static::$id_field} = static::db()->insert($sql);\n static::db()->free_statement();\n if (static::$idf !== -1)\n {\n\t return true;\n\t } else {\n\t return false;\n\t }\n }", "private function generateTraceIdIfNeeded()\n {\n if (empty($this->traceId)) {\n $this->traceId = Uuid::uuid4()->toString();\n }\n }", "public function get_uid() {\n\t\treturn 'create';\n\t}", "function create () {\n\t\t$stm = DB::$pdo->prepare(\"insert into `generated_object` ({$generator_insert_columns}) \n\t\t\t\t\t\t\t\t values ({$generator_insert_values})\");\n\t\t// generator bind hook\n\t\t$stm->execute();\n\n\t\t$this->id = DB::$pdo->lastInsertId();\n\t}", "public static function createAccessLog($idPerson, $idFingerprint, Zend_Date $timestamp, Zend_Date $created, $idEventType, $note)\n {\n $newAccessLog = new AccessLog();\n $newAccessLog->setIdPerson($idPerson);\n $newAccessLog->setIdFingerprint($idFingerprint);\n $newAccessLog->setTimestamp($timestamp);\n $newAccessLog->setCreated($created);\n $newAccessLog->setIdEventType($idEventType);\n $newAccessLog->setNote($note);\n return $newAccessLog;\n }", "public function uploadNewTicket() {\n if (func_num_args() > 0) {\n $data = func_get_arg(0);\n try {\n $responseId = $this->insert($data);\n } catch (Exception $e) {\n throw new Exception($e);\n }\n if ($responseId) {\n return $responseId;\n }\n } else {\n throw new Exception('Argument Not Passed');\n }\n }", "public function insert () {\n\t\t$GLOBALS[\"logger\"]->debug(\"report:insert\");\n\t\t\n\t\t$newRec = ORM::for_table (self::REPORT_TABLE)->create();\n\t\t$newRec->clip_id = $this->clip->id;\n\t\t$newRec->master_id = $this->masterId;\n\t\t$sngid = NULL;\n\t\tif (!is_null($this->song)) {\n\t\t\t$GLOBALS[\"logger\"]->debug('There is a song with ID ' . $this->song->id);\n\t\t\t$sngid = $this->song->id;\n\t\t}\n\t\t$newRec->song_id = $sngid;\n\t\t$newRec->singalong = $this->singalong;\n\t\t$newRec->seq_num = $this->seqNum;\n\t\t$newRec->user_id = $this->user->id;\n\t\t$newRec->sound_type = $this->soundType;\n\t\t$newRec->sound_subtype = $this->soundSubtype;\n\t\t$newRec->performer_type = $this->performerType;\n\t\t$newRec->flagged = $this->flagged;\n\t\t$GLOBALS[\"logger\"]->debug(\"Saving newRec\");\n\t\t$newRec->save();\n\t\t$GLOBALS[\"logger\"]->debug(\"insert: saved new record into reports table\");\n\t\t$this->id = $newRec->id();\n//\t\t$insstmt = \"INSERT INTO REPORTS (CLIP_ID, MASTER_ID, SEQ_NUM, USER_ID, SOUND_TYPE, \" .\n//\t\t\t\" SOUND_SUBTYPE, SONG_ID, PERFORMER_TYPE, SINGALONG, FLAGGED) \" .\n//\t\t\t\" VALUES ($clpid, $mstrid, $seqn, $usrid, $sndtyp, $sndsbtyp, $sngid, $prftyp, $sngalng, $flgd)\";\n\t\t$this->writePerformers();\n\t\t$this->writeInstruments();\n\t\treturn $newRec->id();\n\t}", "abstract public function insert_id();", "function InsertRecord($post) {\n $this->db->insert('purchase',$post);\n $last_id = $this->db->insert_id();\n return $last_id;\n }", "public function test_create_called_shouldReturnAnUniqueIdentificator()\n {\n $expected = 10;\n $actual = CastilloTicketId::create();\n $this->assertEquals($expected,strlen($actual->id()));\n }", "public function insert_id();", "public static function createAccessLogInternal($idAccessLog, $idPerson, $idFingerprint, Zend_Date $timestamp, Zend_Date $created, $idEventType, $note)\n {\n $newAccessLog = AccessLogFactory::createAccessLog($idPerson, $idFingerprint, $timestamp, $created, $idEventType, $note);\n $newAccessLog->setIdAccessLog($idAccessLog);\n return $newAccessLog;\n }", "public function create()\n\t{\n\t\tdebugInfo(get_class($this).\"->create()\");\n\t\tglobal $config;\n\n\t\t// Add set from $config['model'] {'_status', '_comment'}\n\t\t$this->set($config['model']);\n\n\t\t// INSERT\n\t\t$this->_query = $this->_insert();\n\n\t\t// execute SQL request without Result (false)\n\t\tif ($this->_execute(false) === false) {\n\t\t\t$return = false;\n\t\t} else {\n\t\t\t$return = $this->_db->lastInsertId();\n\t\t}\n\n\t\t// clear private variables\n\t\t$this->_clear();\n\n\t\tdebug('->create(), $return', $return);\n\t\treturn $return;\n\t}", "function log_record_add($rec, $sort, $type, $record) {\n $pid = $type.':'.$rec.'.'.$sort;\n if (strlen($record) > 0) {\n lr_set($pid, $record);\n } else {\n lr_clear($pid);\n }\n}", "public function store(Request $request)\n {\n $log=$request->isMethod('put') ? Log::findOrFail\n ($request->$log_id):new Log;\n $log->id = $request->input('log_id');\n $log->lead_this_month = $request->input('lead_this_month');\n $log->lead_till_this_month = $request->input('lead_till_this_month');\n $log->new_lead_this_month = $request->input('new_lead_this_month');\n $log->new_lead_till_this_month = $request->input('new_lead_till_this_month');\n $log->order = $request->input('order');\n $log->employee_id = $request->input('employee_id ');\n $log->month= $request->input('month');\n \n \n if($log->save()){\n return new LogResource($log);\n }\n }", "function dbase_add_record($dbase_identifier, $record)\n{\n}", "function getNewId();", "public function createID()\n {\n $myID = new \\MongoID();\n\n return (string) $myID;\n }", "public function create($id)\n {\n }", "private function generateId() {\n $this->setId(AgaviToolkit::uniqid(\"ldap_conn_\"));\n }", "public function create($fields) {\n \n $fieldService = FieldService::instance();\n $this->handleUploadFields($fields);\n $insertData = $this->prepareData($fields);\n \n //debug($insertData);\n \n $this->db->insert($this->tableName, $insertData);\n \n $insertedId = $this->db->insert_id();\n \n //handle relation fields\n $this->addRelationsFields($fieldService->getAllRelationsFields($fields), $insertedId);\n \n //handle child fields\n $this->addChildFields($fieldService->getAllChildFields($fields), $insertedId);\n \n // handle uploads fields\n $this->handleUploadsFields($fields, $insertedId);\n \n return $insertedId;\n }", "protected function createHistoryRecord() {\n\t\t/** @var HasHistory $model */\n\t\t$model = $this->model;\n\n\t\t$history = HistoryModel::create();\n\t\t$history->save();\n\n\t\t$model->setHistoryId($history->getId());\n\n\t\treturn $history;\n\t}", "public function insert($log) { \r\r\n\r\r\n $query = \"INSERT INTO log (ENTERPRISE_id_enterprise, ip_address, action_datetime) VALUES(?,?,NOW())\";\r\r\n\r\r\n try {\r\r\n $this->pdo->beginTransaction(); // Start transaction\r\r\n $qresult = $this->pdo->prepare($query); \r\r\n $qresult->execute(array($log->getOneEnterprise()->getIdEnterprise(), $log->getIpAddress()));\r\r\n $lastInsertId = $this->pdo->lastInsertId();\r\r\n $this->pdo->commit(); // If all goes well the transaction is validated\r\r\n\r\r\n // $this->pdo = NULL;\r\r\n return ($qresult->rowCount()) ? $lastInsertId : 0; // Returns the last inserted row if insert is OK\r\r\n }\r\r\n catch(Exception $e) // In case of error\r\r\n {\r\r\n // The transaction is cancelled\r\r\n $this->pdo->rollback();\r\r\n\r\r\n // An error message is displayed\r\r\n print 'Tout ne s\\'est pas bien passé, voir les erreurs ci-dessous<br />';\r\r\n print 'Erreur : '.$e->getMessage().'<br />';\r\r\n print 'N° : '.$e->getCode();\r\r\n\r\r\n // Execution of the code is stopped\r\r\n die();\r\r\n }\t\r\r\n }", "public function saveRecord(){\r\n\t\t$db = Zend_Registry::get('db'); // used for all in transaction\r\n\t\t$this->setDbAdapter( $db );\r\n\r\n\t\t$userId = User_Library_Helper_Utils::currentUserId();\r\n\t\tif($userId){\r\n\t\t\t$this->setUserId( $userId );\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->setMessageState( 'missingUserId');\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif( !$this->getMaintenanceRequestId() ){\r\n\t\t\t$this->setMessageState( 'missingRequestId');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttry{\r\n\t\t\t\t$db->beginTransaction();\r\n\t\t\t\t$this->unsetCurrent();\r\n\t\t\t\t$this->setCurrentStatus(1);\r\n\t\t\t\t$id = $this->save();\r\n\t\t\t\t$db->commit();\r\n\t\t\t\treturn $id;\r\n\t\t\t}\r\n\t\t\tcatch ( Exception $e) {\r\n\t\t\t\t$db->rollBack();\r\n\t\t\t\techo $e->getMessage();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function create()\n {\n return 123;\n }", "public static function getLogid(): string\n {\n $contextData = self::getCoroutineContext(self::DATA_KEY);\n $logid = $contextData['logid'] ?? '';\n return $logid;\n }", "protected function createLogFile() {}", "public function pushRecord()\r\n {\r\n\r\n }", "public function createRecord(array $data = array());", "public function create($id)\n {\n\n }", "public function create($id)\n {\n\n }", "abstract public function InsertId();", "public function create() {\n\t\ttry {\n \t\t$sql = 'INSERT INTO blog (name, email, content) VALUES (:name, :email, :content)';\n // create array\n \t\t$data = array(\n\t\t\t 'name' => $this->_name,\n\t\t\t 'email' => $this->_email,\n 'content' => $this->_content,\n\t\t\t);\n\t \t$stmt = $this->_db->prepare($sql);\n\t \t$stmt->execute($data);\n\t\t\t$lastID = $this->_db->lastInsertId();\n return $lastID;\n\n\t\t} catch (Exception $err) {\n \t\tdie(\"Error!: \" . $e->getMessage());\n\t\t}\n }", "public static function Create() {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$record = new Dbi_Record($model, array());\r\n\t\treturn $record;\r\n\t}", "public function created(Modelo $modelo)\n {\n $log = Log::create([\n 'acao' => 'Create', \n 'model' => 'Modelos', \n 'model_id' => $modelo->id, \n 'user_id' => auth()->user()->id \n ]);\n }", "public function __newID() {\n\t\treturn ('#'.$this->_fieldid);\n\t}", "public function create($id)\n {\n //\n\n }", "public static function create_record() {\n\t\t$extension = self::get_extension();\n\t\t$sql = \"INSERT INTO photo_directory (user_id, time_uploaded, extension) VALUES ('{$_SESSION['user_id']}', NOW(), '{$extension}'); \";\n\t\t$do_it_bitch = mysql_query($sql);\n\n\t\t// Create record in photo_description\n\t\t$photo_id = self::max_photo_id();\n\t\t$description = $_POST['description'];\n\t\tif ($description == 'false') {\n\t\t\t$sql = \"INSERT INTO photo_descriptions (photo_id) VALUES ({$photo_id}); \";\n\t\t\t$do_it_bitch = mysql_query($sql);\n\t\t} else {\n\t\t\t$sql = \"INSERT INTO photo_descriptions (photo_id, photo_description) VALUES ({$photo_id}, '{$description}'); \";\n\t\t\t$do_it_bitch = mysql_query($sql);\n\t\t}\n\t}", "function make_record($id, $patient, $doctor, $rad, $type, $p_date, $t_date, $diag, $desc){\n\t$conn = connect();\n\t$sql = \"insert into radiology_record values (\".(string)$id.\", \".(string)$patient.\", \".(string)$doctor.\", \".(string)$rad.\", '\".(string)$type.\"', TO_DATE('\".(string)$p_date.\"', 'YYYY-MM-DD'), TO_DATE('\".(string)$t_date.\"', 'YYYY-MM-DD'), '\".(string)$diag.\"', '\".(string)$desc.\"')\";\n\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\toci_free_statement($statement);\n\t\techo htmlentities($err['message']);\n\t\toci_close($conn);\n\t\treturn FALSE;\n\t}\n\toci_commit($conn);//_______________________________-----------------------------------------------------------------------------------------------\n\toci_free_statement($statement);\n\toci_close($conn);\n}", "protected function _makeId()\n\t{\n\t\treturn JCache::makeId();\n\t}", "protected function generateId()\n {\n }", "public function create($cap = false, $generateNewId = true)\n\t{\n\t\t$query = $this->getCreateQuery($cap, $generateNewId);\n\n\t\t$this->query($query);\n\n\t\t//if applicable, update the \"id\" attribute. If the ID is manually\n\t\t//generated by the user, then do nothing.\n\t\tif ($this->row['id'] == \"NULL\")\n\t\t{\n\t\t\t$this->row['id'] = $this->dbh->insert_id;\n\t\t}\n\t\t$this->wasInited = true;\n\n\t\treturn $this->row['id'];\n\t}", "public function createSequenceNumber($data)\n\t{\n\n\t\t$validator = \\SequenceNumber::validator($data);\n if ($validator->passes()) {\n $record = new \\SequenceNumber();\n $record->fill($data);\n\n /*\n * @todo: assign default values as needed\n */\n $now = new \\DateTime;\n $now_str = $now->format('Y-m-d H:i:s');\n $record->uuid = uniqid();\n $record->created_dt = $now_str;\n $record->updated_dt = $now_str;\n\n $arrModel = $record->toArray();\n $arrModel['_id'] = new \\MongoId();\n $record->sid = (string)$arrModel['_id'];\n\n $this->db_collection->insert( $arrModel );\n\n return $record;\n } else {\n throw new ValidationException($validator);\n }\n\t}", "private function generateId()\n {\n $startHex = dechex((int)$this->startTime);\n $uuid = bin2hex(random_bytes(12));\n\n return \"1-{$startHex}-{$uuid}\";\n }", "public function setIdentifier($record){\n\t\t$record->writeAttribute($this->_identityColumn, $this->generateUUID());\n\t}", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"export_yy_logs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $export_yy_log = new ExportYyLogs();\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"time_from\",\n \"time_to\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n foreach ($post_flds as $post_fld) {\n $export_yy_log->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$export_yy_log->save()) {\n foreach ($export_yy_log->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"export_yy_logs\",\n 'action' => 'new'\n ));\n\n return;\n }\n\n $this->flash->success(\"移出記録の作成が完了しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"export_yy_logs\",\n 'action' => 'edit',\n 'params' => array($export_yy_log->id)\n ));\n }", "public function create($id)\n {\n \n }" ]
[ "0.6707014", "0.66365504", "0.6492538", "0.6251268", "0.60421413", "0.60368884", "0.599039", "0.5909711", "0.59094805", "0.58946997", "0.5893847", "0.5879582", "0.5872317", "0.58366764", "0.57667667", "0.5753124", "0.5729851", "0.5709003", "0.56802166", "0.5651876", "0.5644095", "0.56264246", "0.5619096", "0.5613744", "0.5609768", "0.5605968", "0.56055564", "0.5604944", "0.5578249", "0.55735123", "0.5564589", "0.5561219", "0.5561116", "0.55483997", "0.5537888", "0.553267", "0.5527734", "0.55151975", "0.5515097", "0.5507447", "0.5501298", "0.5501298", "0.5496264", "0.54930407", "0.54930407", "0.54930407", "0.5472424", "0.546718", "0.54459757", "0.54396486", "0.5424063", "0.5423628", "0.5417941", "0.54131544", "0.53965664", "0.53934157", "0.5392124", "0.538161", "0.5381043", "0.5377739", "0.5373468", "0.53732246", "0.5368767", "0.5361164", "0.5358467", "0.53509116", "0.5348905", "0.5343774", "0.5336319", "0.5324468", "0.5323093", "0.5322786", "0.53218406", "0.52990425", "0.529017", "0.52809983", "0.52756083", "0.5273337", "0.5273334", "0.5273107", "0.527106", "0.52691007", "0.5269047", "0.5269047", "0.5264071", "0.5262316", "0.5260184", "0.5252846", "0.525255", "0.5249183", "0.5244997", "0.5241583", "0.5240907", "0.52404255", "0.5233858", "0.5227615", "0.5218089", "0.5216764", "0.521486", "0.52061754" ]
0.6217913
4